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 |  Naked Globals |  Local Variables  | All
Print Page as PDF
Routine: HMPUTILS

Package: Enterprise Health Management Platform

Routine: HMPUTILS


Information

HMPUTILS ;SLC/AGP,ASMR/ASF,JC-HMP utilities ;Jan 20, 2017 17:18:18

Source Information

Source file <HMPUTILS.m>

Call Graph

Call Graph

Call Graph Total: 11

Package Total Call Graph
Kernel 5 $$CRC16^XLFCRC  $$FMADD^XLFDT  $$UP^XLFSTR  $$BASE^XLFUTL  $$KSP^XUPARAM  
Enterprise Health Management Platform 4 $$GETSECS^HMPDJFSP  STATUS^HMPMETA  $$FMTHL7^HMPSTMP  $$SYS^HMPUTILS  
Toolkit 1 ($$GET,GETLST)^XPAR  
VA FileMan 1 FIND^DIC  

Caller Graph

Caller Graph Total: 51

Package Total Caller Graph
Enterprise Health Management Platform 51 HMPAT  HMPCAC  HMPCORD4  HMPCORD5  HMPCRPC1  HMPDCRC  HMPDJ  HMPDJ00  
HMPDJ01  HMPDJ02  HMPDJ03  HMPDJ04  HMPDJ04A  HMPDJ04E  HMPDJ05  HMPDJ05V  
HMPDJ06  HMPDJ07  HMPDJ08  HMPDJ09  HMPDJ09M  HMPDJ1  HMPDJ2  HMPDJFS  
HMPDJFSG  HMPDJFSP  HMPDJFSQ  HMPDJX  HMPEASU  HMPEF  HMPEF1  HMPELAB  
HMPFPTC  HMPHTTP  HMPMETA  HMPMON  HMPMONX  HMPPARAM  HMPPTRPC  HMPPXRM  
HMPROS8  HMPSTMP  HMPTFU2  HMPUTIL1  HMPUTIL2  HMPUTILS  HMPWB1  HMPWB2  
HMPWB5  HMPWBIM1  HMPYCSO  

Entry Points

Name Comments DBIA/ICR reference
CHKSP(HMPFHMP) ; ^XTMP check before patient subscription starts to cache *BEGIN*S68-PJH
; HMPFHMP - server name
SETERROR(RESULT,ERROR,EXTERROR,DATA) ; -- error text for JSON
SETERRTX(TEMP,ERROR) ; concatenate errors from ERROR array, put CR, LF between them
SETTEXT(X,VALUE) ; -- format word processing text
SPLITVAL(NODE,ARRAY) ; -- split a value into a list
SETPROV(NODE,PROV) ; -- providers
SETUID(DOMAIN,PAT,ID,ADDDATA) ; function, UID string
SETFCURN(DOMAIN,FACILITY,VALUE) ; function, create facility URN
SETVURN(DOMAIN,VALUE) ; function, create VA urn
SYS(NAME) ; -- return hashed system name from HMP SYSTEM NAME parameter, or calculate from NAME parameter if it exists
; DE4463 4/22/2016 CK - changed HMP routines to all call this function
; SYS^HMPUTILS returns a 4 digit hashed site, padded with leading zeros
SETNCS(CODESET,VALUE) ; -- create national codeset URN
JSONDT(X) ; function, convert FileMan date-time to HL7 date-time for JSON
FACILITY(X,Y) ; -- add facility info to array for JSON
; X=STATION NUMBER^STATION NAME
; Y=Variable array name
; >D FACILITY^HMPUTILS("500^CAMP MASTER","LAB")
VERSRV()
VERCMP(CUR,VAL) ; Returns 1 if CUR<VAL, -1 if CUR>VAL, 0 if equal
WDWH() ; What kind of data exist?, DE6644, 7 September 2016
; HMPA = loop counter
; HMPB = node information
; HMPOPD = 1 if operational data exists, 0 otherwise
; HMPPAT = 1 if patient data exist, 0 otherwise
; HMPRET = return variable - 0 if no data exist
; 1 if ONLY patient data exist
; 2 if ONLY operational data exist
; 3 if BOTH patient and operational data exist
NODATA(A) ; boolean function, is there any patient data for stream in A?; JD - 2/23/15
; Returns 1 if there is no patient data, 0 Otherwise, DE6644, 7 September 2016
; HMPA = Loop counter
; HMPF = Flag indicating data found
GETSIZE(HMPMODE,HMPSRVN) ; function, returns aggregate extract size for extracts waiting to be sent to HMP servers
; returns: total size ^ object count
; HMPMODE = estimate - use estimated domain average sizes (default)
; actual - walk though object nodes to calculate using $LENGTH
; HMPSRVN = name of HMP server [optional - defaults to all HMP servers]
; DE7401, move function here, 20 January 2017
; loop through extracts for server(s)
WALK(BATCH,TASK,DOMAIN) ; function, walk through domain objects in task to get actual size
GETMAX() ; function, return the max allowable aggregate extract size in bytes

