当前位置: 首页>>代码示例>>Java>>正文


Java MSH类代码示例

本文整理汇总了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");
        }
    };
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:17,代码来源:HL7MLLPCodecLongTest.java

示例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");
        }
    };
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:17,代码来源:HL7MLLPNettyCodecLongTest.java

示例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");
}
 
开发者ID:jembi,项目名称:openhim-mediator-xds,代码行数:14,代码来源:PIXRequestActor.java

示例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");
        }
    };
}
 
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:38,代码来源:HL7MLLPCodecLongTest.java

示例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;
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:15,代码来源:HL7ReaderV25.java


注:本文中的ca.uhn.hl7v2.model.v25.segment.MSH类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。