LA7UTILC ;DALOI/JDB - Browse UI message <cont> ;05/01/09 15:59
Source file <LA7UTILC.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
BRO(LA7HDR,LA7DOC,LA7IEN,LA7J) | ; Setup text for browser.
; Called from DQ^LA7UTILA |
|
HLIN(GBL) | ;
; Retrieve/Parse HL7 message from global. ; Uses LA7DOC,J,LA7X,LA7PASR in symtbl ; Can be called separately to populate ^TMP("DDB",$J ; Inputs ; GBL: Open global root where HL7 message is stored ; : Format must be ^GBL(subscripts,seq,0)=data ; : ie ^LAHM(62.49,LA7IEN,150, |
|
PF | ;
; Parse Fields ; HLO compatible array in HLOARR ; Symbol Table ; HLFS defined (HL7 Field Separator) |
|
PC(SEGNAM,FLDNUM,SHOWNULL) | ;
; Parse Components ; In Symbol table: ; HLECH defined (HL7 encoding characters) ; ^TMP($$RTNNM,$J,"COMP") already has the field's data from PF above |
|
ADDTEXT(STR,APPEND) | ;
|
|
RTNNM() | ;
|
|
STRBUF(BUFF,ADD,MAXSTR,OUT) | ;
; Breaks a long string into an array based on MAXSTR. ; Leftover string is in BUF after call. ; This method is recursive. ; Used in HLO2STR API. ; Inputs ; BUFF:<byref> Buffer (should be empty at start) ; ADD:<byref> New text to add (is consumed by process) ; MAXSTR: Max string length <dflt=245> ; OUT:<byref> See Outputs ; Outputs ; BUFF: Any leftover portion of the string. ; OUT: The array that holds the portions of the string, ; starting at node 0. |
|
HLO2STR(SEGARR,FIELD,FSECH,OUT,MAXSTR) | ;
; Convert an HLO segment array to a segment string. ; Useful when calling APIs that work with a segment string. ; Inputs ; SEGARR:<byref> The HLO segment array ; FIELD:<opt> The field number to extract <dflt=all> ; FSECH: The HL7 field sep and encoding characters ; OUT:<byref> See Outputs ; MAXSTR:<opt><dflt=245> ; Outputs ; Returns either the segment string or the segment length. ; If the string cant fit in one "node" the string is ; broken up into smaller sections and returned in OUT(i) |
|
HL2HLO(STR,IN,FSECH,OUT) | ;
; Convert an HL7 segment string into HLO segment array ; Inputs ; STR:<opt> Complete HL7 string segment. ; IN:<opt><byref> Local array that holds HL7 segment. ; (Must be subscripted). ; FSECH: Original field sep and encoding chars. ; OUT:<byref> See Outputs ; Outputs ; OUT array (Segment array built by SET^HLOAPI) |
|
HL2ARR(STR,FSECH,OUT) | ;
; Deconstructs an entire HL7 segment string into an array compatible ; with the ARR2HLO function. ; Inputs ; STR: The HL7 string segment to be parsed. ; FSECH: The original HL7 field sep and encoding characters. ; OUT:<byref> See Outputs. Kills on entry. ; Outputs ; OUT: The array that can be used with the ARR2HLO function. ; OUT(field#,component#,subcomp#)=value ; Repeating fields are stored in decimals ie OUT(1.01) ; FS=| EC=^#!@ STR="PID|a^b^A@B@C" ; OUT(0,1)="PID" OUT(1,1)="a" OUT(1,2)="b" OUT(1,3)="A@B@C" ; OUT(1,3,1)="A" OUT(1,3,2)="B" OUT(1,3,3)="C" |
|
ARR2HLO(ARR,SEG,FSECH) | ;
; Builds the HLO segment array from the HL2ARR array ; using the SET^HLOAPI function. ; Deletes ARR nodes as it goes & sets top levels to null to ; save space. ; Inputs ; ARR: The array built from HL2ARR. ; SEG:<byref> See Outputs. ; FSECH: The original HL7 field sep and encoding chars. ; Outputs ; SEG: The HLO SEG array. |
FileNo | Call Tags |
---|---|
^LAHM(62.49 - [#62.49] | GETS^DIQ |