QAMPINQ5 ;HISC/DAD-INQUIRE: AUDIT FILE ;2/17/93 07:23
;;1.0;Clinical Monitoring System;;09/13/1993
F K DIC S DIC="^QA(743.1,",DIC(0)="AEMNQ",DIC("A")="Select PATIENT: " W ! D ^DIC Q:Y'>0 S QAMD0=+Y D LOOP
K DIC,QAMD0,Y,QAMAUDT,L,BY,FR,TO,FLDS,DHD,%Y,B,DFN,DGA1DGT,DIJ,DP,P
Q
LOOP ;
S QAMAUDT=$S($D(^QA(743.1,QAMD0,"AUDIT"))#2:+^("AUDIT"),1:0)
I $S(QAMAUDT'>0:1,$D(^QA(740.5,QAMAUDT,0))[0:1,1:0) W *7,!!?5,"*** NO AUDIT TRAIL EXISTS FOR THIS RECORD ***",!,*7 Q
S L=0,DIC="^QA(740.5,",BY="@NUMBER",(FR,TO)=QAMAUDT,FLDS=".02;""PATIENT"",1,.01;S1;C5,.03;C33,.02;C47,.04;C5;W70",DHD="CLINICAL MONITORING SYSTEM AUDIT TRAIL"
W ! D EN1^DIP
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HQAMPINQ5 658 printed Dec 13, 2024@01:42:38 Page 2
QAMPINQ5 ;HISC/DAD-INQUIRE: AUDIT FILE ;2/17/93 07:23
+1 ;;1.0;Clinical Monitoring System;;09/13/1993
+2 FOR
KILL DIC
SET DIC="^QA(743.1,"
SET DIC(0)="AEMNQ"
SET DIC("A")="Select PATIENT: "
WRITE !
DO ^DIC
if Y'>0
QUIT
SET QAMD0=+Y
DO LOOP
+3 KILL DIC,QAMD0,Y,QAMAUDT,L,BY,FR,TO,FLDS,DHD,%Y,B,DFN,DGA1DGT,DIJ,DP,P
+4 QUIT
LOOP ;
+1 SET QAMAUDT=$SELECT($DATA(^QA(743.1,QAMD0,"AUDIT"))#2:+^("AUDIT"),1:0)
+2 IF $SELECT(QAMAUDT'>0:1,$DATA(^QA(740.5,QAMAUDT,0))[0:1,1:0)
WRITE *7,!!?5,"*** NO AUDIT TRAIL EXISTS FOR THIS RECORD ***",!,*7
QUIT
+3 SET L=0
SET DIC="^QA(740.5,"
SET BY="@NUMBER"
SET (FR,TO)=QAMAUDT
SET FLDS=".02;""PATIENT"",1,.01;S1;C5,.03;C33,.02;C47,.04;C5;W70"
SET DHD="CLINICAL MONITORING SYSTEM AUDIT TRAIL"
+4 WRITE !
DO EN1^DIP
+5 QUIT