–sp when nurse module is not fetching the result of ct scan in radio module USE [STATION] GO /****** Object: StoredProcedure [dbo].[Nurse_GetCT] Script Date: 02/11/2025 9:28:23 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO –sp when nurse module is not fetching the result of ct scan in radio module ALTER PROCEDURE [dbo].[Nurse_GetCT] @IDNum As Varchar(10) AS --Declare @IDNum As Varchar(10) = '145375' DECLARE @OPDIDNum As Varchar(10) Select @OPDIDNum = Isnull(OPDIDNum,'') From Patient_Data..tbER_Admitting_Communication Where IDNum = @IDNum; if isnull(@OPDIDNum,'') = '' BEGIN Select @OPDIDNum = Isnull(OPDIDNum,'') From Patient_Data..tbpatient Where IDNum = @IDNum; END SELECT tbCTResult.RequestNum [Trans. No], tbCoCTExam.CTExam [Exam. Name], CONVERT(Varchar(20), tbCTResult.TransDate, 0) [Trans. Date], CONVERT(Varchar(20), tbCTResult.ResultDate, 0) [Result Date], rtrim(tbCoDoctor.Lastname) [Dr. LastName], rtrim(tbCoDoctor.Firstname) [Dr. FirstName], rtrim(tbCoDoctor.Middlename) [Dr. MiddleName], tbCTResult.Interpretation [Interpretation] FROM RADIOLOGY..tbCTResult AS tbCTResult LEFT OUTER JOIN BUILD_FILE..tbCoDoctor AS tbCoDoctor ON tbCTResult.RadCode = tbCoDoctor.DoctorID LEFT OUTER JOIN BUILD_FILE..tbCoCTExam AS tbCoCTExam ON tbCTResult.ItemCode = tbCoCTExam.CTExamID LEFT OUTER JOIN RADIOLOGY..tbctrequest AS Req ON Req.RequestNum = tbCTResult.RequestNum --Request --WHERE (tbCTResult.IDNUM = @IDNum or (ISNULL(@OPDIDNum,'') <> '' AND tbCTResult.IDNUM = @OPDIDNum)) and -- (isnull(tbCTResult.VerifyByID,'') <> '' and tbCTResult.Verifydate is not null ) WHERE (isnull(tbCTResult.VerifyByID,'') <> '' and tbCTResult.Verifydate is not null ) AND Req.IdNum = @IDNum ORDER BY [Trans. Date]