LA7VHLU7 ;DALOI/JDB - HL7 utility ;07/07/09 14:19
Source file <LA7VHLU7.m>
action | A | extended action | Ea | event driver | Ed | subscriber | Su | protocol | O | limited protocol | LP | run routine | RR | broker | B | edit | E | server | Se | P | screenman | SM | inquire | I |
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 |
|
Name | Line Occurrences |
---|---|
$$COMP | FLD2ARR+22 |
$$RTNNM | SEG2FLDS+42 |
$$SUB | FLD2ARR+26 |
EC | FLD2ARR+20, VALUE+8 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
API | DBSTORE~, DBSTORE+17*, DBSTORE+28, DBSTORE+33 |
CNT | SEG2FLDS+65~, SEG2FLDS+73*, SEG2FLDS+74 |
CODE | DBSTORE+16~, DBSTORE+24*, DBSTORE+27, DBSTORE+30, DBSTORE+35 |
CODESYS | DBSTORE+16~, DBSTORE+26*, DBSTORE+27, DBSTORE+30, DBSTORE+35 |
CODSYS | CODSYS~, CODSYS+21*, CODSYS+27, CODSYS+32 |
CONTFLD | SEG2FLDS+29~, SEG2FLDS+52*, SEG2FLDS+56*, SEG2FLDS+59, SEG2FLDS+64 |
D2 | SEG2FLDS+28~, SEG2FLDS+53*, SEG2FLDS+62, SEG2FLDS+66 |
D3 | SEG2FLDS+28~, SEG2FLDS+58*, SEG2FLDS+66 |
DATA | SEG2FLDS+28~, SEG2FLDS+49*, SEG2FLDS+50, SEG2FLDS+51, SEG2FLDS+53 |
DBSTORE | DBSTORE+16~, DBSTORE+23, DBSTORE+32*, DBSTORE+37*, DBSTORE+38, DBSTORE+39*, DBSTORE+40 |
ECH | COMP~, COMP+13*, COMP+14*, COMP+16, SUB~, SUB+12*, SUB+13*, SUB+15 |
FLD | FIELD~, FIELD+13, SEG2FLDS+28~, SEG2FLDS+51*, SEG2FLDS+53, SEG2FLDS+55 |
FLD2ARR | CODSYS~, DBSTORE~ |
FLD2ARR( | CODSYS+24, CODSYS+26, CODSYS+29, CODSYS+30, DBSTORE+24, DBSTORE+25, DBSTORE+26 |
FLD2ARR("A" | DBSTORE+23 |
FLDNUM | SEG2FLDS+28~, SEG2FLDS+40*, SEG2FLDS+55, SEG2FLDS+57, SEG2FLDS+60*, SEG2FLDS+61, SEG2FLDS+68, SEG2FLDS+75, SEG2FLDS+76 |
FS | FIELD~, FIELD+11*, FIELD+12*, FIELD+13, SEG2FLDS~, SEG2FLDS+32*, SEG2FLDS+50*, SEG2FLDS+51, SEG2FLDS+53 |
FSEC | EC~, EC+12*, EC+13*, EC+14, EC+15, EC+16, EC+17, EC+18, EC+19, EC+20 , REPT2ARR~, REPT2ARR+10, REPT2ARR+13 |
FSECH | FLD2ARR~, FLD2ARR+18*, FLD2ARR+20, VALUE~, VALUE+6*, VALUE+8 |
GBLSIZE | SEG2FLDS+29~, SEG2FLDS+31*, SEG2FLDS+67, SEG2FLDS+72, SEG2FLDS+77, SEG2FLDS+78 |
HLEC | FLD2ARR+16~, FLD2ARR+19*, FLD2ARR+20, FLD2ARR+23, FLD2ARR+27, VALUE+5~, VALUE+7*, VALUE+8, VALUE+10 |
HLEC("CS" | FLD2ARR+21 |
HLEC("ECH" | FLD2ARR+22, FLD2ARR+26 |
HLEC("SS" | FLD2ARR+23, FLD2ARR+25, VALUE+9 |
I | CODSYS+20~, CODSYS+22*, CODSYS+24*, CODSYS+25, CODSYS+26, CODSYS+28, CODSYS+29, CODSYS+30, CODSYS+32, FLD2ARR+16~ , FLD2ARR+21*, FLD2ARR+22, FLD2ARR+24, FLD2ARR+27, DBSTORE+16~, DBSTORE+23*, DBSTORE+24, DBSTORE+25, DBSTORE+26, DBSTORE+29~ , DBSTORE+34~, DBSTORE+38, REPT2ARR+9~, REPT2ARR+13*, SEG2FLDS+65~, SEG2FLDS+74*, SEG2FLDS+75, SEG2FLDS+76, SEG2FLDS+77 |
II | FLD2ARR+16~, FLD2ARR+25*, FLD2ARR+26, FLD2ARR+27 |
IN | SEG2FLDS~, SEG2FLDS+33*, SEG2FLDS+35, SEG2FLDS+37, SEG2FLDS+45 |
INODE | SEG2FLDS+29~, SEG2FLDS+45*, SEG2FLDS+46*, SEG2FLDS+48, SEG2FLDS+49 |
J | REPT2ARR+9~, REPT2ARR+11*, REPT2ARR+12*, REPT2ARR+13 |
>> LA76248 | DBSTORE+21 |
>> LA7ECH | COMP+14, SUB+13, EC+13 |
>> LA7FS | FIELD+12, EC+13 |
>> LA7SEG | FIELD+13 |
>> LA7SS | DBSTORE+30 |
NODE | SEG2FLDS+29~, SEG2FLDS+57*, SEG2FLDS+58, SEG2FLDS+61*, SEG2FLDS+62, SEG2FLDS+68*, SEG2FLDS+69, SEG2FLDS+75*, SEG2FLDS+76*, SEG2FLDS+78 |
ONODE | SEG2FLDS+29~, SEG2FLDS+42*, SEG2FLDS+43, SEG2FLDS+44*, SEG2FLDS+57, SEG2FLDS+61, SEG2FLDS+68, SEG2FLDS+75, SEG2FLDS+76 |
OUT | DBSTORE~, DBSTORE+22!, DBSTORE+38*, REPT2ARR~, REPT2ARR+12, SEG2FLDS+30~ |
OUT( | REPT2ARR+13* |
OUT("A" | REPT2ARR+12 |
POS | COMP~, COMP+16, SUB~, SUB+15 |
R6247 | DBSTORE~, DBSTORE+19*, DBSTORE+35 |
R6248 | DBSTORE~, DBSTORE+20*, DBSTORE+21*, DBSTORE+30, DBSTORE+35 |
RPT | REPT2ARR+9~, REPT2ARR+10*, REPT2ARR+13 |
RSLT | CODSYS~, CODSYS+23*, CODSYS+28* |
RSLT("B" | CODSYS+32* |
RSLT(1 | CODSYS+29* |
RSLT(2 | CODSYS+30* |
RSLT(3 | CODSYS+31* |
SEGNUM | SEG2FLDS+28~, SEG2FLDS+39* |
SEQ | SEG2FLDS+28~, SEG2FLDS+41*, SEG2FLDS+57, SEG2FLDS+60*, SEG2FLDS+61, SEG2FLDS+68, SEG2FLDS+75, SEG2FLDS+76* |
STR | VALUE~, VALUE+9, COMP~, COMP+15, SUB~, SUB+14, DBSTORE+16~, DBSTORE+25*, DBSTORE+30, DBSTORE+35 , REPT2ARR~, REPT2ARR+13, SEG2FLDS+28~, SEG2FLDS+65~, SEG2FLDS+66*, SEG2FLDS+67, SEG2FLDS+69, SEG2FLDS+72, SEG2FLDS+78 |
SUB | SEG2FLDS+28~, SEG2FLDS+38*, SEG2FLDS+47*, SEG2FLDS+48* |
SUBSCR | SEG2FLDS~, SEG2FLDS+34*, SEG2FLDS+36*, SEG2FLDS+42 |
VAR | FLD2ARR~, FLD2ARR+17, EC~, EC+14* |
VAR( | FLD2ARR+24*, FLD2ARR+27* |
VAR("CS" | EC+17* |
VAR("EC" | EC+19* |
VAR("ECH" | EC+16* |
VAR("FS" | EC+15* |
VAR("RS" | EC+18* |
VAR("SS" | EC+20* |
VERS | DBSTORE~, DBSTORE+18*, DBSTORE+30, DBSTORE+35 |
X | CODSYS+20~, CODSYS+26*, CODSYS+27, CODSYS+31, CODSYS+32, FLD2ARR+16~, FLD2ARR+22*, FLD2ARR+25, FLD2ARR+26, VALUE+5~ , VALUE+9*, VALUE+10, COMP+12~, COMP+16, SUB+11~, SUB+15, DBSTORE+16~, DBSTORE+30*, DBSTORE+31, DBSTORE+32 , DBSTORE+35*, DBSTORE+36, DBSTORE+37, SEG2FLDS+65~, SEG2FLDS+72*, SEG2FLDS+73, SEG2FLDS+77*, SEG2FLDS+78 |
X(0 | COMP+15*, SUB+14* |
X2 | FLD2ARR+16~, FLD2ARR+22*, FLD2ARR+23*, FLD2ARR+24, FLD2ARR+26*, FLD2ARR+27, DBSTORE+16~, DBSTORE+31*, DBSTORE+32, DBSTORE+36* , DBSTORE+37 |
Z | FLD2ARR+16~, FLD2ARR+17*, FLD2ARR+21, FLD2ARR+22 |
Name | Field # of Occurrence |
---|---|
$T( | RTNNM+2 |