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 |  Label References |  Local Variables  | All
Print Page as PDF
Routine: VPRJSOND

Package: Virtual Patient Record

Routine: VPRJSOND


Information

VPRJSOND ;SLC/KCM -- Decode JSON

Source Information

Source file <VPRJSOND.m>

Call Graph

Call Graph

Call Graph Total: 2

Package Total Call Graph
Kernel 1 $$DEC^XLFUTL  
Virtual Patient Record 1 ERRX^VPRJSON  

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

Package Total Caller Graph
Virtual Patient Record 1 VPRJSON  

Entry Points

Name Comments DBIA/ICR reference
DECODE(VVJSON,VVROOT,VVERR) ; Set JSON object into closed array ref VVROOT
DIRECT ; TAG for use by DECODE^VPRJSON
NXTKN() ; Move the pointers to the beginning of the next token
ADDSTR ; Add string value to current node, escaping text along the way
; Expects VVLINE,VVIDX to reference that starting point of the index
; TODO: add a mechanism to specify names that should not be escaped
; just store as ":")= and ":",n)=
SETSTR ; Set simple string value from within same line
; expects VVJSON, VVLINE, VVINX, VVEND
UESEXT ; unescape from VVLINE,VVIDX to VVTLINE,VVEND & extend (\) if necessary
; expects VVLINE,VVIDX,VVTLINE,VVEND
ADDBUF(VVX) ; add buffer of characters to destination
; expects VVBUF,VVMAX,VVNODE,VVMORE to be defined
; used directly by ADDSTR
SAVEBUF ; write out buffer to destination
; expects VVBUF,VVMAX,VVNODE,VVMORE to be defined
; used directly by ADDSTR,ADDBUF
ISCLOSEQ(VVBLINE) ; return true if this is a closing, rather than escaped, quote
; expects
; VVJSON: lines of the JSON encoded string
; VVIDX: points to 1st character of the segment
; VVLINE: points to the line in which the segment starts
; VVEND: points to 1st character after the " (may be past the end of the line)
; used directly by ADDSTR
NAMPARS() ; Return parsed name, advancing index past the close quote
; -- This assumes no embedded quotes are in the name itself --
NUMPARS(VVDIGIT) ; Return parsed number, advancing index past the end of the number
; VVIDX intially references the second digit
SETBOOL(VVLTR) ; Return parsed value, advancing index past the end of the value
OSETBOOL(VVX) ; set a value and increment VVIDX
CURNODE() ; Return a global/local variable name based on VVSTACK
; Expects VVSTACK to be defined already
UES(X) ; Unescape JSON string
; copy segments from START to POS-2 (right before \)
; translate target character (which is at $F position)
REALCHAR(C) ; Return actual character from escaped
ERRX(ID,VAL) ; Set the appropriate error message

External References

Name Field # of Occurrence
ERRX^VPRJSON ERRX+1
$$DEC^XLFUTL UESEXT+18, UES+11

Label References

