QAOSENT1 ;HISC/DAD-ENTER EDIT AN OCCURRENCE (Cont.) ;2/4/93 08:01
;;3.0;Occurrence Screen;;09/14/1993
S QAOSQUIT=""
F QAOSD0=0:0 S QAOSD0=$O(^QA(741,"AA",QASCRN,QADATE,QANAME,QAOSD0)) Q:QAOSD0'>0 S LOC=$S($D(^QA(741,QAOSD0,0))#2:$P(^(0),"^",11)+1\3+1,1:0) S:LOC $P(QAOSQUIT,"^",LOC)=1
I QAOSQUIT="" S QAOSQUIT=0 G EXIT
I +QAOSQUIT D G EXIT
. W !!?5,"*** THIS OCCURRENCE HAS ALREADY BEEN ENTERED ***",*7
. W !!?5,"To create another similar occurrence screen record for this"
. W !?5,"patient, enter a UNIQUE DATE AND TIME for the occurrence.",!
. S QAOSQUIT=1
. Q
W !!?5,"*** A SIMILAR 'DELETED' OCCURRENCE HAS BEEN FOUND ***",*7,!
ASK ;
W !?5,"Do you want to continue"
S %=2 D YN^DICN S QAOSQUIT=$S(%=2:1,%=-1:1,1:0) G:QAOSQUIT EXIT
I '% D G ASK
. W !!?5,"Please answer Y(es) or N(o)"
. W !!,"Answering Y(es) will add a new record to the file."
. W !,"Answering N(o) will abort the entry process and allow you to enter"
. W !,"a different new record, or you may use the 'Reopen Closed/Deleted"
. W !,"Occurrence Screen Record' option to work with the old record.",!
. Q
EXIT ;
K %,QAOSD0
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HQAOSENT1 1141 printed Dec 13, 2024@02:21:27 Page 2
QAOSENT1 ;HISC/DAD-ENTER EDIT AN OCCURRENCE (Cont.) ;2/4/93 08:01
+1 ;;3.0;Occurrence Screen;;09/14/1993
+2 SET QAOSQUIT=""
+3 FOR QAOSD0=0:0
SET QAOSD0=$ORDER(^QA(741,"AA",QASCRN,QADATE,QANAME,QAOSD0))
if QAOSD0'>0
QUIT
SET LOC=$SELECT($DATA(^QA(741,QAOSD0,0))#2:$PIECE(^(0),"^",11)+1\3+1,1:0)
if LOC
SET $PIECE(QAOSQUIT,"^",LOC)=1
+4 IF QAOSQUIT=""
SET QAOSQUIT=0
GOTO EXIT
+5 IF +QAOSQUIT
Begin DoDot:1
+6 WRITE !!?5,"*** THIS OCCURRENCE HAS ALREADY BEEN ENTERED ***",*7
+7 WRITE !!?5,"To create another similar occurrence screen record for this"
+8 WRITE !?5,"patient, enter a UNIQUE DATE AND TIME for the occurrence.",!
+9 SET QAOSQUIT=1
+10 QUIT
End DoDot:1
GOTO EXIT
+11 WRITE !!?5,"*** A SIMILAR 'DELETED' OCCURRENCE HAS BEEN FOUND ***",*7,!
ASK ;
+1 WRITE !?5,"Do you want to continue"
+2 SET %=2
DO YN^DICN
SET QAOSQUIT=$SELECT(%=2:1,%=-1:1,1:0)
if QAOSQUIT
GOTO EXIT
+3 IF '%
Begin DoDot:1
+4 WRITE !!?5,"Please answer Y(es) or N(o)"
+5 WRITE !!,"Answering Y(es) will add a new record to the file."
+6 WRITE !,"Answering N(o) will abort the entry process and allow you to enter"
+7 WRITE !,"a different new record, or you may use the 'Reopen Closed/Deleted"
+8 WRITE !,"Occurrence Screen Record' option to work with the old record.",!
+9 QUIT
End DoDot:1
GOTO ASK
EXIT ;
+1 KILL %,QAOSD0
+2 QUIT