本文整理汇总了Java中ca.uhn.hl7v2.model.v25.segment.MSH类的典型用法代码示例。如果您正苦于以下问题:Java MSH类的具体用法?Java MSH怎么用?Java MSH使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MSH类属于ca.uhn.hl7v2.model.v25.segment包,在下文中一共展示了MSH类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processMessage
import ca.uhn.hl7v2.model.v25.segment.MSH; //导入依赖的package包/类
@Override
public Message processMessage(Message hapiMsg) {
System.out.println("#################################");
System.out.println("#################################");
System.out.println("#################################");
System.out.println("#################################");
System.out.println("I got a v25 HAPI message");
ADT_A01 adtMsg = (ADT_A01)hapiMsg;
MSH msh = adtMsg.getMSH();
XPN[] xpns = adtMsg.getPID().getPatientName();
for (XPN xpn : xpns ) {
System.out.println(xpn.toString());
}
return null;
}
开发者ID:springframeworkguru,项目名称:hapi-spring-integration,代码行数:19,代码来源:HL7v25InboundMessageServiceImpl.java
示例2: createRouteBuilder
import ca.uhn.hl7v2.model.v25.segment.MSH; //导入依赖的package包/类
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("mina2:tcp://127.0.0.1:" + getPort() + "?sync=true&codec=#hl7codec").process(new Processor() {
public void process(Exchange exchange) throws Exception {
assertEquals(70010, exchange.getIn().getBody(byte[].class).length);
MDM_T02 input = (MDM_T02)exchange.getIn().getBody(Message.class);
assertEquals("2.5", input.getVersion());
MSH msh = input.getMSH();
assertEquals("20071129144629", msh.getDateTimeOfMessage().getTime().getValue());
exchange.getOut().setBody("some response");
}
}).to("mock:result");
}
};
}
示例3: createRouteBuilder
import ca.uhn.hl7v2.model.v25.segment.MSH; //导入依赖的package包/类
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("netty4:tcp://127.0.0.1:" + getPort() + "?sync=true&encoder=#hl7encoder&decoder=#hl7decoder").process(new Processor() {
public void process(Exchange exchange) throws Exception {
assertEquals(70010, exchange.getIn().getBody(byte[].class).length);
MDM_T02 input = (MDM_T02)exchange.getIn().getBody(Message.class);
assertEquals("2.5", input.getVersion());
MSH msh = input.getMSH();
assertEquals("20071129144629", msh.getDateTimeOfMessage().getTime().getValue());
exchange.getOut().setBody("some response");
}
}).to("mock:result");
}
};
}
示例4: constructBasicMSHSegment
import ca.uhn.hl7v2.model.v25.segment.MSH; //导入依赖的package包/类
private void constructBasicMSHSegment(String correlationId, Terser t) throws HL7Exception {
MSH msh = (MSH) t.getSegment("MSH");
t.set("MSH-1", "|");
t.set("MSH-2", "^~\\&");
t.set("MSH-3-1", config.getProperty("pix.sendingApplication"));
t.set("MSH-4-1", config.getProperty("pix.sendingFacility"));
t.set("MSH-5-1", config.getProperty("pix.receivingApplication"));
t.set("MSH-6-1", config.getProperty("pix.receivingFacility"));
msh.getDateTimeOfMessage().getTime().setValue(dateFormat.format(new Date()));
t.set("MSH-10", correlationId);
t.set("MSH-11-1", "P");
t.set("MSH-12-1-1", "2.5");
}
示例5: createRouteBuilder
import ca.uhn.hl7v2.model.v25.segment.MSH; //导入依赖的package包/类
@Override
protected RouteBuilder createRouteBuilder()
throws Exception
{
return new RouteBuilder() {
@Override
public void configure()
throws Exception
{
this
.from("mina:tcp://127.0.0.1:8888?sync=true&codec=#hl7codec")
.process(new Processor() {
@Override
public void process(Exchange exchange)
throws Exception
{
assertEquals(70010, exchange
.getIn()
.getBody()
.toString()
.length());
MDM_T02 input =
(MDM_T02) exchange.getIn().getBody(
Message.class);
assertEquals("2.5", input.getVersion());
MSH msh = input.getMSH();
assertEquals("20071129144629", msh
.getDateTimeOfMessage()
.getTime()
.getValue());
exchange.getOut().setBody("some response");
}
})
.to("mock:result");
}
};
}
示例6: getSender
import ca.uhn.hl7v2.model.v25.segment.MSH; //导入依赖的package包/类
@Override
public String getSender() throws ElexisException{
String sender;
try {
MSH msh = (MSH) message.get("MSH");
sender = msh.getMsh4_SendingFacility().getNamespaceID().getValue();
if (sender == null) {
sender = "";
}
} catch (HL7Exception e) {
throw new ElexisException(e.getMessage(), e);
}
return sender;
}