SDESCRTWALKIN ;ALB/LAB,DJS,LAB - VISTA SCHEDULING WALK-IN RPC ; NOV 2,2023
;;5.3;Scheduling;**823,846,866**;Aug 13, 1993;Build 22
;;Per VHA Directive 6402, this routine should not be modified
;----------------- ----------------- ----------
; ^TMP($J SACC 2.3.2.5.1
;
SDECCRTWALKIN(RETN,STRT,ENDTM,DFN,PID,INSNM,CLIN,NOTE,APTYP,PTSTAT,APPTLEN,SRVCON,SRVPC,ELIG,OVB,PRIGRP,VGUID,MOD,STOP,SECSTP,COL,STATNUM,SDEAS) ;
N ARRAY,%DT
D BUILDARR(.ARRAY,$G(STRT),$G(ENDTM),$G(DFN),$G(PID),$G(INSNM),$G(CLIN),$G(NOTE),$G(APTYP),$G(PTSTAT),$G(APPTLEN),$G(SRVCON),$G(SRVPC),$G(ELIG),$G(OVB),$G(PRIGRP),$G(VGUID),$G(MOD),$G(STOP),$G(SECSTP),$G(COL),$G(STATNUM),$G(SDEAS))
D CREATEWALKIN(.RETN,.ARRAY)
Q
BUILDARR(ARRAY,STRT,ENDTM,DFN,PID,INSNM,CLIN,NOTE,APTYP,PTSTAT,APPTLEN,SRVCON,SRVPC,ELIG,OVB,PRIGRP,VGUID,MOD,STOP,SECSTP,COL,STATNUM,SDEAS) ;
S ARRAY("APPT START")=$$FMTISO^SDAMUTDT($$NETTOFM^SDECDATE(STRT,"Y"),CLIN)
S ARRAY("APPT END")=$$FMTISO^SDAMUTDT($$NETTOFM^SDECDATE(ENDTM,"Y"),CLIN)
S ARRAY("DFN")=DFN
S X=PID S %DT="" D ^%DT S PID=Y
S ARRAY("PATIENT INDICATED DATE")=$$FMTISO^SDAMUTDT(PID,"Y")
S ARRAY("CLINIC IEN")=CLIN
S ARRAY("SDNOTE")=NOTE
S ARRAY("APPOINTMENT TYPE IEN")=APTYP
S ARRAY("APPOINTMENT TYPE NAME")=$$GET1^DIQ(409.1,$G(ARRAY("APPOINTMENT TYPE IEN")),.01,"E")
S ARRAY("PATIENT STATUS")=PTSTAT
S ARRAY("APPT LENGTH")=APPTLEN
S ARRAY("SDSERVCONN")=SRVCON
S ARRAY("SDSERVCONNPERC")=SRVPC
S ARRAY("SDEAS")=SDEAS
S ARRAY("SDPATELIG")=ELIG
S ARRAY("OVERBOOK")=OVB
S ARRAY("SDCOLLATERAL")=COL
S ARRAY("INSTITUTION NAME")=INSNM
S ARRAY("VAOS GUID")=VGUID
S ARRAY("MODALITY")=MOD
S ARRAY("STOP CODE")=STOP
S ARRAY("SECONDARY STOP CODE")=SECSTP
S ARRAY("PRIORITY GROUP")=PRIGRP
S ARRAY("STATION NUMBER")=STATNUM
Q
;
CREATEWALKIN(JSONRETURN,ARRAY) ;
N X,Y,REQRESULT,REQARRAY,APPTARRAY,APPTRESULT,%,APPOINTMENT,APPTIEN,DISPRESULT
N APPTRETURN,REQRETURN,CHECKIN,DA,DIK
S ARRAY("RESOURCE IEN")=$S($G(ARRAY("CLINIC IEN"))="":"",1:$$GETRES^SDESINPUTVALUTL($G(ARRAY("CLINIC IEN")),1))
D BLDREQARRAY(.REQARRAY,.ARRAY)
D CREATEREQUEST^SDESCREATEAPPREQ(.REQRETURN,.REQARRAY)
D DECODE^XLFJSON("REQRETURN","REQRESULT","ERROR")
I $O(REQRESULT("Error",""))'="" D Q
. D BUILDERROR(.REQRESULT,.JSONRETURN)
;
D BLDAPPTARRAY(.APPTARRAY,.ARRAY)
K TMPJSONRETURN
D CREATEAPPTS^SDESCRTAPPTWRAP(.APPTRETURN,.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,.REQRESULT,.REQUEST)
;
S APPTIEN=APPTRESULT("Appointment","IEN")
D CHECKIN^SDESCHECKIN(.CHECKIN,APPTIEN,$$FMTISO^SDAMUTDT($$NOW^XLFDT)) ;
M APPOINTMENT=REQRESULT
M APPOINTMENT=APPTRESULT
D BUILDJSON^SDESBUILDJSON(.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,REQRESULT,REQUEST) ;
NEW REQUESTIEN,EAS,PCMT,DISPOSITION,DISPBY,DISPDATE
S REQUESTIEN=$G(REQRESULT("Request","IEN"))
S EAS=$G(REQUEST("EAS"))
S PCMT=$G(REQUEST("VAOS GUID"))
S DISPOSITION="REMOVED/SCHEDULED-ASSIGNED"
S DISPBY=$G(DUZ)
S DISPDATE=$TR($$FMTE^XLFDT($$NOW^XLFDT,"7DZ"),"/","-")
D DISPOSITION^SDESARCLOSE(.DISPRESULT,$G(REQUESTIEN),$G(DISPOSITION),$G(DISPBY),$G(DISPDATE),$G(EAS),$G(PCMT))
Q
;
BUILDERROR(RESULT,JSONRETURN) ;
NEW RETURNERROR
M RETURNERROR=RESULT
D SETEMPTYOBJECT(.RETURNERROR)
D BUILDJSON^SDESBUILDJSON(.JSONRETURN,.RETURNERROR)
Q
;
BLDREQARRAY(REQARRAY,ARRAY) ;build the array to call SDES CREATE APPT REQ
N FDA,FDAERR,RETURNIEN
S REQARRAY("DFN")=$G(ARRAY("DFN"))
S REQARRAY("CREATE DATE")=$$FMTISO^SDAMUTDT(DT) ;Needs to be in ISO
S REQARRAY("STATION NUMBER")=$G(ARRAY("STATION NUMBER"))
S REQARRAY("INSTITUTION NAME")=$G(ARRAY("INSTITUTION NAME"))
S REQARRAY("CLINIC IEN")=$G(ARRAY("CLINIC IEN"))
S REQARRAY("REQUEST SUB TYPE")="APPT"
S REQARRAY("REQUESTED BY")="PATIENT"
S REQARRAY("PATIENT INDICATED DATE")=$G(ARRAY("PATIENT INDICATED DATE"))
S REQARRAY("PRIORITY")="ASAP"
S REQARRAY("PRIORITY GROUP")=$G(ARRAY("PRIORITY GROUP"))
S REQARRAY("SERVICE CONNECTED")=$G(ARRAY("SDSERVCONN"))
S REQARRAY("SERVICE CONNECTED PERCENTAGE")=$G(ARRAY("SDSERVCONNPERC"))
S REQARRAY("STOP CODE")=$G(ARRAY("STOP CODE"))
S REQARRAY("SECONDARY STOP CODE")=$G(ARRAY("SECONDARY STOP CODE"))
S REQARRAY("MODALITY")=$G(ARRAY("MODALITY"))
S REQARRAY("APPOINTMENT TYPE IEN")=$G(ARRAY("APPOINTMENT TYPE IEN"))
S REQARRAY("APPOINTMENT TYPE NAME")=$G(ARRAY("APPOINTMENT TYPE NAME"))
S REQARRAY("PATIENT STATUS")=$G(ARRAY("PATIENT STATUS"))
S REQARRAY("VAOS GUID")=$G(ARRAY("VAOS GUID"))
S REQARRAY("EAS")=$G(ARRAY("SDEAS"))
S REQARRAY("REQUEST COMMENT")="AUTO-GENERATED WALKIN REQUEST"
S REQARRAY("MRTC","NEEDED")="NO"
S REQARRAY("MRTC","HOW MANY NEEDED")=0
S REQARRAY("CPRS TIME SENSITIVE")="NO"
S REQARRAY("CPRS ORDER NUMBER")=0
Q
;
BLDAPPTARRAY(APPTARRAY,ARRAY) ;Build the appointment array to call SDES CREATE APPOINTMENTS
S APPTARRAY(1)=$G(ARRAY("APPT START"))
S APPTARRAY(2)=$G(ARRAY("APPT END"))
S APPTARRAY(3)=$G(ARRAY("DFN"))
S APPTARRAY(4)=$G(ARRAY("RESOURCE IEN"))
S APPTARRAY(5)="y" ;walk-in
S APPTARRAY(6)=$G(ARRAY("PATIENT INDICATED DATE")) ;this is the CID/PID Date Preferred
S APPTARRAY(7)="" ;this is the EXTERNAL ID - (FREE TEXT 1-50), defaulted to NULL since this not needed
S APPTARRAY(8)="A|"_$G(REQRESULT("Request","IEN"))
S APPTARRAY(9)=""
S APPTARRAY(10)=$G(ARRAY("CLINIC IEN"))
S APPTARRAY(11)=$G(ARRAY("SDNOTE"))
S APPTARRAY(12)=$G(ARRAY("APPOINTMENT TYPE IEN"))
S APPTARRAY(12.5)=$G(ARRAY("APPOINTMENT TYPE NAME"))
;S APPTARRAY(12)=$$GET1^DIQ(409.1,$G(ARRAY("APPOINTMENT TYPE IEN")),.01,"E")
S APPTARRAY(13)=$G(ARRAY("PATIENT STATUS"))
S APPTARRAY(14)=$G(ARRAY("APPT LENGTH"))
S APPTARRAY(15)=$G(ARRAY("SDSERVCONN"))
S APPTARRAY(16)=$G(ARRAY("SDSERVCONNPERC"))
S APPTARRAY(17)="FALSE" ;MRTC is set to FALSE since this is a walkin
S APPTARRAY(18)="" ;parent request null
S APPTARRAY(19)=$G(ARRAY("SDEAS"))
S APPTARRAY(20)=$G(ARRAY("SDNOTE")) ;Appointment reason
S APPTARRAY(21)=$G(ARRAY("SDPATELIG")) ;This is PATIENT ELIGIBILITY IEN pointer to DIC(8
S APPTARRAY(22)=$G(ARRAY("OVERBOOK")) ;OVERBOOK (0 for no, 1 for yes)
S APPTARRAY(23)="" ;LAB DATE/TIME - ISO FORMAT
S APPTARRAY(24)="" ;XRAY DATE/TIME - ISO FORMAT
S APPTARRAY(25)="" ;EKG DATE/TIME - ISO FORMAT
S APPTARRAY(26)=4 ;Always set to '4' FOR WALKIN
S APPTARRAY(27)=$G(ARRAY("SDCOLLATERAL")) ;COLLATERAL - 1 FOR YES
S APPTARRAY(28)="W" ;Always set to 'W' FOR 'NEXT AVAILABLE' APPT.
S APPTARRAY(29)=0 ;Always set to 0
S APPTARRAY(30)=0
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDESCRTWALKIN 7074 printed Nov 22, 2024@18:06:20 Page 2
SDESCRTWALKIN ;ALB/LAB,DJS,LAB - VISTA SCHEDULING WALK-IN RPC ; NOV 2,2023
+1 ;;5.3;Scheduling;**823,846,866**;Aug 13, 1993;Build 22
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 ;----------------- ----------------- ----------
+4 ; ^TMP($J SACC 2.3.2.5.1
+5 ;
SDECCRTWALKIN(RETN,STRT,ENDTM,DFN,PID,INSNM,CLIN,NOTE,APTYP,PTSTAT,APPTLEN,SRVCON,SRVPC,ELIG,OVB,PRIGRP,VGUID,MOD,STOP,SECSTP,COL,STATNUM,SDEAS) ;
+1 NEW ARRAY,%DT
+2 DO BUILDARR(.ARRAY,$GET(STRT),$GET(ENDTM),$GET(DFN),$GET(PID),$GET(INSNM),$GET(CLIN),$GET(NOTE),$GET(APTYP),$GET(PTSTAT),...
... $GET(APPTLEN),$GET(SRVCON),$GET(SRVPC),$GET(ELIG),$GET(OVB),$GET(PRIGRP),$GET(VGUID),$GET(MOD),$GET(STOP),$GET(SECSTP),$GET(COL),$GET(STATNUM),$GET(SDEAS))
+3 DO CREATEWALKIN(.RETN,.ARRAY)
+4 QUIT
BUILDARR(ARRAY,STRT,ENDTM,DFN,PID,INSNM,CLIN,NOTE,APTYP,PTSTAT,APPTLEN,SRVCON,SRVPC,ELIG,OVB,PRIGRP,VGUID,MOD,STOP,SECSTP,COL,STATNUM,SDEAS) ;
+1 SET ARRAY("APPT START")=$$FMTISO^SDAMUTDT($$NETTOFM^SDECDATE(STRT,"Y"),CLIN)
+2 SET ARRAY("APPT END")=$$FMTISO^SDAMUTDT($$NETTOFM^SDECDATE(ENDTM,"Y"),CLIN)
+3 SET ARRAY("DFN")=DFN
+4 SET X=PID
SET %DT=""
DO ^%DT
SET PID=Y
+5 SET ARRAY("PATIENT INDICATED DATE")=$$FMTISO^SDAMUTDT(PID,"Y")
+6 SET ARRAY("CLINIC IEN")=CLIN
+7 SET ARRAY("SDNOTE")=NOTE
+8 SET ARRAY("APPOINTMENT TYPE IEN")=APTYP
+9 SET ARRAY("APPOINTMENT TYPE NAME")=$$GET1^DIQ(409.1,$GET(ARRAY("APPOINTMENT TYPE IEN")),.01,"E")
+10 SET ARRAY("PATIENT STATUS")=PTSTAT
+11 SET ARRAY("APPT LENGTH")=APPTLEN
+12 SET ARRAY("SDSERVCONN")=SRVCON
+13 SET ARRAY("SDSERVCONNPERC")=SRVPC
+14 SET ARRAY("SDEAS")=SDEAS
+15 SET ARRAY("SDPATELIG")=ELIG
+16 SET ARRAY("OVERBOOK")=OVB
+17 SET ARRAY("SDCOLLATERAL")=COL
+18 SET ARRAY("INSTITUTION NAME")=INSNM
+19 SET ARRAY("VAOS GUID")=VGUID
+20 SET ARRAY("MODALITY")=MOD
+21 SET ARRAY("STOP CODE")=STOP
+22 SET ARRAY("SECONDARY STOP CODE")=SECSTP
+23 SET ARRAY("PRIORITY GROUP")=PRIGRP
+24 SET ARRAY("STATION NUMBER")=STATNUM
+25 QUIT
+26 ;
CREATEWALKIN(JSONRETURN,ARRAY) ;
+1 NEW X,Y,REQRESULT,REQARRAY,APPTARRAY,APPTRESULT,%,APPOINTMENT,APPTIEN,DISPRESULT
+2 NEW APPTRETURN,REQRETURN,CHECKIN,DA,DIK
+3 SET ARRAY("RESOURCE IEN")=$SELECT($GET(ARRAY("CLINIC IEN"))="":"",1:$$GETRES^SDESINPUTVALUTL($GET(ARRAY("CLINIC IEN")),1))
+4 DO BLDREQARRAY(.REQARRAY,.ARRAY)
+5 DO CREATEREQUEST^SDESCREATEAPPREQ(.REQRETURN,.REQARRAY)
+6 DO DECODE^XLFJSON("REQRETURN","REQRESULT","ERROR")
+7 IF $ORDER(REQRESULT("Error",""))'=""
Begin DoDot:1
+8 DO BUILDERROR(.REQRESULT,.JSONRETURN)
End DoDot:1
QUIT
+9 ;
+10 DO BLDAPPTARRAY(.APPTARRAY,.ARRAY)
+11 KILL TMPJSONRETURN
+12 DO CREATEAPPTS^SDESCRTAPPTWRAP(.APPTRETURN,.APPTARRAY)
+13 DO DECODE^XLFJSON("APPTRETURN","APPTRESULT","ERROR")
+14 IF $ORDER(APPTRESULT("Error",""))'=""
Begin DoDot:1
+15 SET DIK="^SDEC(409.85,"
SET DA=$GET(REQRESULT("Request","IEN"))
DO ^DIK
+16 DO BUILDERROR(.APPTRESULT,.JSONRETURN)
End DoDot:1
QUIT
+17 ;
+18 DO DISPOSITIONREQ(.DISPRESULT,.REQRESULT,.REQUEST)
+19 ;
+20 SET APPTIEN=APPTRESULT("Appointment","IEN")
+21 ;
DO CHECKIN^SDESCHECKIN(.CHECKIN,APPTIEN,$$FMTISO^SDAMUTDT($$NOW^XLFDT))
+22 MERGE APPOINTMENT=REQRESULT
+23 MERGE APPOINTMENT=APPTRESULT
+24 DO BUILDJSON^SDESBUILDJSON(.JSONRETURN,.APPOINTMENT)
+25 QUIT
+26 ;
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,REQRESULT,REQUEST) ;
+1 NEW REQUESTIEN,EAS,PCMT,DISPOSITION,DISPBY,DISPDATE
+2 SET REQUESTIEN=$GET(REQRESULT("Request","IEN"))
+3 SET EAS=$GET(REQUEST("EAS"))
+4 SET PCMT=$GET(REQUEST("VAOS GUID"))
+5 SET DISPOSITION="REMOVED/SCHEDULED-ASSIGNED"
+6 SET DISPBY=$GET(DUZ)
+7 SET DISPDATE=$TRANSLATE($$FMTE^XLFDT($$NOW^XLFDT,"7DZ"),"/","-")
+8 DO DISPOSITION^SDESARCLOSE(.DISPRESULT,$GET(REQUESTIEN),$GET(DISPOSITION),$GET(DISPBY),$GET(DISPDATE),$GET(EAS),$GET(PCMT))
+9 QUIT
+10 ;
BUILDERROR(RESULT,JSONRETURN) ;
+1 NEW RETURNERROR
+2 MERGE RETURNERROR=RESULT
+3 DO SETEMPTYOBJECT(.RETURNERROR)
+4 DO BUILDJSON^SDESBUILDJSON(.JSONRETURN,.RETURNERROR)
+5 QUIT
+6 ;
BLDREQARRAY(REQARRAY,ARRAY) ;build the array to call SDES CREATE APPT REQ
+1 NEW FDA,FDAERR,RETURNIEN
+2 SET REQARRAY("DFN")=$GET(ARRAY("DFN"))
+3 ;Needs to be in ISO
SET REQARRAY("CREATE DATE")=$$FMTISO^SDAMUTDT(DT)
+4 SET REQARRAY("STATION NUMBER")=$GET(ARRAY("STATION NUMBER"))
+5 SET REQARRAY("INSTITUTION NAME")=$GET(ARRAY("INSTITUTION NAME"))
+6 SET REQARRAY("CLINIC IEN")=$GET(ARRAY("CLINIC IEN"))
+7 SET REQARRAY("REQUEST SUB TYPE")="APPT"
+8 SET REQARRAY("REQUESTED BY")="PATIENT"
+9 SET REQARRAY("PATIENT INDICATED DATE")=$GET(ARRAY("PATIENT INDICATED DATE"))
+10 SET REQARRAY("PRIORITY")="ASAP"
+11 SET REQARRAY("PRIORITY GROUP")=$GET(ARRAY("PRIORITY GROUP"))
+12 SET REQARRAY("SERVICE CONNECTED")=$GET(ARRAY("SDSERVCONN"))
+13 SET REQARRAY("SERVICE CONNECTED PERCENTAGE")=$GET(ARRAY("SDSERVCONNPERC"))
+14 SET REQARRAY("STOP CODE")=$GET(ARRAY("STOP CODE"))
+15 SET REQARRAY("SECONDARY STOP CODE")=$GET(ARRAY("SECONDARY STOP CODE"))
+16 SET REQARRAY("MODALITY")=$GET(ARRAY("MODALITY"))
+17 SET REQARRAY("APPOINTMENT TYPE IEN")=$GET(ARRAY("APPOINTMENT TYPE IEN"))
+18 SET REQARRAY("APPOINTMENT TYPE NAME")=$GET(ARRAY("APPOINTMENT TYPE NAME"))
+19 SET REQARRAY("PATIENT STATUS")=$GET(ARRAY("PATIENT STATUS"))
+20 SET REQARRAY("VAOS GUID")=$GET(ARRAY("VAOS GUID"))
+21 SET REQARRAY("EAS")=$GET(ARRAY("SDEAS"))
+22 SET REQARRAY("REQUEST COMMENT")="AUTO-GENERATED WALKIN REQUEST"
+23 SET REQARRAY("MRTC","NEEDED")="NO"
+24 SET REQARRAY("MRTC","HOW MANY NEEDED")=0
+25 SET REQARRAY("CPRS TIME SENSITIVE")="NO"
+26 SET REQARRAY("CPRS ORDER NUMBER")=0
+27 QUIT
+28 ;
BLDAPPTARRAY(APPTARRAY,ARRAY) ;Build the appointment array to call SDES CREATE APPOINTMENTS
+1 SET APPTARRAY(1)=$GET(ARRAY("APPT START"))
+2 SET APPTARRAY(2)=$GET(ARRAY("APPT END"))
+3 SET APPTARRAY(3)=$GET(ARRAY("DFN"))
+4 SET APPTARRAY(4)=$GET(ARRAY("RESOURCE IEN"))
+5 ;walk-in
SET APPTARRAY(5)="y"
+6 ;this is the CID/PID Date Preferred
SET APPTARRAY(6)=$GET(ARRAY("PATIENT INDICATED DATE"))
+7 ;this is the EXTERNAL ID - (FREE TEXT 1-50), defaulted to NULL since this not needed
SET APPTARRAY(7)=""
+8 SET APPTARRAY(8)="A|"_$GET(REQRESULT("Request","IEN"))
+9 SET APPTARRAY(9)=""
+10 SET APPTARRAY(10)=$GET(ARRAY("CLINIC IEN"))
+11 SET APPTARRAY(11)=$GET(ARRAY("SDNOTE"))
+12 SET APPTARRAY(12)=$GET(ARRAY("APPOINTMENT TYPE IEN"))
+13 SET APPTARRAY(12.5)=$GET(ARRAY("APPOINTMENT TYPE NAME"))
+14 ;S APPTARRAY(12)=$$GET1^DIQ(409.1,$G(ARRAY("APPOINTMENT TYPE IEN")),.01,"E")
+15 SET APPTARRAY(13)=$GET(ARRAY("PATIENT STATUS"))
+16 SET APPTARRAY(14)=$GET(ARRAY("APPT LENGTH"))
+17 SET APPTARRAY(15)=$GET(ARRAY("SDSERVCONN"))
+18 SET APPTARRAY(16)=$GET(ARRAY("SDSERVCONNPERC"))
+19 ;MRTC is set to FALSE since this is a walkin
SET APPTARRAY(17)="FALSE"
+20 ;parent request null
SET APPTARRAY(18)=""
+21 SET APPTARRAY(19)=$GET(ARRAY("SDEAS"))
+22 ;Appointment reason
SET APPTARRAY(20)=$GET(ARRAY("SDNOTE"))
+23 ;This is PATIENT ELIGIBILITY IEN pointer to DIC(8
SET APPTARRAY(21)=$GET(ARRAY("SDPATELIG"))
+24 ;OVERBOOK (0 for no, 1 for yes)
SET APPTARRAY(22)=$GET(ARRAY("OVERBOOK"))
+25 ;LAB DATE/TIME - ISO FORMAT
SET APPTARRAY(23)=""
+26 ;XRAY DATE/TIME - ISO FORMAT
SET APPTARRAY(24)=""
+27 ;EKG DATE/TIME - ISO FORMAT
SET APPTARRAY(25)=""
+28 ;Always set to '4' FOR WALKIN
SET APPTARRAY(26)=4
+29 ;COLLATERAL - 1 FOR YES
SET APPTARRAY(27)=$GET(ARRAY("SDCOLLATERAL"))
+30 ;Always set to 'W' FOR 'NEXT AVAILABLE' APPT.
SET APPTARRAY(28)="W"
+31 ;Always set to 0
SET APPTARRAY(29)=0
+32 SET APPTARRAY(30)=0
+33 QUIT
+34 ;