SDAMEX1 ;ALB/MJK,RMO - Appointment Check In/Check Out Cont. ; 5/6/93
;;5.3;Scheduling;**27**;08/13/93
;
CK(DFN,SDCL,SDT,SDDA,SDACT) ; -- ask 'ok' and call check-in or check-out
; input: DFN
; SDCL := ifn of clinic
; SDT := appt date/time
; SDDA := ifn of ^sc multiple
; SDACT := action CI or CO
; output: none
; returned: check-in/check-out process called [1 := yes | 0 := no]
;
N SDMAX
W !
;
I '$D(^SD(409.63,"ACO",1,+$$STATUS^SDAM1(DFN,SDT,SDCL,$G(^DPT(DFN,"S",SDT,0)),SDDA))) W !!,*7,">>> You can not check in/out this appointment." D PAUSE^VALM1 S Y=0 G CKQ
;
S DIR(0)="Y",DIR("A")="Continue" D ^DIR K DIR
I Y=0!($D(DIRUT)) S Y=0 G CKQ
I SDACT="CI" D
.D ONE^SDAM2(DFN,SDCL,SDT,SDDA,0,"")
I SDACT="CO" D
.D CO^SDCO1(DFN,SDT,SDCL,SDDA,1)
W:$X>47 ! W ?47,"Status: ",$P($$STATUS^SDAM1(DFN,SDT,SDCL,$G(^DPT(DFN,"S",SDT,0)),SDDA),";",3)
S Y=1
CKQ Q Y
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDAMEX1 938 printed Dec 13, 2024@02:47:44 Page 2
SDAMEX1 ;ALB/MJK,RMO - Appointment Check In/Check Out Cont. ; 5/6/93
+1 ;;5.3;Scheduling;**27**;08/13/93
+2 ;
CK(DFN,SDCL,SDT,SDDA,SDACT) ; -- ask 'ok' and call check-in or check-out
+1 ; input: DFN
+2 ; SDCL := ifn of clinic
+3 ; SDT := appt date/time
+4 ; SDDA := ifn of ^sc multiple
+5 ; SDACT := action CI or CO
+6 ; output: none
+7 ; returned: check-in/check-out process called [1 := yes | 0 := no]
+8 ;
+9 NEW SDMAX
+10 WRITE !
+11 ;
+12 IF '$DATA(^SD(409.63,"ACO",1,+$$STATUS^SDAM1(DFN,SDT,SDCL,$GET(^DPT(DFN,"S",SDT,0)),SDDA)))
WRITE !!,*7,">>> You can not check in/out this appointment."
DO PAUSE^VALM1
SET Y=0
GOTO CKQ
+13 ;
+14 SET DIR(0)="Y"
SET DIR("A")="Continue"
DO ^DIR
KILL DIR
+15 IF Y=0!($DATA(DIRUT))
SET Y=0
GOTO CKQ
+16 IF SDACT="CI"
Begin DoDot:1
+17 DO ONE^SDAM2(DFN,SDCL,SDT,SDDA,0,"")
End DoDot:1
+18 IF SDACT="CO"
Begin DoDot:1
+19 DO CO^SDCO1(DFN,SDT,SDCL,SDDA,1)
End DoDot:1
+20 if $X>47
WRITE !
WRITE ?47,"Status: ",$PIECE($$STATUS^SDAM1(DFN,SDT,SDCL,$GET(^DPT(DFN,"S",SDT,0)),SDDA),";",3)
+21 SET Y=1
CKQ QUIT Y