Name Line Occurrences
$$CURNODE DIRECT+37, SETSTR+4, SETSTR+5, UESEXT+3, SETBOOL+11, OSETBOOL+1
$$ISCLOSEQ ADDSTR+9, ADDSTR+20
$$NAMPARS DIRECT+31
$$NUMPARS DIRECT+37
$$NXTKN DIRECT+21
$$REALCHAR UESEXT+19, UES+12
$$UES SETSTR+4
ADDBUF UESEXT+10, UESEXT+18, UESEXT+19
ADDSTR DIRECT+32
ERRX DIRECT+22, DIRECT+23, DIRECT+24, DIRECT+25, DIRECT+29, DIRECT+38, DIRECT+39, ADDSTR+16, UESEXT+13, ISCLOSEQ+12
, NAMPARS+8, NUMPARS+7, SETBOOL+7, SETBOOL+8, SETBOOL+9, SETBOOL+10, OSETBOOL+4, REALCHAR+11
SAVEBUF UESEXT+23, ADDBUF+3
SETBOOL DIRECT+34, DIRECT+35, DIRECT+36
SETSTR ADDSTR+8, ADDSTR+9
UESEXT ADDSTR+23

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
C REALCHAR~, REALCHAR+1, REALCHAR+2, REALCHAR+3, REALCHAR+4, REALCHAR+5, REALCHAR+6, REALCHAR+7, REALCHAR+8, REALCHAR+9
, REALCHAR+11, REALCHAR+12
ID ERRX~, ERRX+1
POS UES+3~, UES+4*, UES+5, UES+6*, UES+7*, UES+10, UES+11*
START UES+3~, UES+5*, UES+6, UES+7, UES+10
TGT UES+9~, UES+10*, UES+11, UES+12
VAL ERRX~, ERRX+1
VVBDONE ISCLOSEQ+7~, ISCLOSEQ+8*, ISCLOSEQ+10, ISCLOSEQ+14*
VVBIDX ISCLOSEQ+7~, ISCLOSEQ+8*, ISCLOSEQ+11, ISCLOSEQ+13*, ISCLOSEQ+14, ISCLOSEQ+15*
VVBLINE ISCLOSEQ~, ISCLOSEQ+12*, ISCLOSEQ+13, ISCLOSEQ+14
VVBOOL SETBOOL+1~, SETBOOL+2*, SETBOOL+6*, SETBOOL+8, SETBOOL+9, SETBOOL+10, SETBOOL+11
VVBS ISCLOSEQ+7~, ISCLOSEQ+8*, ISCLOSEQ+15*, ISCLOSEQ+16
VVBUF UESEXT+2~, UESEXT+3*, ADDBUF+3, ADDBUF+4*, SAVEBUF+3, SAVEBUF+4, SAVEBUF+5*
VVDIFF OSETBOOL+3~*, OSETBOOL+4
VVDIGIT NUMPARS~, NUMPARS+3
VVDONE NXTKN+1~, NXTKN+2*, NXTKN+4*, ADDSTR+12~, ADDSTR+13*, ADDSTR+14, ADDSTR+19*, ADDSTR+20*, UESEXT+2~, UESEXT+4*
UESEXT+5, UESEXT+11*, UESEXT+21*, NAMPARS+2~, NAMPARS+3*, NAMPARS+4, NAMPARS+6*, NUMPARS+2~, NUMPARS+3*, NUMPARS+4
, NUMPARS+5*, SETBOOL+1~, SETBOOL+2*, SETBOOL+3, SETBOOL+5*
VVEND ADDSTR+6~, ADDSTR+7*, ADDSTR+8, ADDSTR+9, ADDSTR+16*, ADDSTR+17*, ADDSTR+18, ADDSTR+19, ADDSTR+25, SETSTR+3
UESEXT+3, ISCLOSEQ+8, NAMPARS+2~, NAMPARS+5*, NAMPARS+6, NAMPARS+7, NAMPARS+8
VVEOF NXTKN+1~, NXTKN+2*, NXTKN+3*, NXTKN+6
VVERR DECODE~, DIRECT+14*, REALCHAR+11
VVERRORS DIRECT+19~, DIRECT+20*, DIRECT+21, ADDSTR+14, ADDSTR+21, UESEXT+5, UESEXT+22, ISCLOSEQ+10, NAMPARS+4, NUMPARS+4
, SETBOOL+3
VVI UESEXT+2~, UESEXT+4*, UESEXT+6*, UESEXT+8, UESEXT+9, UESEXT+11, UESEXT+12*, UESEXT+13*, UESEXT+14, UESEXT+16*
UESEXT+17*, UESEXT+20*, UESEXT+21, CURNODE+2~, CURNODE+4*, CURNODE+5, CURNODE+6
VVIDX DIRECT+19~, DIRECT+20*, NXTKN+3*, NXTKN+4, NXTKN+5*, NXTKN+7*, ADDSTR+7, ADDSTR+25*, SETSTR+3*, SETSTR+6*
UESEXT+4, NAMPARS+5, NAMPARS+6*, NAMPARS+7, NAMPARS+8*, NUMPARS+5, NUMPARS+6, NUMPARS+7*, SETBOOL+4, SETBOOL+7*
, OSETBOOL+2*, OSETBOOL+3, OSETBOOL+4*
VVINPUT DIRECT+17~
VVINPUT(1 DIRECT+17*
VVJSON DECODE~, DIRECT+17*, DIRECT+20, NXTKN+3, NXTKN+4, NXTKN+7, ADDSTR+7, ADDSTR+8, ADDSTR+16, ADDSTR+17
ADDSTR+19, SETSTR+3, SETSTR+6, UESEXT+6, UESEXT+10, UESEXT+13, UESEXT+14, UESEXT+16, UESEXT+17, ISCLOSEQ+13
, ISCLOSEQ+14, NAMPARS+5, NAMPARS+6, NAMPARS+7, NAMPARS+8, NUMPARS+5, NUMPARS+6, NUMPARS+7, SETBOOL+4, SETBOOL+7
, OSETBOOL+3, OSETBOOL+4
VVLINE DIRECT+19~, DIRECT+20*, NXTKN+3*, NXTKN+4, NXTKN+7, ADDSTR+7, ADDSTR+8, ADDSTR+9, ADDSTR+13, ADDSTR+25*
SETSTR+3, SETSTR+6*, UESEXT+4, ISCLOSEQ+12, NAMPARS+5, NAMPARS+6, NAMPARS+7, NAMPARS+8*, NUMPARS+5, NUMPARS+6
, NUMPARS+7*, SETBOOL+4, SETBOOL+7*, OSETBOOL+3, OSETBOOL+4*
VVLTR SETBOOL~, SETBOOL+2, SETBOOL+8, SETBOOL+9, SETBOOL+10
VVMAX DIRECT+13~*, ADDBUF+3
VVMORE UESEXT+2~, UESEXT+3*, SAVEBUF+3, SAVEBUF+4, SAVEBUF+5*
VVNAME NAMPARS+2~, NAMPARS+3*, NAMPARS+6*, NAMPARS+7*, NAMPARS+9
VVNODE UESEXT+2~, UESEXT+3*, SAVEBUF+3, SAVEBUF+4
VVNUM NUMPARS+2~, NUMPARS+3*, NUMPARS+6*, NUMPARS+8
VVPROP DIRECT+19~, DIRECT+20*, DIRECT+22*, DIRECT+28*, DIRECT+29*, DIRECT+31
VVROOT DECODE~, DIRECT+18*, CURNODE+7
VVSTACK DIRECT+19~, DIRECT+20*, DIRECT+22*, DIRECT+23*, DIRECT+24*, DIRECT+25*, DIRECT+27, DIRECT+29, DIRECT+31, DIRECT+39
, CURNODE+4
VVSTACK( DIRECT+22*, DIRECT+23, DIRECT+24*, DIRECT+25, DIRECT+27*, DIRECT+29, DIRECT+31*, CURNODE+5, CURNODE+6
VVSTART UESEXT+2~, UESEXT+6*, UESEXT+10
VVSTOP UESEXT+2~, UESEXT+3*, UESEXT+8, UESEXT+11, UESEXT+21
VVSUBS CURNODE+2~, CURNODE+3*, CURNODE+4*, CURNODE+5*, CURNODE+6*, CURNODE+7
VVTGT UESEXT+14~*, UESEXT+15, UESEXT+19
VVTGTC UESEXT+16~*, UESEXT+17*, UESEXT+18
VVTLINE ADDSTR+12~, ADDSTR+13*, ADDSTR+16*, ADDSTR+17, ADDSTR+19, ADDSTR+20, ADDSTR+25, UESEXT+8, UESEXT+11, UESEXT+21
VVTO UESEXT+2~, UESEXT+8*, UESEXT+9*, UESEXT+10
VVTOKEN NXTKN+1~, NXTKN+7*, NXTKN+8
VVTYPE DIRECT+19~, DIRECT+21*, DIRECT+22, DIRECT+23, DIRECT+24, DIRECT+25, DIRECT+26, DIRECT+29, DIRECT+30, DIRECT+33*
DIRECT+34, DIRECT+35, DIRECT+36, DIRECT+37, DIRECT+38, SETBOOL+8, SETBOOL+9, SETBOOL+10
VVX ADDSTR+6~, SETSTR+2~, SETSTR+3*, SETSTR+4, SETSTR+5, ADDBUF~, ADDBUF+3, ADDBUF+4, SETBOOL+1~, SETBOOL+4*
, SETBOOL+5, SETBOOL+6, OSETBOOL~, OSETBOOL+1, OSETBOOL+2
VVY UESEXT+2~, UESEXT+4*, UESEXT+6, UESEXT+8, UESEXT+10, UESEXT+11, UESEXT+12*, UESEXT+13*, UESEXT+14, UESEXT+16
UESEXT+17*, UESEXT+21
X UES~, UES+5, UES+6, UES+7, UES+10, UES+11
Y UES+3~, UES+4*, UES+7*, UES+10*, UES+11*, UES+12*, UES+13
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Label References |  Local Variables  | All