LA7VHLU7 ;DALOI/JDB - HL7 utility ;07/07/09 14:19
Source file <LA7VHLU7.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
CODSYS(FLD2ARR,RSLT,CODSYS) | ;
; HL7 Coding System from HL7 Component types ; Input ; FLD2ARR:<byref> The array that may contain coding system info. ; This array was generated by the FLD2ARR function. ; RSLT:<byref> Array to hold the results ; CODSYS: <opt> If specified this function will only look ; for the coding system specified. ; Output ; RSLT: If a CODSYS was specified and the coding system was ; found then the array will be defined as follows: ; RSLT(1)=1st field of CE ; RSLT(2)=2nd field of CE ; RSLT(3)=3rd field of CE ; If a CODSYS was not specified then the array will ; contain an index of all potential coding systems ; RSLT("B","99LRE",3)="" ; RSLT("B","99VA64",6)="" ; where the 3rd subscript indicates the subscript level ; in the original FLD2ARR array. |
|
FLD2ARR(VAR,FSECH) | ;
; Places an HL7 field into a local array ; Requires LA7FS,LA7CS,LA7ECH ; Inputs ; VAR :<byref> The local variable to hold the array ; :VAR should be set to the complete HL7 field's data ; :before calling into this routine. ; FSECH :<opt> HL7 Field Sep & Encoding Characters ; :Defaults to LA7FS_LA7ECH ; Outputs ; VAR :Will contain the added nodes ; :VAR(1) = component #1 ; :VAR(1,1) = subcomponent #1 of component #1 (HL7 escaped) ; : The component is not HL7 unescaped but the subcomponent ; : is HL7 unescaped |
|
VALUE(STR,FSECH) | ;
; For use with the generated FLD2ARR array ; Call VALUE to return the unescaped value of the first subcomponent ; ie X(1)="A~B~C" X(1,1)=A X(1,2)=B X(1,3)=C ; $$VALUE(X(1),"^@{}~") returns "A" |
|
FIELD(FLD,FS) | ;
; Gets the field from an HL7 segment ; Requires the LA7SEG array |
|
COMP(POS,STR,ECH) | ;
; Gets the component from an HL7 field |
|
SUB(POS,STR,ECH) | ;
; Gets the subcomponent from an HL7 component |
|
EC(VAR,FSEC) | ;
; Builds the HL7 Field Sep and Encoding Characters array |
|
DBSTORE(FLD2ARR,API,VERS,R6247,R6248,OUT) | ;
|
|
REPT2ARR(STR,FSEC,OUT) | ;
; Puts an HL7 Repeating field into an array. ; The array nodes are also HL7 decoded. ; Input ; STR : Input text that may contain the HL7 repeat character ; FSEC : HL7 Field Separator and Encoding Characters string ; OUT :<byref> The array that holds the split string ; Output ; : see OUT variable above |
|
SEG2FLDS(IN,SUBSCR,FS) | ;
; Inputs ; IN Closed root for input data ie ^TMP($J,"I",0) ; Each node is sequentially numbered ; SUBSCR <opt> Subscript name to use in ^TMP global for output ; Defaults to "S2F" ; Output = ^TMP($$RTNNM-"S2F",$J,SUBSCR) ; This setting allows using the utility numerous ; times in the same routine (ie recursive entry) ; FS <opt> Field Separator (default=^) ; Useful when separating HL7 coded elements,etc. |
|
RTNNM() | ;
; Returns this routine's name (used for namespacing) |
Name | Line Occurrences |
---|---|
Function Call: WRITE |
|
Function Call: WRITE |
|