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: SDESUTIL

Package: Scheduling

Routine: SDESUTIL


Information

SDESUTIL ;ALB/TAW,KML,LAB,MGD - SDES Utilities ;Sept 01, 2022

Source Information

Source file <SDESUTIL.m>

Call Graph

Call Graph

Call Graph Total: 6

Package Total Call Graph
Kernel 2 ($$DOW,$$FMADD)^XLFDT  $$KSP^XUPARAM  
Scheduling 2 $$STRIP^SDEC07  $$VALIDFMFORMAT^SDECDATE  
VA FileMan 2 $$FIND1^DIC  ($$GET1,GETS)^DIQ  

Caller Graph

Caller Graph Total: 54

Package Total Caller Graph
Scheduling 54 SDAMUTDT  SDEC01A  SDEC01C  SDEC07  SDEC08  SDEC40  SDEC50  SDECEPT  
SDESAPPT  SDESAPPT3  SDESAPPT4  SDESAPPTLETTERS  SDESAPPTREQ40984  SDESAPTREQSET  SDESARCLOSE  SDESARGET  
SDESBLKANDMOVE  SDESBLKANDMOVE1  SDESCANCELAPPT  SDESCANCELAPPTS  SDESCCAVAIL  SDESCHECKINSTEP  SDESCKNSTEP  SDESCLINICAVAIL  
SDESCLINICDATA  SDESCLINICSET  SDESCLNSEARCH  SDESCLNSETAVAIL  SDESCREATEAPPREQ  SDESCREATEAPPT  SDESDISPRECALL  SDESEDITAPPTREQ  
SDESGETAPPTREQ  SDESGETAPPTWRAP2  SDESGETAPPTWRAP4  SDESGETCONSULTS  SDESGETDIVISION  SDESGETLETTERS  SDESGETRECALL  SDESGETREGA  
SDESGETREGA1  SDESGETREQWRAPPR  SDESGETUD  SDESGETUDDUZ  SDESHASHCLIN  SDESINACTCLINIC  SDESINPUTVALUTL  SDESMISSIONELG  
SDESPATRPC  SDESPRINTPATAPPT  SDESRTVCLN  SDESRTVCLN2  SDESUPDRECREQ  SDESUPDRECREQ2  

Entry Points

