Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Entry Points |  FileMan Files Accessed Via FileMan Db Call
Print Page as PDF
Routine: SDES2GETVISIT

Package: Scheduling

Routine: SDES2GETVISIT


Information

SDES2GETVISIT ;ALB/JAS,TJB - SDES2 VISTA SCHEDULING API for Visit Retrieval and Checkin functions ;Jun 17, 2024

Source Information

Source file <SDES2GETVISIT.m>

Entry Points

Name Comments DBIA/ICR reference
GETVISIT(SDOUTPUT,SDINPUT) ;Private Entry Point
; >> All date/time variables must be in FileMan internal format
; Special Incoming Variables:
; SDINPUT("FORCE ADD") = 1 ; no matter what, create new visit (Optional)
; SDINPUT("NEVER ADD") = 1 ; never add visit, just try to find one or more (Optional)
; SDINPUT("ANCILLARY") = 1 ; for ancillary packages to create noon visit if no match found (Optional)
; SDINPUT("SHOW VISITS") = 1 ; this will display visits if more than one match
; Incoming Variables used in Matching: REQUIRED
; SDINPUT("PAT") = patient IEN (file 2 or 9000001)
; SDINPUT("VISIT DATE") = visit date & time (same as check-in date & time)
; SDINPUT ("SITE") = location of encounter IEN (file 4 or 9999999.06)
; SDINPUT("VISIT TYPE") = internal value for field .03 in Visit file
; SDINPUT("SRV CAT") = internal value for service category
; SDINPUT("TIME RANGE") = # ; range in minutes for matching on visit time; REQUIRED unless FORCE ADD set
; ; zero=exact matches only; -1=don't match on time
; These are used to match if sent (Optional)
; SDINPUT("PROVIDER") = IEN for provider to match from file 200
; SDINPUT("CLINIC CODE") = IEN of clinic stop code (file 40.7)
; SDINPUT("HOS LOC") = IEN of hospital location (file 44, field .22 in VISIT file)
; Incoming Variables used in creating appt and visit
; SDINPUT("APPT DATE") = appt date & time (Required for scheduled appts and walk-ins; check-in will be performed)
; SDINPUT("USR") = user IEN in file 200; REQUIRED
; SDINPUT("OPT") = name for Option Used To Create field, for check-in only (Optional)
; SDINPUT("OI") = reason for appointment; for walk-ins (Optional)
; Incoming PCC variables for adding additional info to visit (Optional)
; SDINPUT("SDTPB") = Third Party Billed (#.04)
; SDINPUT("SDPVL") = Parent Visit Link (#.12)
; SDINPUT("SDAPPT") = WalkIn/Appt (#.16)
; SDINPUT("SDEVM") = Evaluation and Management Code (#.17)
; SDINPUT("SDCODT") = Check Out Date & Time (#.18)
; SDINPUT("SDLS") = Level of Service -PCC Form (#.19).
; SDINPUT("SDVELG") = Eligibility (#.21)
; SDINPUT("SDPROT") = Protocol (#.25).
; SDINPUT("SDOPT") = Option Used To Create (#.24)
; SDINPUT("SDOLOC") = Outside Location (#2101)
; Outgoing Array:
; SDOUTPUT(0) always set; if = 0 none found and may have error message in 2nd piece
; if = 1 and SDOUTPUT(visit ien)="ADD" new visit just created
; if = 1 and SDOUTPUT(visit ien)=#; # is time difference in minutes
; if >1, multiple SDOUTPUT(visit ien) entries exist
MATCH(SDOUT,SDINPUT) ; find matching visits based on input array
PRVMTCH(SDINPUT,VIEN) ; do visits match on provider?
TIMEDIF(VDTTM,VIEN) ; return time diff between incoming time and current visit
ADDVIST(SDOUTPUT,SDARRAY)
WALKIN(SDOUT,SDWALKIN) ;Create walkin appt which is checked in and visit created
HAVEREQ(SDOUT,SDINPUT) ; check required fields
TIME(RANGE,VISIT,DATE,END) ; set DATE and END based on TIME RANGE setting in minutes
TRIAGE(VST) ; returns 1 if visit's hosp loc is triage type
MAKE(SDAPPTIN) ;Call to store appt made
CHECKIN(SDAPPTIN) ;Call to add checkin info to appt
SERCAT(CLINIC,PAT) ;Returns service category for visit
SCIEN(PAT,CLINIC,DATE) ;Returns ien for appt in ^SC
GETVST(PAT,DATE) ;Returns visit ien for appt date and patient

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^DPT - [#2] GET1^DIQ
2.98 GET1^DIQ
^SCE - [#409.68] GET1^DIQ
^SC - [#44] GET1^DIQ
44.003 GET1^DIQ
^AUPNVSIT - [#9000010] GET1^DIQ
^AUPNVPRV - [#9000010.06] GET1^DIQ
Info |  Source |  Entry Points |  FileMan Files Accessed Via FileMan Db Call