External References

Name Field # of Occurrence
FIND^DIC VERSRV+2
$$GETSECS^HMPDJFSP CHKSP+5
STATUS^HMPMETA CHKSP+4, CHKSP+5
$$FMTHL7^HMPSTMP JSONDT+7
$$SYS^HMPUTILS SETUID+2
$$CRC16^XLFCRC SYS+7
$$FMADD^XLFDT SETERROR+3, JSONDT+6
$$UP^XLFSTR VERSRV+4
$$BASE^XLFUTL SYS+7
$$GET^XPAR SYS+4, GETMAX+2
GETLST^XPAR GETSIZE+10
$$KSP^XUPARAM SYS+5

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^DIC(19 - [#19] FIND^DIC

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^XTMP( SETERROR+3*, SETERROR+5*, WDWH+12, NODATA+6, GETSIZE+13, GETSIZE+14, GETSIZE+15, WALK+3, WALK+4

Label References

Name Line Occurrences
$$GETMAX CHKSP+4
$$GETSIZE CHKSP+4
$$SETUID SETPROV+1
$$SETVURN SPLITVAL+5
$$SYS SYS+5
$$WALK GETSIZE+17
SETERRTX SETERROR+6, SETERROR+8

Naked Globals

Name Field # of Occurrence
^( WALK+4

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
A NODATA~, NODATA+6
ADDDATA SETUID~, SETUID+4
ARRAY SPLITVAL~
ARRAY( SPLITVAL+2, SPLITVAL+3, SPLITVAL+5, SPLITVAL+6*
BATCH GETSIZE+7~, GETSIZE+12*, GETSIZE+13*, GETSIZE+14, GETSIZE+15, GETSIZE+17, WALK~, WALK+3, WALK+4
CNT SETERROR+1~, SETERRTX+1*, SETERRTX+2*, SPLITVAL+1~, SPLITVAL+3*, SPLITVAL+4
CODESET SETNCS~, SETNCS+1
CUR VERCMP~, VERCMP+2
CURMAJOR VERCMP+1~, VERCMP+2*, VERCMP+8
CURMINOR VERCMP+1~, VERCMP+2*, VERCMP+5*, VERCMP+7*, VERCMP+9
CURSNAP VERCMP+1~, VERCMP+2*, VERCMP+10
DATA SETERROR~, SETERROR+5
DOMAIN SETUID~, SETUID+3, SETFCURN~, SETFCURN+1, SETVURN~, SETVURN+1, GETSIZE+7~, GETSIZE+14*, GETSIZE+15, GETSIZE+16
, GETSIZE+17, WALK~, WALK+3, WALK+4
DT SETERROR+3
ERROR SETERROR~, SETERROR+6, SETERRTX~
ERROR( SETERRTX+2
EXTERROR SETERROR~, SETERROR+8
FACILITY SETFCURN~, SETFCURN+1
FIELD SPLITVAL+1~, SPLITVAL+5*
FIRST SETTEXT+1~, SETTEXT+2*
HL7DT JSONDT+1~, JSONDT+7*, JSONDT+8*, JSONDT+9
HMPA WDWH+9~, WDWH+10*, WDWH+12*, WDWH+13, NODATA+4~, NODATA+5*, NODATA+6*
HMPB WDWH+9~, WDWH+13*, WDWH+14
HMPF NODATA+4~, NODATA+5*, NODATA+6*, NODATA+7
HMPFHMP CHKSP~, CHKSP+4, CHKSP+5
HMPLIM GETMAX+2~*, GETMAX+3
HMPLST VERSRV+1~
HMPLST("DILIST" VERSRV+3
HMPMODE GETSIZE~, GETSIZE+8*, GETSIZE+9*, GETSIZE+10, GETSIZE+16
>> HMPOD WDWH+12
HMPOK CHKSP+2~*, CHKSP+3, CHKSP+4*, CHKSP+5
HMPOPD WDWH+9~, WDWH+10*, WDWH+13*, WDWH+15, WDWH+16, WDWH+17
HMPPAT WDWH+9~, WDWH+10*, WDWH+12, WDWH+14*, WDWH+15, WDWH+16, WDWH+17
HMPRET WDWH+9~, WDWH+10*, WDWH+15*, WDWH+16*, WDWH+17*, WDWH+18
HMPSRVN GETSIZE~, GETSIZE+12
>> HMPSYS SETUID+2
HMPTEMP SETERROR+1~, SETERROR+2*, SETERROR+3, SETERROR+5, SETERROR+7
I SETTEXT+1~, SETTEXT+3*, SETTEXT+4, SETTEXT+6
ID SETUID~, SETUID+3
L GETSIZE+7~, GETSIZE+12*, GETSIZE+13
LINE SETTEXT+1~, SETTEXT+4*, SETTEXT+6
NAME SPLITVAL+1~, SPLITVAL+2*, SPLITVAL+3, SPLITVAL+5, SPLITVAL+6, SYS~, SYS+5, SYS+6, SYS+7
NODE SPLITVAL~, SPLITVAL+4, SETPROV~, SETPROV+1, WALK+1~, WALK+4*
OBJ WALK+1~, WALK+2*, WALK+3*, WALK+4
OBJCNT GETSIZE+7~, GETSIZE+12*, GETSIZE+15*, GETSIZE+18
OBJS GETSIZE+7~, GETSIZE+15*, GETSIZE+16
OBJSIZES GETSIZE+7~, GETSIZE+10
OBJSIZES( GETSIZE+16
PAT SETUID~, SETUID+3
PROV SETPROV~
PROV("providerName" SETPROV+1*
PROV("providerUid" SETPROV+1*
RESULT SETERROR~, SETUID+1~, SETUID+3*, SETUID+4*, SETUID+5
RESULT("error" SETERROR+6*, SETERROR+7*, SETERROR+8*
RESULT("success" SETERROR+4*
ROOT GETSIZE+7~, GETSIZE+12*, GETSIZE+13
SIZE WALK+1~, WALK+2*, WALK+4*, WALK+5
SYS SETUID+1~, SETUID+2*, SETUID+3, SYS+3~, SYS+4*, SYS+5, SYS+6
T JSONDT+1~, JSONDT+4*, JSONDT+5, JSONDT+6, JSONDT+8
TASK GETSIZE+7~, GETSIZE+14*, GETSIZE+15, GETSIZE+17, WALK~, WALK+3, WALK+4
TEMP SETERROR+1~, SETERROR+6, SETERROR+8, SETERRTX~, SETERRTX+1*, SETERRTX+2*
TOTAL GETSIZE+7~, GETSIZE+12*, GETSIZE+16*, GETSIZE+17*, GETSIZE+18
U SETERROR+3, SPLITVAL+4, SPLITVAL+5, SETPROV+1, GETSIZE+9
VAL VERSRV+1~, VERSRV+3*, VERSRV+4, VERCMP~, VERCMP+3
VALMAJOR VERCMP+1~, VERCMP+3*, VERCMP+8
VALMINOR VERCMP+1~, VERCMP+3*, VERCMP+4*, VERCMP+5, VERCMP+6*, VERCMP+9
VALSNAP VERCMP+1~, VERCMP+3*, VERCMP+10
VALUE SETTEXT~, SETTEXT+6, SPLITVAL+1~, SPLITVAL+4*, SPLITVAL+5*, SPLITVAL+6, SETFCURN~, SETFCURN+1, SETVURN~, SETVURN+1
, SETNCS~, SETNCS+1
X SETTEXT~, SETTEXT+3, SETTEXT+4, JSONDT~, JSONDT+4, JSONDT+5, FACILITY~, FACILITY+5, FACILITY+6
XCNT SETERROR+1~, SETERROR+5*, SETERROR+7
Y JSONDT+1~, JSONDT+5*, JSONDT+6*, JSONDT+7, FACILITY~, FACILITY+5, FACILITY+6
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables  | All