Name Comments DBIA/ICR reference
PADCLTIME(TIME) ;
; TIME - Time to Pad
PADFMTIME(TIME) ;
; TIME - Time to Pad
PADLENGTH(STRING,CHAR,LENGTH,WHERE) ;
EASVALIDATE(SDEAS) ;
ISDATEDST(DATE,DSTSUM) ;Does this date use Daylight Savings
; DATE - FM format
; DSTSUM - "DST" or "SUM"
; Return 1 = DATE is considered DST or SUM.
; 0 = DATE is not DST and not SUM
; -1 = DATE is not FM format
DSTSTART(YR,DSTSUM) ;Daylight Savings or Summer start date
; countries that observe DST or Summer ST (e.g., USA observes DST and Europe observes SUM ST)
; YR - 2 digit year
; DSTSUM - "DST" or "SUM"
; Return is the FM date for the FIRST day of DST or SUM
DSTEND(YR,DSTSUM) ;Daylight Savings END date
; YR - 2 digit year
; DSTSUM - "DST" or "SUM"
; Return is the FM date for the LAST day of DST or SUM
SUMMER(DSTDT,DOW,SUNDAY) ; determine last Sunday of MARCH or OCTOBER
; DSTDT - March or October (e.g, CYY0301 or CYY1001)
; DOW - 1, 2, 3, 4, 5, or 6
; SUNDAY - "4,5" representing 4th or 5th Sunday of March or October
; Returns the date when SUMMER offset begins or ends (e.g., eastern Europe uses Summer offset)
TIMEZONEDATA(CLINICIEN) ;Get timezone and offsets
; CLINIC - IEN from Hospital Location #44
; If clinic is not passed, use default Facility/Institution
; Output:
; Returns TimeZone Name ^ TimeZone IEN ^ TimeZone Exception ^ Offset for Standard Time ^ Offset for DST or SUMMER ^
GETTZOFFSET(SDDATE,SDCLINIC) ;Get Time Zone offset based on clinic and daylight savings
; SDCLINIC - OPT - IEN from Hospital Location #44
; SDDATE - REQ - FM formatted date
; Return
; If clinic is passed in get Division then Institution
; Otherwise get Institution from Kernel System Parameters
; Get the Time Zone and Time Zone Exception from the Institution
CHAR4(CLINNAME) ;
; CLINNAME - REQ - Name of clinic from #44
; Return
; The CODE (#.01) field from NATIONAL CLINIC (#728.411) file or null
TELEPHONE(PHONE) ; Format all numeric Telephone Number
; PHONE - The Telephone Number
; Return
; If PHONE is all numeric it will be formatted as follows
; 1234567890 will be formatted as (123)456-7890
; otherwise the passed in PHONE is returned.
EXT(EXT) ; Add an x to the beginning of an all numeric Telephone Extension field.
; EXT - The Telephone Extension.
; Return
; If EXT is all numeric, a lowercase x concantenated to the passed in EXT.
; otherwise the passed in EXT is returned.
INACTIVE(SDCL,SDDT) ; determine if clinic is active
; Input:
; SDCL = (Req) IEN of Clinic from file #44.
; SDDT = (Opt) Date to use for determining Status. If not passed in, defaults to DT.
; Return:
; 0=ACTIVE
; 1=INACTIVE
STATIONNUMBER(CLINICIEN) ;
; Input:
; CLINICIEN (Opt) = IEN of the Clinic from File #44. If not passed in, the default
; Institution for the VistA Instance it used.
; Output: The STATION NUMBER (#99) field from the INSTITUTION (#4) file.
AMISTOSTOPCODE(AMIS) ; Map from AMIS to Stop Code
; Input: AMIS = (Req) the AMIS REPORTING STOP CODE (#1) field from the CLINIC STOP (#40.7) file.
; Output: 0:validation failed, IEN for the Stop Code that matches to the passed in AMIS code.
RESCHKFAILED(STOPCODEIEN,RESTYPE) ;
; Input: STOPCODEIEN (Req) IEN from CLINIC STOP (#40.7) file.
; RESTYPE (Req) P for Primary or S for Credit
; Output: 0: Restriction checks passed, 1: Restriction checks failed

External References

Name Field # of Occurrence
$$FIND1^DIC CHAR4+7
$$GET1^DIQ TIMEZONEDATA+9, TIMEZONEDATA+10, TIMEZONEDATA+11, TIMEZONEDATA+12, TIMEZONEDATA+13, TIMEZONEDATA+14, CHAR4+9, STATIONNUMBER+8, STATIONNUMBER+10, STATIONNUMBER+11
, STATIONNUMBER+12, RESCHKFAILED+7
GETS^DIQ TIMEZONEDATA+19
$$STRIP^SDEC07 EASVALIDATE+2
$$VALIDFMFORMAT^SDECDATE ISDATEDST+8, SUMMER+8, GETTZOFFSET+9
$$DOW^XLFDT DSTSTART+12, DSTEND+12
$$FMADD^XLFDT DSTEND+16
$$KSP^XUPARAM STATIONNUMBER+7

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
1.711 GETS^DIQ
^DIC(4 - [#4] GET1^DIQ
^DIC(40.7 - [#40.7] GET1^DIQ
^DG(40.8 - [#40.8] GET1^DIQ
^SC - [#44] GET1^DIQ
^ECX(728.44 - [#728.44] FIND1^DIC,  GET1^DIQ
^XTV(8989.3 - [#8989.3] GET1^DIQ

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^DIC(40.7 - [#40.7] AMISTOSTOPCODE+4, AMISTOSTOPCODE+6, AMISTOSTOPCODE+7
^SC - [#44] INACTIVE+11
^SC("B" CHAR4+6

Label References

Name Line Occurrences
$$DSTEND ISDATEDST+11
$$DSTSTART ISDATEDST+10
$$ISDATEDST GETTZOFFSET+14
$$SUMMER DSTSTART+15, DSTEND+15
$$TIMEZONEDATA GETTZOFFSET+11

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
AMIS AMISTOSTOPCODE~, AMISTOSTOPCODE+3, AMISTOSTOPCODE+4, AMISTOSTOPCODE+6
CHAR PADLENGTH~, PADLENGTH+4
CLINICIEN TIMEZONEDATA~, TIMEZONEDATA+8, TIMEZONEDATA+9, STATIONNUMBER~, STATIONNUMBER+6, STATIONNUMBER+9, STATIONNUMBER+10
CLINNAME CHAR4~, CHAR4+5, CHAR4+6, CHAR4+7
DATE ISDATEDST~, ISDATEDST+7*, ISDATEDST+8, ISDATEDST+9, ISDATEDST+10, ISDATEDST+11
DIVISION STATIONNUMBER+5~, STATIONNUMBER+10*, STATIONNUMBER+11
DOW DSTSTART+5~, DSTSTART+12*, DSTSTART+13, DSTSTART+14, DSTSTART+15, DSTEND+4~, DSTEND+12*, DSTEND+13, DSTEND+14, DSTEND+15
, SUMMER~, SUMMER+6*, SUMMER+8
DSTDT DSTSTART+5~, DSTSTART+10*, DSTSTART+11*, DSTSTART+12, DSTSTART+14*, DSTSTART+15*, DSTSTART+16, DSTEND+4~, DSTEND+10*, DSTEND+11*
, DSTEND+12, DSTEND+14*, DSTEND+15*, DSTEND+16, SUMMER~, SUMMER+6*, SUMMER+8
DSTMONTH DSTSTART+5~, DSTSTART+6*, DSTSTART+10, DSTSTART+11, DSTEND+4~, DSTEND+6*, DSTEND+10, DSTEND+11
DSTSUM ISDATEDST~, ISDATEDST+7*, ISDATEDST+10, ISDATEDST+11, DSTSTART~, DSTSTART+6*, DSTSTART+8, DSTSTART+14, DSTEND~, DSTEND+5*
, DSTEND+6, DSTEND+8, DSTEND+14, TIMEZONEDATA+5~, TIMEZONEDATA+7*, TIMEZONEDATA+22*, TIMEZONEDATA+23*, TIMEZONEDATA+25
DT DSTSTART+10, DSTSTART+11, DSTEND+10, DSTEND+11, INACTIVE+8
EXECPTFLG TIMEZONEDATA+6~, TIMEZONEDATA+7*, TIMEZONEDATA+14*, TIMEZONEDATA+15
EXT EXT~, EXT+5*, EXT+6*, EXT+7
IEN CHAR4+4~, CHAR4+7*, CHAR4+8, CHAR4+9
INACTIVEDATE INACTIVE+7~, INACTIVE+13*, INACTIVE+15, INACTIVE+16
INSTIEN STATIONNUMBER+5~, STATIONNUMBER+11*, STATIONNUMBER+12
LASTSUNDAY SUMMER+5~, SUMMER+7*, SUMMER+8*, SUMMER+9
LENGTH PADLENGTH~, PADLENGTH+2, PADLENGTH+3
NATLCODE CHAR4+4~, CHAR4+9*, CHAR4+10
OFFSET TIMEZONEDATA+5~, TIMEZONEDATA+7*, TIMEZONEDATA+21*, TIMEZONEDATA+25, GETTZOFFSET+7~, GETTZOFFSET+12*, GETTZOFFSET+14*, GETTZOFFSET+15
OFFSETDSTSUM TIMEZONEDATA+5~, TIMEZONEDATA+7*, TIMEZONEDATA+22*, TIMEZONEDATA+23*, TIMEZONEDATA+25
PAD PADLENGTH+1~, PADLENGTH+4*, PADLENGTH+5, PADLENGTH+6
PADST PADLENGTH+1~, PADLENGTH+3*, PADLENGTH+4
PHONE TELEPHONE~, TELEPHONE+6*, TELEPHONE+7*, TELEPHONE+8
POP TIMEZONEDATA+5~, TIMEZONEDATA+7*, TIMEZONEDATA+17, TIMEZONEDATA+20*
REACTIVEDATE INACTIVE+7~, INACTIVE+14*, INACTIVE+17
RESTRICTION RESCHKFAILED+6~, RESCHKFAILED+7*, RESCHKFAILED+8, RESCHKFAILED+9
RESTYPE RESCHKFAILED~, RESCHKFAILED+5, RESCHKFAILED+9
RETURN TIMEZONEDATA+5~
SCODEIEN AMISTOSTOPCODE+5~, AMISTOSTOPCODE+6*, AMISTOSTOPCODE+7
SDCL INACTIVE~, INACTIVE+11
SDCLINIC GETTZOFFSET~, GETTZOFFSET+10*, GETTZOFFSET+11
SDDATE GETTZOFFSET~, GETTZOFFSET+8*, GETTZOFFSET+9, GETTZOFFSET+14
SDDIV TIMEZONEDATA+5~, TIMEZONEDATA+9*, TIMEZONEDATA+10
SDDT INACTIVE~, INACTIVE+8*, INACTIVE+9*, INACTIVE+16, INACTIVE+17
SDEAS EASVALIDATE~, EASVALIDATE+1*, EASVALIDATE+2*, EASVALIDATE+3*, EASVALIDATE+4
SDINST TIMEZONEDATA+5~, TIMEZONEDATA+7*, TIMEZONEDATA+10*, TIMEZONEDATA+11*, TIMEZONEDATA+12, TIMEZONEDATA+13, TIMEZONEDATA+14
SDMSG TIMEZONEDATA+5~
SDNODEI INACTIVE+7~, INACTIVE+11*, INACTIVE+12, INACTIVE+13, INACTIVE+14
SDTIMEZONEE TIMEZONEDATA+5~, TIMEZONEDATA+12*, TIMEZONEDATA+25
SDTIMEZONEI TIMEZONEDATA+5~, TIMEZONEDATA+13*, TIMEZONEDATA+18, TIMEZONEDATA+25
STATIONNUMBER STATIONNUMBER+5~, STATIONNUMBER+6, STATIONNUMBER+7*, STATIONNUMBER+8*, STATIONNUMBER+9, STATIONNUMBER+12*
STATUS INACTIVE+7~, INACTIVE+10*, INACTIVE+12*, INACTIVE+15*, INACTIVE+16*, INACTIVE+17*, INACTIVE+18
STOPCODEIEN RESCHKFAILED~, RESCHKFAILED+4, RESCHKFAILED+7
STRING PADLENGTH~, PADLENGTH+2, PADLENGTH+3, PADLENGTH+5*, PADLENGTH+6*, PADLENGTH+7
SUNDAY DSTSTART+5~, DSTSTART+8*, DSTSTART+14, DSTSTART+15, DSTEND+4~, DSTEND+8*, DSTEND+14, DSTEND+15, SUMMER~, SUMMER+6*
, SUMMER+8
TIME PADCLTIME~, PADCLTIME+2*, PADCLTIME+3, PADCLTIME+4*, PADCLTIME+5, PADFMTIME~, PADFMTIME+2, PADFMTIME+3*, PADFMTIME+4
TIMEFRAMEARY TIMEZONEDATA+5~
TIMEFRAMEARY( TIMEZONEDATA+20, TIMEZONEDATA+21, TIMEZONEDATA+22, TIMEZONEDATA+23
TIMEFRAMEIEN TIMEZONEDATA+5~, TIMEZONEDATA+18*, TIMEZONEDATA+19, TIMEZONEDATA+20, TIMEZONEDATA+21, TIMEZONEDATA+22, TIMEZONEDATA+23
TIMEZONEEXECPT TIMEZONEDATA+5~, TIMEZONEDATA+15*, TIMEZONEDATA+25
TZINFO GETTZOFFSET+7~, GETTZOFFSET+11*, GETTZOFFSET+12, GETTZOFFSET+14
U INACTIVE+13, INACTIVE+14
VALIDSUNDAY SUMMER+5~, SUMMER+8*
WHERE PADLENGTH~, PADLENGTH+5, PADLENGTH+6
X SUMMER+5~, SUMMER+8*, TIMEZONEDATA+5~, TIMEZONEDATA+17*, TIMEZONEDATA+18
YR ISDATEDST+6~, ISDATEDST+9*, ISDATEDST+10, ISDATEDST+11, DSTSTART~, DSTSTART+9*, DSTSTART+10, DSTSTART+11, DSTEND~, DSTEND+9*
, DSTEND+10, DSTEND+11
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