SDES2CRTWALKIN ;ALB/JAS,JAS - VISTA SCHEDULING WALK-IN RPC ; FEB 15 2024 11:07 AM
;;5.3;Scheduling;**869,871**;Aug 13, 1993;Build 13
;;Per VHA Directive 6402, this routine should not be modified
;
Q
;
; RPC: SDES2 CREATE WALKIN APPT
;
; SDCONTEXT("ACHERON AUDIT ID") = 40 character unique ID number. Ex: 11d9dcc6-c6a2-4785-8031-8261576fca37
; SDCONTEXT("USER DUZ") = The DUZ of the user taking action on the calling application.
; SDCONTEXT("USER SECID") = The name of the user taking action on the calling application.
; SDCONTEXT("PATIENT DFN") = The DFN of the Veteran/user taking action on the calling application.
; SDCONTEXT("PATIENT ICN") = The ICN of the Veteran/user taking action on the calling application.
;
; ** Required Parameters **
; PARAMS("APPT START") = APPOINTMENT START TIME - ISO FORMAT
; PARAMS("APPT END") = APPOINTMENT END TIME - ISO FORMAT
; PARAMS("DFN") = PATIENT ID - Pointer to the PATIENT (#2) file
; PARAMS("PATIENT INDICATED DATE") = DESIRED DATE/TIME
; PARAMS("CLINIC IEN") = Pointer to the HOSPITAL LOCATION (#44) file
; PARAMS("APPOINTMENT TYPE NAME") = APPOINTMENT TYPE NAME
; PARAMS("APPT LENGTH") = APPOINTMENT LENGTH
; PARAMS("INSTITUTION NAME") = INSTITUTION NAME (OR STATION NUMBER IS REQUIRED)
; PARAMS("STATION NUMBER") = STATION NUMBER (OR INSTITUTION NAME IS REQUIRED)
;
; * Optional Parameters *
; PARAMS("SDNOTE") = NOTE
; PARAMS("PATIENT STATUS") = PATIENT STATUS - (N/E) N:NEW E:ESTABLISHED
; PARAMS("SDSERVCONN") = SERVICE CONNECTED - YES/NO
; PARAMS("SDSERVCONNPERC") = SERVICE CONNECTED PERCENTAGE - 0-100
; PARAMS("SDPATELIG") = PATIENT ELIGIBILITY
; PARAMS("OVERBOOK") = OVERBOOK
; PARAMS("SDCOLLATERAL") = COLLATERAL
; PARAMS("VAOS GUID") = VAOS GUID
; PARAMS("MODALITY") = MODALITY
; PARAMS("STOP CODE") = STOP CODE
; PARAMS("SECONDARY STOP CODE") = SECONDARY STOP CODE
; PARAMS("PRIORITY GROUP") = PRIORITY GROUP
;
CREATEWALKIN(JSONRETURN,SDCONTEXT,PARAMS) ;
;
N X,Y,REQRESULT,REQARRAY,APPTARRAY,APPTRESULT,%,APPOINTMENT,DISPRESULT
N APPTRETURN,REQRETURN,CHECKIN,DA,DIK,SDERRORS,SDPARAMS,VALRETURN
;
; Validate SDCONTEXT and PARAMS("APPOINTMENT TYPE NAME")
;
D VALCONTEXT^SDES2VALCONTEXT(.SDERRORS,.SDCONTEXT)
I $D(SDERRORS) D BUILDERROR(.SDERRORS,.JSONRETURN) Q
S PARAMS("ORIG USER")=$S($G(SDCONTEXT("USER DUZ"))'="":SDCONTEXT("USER DUZ"),1:DUZ)
S PARAMS("ACHERON AUDIT ID")=$G(SDCONTEXT("ACHERON AUDIT ID"))
;
S PARAMS("RESOURCE IEN")=$S($G(PARAMS("CLINIC IEN"))="":"",1:$$GETRES^SDESINPUTVALUTL($G(PARAMS("CLINIC IEN")),1))
D VALFIELD^SDES2VALUTIL(.VALRETURN,.SDERRORS,409.85,8.7,$G(PARAMS("APPOINTMENT TYPE NAME")),1,,181,180)
I $D(SDERRORS) D BUILDERROR(.SDERRORS,.JSONRETURN) Q
;
D BLDREQARRAY(.REQARRAY,.PARAMS)
D CREATEREQUEST^SDES2CRTAPREQ(.REQRETURN,.SDCONTEXT,.REQARRAY)
D DECODE^XLFJSON("REQRETURN","REQRESULT","ERROR")
I $O(REQRESULT("Error",""))'="" D Q
. D BUILDERROR(.REQRESULT,.JSONRETURN)
;
D BLDAPPTARRAY(.APPTARRAY,.PARAMS)
K TMPJSONRETURN
D CREATE^SDES2CREATEAPPT(.APPTRETURN,.SDCONTEXT,.APPTARRAY)
D DECODE^XLFJSON("APPTRETURN","APPTRESULT","ERROR")
I $O(APPTRESULT("Error",""))'="" D Q
. S DIK="^SDEC(409.85,",DA=$G(REQRESULT("Request","IEN")) D ^DIK
. D BUILDERROR(.APPTRESULT,.JSONRETURN)
;
D DISPOSITIONREQ(.DISPRESULT,.SDCONTEXT,.REQRESULT,.REQUEST)
;
S SDPARAMS("APPOINTMENT IEN")=APPTRESULT("Appointment","IEN")
S SDPARAMS("CHECKIN DATE TIME")=$$FMTISO^SDAMUTDT($$NOW^XLFDT)
D CHECKIN^SDES2CHECKIN(.CHECKIN,.SDCONTEXT,.SDPARAMS)
M APPOINTMENT=REQRESULT
M APPOINTMENT=APPTRESULT
D BUILDJSON^SDES2JSON(.JSONRETURN,.APPOINTMENT)
Q
;
SETEMPTYOBJECT(RETURNERROR) ;set the return object into null if an error occur
S RETURNERROR("Request","IEN")=""
S RETURNERROR("Appointment","IEN")=""
Q
;
DISPOSITIONREQ(DISPRESULT,SDCONTEXT,REQRESULT,REQUEST) ;
NEW DISPARAMS
S DISPARAMS("REQUEST ID")=$G(REQRESULT("Request","IEN"))
S DISPARAMS("PCMT")=$G(REQUEST("VAOS GUID"))
S DISPARAMS("DISP")="REMOVED/SCHEDULED-ASSIGNED"
S DISPARAMS("DISPDT")=$TR($$FMTE^XLFDT($$NOW^XLFDT,"7DZ"),"/","-")
D DISPOSITION^SDES2ARCLOSE(.DISPRESULT,.SDCONTEXT,.DISPARAMS)
Q
;
BUILDERROR(RESULT,JSONRETURN) ;
NEW RETURNERROR
M RETURNERROR=RESULT
D SETEMPTYOBJECT(.RETURNERROR)
D BUILDJSON^SDES2JSON(.JSONRETURN,.RETURNERROR)
Q
;
BLDREQARRAY(REQARRAY,PARAMS) ;build the array to call SDES2 CREATE APPT REQ
N FDA,FDAERR,RETURNIEN
S REQARRAY("DFN")=$G(PARAMS("DFN"))
S REQARRAY("CREATE DATE")=$$FMTISO^SDAMUTDT(DT) ;Needs to be in ISO
S REQARRAY("STATION NUMBER")=$G(PARAMS("STATION NUMBER"))
S REQARRAY("INSTITUTION NAME")=$G(PARAMS("INSTITUTION NAME"))
S REQARRAY("CLINIC IEN")=$G(PARAMS("CLINIC IEN"))
S REQARRAY("REQUEST SUB TYPE")="APPT"
S REQARRAY("REQUESTED BY")="PATIENT"
S REQARRAY("PATIENT INDICATED DATE")=$G(PARAMS("PATIENT INDICATED DATE"))
S REQARRAY("PRIORITY")="ASAP"
S REQARRAY("PRIORITY GROUP")=$G(PARAMS("PRIORITY GROUP"))
S REQARRAY("SERVICE CONNECTED")=$G(PARAMS("SDSERVCONN"))
S REQARRAY("SERVICE CONNECTED PERCENTAGE")=$G(PARAMS("SDSERVCONNPERC"))
S REQARRAY("STOP CODE")=$G(PARAMS("STOP CODE"))
S REQARRAY("SECONDARY STOP CODE")=$G(PARAMS("SECONDARY STOP CODE"))
S REQARRAY("MODALITY")=$G(PARAMS("MODALITY"))
S REQARRAY("APPOINTMENT TYPE")=$G(PARAMS("APPOINTMENT TYPE NAME"))
S REQARRAY("PATIENT STATUS")=$G(PARAMS("PATIENT STATUS"))
S REQARRAY("VAOS GUID")=$G(PARAMS("VAOS GUID"))
S REQARRAY("EAS")=$G(PARAMS("ACHERON AUDIT ID"))
S REQARRAY("REQUEST COMMENT")="AUTO-GENERATED WALKIN REQUEST"
S REQARRAY("MRTC","NEEDED")="NO"
S REQARRAY("CPRS TIME SENSITIVE")="NO"
S REQARRAY("CPRS ORDER NUMBER")=0
S REQARRAY("ORIG USER")=PARAMS("ORIG USER")
Q
;
BLDAPPTARRAY(APPTARRAY,PARAMS) ;Build the appointment array to call SDES2 CREATE APPOINTMENT
S APPTARRAY("START DATE TIME")=$G(PARAMS("APPT START"))
S APPTARRAY("END DATE TIME")=$G(PARAMS("APPT END"))
S APPTARRAY("DFN")=$G(PARAMS("DFN"))
S APPTARRAY("RESOURCE IEN")=$G(PARAMS("RESOURCE IEN"))
S APPTARRAY("WALKIN")="y" ;walk-in
S APPTARRAY("PATIENT INDICATED DATE")=$G(PARAMS("PATIENT INDICATED DATE")) ;this is the CID/PID Date Preferred
S APPTARRAY("EXTERNAL ID")="" ;this is the EXTERNAL ID - (FREE TEXT 1-50), defaulted to NULL since this not needed
S APPTARRAY("REQUEST TYPE")="A|"_$G(REQRESULT("Request","IEN"))
S APPTARRAY("PROVIDER IEN")=""
S APPTARRAY("CLINIC IEN")=$G(PARAMS("CLINIC IEN"))
S APPTARRAY("NOTE")=$G(PARAMS("SDNOTE"))
S APPTARRAY("APPOINTMENT TYPE NAME")=$G(PARAMS("APPOINTMENT TYPE NAME"))
S APPTARRAY("PATIENT STATUS")=$G(PARAMS("PATIENT STATUS"))
S APPTARRAY("APPOINTMENT LENGTH")=$G(PARAMS("APPT LENGTH"))
S APPTARRAY("SERVICE CONNECTED")=$G(PARAMS("SDSERVCONN"))
S APPTARRAY("SERVICE CONNECTED PERCENTAGE")=$G(PARAMS("SDSERVCONNPERC"))
S APPTARRAY("APPOINTMENT REASON")=$G(PARAMS("SDNOTE")) ;Appointment reason
S APPTARRAY("PATIENT ELIGIBILITY")=$G(PARAMS("SDPATELIG")) ;This is PATIENT ELIGIBILITY IEN pointer to DIC(8
S APPTARRAY("OVERBOOK")=$G(PARAMS("OVERBOOK")) ;OVERBOOK (0 for no, 1 for yes)
S APPTARRAY("LAB DATE TIME")="" ;LAB DATE/TIME - ISO FORMAT
S APPTARRAY("XRAY DATE TIME")="" ;XRAY DATE/TIME - ISO FORMAT
S APPTARRAY("EKG DATE TIME")="" ;EKG DATE/TIME - ISO FORMAT
S APPTARRAY("PURPOSE")=4 ;Always set to '4' FOR WALKIN
S APPTARRAY("COLLATERAL")=$G(PARAMS("SDCOLLATERAL")) ;COLLATERAL - 1 FOR YES
S APPTARRAY("SCHEDULE REQUEST TYPE")="W" ;Always set to 'W' FOR 'NEXT AVAILABLE' APPT.
S APPTARRAY("NEXT AVAILABLE APPOINTMENT")=0 ;Always set to 0
S APPTARRAY("FOLLOWUP")=0
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDES2CRTWALKIN 7882 printed Nov 22, 2024@18:03:41 Page 2
SDES2CRTWALKIN ;ALB/JAS,JAS - VISTA SCHEDULING WALK-IN RPC ; FEB 15 2024 11:07 AM
+1 ;;5.3;Scheduling;**869,871**;Aug 13, 1993;Build 13
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 ;
+4 QUIT
+5 ;
+6 ; RPC: SDES2 CREATE WALKIN APPT
+7 ;
+8 ; SDCONTEXT("ACHERON AUDIT ID") = 40 character unique ID number. Ex: 11d9dcc6-c6a2-4785-8031-8261576fca37
+9 ; SDCONTEXT("USER DUZ") = The DUZ of the user taking action on the calling application.
+10 ; SDCONTEXT("USER SECID") = The name of the user taking action on the calling application.
+11 ; SDCONTEXT("PATIENT DFN") = The DFN of the Veteran/user taking action on the calling application.
+12 ; SDCONTEXT("PATIENT ICN") = The ICN of the Veteran/user taking action on the calling application.
+13 ;
+14 ; ** Required Parameters **
+15 ; PARAMS("APPT START") = APPOINTMENT START TIME - ISO FORMAT
+16 ; PARAMS("APPT END") = APPOINTMENT END TIME - ISO FORMAT
+17 ; PARAMS("DFN") = PATIENT ID - Pointer to the PATIENT (#2) file
+18 ; PARAMS("PATIENT INDICATED DATE") = DESIRED DATE/TIME
+19 ; PARAMS("CLINIC IEN") = Pointer to the HOSPITAL LOCATION (#44) file
+20 ; PARAMS("APPOINTMENT TYPE NAME") = APPOINTMENT TYPE NAME
+21 ; PARAMS("APPT LENGTH") = APPOINTMENT LENGTH
+22 ; PARAMS("INSTITUTION NAME") = INSTITUTION NAME (OR STATION NUMBER IS REQUIRED)
+23 ; PARAMS("STATION NUMBER") = STATION NUMBER (OR INSTITUTION NAME IS REQUIRED)
+24 ;
+25 ; * Optional Parameters *
+26 ; PARAMS("SDNOTE") = NOTE
+27 ; PARAMS("PATIENT STATUS") = PATIENT STATUS - (N/E) N:NEW E:ESTABLISHED
+28 ; PARAMS("SDSERVCONN") = SERVICE CONNECTED - YES/NO
+29 ; PARAMS("SDSERVCONNPERC") = SERVICE CONNECTED PERCENTAGE - 0-100
+30 ; PARAMS("SDPATELIG") = PATIENT ELIGIBILITY
+31 ; PARAMS("OVERBOOK") = OVERBOOK
+32 ; PARAMS("SDCOLLATERAL") = COLLATERAL
+33 ; PARAMS("VAOS GUID") = VAOS GUID
+34 ; PARAMS("MODALITY") = MODALITY
+35 ; PARAMS("STOP CODE") = STOP CODE
+36 ; PARAMS("SECONDARY STOP CODE") = SECONDARY STOP CODE
+37 ; PARAMS("PRIORITY GROUP") = PRIORITY GROUP
+38 ;
CREATEWALKIN(JSONRETURN,SDCONTEXT,PARAMS) ;
+1 ;
+2 NEW X,Y,REQRESULT,REQARRAY,APPTARRAY,APPTRESULT,%,APPOINTMENT,DISPRESULT
+3 NEW APPTRETURN,REQRETURN,CHECKIN,DA,DIK,SDERRORS,SDPARAMS,VALRETURN
+4 ;
+5 ; Validate SDCONTEXT and PARAMS("APPOINTMENT TYPE NAME")
+6 ;
+7 DO VALCONTEXT^SDES2VALCONTEXT(.SDERRORS,.SDCONTEXT)
+8 IF $DATA(SDERRORS)
DO BUILDERROR(.SDERRORS,.JSONRETURN)
QUIT
+9 SET PARAMS("ORIG USER")=$SELECT($GET(SDCONTEXT("USER DUZ"))'="":SDCONTEXT("USER DUZ"),1:DUZ)
+10 SET PARAMS("ACHERON AUDIT ID")=$GET(SDCONTEXT("ACHERON AUDIT ID"))
+11 ;
+12 SET PARAMS("RESOURCE IEN")=$SELECT($GET(PARAMS("CLINIC IEN"))="":"",1:$$GETRES^SDESINPUTVALUTL($GET(PARAMS("CLINIC IEN")),1))
+13 DO VALFIELD^SDES2VALUTIL(.VALRETURN,.SDERRORS,409.85,8.7,$GET(PARAMS("APPOINTMENT TYPE NAME")),1,,181,180)
+14 IF $DATA(SDERRORS)
DO BUILDERROR(.SDERRORS,.JSONRETURN)
QUIT
+15 ;
+16 DO BLDREQARRAY(.REQARRAY,.PARAMS)
+17 DO CREATEREQUEST^SDES2CRTAPREQ(.REQRETURN,.SDCONTEXT,.REQARRAY)
+18 DO DECODE^XLFJSON("REQRETURN","REQRESULT","ERROR")
+19 IF $ORDER(REQRESULT("Error",""))'=""
Begin DoDot:1
+20 DO BUILDERROR(.REQRESULT,.JSONRETURN)
End DoDot:1
QUIT
+21 ;
+22 DO BLDAPPTARRAY(.APPTARRAY,.PARAMS)
+23 KILL TMPJSONRETURN
+24 DO CREATE^SDES2CREATEAPPT(.APPTRETURN,.SDCONTEXT,.APPTARRAY)
+25 DO DECODE^XLFJSON("APPTRETURN","APPTRESULT","ERROR")
+26 IF $ORDER(APPTRESULT("Error",""))'=""
Begin DoDot:1
+27 SET DIK="^SDEC(409.85,"
SET DA=$GET(REQRESULT("Request","IEN"))
DO ^DIK
+28 DO BUILDERROR(.APPTRESULT,.JSONRETURN)
End DoDot:1
QUIT
+29 ;
+30 DO DISPOSITIONREQ(.DISPRESULT,.SDCONTEXT,.REQRESULT,.REQUEST)
+31 ;
+32 SET SDPARAMS("APPOINTMENT IEN")=APPTRESULT("Appointment","IEN")
+33 SET SDPARAMS("CHECKIN DATE TIME")=$$FMTISO^SDAMUTDT($$NOW^XLFDT)
+34 DO CHECKIN^SDES2CHECKIN(.CHECKIN,.SDCONTEXT,.SDPARAMS)
+35 MERGE APPOINTMENT=REQRESULT
+36 MERGE APPOINTMENT=APPTRESULT
+37 DO BUILDJSON^SDES2JSON(.JSONRETURN,.APPOINTMENT)
+38 QUIT
+39 ;
SETEMPTYOBJECT(RETURNERROR) ;set the return object into null if an error occur
+1 SET RETURNERROR("Request","IEN")=""
+2 SET RETURNERROR("Appointment","IEN")=""
+3 QUIT
+4 ;
DISPOSITIONREQ(DISPRESULT,SDCONTEXT,REQRESULT,REQUEST) ;
+1 NEW DISPARAMS
+2 SET DISPARAMS("REQUEST ID")=$GET(REQRESULT("Request","IEN"))
+3 SET DISPARAMS("PCMT")=$GET(REQUEST("VAOS GUID"))
+4 SET DISPARAMS("DISP")="REMOVED/SCHEDULED-ASSIGNED"
+5 SET DISPARAMS("DISPDT")=$TRANSLATE($$FMTE^XLFDT($$NOW^XLFDT,"7DZ"),"/","-")
+6 DO DISPOSITION^SDES2ARCLOSE(.DISPRESULT,.SDCONTEXT,.DISPARAMS)
+7 QUIT
+8 ;
BUILDERROR(RESULT,JSONRETURN) ;
+1 NEW RETURNERROR
+2 MERGE RETURNERROR=RESULT
+3 DO SETEMPTYOBJECT(.RETURNERROR)
+4 DO BUILDJSON^SDES2JSON(.JSONRETURN,.RETURNERROR)
+5 QUIT
+6 ;
BLDREQARRAY(REQARRAY,PARAMS) ;build the array to call SDES2 CREATE APPT REQ
+1 NEW FDA,FDAERR,RETURNIEN
+2 SET REQARRAY("DFN")=$GET(PARAMS("DFN"))
+3 ;Needs to be in ISO
SET REQARRAY("CREATE DATE")=$$FMTISO^SDAMUTDT(DT)
+4 SET REQARRAY("STATION NUMBER")=$GET(PARAMS("STATION NUMBER"))
+5 SET REQARRAY("INSTITUTION NAME")=$GET(PARAMS("INSTITUTION NAME"))
+6 SET REQARRAY("CLINIC IEN")=$GET(PARAMS("CLINIC IEN"))
+7 SET REQARRAY("REQUEST SUB TYPE")="APPT"
+8 SET REQARRAY("REQUESTED BY")="PATIENT"
+9 SET REQARRAY("PATIENT INDICATED DATE")=$GET(PARAMS("PATIENT INDICATED DATE"))
+10 SET REQARRAY("PRIORITY")="ASAP"
+11 SET REQARRAY("PRIORITY GROUP")=$GET(PARAMS("PRIORITY GROUP"))
+12 SET REQARRAY("SERVICE CONNECTED")=$GET(PARAMS("SDSERVCONN"))
+13 SET REQARRAY("SERVICE CONNECTED PERCENTAGE")=$GET(PARAMS("SDSERVCONNPERC"))
+14 SET REQARRAY("STOP CODE")=$GET(PARAMS("STOP CODE"))
+15 SET REQARRAY("SECONDARY STOP CODE")=$GET(PARAMS("SECONDARY STOP CODE"))
+16 SET REQARRAY("MODALITY")=$GET(PARAMS("MODALITY"))
+17 SET REQARRAY("APPOINTMENT TYPE")=$GET(PARAMS("APPOINTMENT TYPE NAME"))
+18 SET REQARRAY("PATIENT STATUS")=$GET(PARAMS("PATIENT STATUS"))
+19 SET REQARRAY("VAOS GUID")=$GET(PARAMS("VAOS GUID"))
+20 SET REQARRAY("EAS")=$GET(PARAMS("ACHERON AUDIT ID"))
+21 SET REQARRAY("REQUEST COMMENT")="AUTO-GENERATED WALKIN REQUEST"
+22 SET REQARRAY("MRTC","NEEDED")="NO"
+23 SET REQARRAY("CPRS TIME SENSITIVE")="NO"
+24 SET REQARRAY("CPRS ORDER NUMBER")=0
+25 SET REQARRAY("ORIG USER")=PARAMS("ORIG USER")
+26 QUIT
+27 ;
BLDAPPTARRAY(APPTARRAY,PARAMS) ;Build the appointment array to call SDES2 CREATE APPOINTMENT
+1 SET APPTARRAY("START DATE TIME")=$GET(PARAMS("APPT START"))
+2 SET APPTARRAY("END DATE TIME")=$GET(PARAMS("APPT END"))
+3 SET APPTARRAY("DFN")=$GET(PARAMS("DFN"))
+4 SET APPTARRAY("RESOURCE IEN")=$GET(PARAMS("RESOURCE IEN"))
+5 ;walk-in
SET APPTARRAY("WALKIN")="y"
+6 ;this is the CID/PID Date Preferred
SET APPTARRAY("PATIENT INDICATED DATE")=$GET(PARAMS("PATIENT INDICATED DATE"))
+7 ;this is the EXTERNAL ID - (FREE TEXT 1-50), defaulted to NULL since this not needed
SET APPTARRAY("EXTERNAL ID")=""
+8 SET APPTARRAY("REQUEST TYPE")="A|"_$GET(REQRESULT("Request","IEN"))
+9 SET APPTARRAY("PROVIDER IEN")=""
+10 SET APPTARRAY("CLINIC IEN")=$GET(PARAMS("CLINIC IEN"))
+11 SET APPTARRAY("NOTE")=$GET(PARAMS("SDNOTE"))
+12 SET APPTARRAY("APPOINTMENT TYPE NAME")=$GET(PARAMS("APPOINTMENT TYPE NAME"))
+13 SET APPTARRAY("PATIENT STATUS")=$GET(PARAMS("PATIENT STATUS"))
+14 SET APPTARRAY("APPOINTMENT LENGTH")=$GET(PARAMS("APPT LENGTH"))
+15 SET APPTARRAY("SERVICE CONNECTED")=$GET(PARAMS("SDSERVCONN"))
+16 SET APPTARRAY("SERVICE CONNECTED PERCENTAGE")=$GET(PARAMS("SDSERVCONNPERC"))
+17 ;Appointment reason
SET APPTARRAY("APPOINTMENT REASON")=$GET(PARAMS("SDNOTE"))
+18 ;This is PATIENT ELIGIBILITY IEN pointer to DIC(8
SET APPTARRAY("PATIENT ELIGIBILITY")=$GET(PARAMS("SDPATELIG"))
+19 ;OVERBOOK (0 for no, 1 for yes)
SET APPTARRAY("OVERBOOK")=$GET(PARAMS("OVERBOOK"))
+20 ;LAB DATE/TIME - ISO FORMAT
SET APPTARRAY("LAB DATE TIME")=""
+21 ;XRAY DATE/TIME - ISO FORMAT
SET APPTARRAY("XRAY DATE TIME")=""
+22 ;EKG DATE/TIME - ISO FORMAT
SET APPTARRAY("EKG DATE TIME")=""
+23 ;Always set to '4' FOR WALKIN
SET APPTARRAY("PURPOSE")=4
+24 ;COLLATERAL - 1 FOR YES
SET APPTARRAY("COLLATERAL")=$GET(PARAMS("SDCOLLATERAL"))
+25 ;Always set to 'W' FOR 'NEXT AVAILABLE' APPT.
SET APPTARRAY("SCHEDULE REQUEST TYPE")="W"
+26 ;Always set to 0
SET APPTARRAY("NEXT AVAILABLE APPOINTMENT")=0
+27 SET APPTARRAY("FOLLOWUP")=0
+28 QUIT
+29 ;