AQAOAUD ; IHS/ORDC/LJF - QAI AUDIT UTILITY ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;PEP >> PRIVATE ENTRY POINT (Called by QI LINKAGES-RPMS pkg.)
;This utility is called to create an entry in the QI Audit file
;each time data is added or changed in the QI Occurrence file and
;QI Action Plan file.
;
;REQUIRED INPUTS: AQAOUDIT("DA")=OCCURRENCE INTERNAL NUMBER
; AQAOUDIT("ACTION")=ACTION CODE
; AQAOUDIT("COMMENT")=ACTION COMMENT
; DUZ=USER'S NUMBER
;OPTIONAL INPUT: AQAOUDIT("REV")=OCC REVIEW INTERNAL NUMBER
;
ADD ; >> add entry to audit file
S %H=$H D YMD^%DTC S AQAOUDIT("DT")=X_% ;date/time created
K DD,DO,DIC S DIC="^AQAGU(",DIC(0)="",X=AQAOUDIT("DT") D FILE^DICN
L -(^AQAGU(0)) ;original locks in calling programs
I Y=-1 G END
;
; >> edit fields
K DIC,DIE S DIE="^AQAGU(",DA=+Y
S DR=".02////"_AQAOUDIT("DA")_";.03////"_DUZ_";.04////"_AQAOUDIT("ACTION")_";.05////"_AQAOUDIT("COMMENT")
I $D(AQAOUDIT("REV")) S DR=DR_";.06////"_AQAOUDIT("REV")
;no lock required; edit only when first entered; never again
D ^DIE
;
;
END ; >> eoj
K DIC,DIE,DR,AQAOUDIT Q
AQAOAUD ; IHS/ORDC/LJF - QAI AUDIT UTILITY ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;PEP >> PRIVATE ENTRY POINT (Called by QI LINKAGES-RPMS pkg.)
+4 ;This utility is called to create an entry in the QI Audit file
+5 ;each time data is added or changed in the QI Occurrence file and
+6 ;QI Action Plan file.
+7 ;
+8 ;REQUIRED INPUTS: AQAOUDIT("DA")=OCCURRENCE INTERNAL NUMBER
+9 ; AQAOUDIT("ACTION")=ACTION CODE
+10 ; AQAOUDIT("COMMENT")=ACTION COMMENT
+11 ; DUZ=USER'S NUMBER
+12 ;OPTIONAL INPUT: AQAOUDIT("REV")=OCC REVIEW INTERNAL NUMBER
+13 ;
ADD ; >> add entry to audit file
+1 ;date/time created
SET %H=$HOROLOG
DO YMD^%DTC
SET AQAOUDIT("DT")=X_%
+2 KILL DD,DO,DIC
SET DIC="^AQAGU("
SET DIC(0)=""
SET X=AQAOUDIT("DT")
DO FILE^DICN
+3 ;original locks in calling programs
LOCK -(^AQAGU(0))
+4 IF Y=-1
GOTO END
+5 ;
+6 ; >> edit fields
+7 KILL DIC,DIE
SET DIE="^AQAGU("
SET DA=+Y
+8 SET DR=".02////"_AQAOUDIT("DA")_";.03////"_DUZ_";.04////"_AQAOUDIT("ACTION")_";.05////"_AQAOUDIT("COMMENT")
+9 IF $DATA(AQAOUDIT("REV"))
SET DR=DR_";.06////"_AQAOUDIT("REV")
+10 ;no lock required; edit only when first entered; never again
+11 DO ^DIE
+12 ;
+13 ;
END ; >> eoj
+1 KILL DIC,DIE,DR,AQAOUDIT
QUIT