- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何使用 HAPI Framework 解析 HL7 多段(ORC/OBR/OBX)。
我还面临与解析多个实验室订单相关的问题,还面临与特殊字符 (MSH|^~\&#|
) 编码相关的问题。
MSH|^~\&|NIST Test Lab APP|NIST Lab Facility||NIST EHR Facility|20110531140551-0500||ORU^R01^ORU_R01|NIST-LRI-NG-RN-005.01|T|2.5.1|||AL|NE|||||LRI_Common_Component^^2.16.840.1.113883.9.16^ISO~LRI_NG_Component^^2.16.840.1.113883.9.13^ISO~LRI_RN_Component^^2.16.840.1.113883.9.15^ISO
PID|1||PATID1239^^^NIST MPI^MR||Smirnoff^Peggy^^^^^M||19750401|F||2106-3^White^HL70005^wh^white^L
ORC|RE|ORD448811^NIST EHR|R-511^NIST Lab Filler|||||||||1234567890^Fine^Larry^^^Dr.^^^NIST-AA-1^L^^^NPI
OBR|1|ORD448811^NIST EHR|R-511^NIST Lab Filler|HepABC Panel^Hepatitis A B C Panel^L|||20120628070100|||||||||1234567890^Fine^Larry^^^Dr.^^^NIST-AA-1^L^^^NPI||||||20120629132900-0500|||F
OBX|1|CWE|22314-9^Hepatitis A virus IgM Ab [Presence] in Serum^LN^HAVM^Hepatitis A IgM antibodies (IgM anti-HAV)^L||260385009^Negative (qualifier value)^SCT^NEG^NEGATIVE^L^^^Negative (qualifier value)||Negative|N|||F|||20120628070100|||||20120628100500||||Princeton Hospital Laboratory^^^^^NIST HCAA-1^XX^^^34D4567890|123 High Street^^Princeton^NJ^08540^USA^O^^34021|^Martin^Steven^M^^Dr.
OBX|2|CWE|20575-7^Hepatitis A virus Ab [Presence] in Serum^LN^HAVAB^Hepatitis A antibodies (anti-HAV)^L||260385009^Negative (qualifier value)^SCT^NEG^NEGATIVE^L^^^Negative (qualifier value)||Negative|N|||F|||20120628070100|||||20120628100500||||Princeton Hospital Laboratory^^^^^NIST HCAA-1^XX^^^34D4567890|123 High Street^^Princeton^NJ^08540^USA^O^^34021|^Martin^Steven^M^^Dr.
OBX|3|CWE|16933-4^Hepatitis B virus core Ab [Presence] in Serum^LN^HBVcAB^Hepatitis B core antibodies (anti-HBVc)^L||260385009^Negative (qualifier value)^SCT^NEG^NEGATIVE^L^^^Negative (qualifier value)||Negative|N|||F|||20120628070100|||||20120628100500||||Princeton Hospital Laboratory^^^^^NIST HCAA-1^XX^^^34D4567890|123 High Street^^Princeton^NJ^08540^USA^O^^34021|^Martin^Steven^M^^Dr.
OBX|4|SN|22316-4^Hepatitis B virus core Ab [Units/volume] in Serum^LN^HBcAbQ^Hepatitis B core antibodies (anti-HBVc) Quant^L||^0.40|[IU]/mL^international unit per milliliter^UCUM^IU/ml^^L|<0.50 IU/mL|N|||F|||20120628070100|||||20120628100500||||Princeton Hospital Laboratory^^^^^NIST HCAA-1^XX^^^34D4567890|123 High Street^^Princeton^NJ^08540^USA^O^^34021|^Martin^Steven^M^^Dr.
OBX|5|CWE|22320-6^Hepatitis B virus e Ab [Presence] in Serum^LN^HBVeAB^Hepatitis B e antibodies (anti-HBVe)^L||260385009^Negative (qualifier value)^SCT^NEG^NEGATIVE^L^^^Negative (qualifier value)||Negative|N|||F|||20120628070100|||||20120628100500||||Princeton Hospital Laboratory^^^^^NIST HCAA-1^XX^^^34D4567890|123 High Street^^Princeton^NJ^08540^USA^O^^34021|^Martin^Steven^M^^Dr.
OBX|6|CWE|5195-3^Hepatitis B virus surface Ag [Presence] in Serum^LN^HBVsAG^Hepatitis B surface antigen (HBsAg)^L||260385009^Negative (qualifier value)^SCT^NEG^NEGATIVE^L^^^Negative (qualifier value)||Negative|N|||F|||20120628070100|||||20120628100500||||Princeton Hospital Laboratory^^^^^NIST HCAA-1^XX^^^34D4567890|123 High Street^^Princeton^NJ^08540^USA^O^^34021|^Martin^Steven^M^^Dr.
OBX|7|CWE|22322-2^Hepatitis B virus surface Ab [Presence] in Serum^LN^HBVSAB^Hepatitis B surface antibody (anti-HBVs)^L||260385009^Negative (qualifier value)^SCT^NEG^NEGATIVE^L^^^Negative (qualifier value)||Negative|N|||F|||20120628070100|||||20120628100500||||Princeton Hospital Laboratory^^^^^NIST HCAA-1^XX^^^34D4567890|123 High Street^^Princeton^NJ^08540^USA^O^^34021|^Martin^Steven^M^^Dr.
OBX|8|CWE|16128-1^Hepatitis C virus Ab [Presence] in Serum^LN^HCVAB^Hepatitis C antibody screen (anti-HCV)^L||10828004^Positive (qualifier value)^SCT^POS^POSITIVE^L^^^Positive (qualifier value)||Negative|A|||F|||20120628070100|||||20120628100500||||Princeton Hospital Laboratory^^^^^NIST HCAA-1^XX^^^34D4567890|123 High Street^^Princeton^NJ^08540^USA^O^^34021|^Martin^Steven^M^^Dr.
OBX|9|SN|48159-8^Hepatitis C virus Ab Signal/Cutoff in Serum or Plasma by Immunoassay^LN^HCVSCO^Hepatitis C antibodies Signal to Cut-off Ratio^L||^10.8|{s_co_ratio}^Signal to cutoff ratio^UCUM^s/co^^L|0.0-0.9 s/co|H|||F|||20120628070100|||||20120628100500||||Princeton Hospital Laboratory^^^^^NIST HCAA-1^XX^^^34D4567890|123 High Street^^Princeton^NJ^08540^USA^O^^34021|^Martin^Steven^M^^Dr.
NTE|1||Negative: < 0.8; Indeterminate 0.8 - 0.9; Positive: > 0.9. In order to reduce the incidence of a false positive result, the CDC recommends that all s/co ratios between 1.0 and 10.9 be confirmed with additional Verification or PCR testing.
SPM|1|||119364003^Serum specimen (specimen)^SCT^SER^Serum^L|||||||||||||20120628070100
ORC|RE||R-511^NIST Lab Filler|||||||||1234567890^Fine^Larry^^^Dr.^^^NIST-AA-1^L^^^NPI|||||||||||||||||||HepABC Panel^Hepatitis A B C Panel^L
OBR|2||R-511^NIST Lab Filler|11011-4^Hepatitis C virus RNA [Units/volume] (viral load) in Serum or Plasma by Probe and target amplification method^LN^HCVRNA^Hepatitis C RNA PCR^L|||20120628070100||||G|||||1234567890^Fine^Larry^^^Dr.^^^NIST-AA-1^L^^^NPI||||||20120629132900-0500|||F|16128-1&Hepatitis C virus Ab [Presence] in Serum&LN&HCVAB&Hepatitis C antibody screen (anti-HCV)&L|||ORD448811&NIST EHR^R-511&NIST Lab Filler|||||||||||||||||||||HepABC Panel^Hepatitis A B C Panel^L
OBX|1|SN|11011-4^Hepatitis C virus RNA [Units/volume] (viral load) in Serum or Plasma by Probe and target amplification method^LN^HCVRNA^Hepatitis C RNA PCR^L||^7611200|[IU]/mL^international unit per milliliter^UCUM^IU/ml^^L|<43 IU/mL|H|||F|||20120628070100|||||20120629092700||||Princeton Hospital Laboratory^^^^^NIST HCAA-1^XX^^^34D4567890|123 High Street^^Princeton^NJ^08540^USA^O^^34021|^Martin^Steven^M^^Dr.
代码片段:
package HAPIHL7Parser.HAPIHL7Parser;
import java.io.FileReader;
import ca.uhn.hl7v2.DefaultHapiContext;
import ca.uhn.hl7v2.HapiContext;
import ca.uhn.hl7v2.model.Message;
import ca.uhn.hl7v2.parser.Parser;
import ca.uhn.hl7v2.util.Hl7InputStreamMessageIterator;
import ca.uhn.hl7v2.util.Terser;
import ca.uhn.hl7v2.validation.impl.NoValidation;
/**
* 40 * Example code for using the {@link Terser} 41 * 42 * @author
* <a href="Sitansu:swainsitansu@gmail.com">Sitansu</a> 43 * @version $Revision:
* 1.3 $ updated on $Date: 2009-08-06 22:43:33 $ by $Author: Sitansu $ 44
*/
public class ExampleUseTerser {
/**
* 49 * A simple example of parsing a message 50 * 51 * @throws HL7Exception
* 52 * @throws EncodingNotSupportedException 53
*/
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
FileReader reader = new FileReader("src\\main\\resource\\LRI_5.1-NG-RN_Reflex_Hepatitis_Parent_Child_Message.txt");
// Create an iterator to iterate over all the messages
Hl7InputStreamMessageIterator iter = new Hl7InputStreamMessageIterator(reader);
HapiContext context = new DefaultHapiContext();
context.setValidationContext(new NoValidation());
Parser p = context.getGenericParser();
String msg = null;
while (iter.hasNext()) {
/*
* If we don't already have a connection, create one. 42 * Note that
* unless something goes wrong, it's very common 43 * to keep
* reusing the same connection until we are done 44 * sending
* messages. Many systems keep a connection open 45 * even if a long
* period will pass between messages being 46 * sent. This is good
* practice, as it is much faster than 47 * creating a new
* connection each time. 48
*/
msg = iter.next().toString();
System.out.println("Sent message. Response was " + msg);
}
Message hapiMsg = p.parse(msg);
// Message hapiMsg = p.parse(next);
/*
* 70 * Another way of reading messages is to use a Terser. The terser
* 71 * accepts a particular syntax to retrieve segments. See the API 72
* * documentation for the Terser for more information. 73
*/
Terser terser = new Terser(hapiMsg);
/*
* 77 * Sending Application is in MSH-3-1 (the first component of the
* third 78 * field of the MSH segment) 79
*/
String sendingApplication = terser.get("/.MSH-3");
System.out.println("Sending Application:" + sendingApplication);
String sendingfacility = terser.get("/.MSH-4");
System.out.println("Sending Facility:" + sendingfacility);
String timeofdate = terser.get("/.MSH-7");
System.out.println("Date/time of the message:" + timeofdate);
String messagetype = terser.get("/.MSH-9");
System.out.println("Message Type:" + messagetype);
String messageControlID = terser.get("/.MSH-10");
System.out.println("Message Control ID:" + messageControlID);
String patientIDTypeCode = terser.get("/.PID-3-5");
System.out.println("Patient ID Type Code:" + patientIDTypeCode);
String dateOfBirth = terser.get("/.PID-7");
System.out.println("Date of Birth:" + dateOfBirth);
String placerGroupNumber = terser.get("/.ORC-4-1");
System.out.println("Placer Group Number:" + placerGroupNumber);
String placerOrderNo = terser.get("/.ORC-2-1");
System.out.println("Placer Order Number:" + placerOrderNo);
String fillerOrderNo = terser.get("/.ORC-3-1");
System.out.println("Filler Order Number:" + fillerOrderNo);
String orderProviderID = terser.get("/.ORC-12-1");
System.out.println("Ordering Provider ID:" + orderProviderID);
String orderProviderIDType = terser.get("/.ORC-12-13");
System.out.println("Ordering Provider ID Type:" + orderProviderIDType);
String plcOrderNO = terser.get("/.OBR-2-1");
System.out.println("Placer Order Number:" + plcOrderNO);
String fillrOrdNo = terser.get("/.OBR-3-1");
System.out.println("Filler Order Number:" + fillrOrdNo);
String testCode = terser.get("/.OBR-4-1");
System.out.println("Test Code:" + testCode);
String testDesc = terser.get("/.OBR-4-2");
System.out.println("Test Description:" + testDesc);
String testALTDesc = terser.get("/.OBR-4-9");
System.out.println("Test alternative Description:" + testALTDesc);
String obsDateTime = terser.get("/.OBR-7-1");
System.out.println("Observation Date Time:" + obsDateTime);
String speciActionCode = terser.get("/.OBR-11");
System.out.println("Specimen Action Code:" + speciActionCode);
String relevantClinicInfo = terser.get("/.OBR-13-1");
System.out.println("Relevant Clinical Information:" + relevantClinicInfo);
String relevantClinicInfo2 = terser.get("/.OBR-13-2");
System.out.println("Relevant Clinical Information:" + relevantClinicInfo2);
String resultStatus = terser.get("/.OBR-25");
System.out.println("Result Status:" + resultStatus);
String test = terser.get("/.OBSERVATION(0)/OBX-3-1");
System.out.println("Result Status:" + test);
String test1 = terser.get("/.OBSERVATION(2)/OBX-3-1");
System.out.println("Result Status:" + test1);
String test2 = terser.get("/.OBSERVATION(3)/OBX-3-1");
System.out.println("Result Status:" + test2);
String test3 = terser.get("/.OBSERVATION(4)/OBX-3-1");
System.out.println("Result Status:" + test3);
//terser.getFinder().iterate(, true);
String testNotes = terser.get("/.NTE");
System.out.println("Test Notes:" + testNotes);
String speType = terser.get("/.SPM-4-9");
System.out.println("Specimen Type:" + speType);
String speciRejReason = terser.get("/.SPM-21-9");
System.out.println("Specimen Reject reason:" + speciRejReason);
String specCond = terser.get("/.SPM-24-9");
System.out.println("Specimen condition:" + specCond);
String specCollStartDateTime = terser.get("/.SPM-17-1-1");
System.out.println("Speciment Collection Start Date Time:" + specCollStartDateTime);
String notesCommts = terser.get("/.NTE-3");
System.out.println("Notes and Comments:" + notesCommts);
String obxID = terser.get("/.OBX-3-1");
System.out.println("Observation ID:" + obxID);
String obxText = terser.get("/.OBX-3-2");
System.out.println("Observation Text:" + obxText);
String obxText2 = terser.get("/.OBX-3-9");
System.out.println("Observation Text:" + obxText2);
String obxValue = terser.get("/.OBX-5-1");
System.out.println("Observation Value:" + obxValue);
String obxUnits = terser.get("/.OBX-6-1");
System.out.println("Observation Units:" + obxUnits);
String refRange = terser.get("/.OBX-7");
System.out.println("Reference Range:" + refRange);
String abnormalFlags = terser.get("/.OBX-8");
System.out.println("Abnormal Flags:" + abnormalFlags);
String obXResultStatus = terser.get("/.OBX-11");
System.out.println("Observation Result Status:" + obXResultStatus);
String dateOfObservation = terser.get("/.OBX-14-1");
System.out.println("Date/Time of the Observation:" + dateOfObservation);
String perOrgName = terser.get("/.OBX-23-1");
System.out.println("Performing Organization Name:" + perOrgName);
String perOrgAdd1 = terser.get("/.OBX-24-1");
System.out.println("Performing Organization address Line 1:" + perOrgAdd1);
String perOrgAdd2 = terser.get("/.OBX-24-2");
System.out.println("Performing Organization address Line 2:" + perOrgAdd2);
String perOrgCity = terser.get("/.OBX-24-3");
System.out.println("Performing Organization City:" + perOrgCity);
String perOrgState = terser.get("/.OBX-24-4");
System.out.println("Performing Organization State:" + perOrgState);
String perOrgZipCode = terser.get("/.OBX-24-5");
System.out.println("Performing Organization Zip code:" + perOrgZipCode);
// HIS
/*
* 85 * We can use brackets to get particular repetitions 86
*/
/*
* 108 * MSH|^~\&|||||||ORU^R01|||2.5 109 * OBX|1||ST||This is the value
* for rep 0 110 * OBX|2||ST||This is the value for rep 1 111 *
* OBX|3||ST||This is the value for rep 2 112 * OBX|4||ST||This is the
* value for rep 3 113 * OBX|5||ST||This is the value for rep 4
*/
}
}
最佳答案
您可以在 get
调用时指定索引,如下所示:
String perOrgCity = terser.get("/.OBX1-24-3");
注意上面代码中OBX1
中的1
。索引从零开始。如果您想读取多个循环计数器,只需将 1 替换为循环计数器即可。
这里是类似的question .
关于java - 如何使用 HAPI 框架工作解析 HL7 多段(ORC/OBR/OBX)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49666228/
由于 Maven 不能保证一个 jar 也是一个包,我想使用 OBR 作为我的项目存储库。当然,在 OSGi 的情况下,它有很多更好的功能,这就是我使用它的原因:) 那么,是否有可能将发布到 Mave
有谁知道任何提供 OBR 来托管我自己的 bundle 的服务吗? 类似于 github - 但用于 bundle 。 (如果没有 - 有没有人创建过自己的 OBR 服务器,这有多难?) 编辑:我通过
有没有办法在Felix的config.properties文件中指定多个OBR仓库?我确实可以在运行时添加存储库,但我必须在重启后添加。 “Prefrences Service”没有帮助,似乎“Bun
我正在研究部署和更新 OSGI(特别是 Karaf)应用程序的方法。似乎有几种选择。一个是使用 OSGi Bundle Repository (OBR),另一个是使用 Karaf 中的 Feature
我想安装 Nexus-obr-plugin GitHub在我的 Nexus oss 2.10.0-02 中。 标准 Nexus OSS 中似乎没有提供 OBR 插件。我可以找到这个插件的 jar 版本
以前我一直在使用 Maven 和 maven-bundle-plugin 来存档以下内容: 做的时候mvn install , 本地 maven repo 自动包含我的包 + 我所有的包的 deps
获得在 Mirth 工作的机会,在 OBR 字段中添加条目。在这个论坛的帮助下,我能够编辑现有数据,效果非常好。但无法将数据添加到源 HL7 中不存在的字段。下面是示例, 来源HL7 PV2|||||
我的 Maven 存储库有问题,我正在尝试让 eclipse 的 BNDTools 插件与我的本地 m2 存储库一起使用。但它声称我的 m2 存储库不是 OBR 存储库,因此不能用于 OBR 解析。
我正在尝试使用 Python 库 hl7apy 生成 HL7 消息,但是生成 HL7 消息时,它不会在输出中给出 OBR 段,请尝试解决此查询。 代码是 from hl7apy import core
有人在使用 OSGi Bundle Repository 吗?为了什么? 最佳答案 我在 apache felix 上试过了,我觉得它很棒。您可以将您的 osgi 容器指向多个 obrs,当您安装一个
我正在寻找一种巧妙的方法来在 Virgo 容器上部署和管理 bundle ,但也想确保如果我们想在几年内从 Virgo 迁移,我们不会与它紧密相连。我们使用的是 Maven,因此免费获取 OBR,这可
我一直致力于一个以 Apache Sling 和其他技术为中心的小型 Java 项目(其他一些支持技术是开源的,有些不是)。 我想从一些易于访问的存储库中共享一个包和一个 maven 原型(proto
我正在尝试解析版本为 2.3.1 的 HL7 消息文件。解析消息时,OBX 段为空。 如果我在 HL7 消息中没有 OBR 段,Terser 无法获取 OBX 段值(它返回空值),那么查看 HL7 消
以下文本是 hl7 消息,我可以解析除 NTE 段之外的许多段。我正在使用 HAPI 来解析 hl7 消息。我是 HL7 新手,所以请任何人在 HAPI 中建议相关类。如何解析NTE段?如果能用一些例
作为HL7解析器开发的一部分,需要知道 HL7 消息中多个 OBR 段的放置器顺序和填充器顺序号是否相同 . 在互联网上阅读有关砂纸和填料订单号的理论。但是没能找到好的例子。 期待有好的例子的答案。
从 nexus 文档中,我只能在版本 2.xx 中找到与 osgi 相关的部分,osgi 支持在版本 3 中是否已删除,或者它现在是一个内置功能? 最佳答案 OBR 支持不太可能很快从 Sonatyp
大约 10 年前,我使用了 Mirth,发现我几乎忘记了所有内容,而且我的很多资源不再可用。我希望遍历 OBR 和 OBX 段以提取 OBR 4.2、7.1、16.2 以用作节标题和 OBX 3.2、
如何使用 terser 使用 HAPI 解析 HL7 中的多个 OBR 段 我有这样的示例 hl7 消息 MSH|^~\&|SENDERAPP|SENDERFAC|COVCDR|COVCDR|2013
如何使用 HAPI Framework 解析 HL7 多段(ORC/OBR/OBX)。 我还面临与解析多个实验室订单相关的问题,还面临与特殊字符 (MSH|^~\|) 编码相关的问题。 MSH|
我想知道是否有在 C# 中使用 nHAPI 经验的好人能够帮助新手解决 HL7 消息的 OBR-15 字段(样本源)?我四处寻找,但找不到任何在线文档来帮助我,所以我将不胜感激任何建议。 我的问题是,
我是一名优秀的程序员,十分优秀!