Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IS00002A

IS00002A.m

Go to the documentation of this file.
IS00002A ;Compiled from script 'Generated: HL IHS LOINC R01-O' on DEC 03, 2002
 ;Part 2
 ;Copyright 2002 SAIC
EN D SETPIECE^INHU(.LINE,DELIM,15,L1,.CP) S L1=$G(@INV@("MSH15")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,16,L1,.CP) S L1=$G(@INV@("MSH16"))
 S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,17,L1,.CP)
 S LCT=LCT+1,^UTILITY("INH",$J,LCT)=LINE I $D(LINE)>9 M ^UTILITY("INH",$J,LCT)=LINE
 SET INSETID=0
 ;SET PID1 = INSGX\^INTHL7FT(11,3)\\4\"PID"
 S D0=INDA S X="PID"
 S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
 S @INV@("PID1")=X K DXS,D0
 ;SET PID2 = INSGX\^INTHL7F(15152,5)\\250\"OUTPUT TRANSFORM"
 S D0=INDA S X="OUTPUT TRANSFORM"
 S X1="^INTHL7F(15152,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
 S @INV@("PID2")=X K DXS,D0
 ;SET PID3 = INSGX\^INTHL7F(15151,5)\\250\@PID3
 S D0=INDA S X=$G(INA("PID3"))
 S X1="^INTHL7F(15151,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
 S @INV@("PID3")=X K DXS,D0
 D:'INVS MC^INHS
 K LINE S LINE="",CP=0 S L1="PID" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("PID1")) S:$TR(L1,$G(SUBDELIM))="" L1=""
 D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("PID2")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,3,L1,.CP) S L1=$G(@INV@("PID3"))
 S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP)
 S LCT=LCT+1,^UTILITY("INH",$J,LCT)=LINE I $D(LINE)>9 M ^UTILITY("INH",$J,LCT)=LINE
 SET INSETID=0
 I '$D(INDA(9000010)) S INI=0 F  S INI=$O(^AUPNVSIT("AC",INDA,INI)) Q:'INI  S INDA(9000010,INI)=""
 S INDA0=INDA,INI(1)=0  F  S INI(1)=$O(INDA(9000010,INI(1))) Q:'INI(1)  S INDA=$S(INDA(9000010,INI(1)):INDA(9000010,INI(1)),1:INI(1)) D
 .Q:'$D(^AUPNVSIT(INDA,0))
 .;SET PV11 = INSGX\^INTHL7FT(11,3)\\4\"PV1"
 .S D0=INDA S X="PV1"
 .S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
 .S @INV@("PV11")=X K DXS,D0
 .;SET PV12 = INSGX\^INTHL7F(15551,5)\\1\"OUTPUT TRANSFORM"
 .S D0=INDA S X="OUTPUT TRANSFORM"
 .S X1="^INTHL7F(15551,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,1)
 .S @INV@("PV12")=X K DXS,D0
 .;SET PV13 = INSGX\^INTHL7FT(1,3)\\80\@PV13LAB
 .S D0=INDA S X=$G(INA("PV13LAB",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,80)
 .S @INV@("PV13")=X K DXS,D0
 .;SET PV110 = INSGX\^INTHL7FT(1,3)\\2\@PV110LAB
 .S D0=INDA S X=$G(INA("PV110LAB",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,2)
 .S @INV@("PV110")=X K DXS,D0
 .;SET PV119 = INSGX\^INTHL7F(15554,5)\\20\"OUTPUT TRANSFORM"
 .S D0=INDA S X="OUTPUT TRANSFORM"
 .S X1="^INTHL7F(15554,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,20)
 .S @INV@("PV119")=X K DXS,D0
 .;SET PV144 = INSGX\^INTHL7FT(6,3)\\26\#.01
 .S D0=INDA S Y(1)=$S($D(^AUPNVSIT(D0,0)):^(0),1:"") S X=$P(Y(1),U,1)
 .S X1="^INTHL7FT(6,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,26)
 .S @INV@("PV144")=X K DXS,D0
 .D:'INVS MC^INHS
 .K LINE S LINE="",CP=0 S L1="PV1" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("PV11")) S:$TR(L1,$G(SUBDELIM))="" L1=""
 .D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("PV12")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,3,L1,.CP) S L1=$G(@INV@("PV13"))
 .S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("PV110")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,11,L1,.CP)
 .S L1=$G(@INV@("PV119")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,20,L1,.CP) S L1=$G(@INV@("PV144")) S:$TR(L1,$G(SUBDELIM))="" L1=""
 .D SETPIECE^INHU(.LINE,DELIM,45,L1,.CP)
 .S LCT=LCT+1,^UTILITY("INH",$J,LCT)=LINE I $D(LINE)>9 M ^UTILITY("INH",$J,LCT)=LINE
 .Q
 S INDA=INDA0 K INDA0
 SET INSETID=0
 I '$D(INDA(9000010.09)) S INI=0 F  S INI=$O(^AUPNVLAB("AC",INDA,INI)) Q:'INI  S INDA(9000010.09,INI)=""
 S INDA0=INDA,INI(1)=0  F  S INI(1)=$O(INDA(9000010.09,INI(1))) Q:'INI(1)  S INDA=$S(INDA(9000010.09,INI(1)):INDA(9000010.09,INI(1)),1:INI(1)) D
 .Q:'$D(^AUPNVLAB(INDA,0))
 .;SET OBR1 = INSGX\^INTHL7FT(11,3)\\4\"OBR"
 .S D0=INDA S X="OBR"
 .S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
 .S @INV@("OBR1")=X K DXS,D0
 .;SET OBR2 = INSGX\^INTHL7FT(1,3)\\20\#.06
 .S D0=INDA S Y(1)=$S($D(^AUPNVLAB(D0,0)):^(0),1:"") S X=$P(Y(1),U,6)
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,20)
 .S @INV@("OBR2")=X K DXS,D0
 .;SET OBR4 = INSGX\^INTHL7FT(1,3)\\250\@OBR4LAB
 .S D0=INDA S X=$G(INA("OBR4LAB",INI(1)))
9 .D EN^IS00002B
 G B1^IS00002B