SDESREQAPPCREATE ;ALB/RRM,MGD - VISTA SCHEDULING CREATE APPT REQ AND SCHEDULE APPT RPC ;Mar 27, 2023@10:29
Source file <SDESREQAPPCREATE.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
CREATEREQANDAPPT(RETURNJSON,REQUEST) | ;EP for SDES CREATE VET REQ SCHED APPT
; Input: ; REQUEST [Required] - This is the array that contains all necessary data for the creation of the appointment request, ; scheduling the appointment, and then dispositioning the appointment. ; REQUEST("APPOINTMENT END TIME") = (Required) APPT END TIME - ISO FORMAT ; REQUEST("APPOINTMENT LENGTH") = (Required) APPT LENGTH IN MINUTES (5-120) ; REQUEST("APPOINTMENT START TIME") = (Required) APPT START TIME - ISO FORMAT ; REQUEST("CLINIC IEN") = (Required) CLINIC IEN ; REQUEST("CREATE DATE") = (Required) DATE/TIME ENTERED (#409.85,9.5) in ISO8601 date/time format to include offset (e.g. CCYY-MM-DDTHH:MM-NNNN) ; REQUEST("PATIENT INDICATED DATE") = (Required) CID/PID DATE - ISO FORMAT ; REQUEST("DFN") = (Required) PATIENT IEN ; REQUEST("APPOINTMENT REASON") = (Optional) FREE TEXT (1-150) ; REQUEST("COLLATERAL VISIT") = (Optional) COLLATERAL - 1 FOR YES ; REQUEST("APPOINTMENT TYPE IEN") = (Optional) POINTER TO APPOINTMENT TYPE FILE (#409.1) ; REQUEST("APPOINTMENT TYPE NAME") = (Optional) NAME from APPOINTMENT TYPE FILE (#409.1) ; Either APPOINTMENT TYPE IEN or APPOINTMENT TYPE NAME is Required ; REQUEST("EAS") = (Optional) Enterprise APPT Scheduling Tracking Number associated to an appt. ; REQUEST("FOLLOWUP") = (Optional) FOLLOWUP VISIT - 1 FOR YES 0 FOR NO ; REQUEST("INSTITUTION NAME") = (Optional) Institution name from the INSTITUTION file ; REQUEST("MODALITY") = (Optional) Valid Values: FACE2FACE, TELEPHONE, VIDEO ; REQUEST("NOTE") = (Optional) NOTE - FREE TEXT 1-150 ; REQUEST("OVERBOOK") = (Optional) OVERBOOK (0 for no, 1 for yes) ; REQUEST("PATIENT COMMENT") = (Optional) Patient-entered comments when using VAOS or other web-service (stored at 409.85,60 a word processing field) ; REQUEST("PATIENT ELIGIBILITY IEN") = (Optional) ELIGIBILITY IEN ; REQUEST("PATIENT PREFERRED END DATE",1) = (Optional) PATIENT PREFERRED END DATE 1 - ISO FORMAT ; REQUEST("PATIENT PREFERRED END DATE",2) = (Optional) PATIENT PREFERRED END DATE 2 - ISO FORMAT ; REQUEST("PATIENT PREFERRED END DATE",3) = (Optional) PATIENT PREFERRED END DATE 3 - ISO FORMAT ; REQUEST("PATIENT PREFERRED START DATE",1)= (Optional) PATIENT PREFERRED START DATE 1 - ISO FORMAT ; REQUEST("PATIENT PREFERRED START DATE",2)= (Optional) PATIENT PREFERRED START DATE 2 - ISO FORMAT ; REQUEST("PATIENT PREFERRED START DATE",3)= (Optional) PATIENT PREFERRED START DATE 3 - ISO FORMAT ; REQUEST("PATIENT STATUS") = (Optional) PATIENT STATUS - "NEW" OR "ESTABLISHED ; REQUEST("PRIORITY") = (Optional) PRIORITY - "ASAP" or FUTURE ; REQUEST("PRIORITY GROUP") = (Optional) ENROLLMENT PRIORITY - GROUP 1 - GROUP 7 ; REQUEST("REQUEST COMMENT") = (Optional) REQUEST COMMENT ; REQUEST("SECONDARY STOP CODE") = (Optional) Secondary Stop Code Number pointer to CLINIC STOP file #40.7 used to populate the REQ SECONDARY STOP CODE field in 409.85 ; REQUEST("SERVICE CONNECTED") = (Optional) Valid Values: YES, NO ; REQUEST("SERVICE CONNECTED PERCENTAGE") = (Optional) SC % = 0-100 ; REQUEST("STATION NUMBER") = (Optional) STATION NUMBER (#99),INSTITUTION (#4) ; REQUEST("STOP CODE") = (Optional) CLINIC STOP pointer to CLINIC STOP file 40.7 used to populate the REQ SERVICE/SPECIALTY field in 409.85 ; REQUEST("VAOS GUID") = (Optional) VAOS GUID |
|
BUILDAPPTARRAY(REQUEST,REQRESULT,APPTARRAY) | ;build the appointment array based from the REQUEST array
|
|
SETERRORRETURN(ERRORS,RETURNERROR,RETURNJSON) | ;
|
|
SETEMPTYOBJECT(RETURNERROR) | ;set the return object into null if an error occur
|
|
CLEANUP | ;
|
|
RETURNERR(ERRORS) | ;
|
Name | Field # of Occurrence |
---|---|
^DIK | CREATEREQANDAPPT+90 |
$$GET1^DIQ | BUILDAPPTARRAY+14 |
$$ISOTFM^SDAMUTDT | CREATEREQANDAPPT+75, CREATEREQANDAPPT+80 |
DISPOSITION^SDESARCLOSE | CREATEREQANDAPPT+103 |
BUILDJSON^SDESBUILDJSON | CREATEREQANDAPPT+93, CREATEREQANDAPPT+106, SETERRORRETURN+3 |
$$CHKOVERL^SDESCHKAPPTOVP | CREATEREQANDAPPT+76 |
$$BUILDER^SDESCREATEAPPREQ | CREATEREQANDAPPT+81 |
VALIDATE^SDESCREATEAPPREQ | CREATEREQANDAPPT+63 |
VALIDATE^SDESCREATEAPPT | CREATEREQANDAPPT+67 |
VALIDATE^SDESCREATEAPPT2 | CREATEREQANDAPPT+68 |
VALIDATE^SDESCREATEAPPT44 | CREATEREQANDAPPT+70 |
CREATEAPPTS^SDESCRTAPPTWRAP | CREATEREQANDAPPT+86 |
POPULATEARRAYS^SDESCRTAPPTWRAP | CREATEREQANDAPPT+66 |
$$GETRES^SDESINPUTVALUTL | BUILDAPPTARRAY+2 |
$$FMTE^XLFDT | CREATEREQANDAPPT+102 |
$$NOW^XLFDT | CREATEREQANDAPPT+102 |
DECODE^XLFJSON | CREATEREQANDAPPT+87 |
RPC Name | Call Tags |
---|---|
SDES CREATE VET REQ SCHED APPT | CREATEREQANDAPPT |
FileNo | Call Tags |
---|---|
^SD(409.1 - [#409.1] | GET1^DIQ |
^SDEC(409.85 - [#409.85] | Classic Fileman Calls |
Name | Line Occurrences |
---|---|
BUILDAPPTARRAY | CREATEREQANDAPPT+65 |
CLEANUP | CREATEREQANDAPPT+71, CREATEREQANDAPPT+77, CREATEREQANDAPPT+107 |
RETURNERR | CREATEREQANDAPPT+69 |
SETEMPTYOBJECT | CREATEREQANDAPPT+92, SETERRORRETURN+2 |
SETERRORRETURN | CREATEREQANDAPPT+57, CREATEREQANDAPPT+71, CREATEREQANDAPPT+77 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
APPOINTMENT | CREATEREQANDAPPT+51~, CREATEREQANDAPPT+104*, CREATEREQANDAPPT+105*, CREATEREQANDAPPT+106 |
APPTARRAY | CREATEREQANDAPPT+46~, CREATEREQANDAPPT+65, CREATEREQANDAPPT+66, CREATEREQANDAPPT+86, BUILDAPPTARRAY~ |
APPTARRAY( | BUILDAPPTARRAY+15* |
APPTARRAY(1 | BUILDAPPTARRAY+3* |
APPTARRAY(10 | BUILDAPPTARRAY+12* |
APPTARRAY(11 | BUILDAPPTARRAY+13* |
APPTARRAY(12 | BUILDAPPTARRAY+14* |
APPTARRAY(13 | BUILDAPPTARRAY+16* |
APPTARRAY(14 | BUILDAPPTARRAY+17* |
APPTARRAY(15 | BUILDAPPTARRAY+18* |
APPTARRAY(16 | BUILDAPPTARRAY+19* |
APPTARRAY(17 | BUILDAPPTARRAY+20* |
APPTARRAY(18 | BUILDAPPTARRAY+21* |
APPTARRAY(19 | BUILDAPPTARRAY+22* |
APPTARRAY(2 | BUILDAPPTARRAY+4* |
APPTARRAY(20 | BUILDAPPTARRAY+23* |
APPTARRAY(21 | BUILDAPPTARRAY+24* |
APPTARRAY(22 | BUILDAPPTARRAY+25* |
APPTARRAY(23 | BUILDAPPTARRAY+26* |
APPTARRAY(24 | BUILDAPPTARRAY+27* |
APPTARRAY(25 | BUILDAPPTARRAY+28* |
APPTARRAY(26 | BUILDAPPTARRAY+29* |
APPTARRAY(27 | BUILDAPPTARRAY+30* |
APPTARRAY(28 | BUILDAPPTARRAY+31* |
APPTARRAY(29 | BUILDAPPTARRAY+32* |
APPTARRAY(3 | BUILDAPPTARRAY+5* |
APPTARRAY(30 | BUILDAPPTARRAY+33* |
APPTARRAY(4 | BUILDAPPTARRAY+6* |
APPTARRAY(5 | BUILDAPPTARRAY+7* |
APPTARRAY(6 | BUILDAPPTARRAY+8* |
APPTARRAY(7 | BUILDAPPTARRAY+9* |
APPTARRAY(8 | CREATEREQANDAPPT+85*, BUILDAPPTARRAY+10* |
APPTARRAY(9 | BUILDAPPTARRAY+11* |
APPTRESULT | CREATEREQANDAPPT+50~, CREATEREQANDAPPT+91, CREATEREQANDAPPT+105 |
APPTRESULT("Error" | CREATEREQANDAPPT+89 |
ARY2 | CREATEREQANDAPPT+47~, CREATEREQANDAPPT+66, CREATEREQANDAPPT+68 |
ARY44 | CREATEREQANDAPPT+47~, CREATEREQANDAPPT+66, CREATEREQANDAPPT+70 |
ARY84 | CREATEREQANDAPPT+47~, CREATEREQANDAPPT+66, CREATEREQANDAPPT+67 |
CLINICRES | BUILDAPPTARRAY+1~, BUILDAPPTARRAY+2*, BUILDAPPTARRAY+6 |
CNTR | RETURNERR+1~, RETURNERR+4*, RETURNERR+5* |
DA | CREATEREQANDAPPT+46~, CREATEREQANDAPPT+90* |
DIK | CREATEREQANDAPPT+46~, CREATEREQANDAPPT+90* |
DISPBY | CREATEREQANDAPPT+47~, CREATEREQANDAPPT+101*, CREATEREQANDAPPT+103 |
DISPDATE | CREATEREQANDAPPT+47~, CREATEREQANDAPPT+102*, CREATEREQANDAPPT+103 |
DISPOSITION | CREATEREQANDAPPT+47~, CREATEREQANDAPPT+100*, CREATEREQANDAPPT+103 |
DUZ | CREATEREQANDAPPT+101 |
EAS | CREATEREQANDAPPT+46~, CREATEREQANDAPPT+98*, CREATEREQANDAPPT+103 |
ERRORS | CREATEREQANDAPPT+48~, CREATEREQANDAPPT+57, CREATEREQANDAPPT+63, CREATEREQANDAPPT+67, CREATEREQANDAPPT+68, CREATEREQANDAPPT+69, CREATEREQANDAPPT+70, CREATEREQANDAPPT+71, CREATEREQANDAPPT+77*, SETERRORRETURN~ , SETERRORRETURN+1, CLEANUP+1!, RETURNERR~ |
ERRORS("Error" | CREATEREQANDAPPT+56*, CREATEREQANDAPPT+71, CREATEREQANDAPPT+77*, RETURNERR+4, RETURNERR+5! |
INSTITUTIONIEN | CREATEREQANDAPPT+46~, CREATEREQANDAPPT+63, CREATEREQANDAPPT+81, CLEANUP+1! |
ISAPPTOVERLAP | CREATEREQANDAPPT+47~, CREATEREQANDAPPT+76* |
ISAPPTTYPEVALID | CLEANUP+2! |
ISCLINSTOPVALID | CLEANUP+1! |
ISCPRSDATAVALID | CLEANUP+2! |
ISDATEPREFVALID | CLEANUP+2! |
ISDATETIMEVALID | CLEANUP+1! |
ISDFNVALID | CLEANUP+1! |
ISEASVALID | CLEANUP+1! |
ISMODALINVALID | CLEANUP+1! |
ISMODALITYVALID | CLEANUP+1! |
ISMTRCDATAVALID | CLEANUP+2! |
ISPATSTATVALID | CLEANUP+2! |
ISPIDVALID | CLEANUP+2! |
ISPRIGROUPVALID | CLEANUP+2! |
ISPRIORITYVALID | CLEANUP+2! |
ISPROVIDERVALID | CLEANUP+1! |
ISREQTYPEVALID | CLEANUP+2! |
ISREQUESTBYVALID | CLEANUP+1! |
ISSERVCONNVALID | CLEANUP+2! |
LASTSUB | RETURNERR+1~, RETURNERR+4*, RETURNERR+5 |
PCMT | CREATEREQANDAPPT+46~, CREATEREQANDAPPT+99*, CREATEREQANDAPPT+103 |
REQRESULT | CREATEREQANDAPPT+50~, CREATEREQANDAPPT+65, CREATEREQANDAPPT+104, BUILDAPPTARRAY~ |
REQRESULT("Request" | CREATEREQANDAPPT+82*, CREATEREQANDAPPT+90, CREATEREQANDAPPT+97, BUILDAPPTARRAY+10 |
REQUEST | CREATEREQANDAPPT~, CREATEREQANDAPPT+63, CREATEREQANDAPPT+65, CREATEREQANDAPPT+81, BUILDAPPTARRAY~ |
REQUEST("" | CREATEREQANDAPPT+55 |
REQUEST("APPO | INTMENT END TIME" , BUILDAPPTARRAY+4, INTMENT LENGTH" , CREATEREQANDAPPT+74, CREATEREQANDAPPT+76, BUILDAPPTARRAY+17, INTMENT REASON" , BUILDAPPTARRAY+23, INTMENT START TIME" , CREATEREQANDAPPT+74 , CREATEREQANDAPPT+75, BUILDAPPTARRAY+3, INTMENT TYPE IEN" , BUILDAPPTARRAY+14, INTMENT TYPE NAME" , BUILDAPPTARRAY+15 |
REQUEST("CLIN | IC IEN" , BUILDAPPTARRAY+2, BUILDAPPTARRAY+12 |
REQUEST("COLL | ATERAL VISIT" , BUILDAPPTARRAY+30 |
REQUEST("DFN" | CREATEREQANDAPPT+74, CREATEREQANDAPPT+76, BUILDAPPTARRAY+5 |
REQUEST("EAS" | CREATEREQANDAPPT+98, BUILDAPPTARRAY+22 |
REQUEST("FOLLOWUP" | BUILDAPPTARRAY+33 |
REQUEST("NOTE" | BUILDAPPTARRAY+13 |
REQUEST("OVERBOOK" | BUILDAPPTARRAY+25 |
REQUEST("PATI | ENT COMMENT" , CREATEREQANDAPPT+99, ENT ELIGIBILITY IEN" , BUILDAPPTARRAY+24, ENT INDICATED DATE" , CREATEREQANDAPPT+59, CREATEREQANDAPPT+64*, CREATEREQANDAPPT+80*, BUILDAPPTARRAY+8, ENT STATUS" , BUILDAPPTARRAY+16 |
REQUEST("REQU | EST SUB TYPE" , CREATEREQANDAPPT+61*, ESTED BY" , CREATEREQANDAPPT+60* |
REQUEST("SERV | ICE CONNECTED PERCENTAGE" , BUILDAPPTARRAY+19, ICE CONNECTED" , BUILDAPPTARRAY+18 |
REQUESTIEN | CREATEREQANDAPPT+46~, CREATEREQANDAPPT+81*, CREATEREQANDAPPT+82, CREATEREQANDAPPT+85, CREATEREQANDAPPT+97*, CREATEREQANDAPPT+103 |
RETURNERROR | CREATEREQANDAPPT+48~, CREATEREQANDAPPT+57, CREATEREQANDAPPT+71, CREATEREQANDAPPT+77, CREATEREQANDAPPT+91*, CREATEREQANDAPPT+92, CREATEREQANDAPPT+93, SETERRORRETURN~, SETERRORRETURN+1*, SETERRORRETURN+2 , SETERRORRETURN+3, SETEMPTYOBJECT~, CLEANUP+1! |
RETURNERROR("Appointment" | SETEMPTYOBJECT+2* |
RETURNERROR("Request" | SETEMPTYOBJECT+1* |
RETURNJSON | CREATEREQANDAPPT~, CREATEREQANDAPPT+53!, CREATEREQANDAPPT+57, CREATEREQANDAPPT+71, CREATEREQANDAPPT+77, CREATEREQANDAPPT+93, CREATEREQANDAPPT+106, SETERRORRETURN~, SETERRORRETURN+3 |
SDBEGDATE | CREATEREQANDAPPT+46~, CREATEREQANDAPPT+75*, CREATEREQANDAPPT+76 |
SDCIDPREFDATE | CREATEREQANDAPPT+46~, CREATEREQANDAPPT+59*, CREATEREQANDAPPT+64, CREATEREQANDAPPT+80 |
SDREQBY | CREATEREQANDAPPT+47~ |
TMPJSONRETURN | CREATEREQANDAPPT+49~, CREATEREQANDAPPT+76, CREATEREQANDAPPT+86!, CREATEREQANDAPPT+96!, CREATEREQANDAPPT+103 |
TMPJSONRETURN("Overlap" | CREATEREQANDAPPT+74, CREATEREQANDAPPT+77 |