SDCO5 ;ALB/RMO - Make Clinic Appt - Check Out;08 DEC 1992 4:05 pm
;;5.3;Scheduling;**27,1001,1012,1015**;08/13/93;Build 21
;cmi/flag/maw 06/08/2010 PATCH 1012 RQMT147 added follow up indicator
;
MC(SDOE,SDASKF,SDCOMKF,SDCOQUIT) ;Entry point for SDCO CLINIC APPT protocol
; Input -- SDOE Outpatient Encounter file IEN
; SDASKF Ask if user wishes to make an appt
; Output -- SDCOMKF User Makes an Appointment
; 1=Yes
; SDCOQUIT User entered '^' or timeout
N DFN,DIRUT,SDAMERR,SDCL,SDCLN,SDDA,SDFN,SDOE0,SDSC,SDT
S VALMBCK=""
I '$G(^SCE(+SDOE,0)) G MCQ ;IHS/ITSC/LJF 5/20/2004 in case OP Encounter never created:PATCH #1001
;
I $G(SDASKF),'$$ASK S:$D(DIRUT) SDCOQUIT="" G MCQ
I $G(SDASKF) S BSDSRFU=1 ;cmi/maw 6/8/2010 PATCH 1012 follow up indicator
S SDOE0=$G(^SCE(+SDOE,0)),SDFN=+$P(SDOE0,"^",2)
I $P(SDOE0,U,4),$P(SDOE0,U,8)'=3 S SDCLN=+$P(SDOE0,"^",4)
;
K SDCLN ;IHS/ITSC/LJF 5/20/2004 make s/w ask for clinic; PATCH #1001
;
D FULL^VALM1
D ^SDM
I $D(SDAMERR) D PAUSE^VALM1
I '$D(SDAMERR) S SDCOMKF=1
D SDM^SDKILL S VALMBCK="R"
MCQ Q
;
ASK() ;Ask if user wishes to make an appt
N DIR,DTOUT,DUOUT,Y
S DIR("A")="Do you wish to make a follow-up appointment"
S DIR("B")="YES",DIR(0)="Y" D ^DIR
Q +$G(Y)
SDCO5 ;ALB/RMO - Make Clinic Appt - Check Out;08 DEC 1992 4:05 pm
+1 ;;5.3;Scheduling;**27,1001,1012,1015**;08/13/93;Build 21
+2 ;cmi/flag/maw 06/08/2010 PATCH 1012 RQMT147 added follow up indicator
+3 ;
MC(SDOE,SDASKF,SDCOMKF,SDCOQUIT) ;Entry point for SDCO CLINIC APPT protocol
+1 ; Input -- SDOE Outpatient Encounter file IEN
+2 ; SDASKF Ask if user wishes to make an appt
+3 ; Output -- SDCOMKF User Makes an Appointment
+4 ; 1=Yes
+5 ; SDCOQUIT User entered '^' or timeout
+6 NEW DFN,DIRUT,SDAMERR,SDCL,SDCLN,SDDA,SDFN,SDOE0,SDSC,SDT
+7 SET VALMBCK=""
+8 ;IHS/ITSC/LJF 5/20/2004 in case OP Encounter never created:PATCH #1001
IF '$GET(^SCE(+SDOE,0))
GOTO MCQ
+9 ;
+10 IF $GET(SDASKF)
IF '$$ASK
IF $DATA(DIRUT)
SET SDCOQUIT=""
GOTO MCQ
+11 ;cmi/maw 6/8/2010 PATCH 1012 follow up indicator
IF $GET(SDASKF)
SET BSDSRFU=1
+12 SET SDOE0=$GET(^SCE(+SDOE,0))
SET SDFN=+$PIECE(SDOE0,"^",2)
+13 IF $PIECE(SDOE0,U,4)
IF $PIECE(SDOE0,U,8)'=3
SET SDCLN=+$PIECE(SDOE0,"^",4)
+14 ;
+15 ;IHS/ITSC/LJF 5/20/2004 make s/w ask for clinic; PATCH #1001
KILL SDCLN
+16 ;
+17 DO FULL^VALM1
+18 DO ^SDM
+19 IF $DATA(SDAMERR)
DO PAUSE^VALM1
+20 IF '$DATA(SDAMERR)
SET SDCOMKF=1
+21 DO SDM^SDKILL
SET VALMBCK="R"
MCQ QUIT
+1 ;
ASK() ;Ask if user wishes to make an appt
+1 NEW DIR,DTOUT,DUOUT,Y
+2 SET DIR("A")="Do you wish to make a follow-up appointment"
+3 SET DIR("B")="YES"
SET DIR(0)="Y"
DO ^DIR
+4 QUIT +$GET(Y)