ORU^R01 - 版本 2.2 和 2.3(无法从字段 5 获取重复 2 - 最大重复次数仅为 1 次。:段:obx (rep 0) 字段 5)
ORU^R01 - Version 2.2 and 2.3 (can't get repetition 2 from field 5 - maximum repetitions is only 1 reps.: segment: obx (rep 0) field 5)
我在解析邮件时遇到此错误。
pipeparser.Parser(message)
---> 在此行抛出异常。
错误:无法从字段 5 中获取重复 2 - 最大重复次数仅为 1 次。:段:obx (rep 0) 字段 5
Message Version
2.2 and 2.3
示例消息:
MSH|^~&|LAB|SSS|RRRR1||201412080903||ORU^R01|2014342330808001||2.2
PID||000000000^8|000000000^^^SSS^MR|||||F||1||||||||000000000^^^SSS^PN|000000000
PV1|0001|I|^^^SSS|||||||YYY||||||||IP|000000000|1|||||||||||||||||||SSS
ORC|RE|2051855|||CM||1^^^201412051855^^STAT|2051855|201412051855||||EMR||201412080903||SSS^SSS^L
OBR|1|2051855^2051855|339.01149|CULT WD^WOUND CULTURE^L|||201412051858|||Bal|||||WOUND&WOUND&L^WOUND|^CAL^CAR||||3||201412080903|||F||1^^^201412051858^^STAT||4659571
OBX|24|TX|TESTNM^TEST^L||WOUND CULTURE||||||C||260.00.295|201412051858
OBX|25|TX|SOURCE^SOURCE^L||WOUND||||||C||260.00.295|201412051858
OBX|26|TX|COLLDT^COLLECTION DATE/TIME^L||12/05/2014 18:58||||||C||260.00.295|201412051858
OBX|27|TX|PLTDT^PLATE DATE/TIME^L||12/06/2014 14:15||||||C||260.00.295|201412051858
OBX|28|TX|CULTST^CULTURE STATUS^L||Final||||||C||260.00.295|201412051858
OBX|29|TX|SPCMN^SPECIMEN NUMBER^L||339.01149||||||C||260.00.295|201412051858
OBX|30|TX|CLNSIG^CLINICAL SIGNIFICANCE^L||Significance Not Determined||||||C||260.00.295|201412051858
OBX|31|TX|GRAM STAIN^GRAM STAIN^L||MODERATE WHITE BLOOD CELLS~FEW GRAM NEGATIVE BACILLI~FEW GRAM POSITIVE COCCI CLUSTERS~OCCASIONAL GRAM POSITIVE COCCI IN PAIRS|||^N|||F|||201412051858|PM
OBR|2|2051855^2051855|339.01149|CULT WD^WOUND CULTURE^L|||201412051858|||Bal|||||WOUND&WOUND&L^WOUND|^CAL^CAR||||3^1||201412080903|||F|MORMOM^MORMOM|1^^^201412051858^^STAT||4659571
OBX|32|TX|ORG ID^ORGANISM ID^L|1|MODERATE MORGANELLA MORGANII SSP MORGANII|||^N|||C||260.01.285|201412051858|PM
OBR|3|2051855^2051855|339.01149|CULT WD^WOUND CULTURE^L|||201412051858|||Bal|||||WOUND&WOUND&L^WOUND|^CAL^CAR||||3^1||201412080903|||F|MORMOM^MORMOM|1^^^201412051858^^STAT||4659571
OBX|33|NM|AMPICILLIN^AMPICILLIN^L|1|>= 32|||R|||F||260.01.010|201412051858|PM
OBX|34|NM|AMIKACIN^AMIKACIN^L|1|<= 2|||S|||F||260.01.015|201412051858|PM
OBX|35|NM|CEFAZOLIN^CEFAZOLIN^L|1|>= 64|||R|||F||260.01.020|201412051858|PM
OBX|36|NM|CEFTRIAXONE^CEFTRIAXONE^L|1|<= 1|||S|||F||260.01.035|201412051858|PM
OBX|37|NM|CIPROFLOXACIN^CIPROFLOXICIN^L|1|<= 0.25|||S|||F||260.01.040|201412051858|PM
OBX|38|NM|GENTAMICIN^GENTAMICIN^L|1|<= 1|||S|||F||260.01.045|201412051858|PM
OBX|39|NM|NITROFURANTOIN^NITROFURANTOIN^L|1|128|||R|||F||260.01.060|201412051858|PM
OBX|40|NM|PIP/TAZO^PIPERACILLIN/TAZ^L|1|<= 4|||S|||F||260.01.065|201412051858|PM
OBX|41|NM|TOBRAMYCIN^TOBRAMYACIN^L|1|<= 1|||S|||F||260.01.070|201412051858|PM
OBX|42|NM|TRIMETHOPRIM/SULFA^TRIMETH/SULFA^L|1|<= 20|||S|||F||260.01.075|201412051858|PM
OBX|43|NM|AMP SULBACT^AMP/SULBACTAM^L|1|>= 32|||R|||F||260.01.080|201412051858|PM
OBX|44|NM|ERTAPENEM^ERTAPENEM^L^35801-0^Ertapenem Islt MIC^LOINC|1|<= 0.5|||S|||F||260.01.330|201412051858|PM
OBX|45|NM|AZTREONAM^AZTREONAM^L^18868-0^Aztreonam Susc Islt^LOINC|1|<= 1|||S|||F||260.01.335|201412051858|PM
OBX|46|NM|CEFEPIME^CEFEPIME^L^18879-7^Cefepime Susc Islt^LOINC|1|<= 1|||S|||F||260.01.360|201412051858|PM
OBX|47|NM|MEROPENEM^MEROPENEM^L^18943-1^Meropenem Susc Islt^LOINC|1|<= 0.25|||S|||F||260.01.430|201412051858|PM
如错误消息所述,规范仅允许 OBX 中有一个 "Observation Value" 字段 5。如果您查看 OBX Set Id 31,它有多个值(使用重复字符)。
OBX|31|TX|GRAM STAIN^GRAM STAIN^L||MODERATE WHITE BLOOD CELLS~FEW GRAM NEGATIVE BACILLI~FEW GRAM POSITIVE COCCI CLUSTERS~OCCASIONAL GRAM POSITIVE COCCI IN PAIRS|||^N|||F|||201412051858|PM
这在 HL7 v2.2 中是不允许的 - 但在 v2.3 中是允许的。
因此您有两个选择:
- 编辑消息 header,使其成为 v2.3
- 强制解析器使用 2.3 规范。
强制解析器就像
一样简单
PipeParser parser = new PipeParser();
IMessage hl7Message = parser.Parse(hl7, "2.3");
强制 HL7 v2.4
PipeParser parser = new PipeParser();
IMessage hl7Message = parser.Parse(hl7, "2.4");
我在解析邮件时遇到此错误。
pipeparser.Parser(message)
---> 在此行抛出异常。
错误:无法从字段 5 中获取重复 2 - 最大重复次数仅为 1 次。:段:obx (rep 0) 字段 5
Message Version
2.2 and 2.3
示例消息:
MSH|^~&|LAB|SSS|RRRR1||201412080903||ORU^R01|2014342330808001||2.2
PID||000000000^8|000000000^^^SSS^MR|||||F||1||||||||000000000^^^SSS^PN|000000000
PV1|0001|I|^^^SSS|||||||YYY||||||||IP|000000000|1|||||||||||||||||||SSS
ORC|RE|2051855|||CM||1^^^201412051855^^STAT|2051855|201412051855||||EMR||201412080903||SSS^SSS^L
OBR|1|2051855^2051855|339.01149|CULT WD^WOUND CULTURE^L|||201412051858|||Bal|||||WOUND&WOUND&L^WOUND|^CAL^CAR||||3||201412080903|||F||1^^^201412051858^^STAT||4659571
OBX|24|TX|TESTNM^TEST^L||WOUND CULTURE||||||C||260.00.295|201412051858
OBX|25|TX|SOURCE^SOURCE^L||WOUND||||||C||260.00.295|201412051858
OBX|26|TX|COLLDT^COLLECTION DATE/TIME^L||12/05/2014 18:58||||||C||260.00.295|201412051858
OBX|27|TX|PLTDT^PLATE DATE/TIME^L||12/06/2014 14:15||||||C||260.00.295|201412051858
OBX|28|TX|CULTST^CULTURE STATUS^L||Final||||||C||260.00.295|201412051858
OBX|29|TX|SPCMN^SPECIMEN NUMBER^L||339.01149||||||C||260.00.295|201412051858
OBX|30|TX|CLNSIG^CLINICAL SIGNIFICANCE^L||Significance Not Determined||||||C||260.00.295|201412051858
OBX|31|TX|GRAM STAIN^GRAM STAIN^L||MODERATE WHITE BLOOD CELLS~FEW GRAM NEGATIVE BACILLI~FEW GRAM POSITIVE COCCI CLUSTERS~OCCASIONAL GRAM POSITIVE COCCI IN PAIRS|||^N|||F|||201412051858|PM
OBR|2|2051855^2051855|339.01149|CULT WD^WOUND CULTURE^L|||201412051858|||Bal|||||WOUND&WOUND&L^WOUND|^CAL^CAR||||3^1||201412080903|||F|MORMOM^MORMOM|1^^^201412051858^^STAT||4659571
OBX|32|TX|ORG ID^ORGANISM ID^L|1|MODERATE MORGANELLA MORGANII SSP MORGANII|||^N|||C||260.01.285|201412051858|PM
OBR|3|2051855^2051855|339.01149|CULT WD^WOUND CULTURE^L|||201412051858|||Bal|||||WOUND&WOUND&L^WOUND|^CAL^CAR||||3^1||201412080903|||F|MORMOM^MORMOM|1^^^201412051858^^STAT||4659571
OBX|33|NM|AMPICILLIN^AMPICILLIN^L|1|>= 32|||R|||F||260.01.010|201412051858|PM
OBX|34|NM|AMIKACIN^AMIKACIN^L|1|<= 2|||S|||F||260.01.015|201412051858|PM
OBX|35|NM|CEFAZOLIN^CEFAZOLIN^L|1|>= 64|||R|||F||260.01.020|201412051858|PM
OBX|36|NM|CEFTRIAXONE^CEFTRIAXONE^L|1|<= 1|||S|||F||260.01.035|201412051858|PM
OBX|37|NM|CIPROFLOXACIN^CIPROFLOXICIN^L|1|<= 0.25|||S|||F||260.01.040|201412051858|PM
OBX|38|NM|GENTAMICIN^GENTAMICIN^L|1|<= 1|||S|||F||260.01.045|201412051858|PM
OBX|39|NM|NITROFURANTOIN^NITROFURANTOIN^L|1|128|||R|||F||260.01.060|201412051858|PM
OBX|40|NM|PIP/TAZO^PIPERACILLIN/TAZ^L|1|<= 4|||S|||F||260.01.065|201412051858|PM
OBX|41|NM|TOBRAMYCIN^TOBRAMYACIN^L|1|<= 1|||S|||F||260.01.070|201412051858|PM
OBX|42|NM|TRIMETHOPRIM/SULFA^TRIMETH/SULFA^L|1|<= 20|||S|||F||260.01.075|201412051858|PM
OBX|43|NM|AMP SULBACT^AMP/SULBACTAM^L|1|>= 32|||R|||F||260.01.080|201412051858|PM
OBX|44|NM|ERTAPENEM^ERTAPENEM^L^35801-0^Ertapenem Islt MIC^LOINC|1|<= 0.5|||S|||F||260.01.330|201412051858|PM
OBX|45|NM|AZTREONAM^AZTREONAM^L^18868-0^Aztreonam Susc Islt^LOINC|1|<= 1|||S|||F||260.01.335|201412051858|PM
OBX|46|NM|CEFEPIME^CEFEPIME^L^18879-7^Cefepime Susc Islt^LOINC|1|<= 1|||S|||F||260.01.360|201412051858|PM
OBX|47|NM|MEROPENEM^MEROPENEM^L^18943-1^Meropenem Susc Islt^LOINC|1|<= 0.25|||S|||F||260.01.430|201412051858|PM
如错误消息所述,规范仅允许 OBX 中有一个 "Observation Value" 字段 5。如果您查看 OBX Set Id 31,它有多个值(使用重复字符)。
OBX|31|TX|GRAM STAIN^GRAM STAIN^L||MODERATE WHITE BLOOD CELLS~FEW GRAM NEGATIVE BACILLI~FEW GRAM POSITIVE COCCI CLUSTERS~OCCASIONAL GRAM POSITIVE COCCI IN PAIRS|||^N|||F|||201412051858|PM
这在 HL7 v2.2 中是不允许的 - 但在 v2.3 中是允许的。
因此您有两个选择:
- 编辑消息 header,使其成为 v2.3
- 强制解析器使用 2.3 规范。
强制解析器就像
一样简单PipeParser parser = new PipeParser();
IMessage hl7Message = parser.Parse(hl7, "2.3");
强制 HL7 v2.4
PipeParser parser = new PipeParser();
IMessage hl7Message = parser.Parse(hl7, "2.4");