Examples of MDM_T02


Examples of ca.uhn.hl7v2.model.v231.message.MDM_T02

    /*
     * In this example, a CDA r2 document is being embedded as mime content
     * in an MDM_T02 message.
     */
   
    MDM_T02 mdmMessage = new MDM_T02();

    // A few basic MSH fields are populated. In a real situation, this would not be enough
        // to produce a valid message, but for demonstration purposes we'll skip a few
        // fields.
        mdmMessage.getMSH().getEncodingCharacters().setValue("^~\\&");
        mdmMessage.getMSH().getFieldSeparator().setValue("|");

        OBX obx = mdmMessage.getOBX();
   
        // This is not a complete CDA document, but it serves as a good example
        String sampleClinicalDocument = "<ClinicalDocument xsi:schemaLocation=\"urn:hl7-org:v3 CDA.ReleaseTwo.CommitteeBallot03.Aug.2004.xsd\" templateId=\"2.16.840.1.113883.3.27.1776\">\r\n" +
            "   <id extension=\"c266\" root=\"2.16.840.1.113883.3.933\"/>\r\n" +
            "   <code code=\"11488-4\" codeSystem=\"2.16.840.1.113883.6.1\" displayName=\"Consultation note\"/>\r\n" +
View Full Code Here

Examples of ca.uhn.hl7v2.model.v25.message.MDM_T02

        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");
            }
View Full Code Here

Examples of ca.uhn.hl7v2.model.v25.message.MDM_T02

        return new RouteBuilder() {
            public void configure() throws Exception {
                from("mina:tcp://127.0.0.1:8888?sync=true&codec=#hl7codec").process(new Processor() {
                    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");
            }
View Full Code Here

Examples of ca.uhn.hl7v2.model.v25.message.MDM_T02

        return new RouteBuilder() {
            public void configure() throws Exception {
                from("mina:tcp://127.0.0.1:8888?sync=true&codec=#hl7codec").process(new Processor() {
                    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");
            }
View Full Code Here

Examples of ca.uhn.hl7v2.model.v25.message.MDM_T02

        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().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");
            }
View Full Code Here

Examples of ca.uhn.hl7v2.model.v25.message.MDM_T02

        return new RouteBuilder() {
            public void configure() throws Exception {
                from("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec").process(new Processor() {
                    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");
            }
View Full Code Here

Examples of ca.uhn.hl7v2.model.v25.message.MDM_T02

        return new RouteBuilder() {
            public void configure() throws Exception {
                from("mina:tcp://127.0.0.1:8888?sync=true&codec=#hl7codec").process(new Processor() {
                    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");
            }
View Full Code Here

Examples of ca.uhn.hl7v2.model.v25.message.MDM_T02

        return new RouteBuilder() {
            public void configure() throws Exception {
                from("mina2:tcp://127.0.0.1:8888?sync=true&codec=#hl7codec").process(new Processor() {
                    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");
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.