Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Local Variables  | All
Print Page as PDF
Routine: SDECAPI4

Package: Scheduling

Routine: SDECAPI4


Information

SDECAPI4 ;ALB/SAT - VISTA SCHEDULING RPCS ;JAN 15, 2016

Source Information

Source file <SDECAPI4.m>

Call Graph

Call Graph

Call Graph Total: 7

Package Total Call Graph
Scheduling 4 EN1^SDECALV  ($$CHECKIN,$$MAKE)^SDECAPI  ($$GETVST,$$SCIEN)^SDECU2  $$SERCAT^SDECV  
Kernel 2 ($$FMADD,$$FMDIFF)^XLFDT  $$ABS^XLFMTH  
VA FileMan 1 $$GET1^DIQ  

Caller Graph

Legends:

Legend of Colors

Package Component Superscript legend

action A extended action Ea event driver Ed subscriber Su protocol O limited protocol LP run routine RR broker B edit E server Se print P screenman SM inquire I

Caller Graph

Caller Graph Total: 4

Package Total Caller Graph
Scheduling 4 SDEC25  SDECV  SDES25  SDESCHECKIN  

Entry Points

Name Comments DBIA/ICR reference
GETVISIT(BSDIN,BSDOUT) ;Private Entry Point
; >> All date/time variables must be in FileMan internal format
; Special Incoming Variables:
; BSDIN("FORCE ADD") = 1 ; no matter what, create new visit (Optional)
; BSDIN ("NEVER ADD") = 1 ; never add visit, just try to find one or more (Optional)
; BSDIN("ANCILLARY") = 1 ; for ancillary packages to create noon visit if no match found (Optional)
; BSDIN("SHOW VISITS") = 1 ; this will display visits if more than one match
; Incoming Variables used in Matching: REQUIRED
; BSDIN("PAT") = patient IEN (file 2 or 9000001)
; BSDIN("VISIT DATE") = visit date & time (same as check-in date & time)
; BSDIN ("SITE") = location of encounter IEN (file 4 or 9999999.06)
; BSDIN("VISIT TYPE") = internal value for field .03 in Visit file
; BSDIN("SRV CAT") = internal value for service category
; BSDIN("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)
; BSDIN("PROVIDER") = IEN for provider to match from file 200
; BSDIN("CLINIC CODE") = IEN of clinic stop code (file 40.7)
; BSDIN("HOS LOC") = IEN of hospital location (file 44, field .22 in VISIT file)
; BSDIN("DEF CC") = IEN of default clinic code for package making call PATCH 1009
; BSDIN("DEF HL") = IEN of default hospital location for package making call PATCH 1009
; Incoming Variables used in creating appt and visit
; BSDIN("APPT DATE") = appt date & time (Required for scheduled appts and walk-ins; check-in will be performed)
; BSDIN("USR") = user IEN in file 200; REQUIRED
; BSDIN("OPT") = name for Option Used To Create field, for check-in only (Optional)
; BSDIN("OI") = reason for appointment; for walk-ins (Optional)
; Incoming PCC variables for adding additional info to visit (Optional)
; BSDIN("SDTPB") = Third Party Billed (#.04)
; BSDIN("SDPVL") = Parent Visit Link (#.12)
; BSDIN("SDAPPT") = WalkIn/Appt (#.16)
; BSDIN("SDEVM") = Evaluation and Management Code (#.17)
; BSDIN("SDCODT") = Check Out Date & Time (#.18)
; BSDIN("SDLS") = Level of Service -PCC Form (#.19).
; BSDIN("SDVELG") = Eligibility (#.21)
; BSDIN("SDPROT") = Protocol (#.25).
; BSDIN("SDOPT") = Option Used To Create (#.24)
; BSDIN("SDOLOC") = Outside Location (#2101)
; Outgoing Array:
; BSDOUT(0) always set; if = 0 none found and may have error message in 2nd piece
; if = 1 and BSDOUT(visit ien)="ADD" new visit just created
; if = 1 and BSDOUT(visit ien)=#; # is time difference in minutes
; if >1, multiple BSDOUT(visit ien) entries exist
APPTDT ;
MATCH(IN,OUT) ; find matching visits based on IN array
PRVMTCH() ; do visits match on provider?
TIMEDIF(VDTTM,VIEN) ; return time diff between incoming time and current visit
ADDVIST(BSDTMP,BSDOUT)
WALKIN(BSDATA,OUT) ;EP; create walkin appt which is checked in and visit created
; also called by BSDAPI3 to create ancillary walkin appt
HAVEREQ(IN,OUT) ; 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

External References

Name Field # of Occurrence
$$GET1^DIQ MATCH+8, MATCH+9, MATCH+10, MATCH+13, MATCH+14, MATCH+15, MATCH+16, MATCH+25, MATCH+26, MATCH+29
, MATCH+31, WALKIN+7, HAVEREQ+8, TRIAGE+2, TRIAGE+3
EN1^SDECALV ADDVIST+18
$$CHECKIN^SDECAPI APPTDT+17, WALKIN+15
$$MAKE^SDECAPI WALKIN+9
$$GETVST^SDECU2 APPTDT+19, WALKIN+18
$$SCIEN^SDECU2 APPTDT+8
$$SERCAT^SDECV HAVEREQ+10
$$FMADD^XLFDT TIME+3, TIME+4
$$FMDIFF^XLFDT TIMEDIF+1
$$ABS^XLFMTH MATCH+20

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^SC - [#44] GET1^DIQ
^AUPNVSIT - [#9000010] GET1^DIQ

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^AUPNVPRV - [#9000010.06] PRVMTCH+7
^AUPNVPRV("AD" PRVMTCH+6
^AUPNVSIT - [#9000010] TIMEDIF+1
^AUPNVSIT("AA" MATCH+5, MATCH+7
^DIC(19 - [#19] GETVISIT+49, GETVISIT+51, GETVISIT+53

Label References

Name Line Occurrences
$$HAVEREQ GETVISIT+44
$$PRVMTCH MATCH+21
$$TIMEDIF MATCH+19, MATCH+34
$$TRIAGE MATCH+31, PRVMTCH+4
ADDVIST GETVISIT+54, APPTDT+3
MATCH GETVISIT+56
TIME MATCH+4
WALKIN APPTDT+22

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
%DT ADDVIST+1~
BSDATA WALKIN~, WALKIN+9, WALKIN+15
BSDATA("ADT" WALKIN+6*
BSDATA("APPT DATE" , WALKIN+6, WALKIN+18
BSDATA("CC" WALKIN+12*
BSDATA("CDT" WALKIN+11*
BSDATA("CLINI C CODE" , WALKIN+12
BSDATA("CLN" WALKIN+4*, WALKIN+7
BSDATA("HOS L OC" , WALKIN+4
BSDATA("LEN" WALKIN+7*
BSDATA("PAT" WALKIN+18
BSDATA("PROVIDER" WALKIN+13
BSDATA("PRV" WALKIN+13*
BSDATA("TYP" WALKIN+5*
BSDATA("VISIT DATE" , WALKIN+11
BSDIN GETVISIT~, GETVISIT+43
BSDOUT GETVISIT~, GETVISIT+42!, GETVISIT+44, GETVISIT+54, GETVISIT+56, APPTDT+3, APPTDT+22, ADDVIST~
BSDOUT( APPTDT+19*, ADDVIST+23*
BSDOUT(0 APPTDT+5, APPTDT+19*, APPTDT+20*, ADDVIST+21*, ADDVIST+23*
BSDTMP GETVISIT+42~, GETVISIT+43*, GETVISIT+44, GETVISIT+54, GETVISIT+56, APPTDT+3, APPTDT+17, APPTDT+22, ADDVIST~
BSDTMP( ADDVIST+3
BSDTMP("ADT" APPTDT+16*
BSDTMP("APPT DATE" , APPTDT+3, APPTDT+8, APPTDT+16, APPTDT+19, ADDVIST+12
BSDTMP("CALLER" APPTDT+1
BSDTMP("CC" APPTDT+12*
BSDTMP("CDT" APPTDT+11*
BSDTMP("CLINI C CODE" , APPTDT+12, ADDVIST+10
BSDTMP("CLN" APPTDT+15*
BSDTMP("FORCE ADD" , GETVISIT+54, GETVISIT+56
BSDTMP("HOS L OC" , APPTDT+8, APPTDT+15, ADDVIST+11
BSDTMP("OPT" GETVISIT+49, GETVISIT+50, GETVISIT+51
BSDTMP("PAT" APPTDT+8, APPTDT+19, ADDVIST+6
BSDTMP("PROVIDER" APPTDT+13
BSDTMP("PRV" APPTDT+13*
BSDTMP("SDCODT" ADDVIST+15
BSDTMP("SDOPT" GETVISIT+48, GETVISIT+49*, GETVISIT+50*, GETVISIT+51*, GETVISIT+52*, GETVISIT+53*
BSDTMP("SITE" ADDVIST+5
BSDTMP("SRV C AT" , ADDVIST+8
BSDTMP("USR" ADDVIST+13
BSDTMP("VIEN" APPTDT+5*, APPTDT+19, WALKIN+18
BSDTMP("VISIT DATE" , APPTDT+11, ADDVIST+9,  TYPE" , ADDVIST+7
DATE MATCH+2~, MATCH+4, MATCH+5*, MATCH+7, TIME~, TIME+3*, TIME+5*, TIME+6*, TIME+8*
DIFF MATCH+2~, MATCH+19*, MATCH+20
END MATCH+2~, MATCH+4, MATCH+5, TIME~, TIME+4*, TIME+5*, TIME+7*, TIME+8*
ERR APPTDT+7~, APPTDT+17*, APPTDT+19, APPTDT+20, WALKIN+2~, WALKIN+9*, WALKIN+15*, WALKIN+18, WALKIN+19
HL TRIAGE+1~, TRIAGE+2*, TRIAGE+3
IEN APPTDT+7~, APPTDT+8*, APPTDT+9, PRVMTCH+1~, PRVMTCH+6*, PRVMTCH+7
IN MATCH~, HAVEREQ~
IN("ANCILLARY" MATCH+15, MATCH+16, MATCH+24, PRVMTCH+4
IN("APPT DATE " , MATCH+31, HAVEREQ+10
IN("CLINIC CO DE" , MATCH+25*, MATCH+26, HAVEREQ+8*
IN("FORCE ADD " , HAVEREQ+1
IN("HOS LOC" MATCH+25, MATCH+29, HAVEREQ+8, HAVEREQ+10
IN("PAT" MATCH+5, MATCH+7, HAVEREQ+2, HAVEREQ+10
IN("PROVIDER" PRVMTCH+2, PRVMTCH+9
IN("SITE" MATCH+9, HAVEREQ+4
IN("SRV CAT" MATCH+12, MATCH+14, MATCH+15, MATCH+16, HAVEREQ+6, HAVEREQ+10*
IN("TIME RANG E" , MATCH+4, MATCH+18, MATCH+20, HAVEREQ+1
IN("USR" HAVEREQ+7
IN("VISIT DAT E" , MATCH+4, MATCH+19, MATCH+34, HAVEREQ+3
IN("VISIT TYP E" , MATCH+10, HAVEREQ+5
MATCH MATCH+2~, MATCH+3*, MATCH+14*, MATCH+15*, MATCH+16*, MATCH+17
OUT MATCH~, WALKIN~, HAVEREQ~
OUT( MATCH+34*, WALKIN+18*
OUT(0 MATCH+1*, MATCH+33*, WALKIN+3*, WALKIN+9*, WALKIN+18*, WALKIN+19*, HAVEREQ+1*, HAVEREQ+2*, HAVEREQ+3*, HAVEREQ+4*
, HAVEREQ+5*, HAVEREQ+6*, HAVEREQ+7*
PRVS PRVMTCH+1~
PRVS( PRVMTCH+7*, PRVMTCH+9
RANGE TIME~, TIME+2, TIME+8
SDALVR ADDVIST+1~, ADDVIST+18
SDALVR( ADDVIST+3*
SDALVR("AUPNTALK" ADDVIST+4*
SDALVR("SDADD" ADDVIST+14*
SDALVR("SDANE" ADDVIST+4*
SDALVR("SDAPDT" ADDVIST+12*
SDALVR("SDCAT" ADDVIST+8*
SDALVR("SDCLN" ADDVIST+10*
SDALVR("SDDATE" ADDVIST+9*
SDALVR("SDHL" ADDVIST+11*
SDALVR("SDLOC" ADDVIST+5*
SDALVR("SDPAT" ADDVIST+6*
SDALVR("SDTYPE" ADDVIST+7*
SDALVR("SDUSR" ADDVIST+13*
SDALVR("SDVSIT" ADDVIST+20, ADDVIST+23
SDCODT ADDVIST+2~, ADDVIST+15*
SDDATE ADDVIST+2~, ADDVIST+9*
SDHL ADDVIST+2~, ADDVIST+11*
SDLOC ADDVIST+2~, ADDVIST+5*
SDPAT ADDVIST+2~, ADDVIST+6*
STOP MATCH+2~, MATCH+18*, MATCH+20*, MATCH+24*, MATCH+26*, MATCH+29*, MATCH+31*
SUB ADDVIST+1~, ADDVIST+3*
SW TIME+1~, TIME+5*
TMDIF TIME+1~, TIME+2*, TIME+3, TIME+4
U APPTDT+20, WALKIN+9, WALKIN+19
V APPTDT+7~, APPTDT+19*, WALKIN+2~, WALKIN+18*
VDTTM TIMEDIF~, TIMEDIF+1
VIEN MATCH+2~, MATCH+6*, MATCH+7*, MATCH+8, MATCH+9, MATCH+10, MATCH+13, MATCH+14, MATCH+15, MATCH+16
, MATCH+19, MATCH+26, MATCH+29, MATCH+31, MATCH+34, PRVMTCH+4, PRVMTCH+6, TIMEDIF~, TIMEDIF+1
VISIT TIME~, TIME+3, TIME+4
VST TRIAGE~, TRIAGE+2
X ADDVIST+1~
Y ADDVIST+1~
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Local Variables  | All