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

IS00005A.m

Go to the documentation of this file.
  1. IS00005A ;Compiled from script 'Generated: HL IHS CHR R01 IN-I' on JUN 08, 2006
  1. ;Part 2
  1. ;Copyright 2006 SAIC
  1. EN S:DO @("@INV@(""ZV119"")")=$$PIECE^INHU(.LINE,DELIM,20)
  1. S:DO @("@INV@(""ZV120"")")=$$PIECE^INHU(.LINE,DELIM,21)
  1. S:DO @("@INV@(""ZV121"")")=$$PIECE^INHU(.LINE,DELIM,22)
  1. S:DO @("@INV@(""ZV122"")")=$$PIECE^INHU(.LINE,DELIM,23)
  1. S:DO @("@INV@(""ZV123"")")=$$PIECE^INHU(.LINE,DELIM,24)
  1. Q:MATCH
  1. D:'INVS MC^INHS
  1. D GET^INHOU(UIF,0) S LINE=$G(LINE),DO=0
  1. I 'MATCH,LINE?1"Z"1"H"1"R".ANPC S DO=1,MATCH=1
  1. E S LCT=LCT-CNT,DO=0
  1. S:DO @("@INV@(""ZHR1"")")=$$PIECE^INHU(.LINE,DELIM,2)
  1. S:DO @("@INV@(""ZHR2"")")=$$PIECE^INHU(.LINE,DELIM,3)
  1. S:DO @("@INV@(""ZHR3"")")=$$PIECE^INHU(.LINE,DELIM,4)
  1. S:DO @("@INV@(""ZHR4"")")=$$PIECE^INHU(.LINE,DELIM,5)
  1. S:DO @("@INV@(""ZHR5"")")=$$PIECE^INHU(.LINE,DELIM,6)
  1. S:DO @("@INV@(""ZHR6"")")=$$PIECE^INHU(.LINE,DELIM,7)
  1. S:DO @("@INV@(""ZHR7"")")=$$PIECE^INHU(.LINE,DELIM,8)
  1. S:DO @("@INV@(""ZHR8"")")=$$PIECE^INHU(.LINE,DELIM,9)
  1. Q:MATCH
  1. Q
  1. A1 ;WHILE $P(DATA,DELIM)="OBR"
  1. S INI(1)=1 F S DATA=$$GL^INHOU(UIF,LCT) Q:'$$CHECKSEG^INHOU("OBR",0,1) D S INI(1)=INI(1)+1
  1. .D:'INVS MC^INHS
  1. .D GET^INHOU(UIF,0) S LINE=$G(LINE),DO=1
  1. .S:DO @("@INV@(""OBR1"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,2)
  1. .S:DO @("@INV@(""OBR2"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,3)
  1. .S:DO @("@INV@(""OBR3"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,4)
  1. .S:DO @("@INV@(""OBR4"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,5)
  1. .S:DO @("@INV@(""OBR7"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,8)
  1. .S:DO @("@INV@(""OBR20"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,21)
  1. .S:DO @("@INV@(""OBR22"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,23)
  1. .S:DO @("@INV@(""OBR25"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,26)
  1. .S:DO @("@INV@(""OBR27"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,28)
  1. .S:DO @("@INV@(""OBR32"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,33)
  1. .S:DO @("@INV@(""OBR33"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,34)
  1. .S:DO @("@INV@(""OBR35"",INI(1))")=$$PIECE^INHU(.LINE,DELIM,36)
  1. .;WHILE $P(DATA,DELIM)="OBX"
  1. .S INI(2)=1 F S DATA=$$GL^INHOU(UIF,LCT) Q:'$$CHECKSEG^INHOU("OBX",0,2) D S INI(2)=INI(2)+1
  1. ..D:'INVS MC^INHS
  1. ..D GET^INHOU(UIF,0) S LINE=$G(LINE),DO=1
  1. ..S:DO @("@INV@(""OBX1"",INI(1),INI(2))")=$$PIECE^INHU(.LINE,DELIM,2)
  1. ..S:DO @("@INV@(""OBX2"",INI(1),INI(2))")=$$PIECE^INHU(.LINE,DELIM,3)
  1. ..S:DO @("@INV@(""OBX3"",INI(1),INI(2))")=$$PIECE^INHU(.LINE,DELIM,4)
  1. ..S:DO @("@INV@(""OBX4"",INI(1),INI(2))")=$$PIECE^INHU(.LINE,DELIM,5)
  1. ..S:DO @("@INV@(""OBX5"",INI(1),INI(2))")=$$PIECE^INHU(.LINE,DELIM,6)
  1. ..S:DO @("@INV@(""OBX6"",INI(1),INI(2))")=$$PIECE^INHU(.LINE,DELIM,7)
  1. ..S:DO @("@INV@(""OBX7"",INI(1),INI(2))")=$$PIECE^INHU(.LINE,DELIM,8)
  1. ..S:DO @("@INV@(""OBX8"",INI(1),INI(2))")=$$PIECE^INHU(.LINE,DELIM,9)
  1. ..S:DO @("@INV@(""OBX14"",INI(1),INI(2))")=$$PIECE^INHU(.LINE,DELIM,15)
  1. ..S:DO @("@INV@(""OBX16"",INI(1),INI(2))")=$$PIECE^INHU(.LINE,DELIM,17)
  1. ..Q
  1. .Q
  1. D:'INVS MC^INHS
  1. ;Entering TRANS section.
  1. ;IF $D(@INV@("MSH1"))
  1. I $D(@INV@("MSH1"))
  1. D:$T
  1. .S (INX,X)=$G(@INV@("MSH1"))
  1. .I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
  1. .S @INV@("MSH1")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH1' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH2"))
  1. .I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
  1. .S @INV@("MSH2")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH2' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH3"))
  1. .I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
  1. .S @INV@("MSH3")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH3' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH4"))
  1. .I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
  1. .S @INV@("MSH4")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH4' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH5"))
  1. .I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
  1. .S @INV@("MSH5")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH5' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH6"))
  1. .I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
  1. .S @INV@("MSH6")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH6' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH7"))
  1. .I X]"" S X=$$TIMEIO^INHUT10(X,$P($G(INTHL7F2),U),$P($G(INTHL7F2),U,2),$P($G(INTHL7F2),U,3),1)
  1. .S @INV@("MSH7")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH7' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH8"))
  1. .I X]"" S X=$$TIMEIO^INHUT10(X,$P($G(INTHL7F2),U),$P($G(INTHL7F2),U,2),$P($G(INTHL7F2),U,3),1)
  1. .S @INV@("MSH8")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH8' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH10"))
  1. .I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
  1. .S @INV@("MSH10")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH10' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH12"))
  1. .S:$L(X) X=+X
  1. .S @INV@("MSH12")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH12' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH13"))
  1. .S:$L(X) X=+X
  1. .S @INV@("MSH13")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH13' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("MSH14"))
  1. .I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
  1. .S @INV@("MSH14")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'MSH14' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .Q
  1. ;IF $D(@INV@("PID1"))
  1. I $D(@INV@("PID1"))
  1. D:$T
  1. .S (INX,X)=$G(@INV@("PID3"))
  1. .S:X]"" X=$$HLPN^INHUT(X,INSUBDEL,INDELIMS,$P($G(INTHL7F2),U,4),"I")
  1. .S @INV@("PID3")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'PID3' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("PID4"))
  1. .I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
  1. .S @INV@("PID4")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'PID4' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("PID5"))
  1. .S:X]"" X=$$HLPN^INHUT(X,INSUBDEL,INDELIMS,$P($G(INTHL7F2),U,4),"I")
  1. .S @INV@("PID5")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'PID5' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("PID6"))
  1. .S:X]"" X=$$HLPN^INHUT(X,INSUBDEL,INDELIMS,$P($G(INTHL7F2),U,4),"I")
  1. .S @INV@("PID6")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'PID6' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("PID7"))
  1. .I X]"" S X=$E(X,1,4)-1700_$E(X,5,8)
  1. .S @INV@("PID7")=$G(X)
  1. .I '$D(X) D ERROR^INHS("Variable 'PID7' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
  1. .K DXS
  1. .S (INX,X)=$G(@INV@("PID11"))
  1. .I $L(X) S:$P(X,INSUBDEL,4)="" $P(X,INSUBDEL,4)=INSUBDEL
  1. 9 .D EN^IS00005B
  1. G D1^IS00005B