Package ca.uhn.hl7v2.model.v25.message

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


        Parser xmlParser = new DefaultXMLParser();
        Parser ediParser = new PipeParser();
        ediParser.setValidationContext(new NoValidation());
        String xmlDoc = null;
        try {
            Message message = ediParser.parse(rowHL7);
            ConformanceProfileRule rule = new ConformanceProfileRule();
        ValidationException[] exs = rule.test(message);
        if (exs != null && exs.length > 0) {
          throw new HL7Exception(exs[0].getMessage());
       
View Full Code Here


        String encodedMessage = new PipeParser().encode(theIn);
        System.out.println("Received message:\n" + encodedMessage + "\n\n");

        // Now we need to generate a message to return. This will generally be an ACK message.
        Segment msh = (Segment) theIn.get("MSH");
        Message retVal;
        try {
            // This method takes in the MSH segment of an incoming message, and generates an
            // appropriate ACK
            retVal = DefaultApplication.makeACK(msh);
        } catch (IOException e) {
View Full Code Here

        // The initiator is used to transmit unsolicited messages
        Initiator initiator = connection.getInitiator();
        HL7Message sampleMessage = new HL7Message();

        //send
        Message response = null;
        try {
            response = initiator.sendAndReceive(sampleMessage.getHL7Message());
            PipeParser parser = new PipeParser();
            String responseString = parser.encode(response);
            System.out.println("Received response:\n" + responseString);
View Full Code Here

        String encodedMessage = new PipeParser().encode(theIn);
        System.out.println("Received message:\n" + encodedMessage + "\n\n");

        // Now we need to generate a message to return. This will generally be an ACK message.
        Segment msh = (Segment) theIn.get("MSH");
        Message retVal;
        try {
            // This method takes in the MSH segment of an incoming message, and generates an
            // appropriate ACK
            retVal = DefaultApplication.makeACK(msh);
View Full Code Here

        assertEquals("MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123", lines[0]);
        assertEquals("MSA|AA|123", lines[1]);
    }

    public void process(Exchange exchange) throws Exception {
        QRY_A19 a19 = exchange.getIn().getBody(QRY_A19.class);
        MSH msh = a19.getMSH();
        assertEquals("MYSENDER", msh.getSendingApplication().getHd1_NamespaceID().getValue());

        String out = "MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123\rMSA|AA|123\n";
        exchange.getOut().setBody(out);
    }
View Full Code Here

        assertEquals("MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123", lines[0]);
        assertEquals("MSA|AA|123", lines[1]);
    }

    public void process(Exchange exchange) throws Exception {
        QRY_A19 a19 = exchange.getIn().getBody(QRY_A19.class);
        MSH msh = a19.getMSH();
        assertEquals("MYSENDER", msh.getSendingApplication().getHd1_NamespaceID().getValue());

        String out = "MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123\rMSA|AA|123\n";
        exchange.getOut().setBody(out);
    }
View Full Code Here

        assertEquals("MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123", lines[0]);
        assertEquals("MSA|AA|123", lines[1]);
    }

    public void process(Exchange exchange) throws Exception {
        QRY_A19 a19 = exchange.getIn().getBody(QRY_A19.class);
        MSH msh = a19.getMSH();
        assertEquals("MYSENDER", msh.getSendingApplication().getHd1_NamespaceID().getValue());

        String out = "MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123\rMSA|AA|123\n";
        exchange.getOut().setBody(out);
    }
View Full Code Here

        assertEquals("MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123", lines[0]);
        assertEquals("MSA|AA|123", lines[1]);
    }

    public void process(Exchange exchange) throws Exception {
        QRY_A19 a19 = exchange.getIn().getBody(QRY_A19.class);
        MSH msh = a19.getMSH();
        assertEquals("MYSENDER", msh.getSendingApplication().getHd1_NamespaceID().getValue());

        String out = "MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123\rMSA|AA|123\n";
        exchange.getOut().setBody(out);
    }
View Full Code Here

        // The first OBX has a value type of CE. So first, we populate OBX-2 with "CE"...
        obx.getValueType().setValue("CE");
       
        // ... then we create a CE instance to put in OBX-5.
        CE ce = new CE(message);
        ce.getIdentifier().setValue("T57000");
        ce.getText().setValue("GALLBLADDER");
        ce.getNameOfCodingSystem().setValue("SNM");
        Varies value = obx.getObservationValue(0);
        value.setData(ce);
       
        // Now we populate the second OBX
        obx = orderObservation.getOBSERVATION(1).getOBX();
View Full Code Here

        // The first OBX has a value type of CE. So first, we populate OBX-2 with "CE"...
        obx.getValueType().setValue("CE");
       
        // ... then we create a CE instance to put in OBX-5.
        CE ce = new CE(message);
        ce.getIdentifier().setValue("T57000");
        ce.getText().setValue("GALLBLADDER");
        ce.getNameOfCodingSystem().setValue("SNM");
        Varies value = obx.getObservationValue(0);
        value.setData(ce);
       
        // Now we populate the second OBX
        obx = orderObservation.getOBSERVATION(1).getOBX();
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.model.v25.message.QRY_A19

Copyright © 2018 www.massapicom. 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.