Package ca.uhn.hl7v2.model.v22.segment

Examples of ca.uhn.hl7v2.model.v22.segment.OBR


         * Now let's retrieve the patient's name from the parsed message.
         *
         * PN is an HL7 data type consisting of several components, such as
         * family name, given name, etc.
         */
        PN patientName = adtMsg.getPID().getPatientName();

        // Prints "SMITH"
        String familyName = patientName.getFamilyName().getValue();
        System.out.println(familyName);

    }
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.
        MSH msh = (MSH)theIn.get("MSH");
        ACK retVal;
        try {
            // This method takes in the MSH segment of an incoming message, and generates an
            // appropriate ACK
            retVal = (ACK)DefaultApplication.makeACK(msh);
        } catch (IOException e) {
View Full Code Here

         * accessors for ADT^A01's segments.
         *
         * HAPI provides several versions of the ADT_A01 class, each in a different package (note
         * the import statement above) corresponding to the HL7 version for the message.
         */
        ADT_A01 adtMsg = (ADT_A01)hapiMsg;

        MSH msh = adtMsg.getMSH();

        // Retrieve some data from the MSH segment
        String msgType = msh.getMessageType().getMessageType().getValue();
        String msgTrigger = msh.getMessageType().getTriggerEvent().getValue();

        // Prints "ADT A01"
        System.out.println(msgType + " " + msgTrigger);

        /*
         * Now let's retrieve the patient's name from the parsed message.
         *
         * PN is an HL7 data type consisting of several components, such as
         * family name, given name, etc.
         */
        PN patientName = adtMsg.getPID().getPatientName();

        // Prints "SMITH"
        String familyName = patientName.getFamilyName().getValue();
        System.out.println(familyName);

View Full Code Here

         * accessors for ADT^A01's segments.
         *
         * HAPI provides several versions of the ADT_A01 class, each in a different package (note
         * the import statement above) corresponding to the HL7 version for the message.
         */
        ADT_A01 adtMsg = (ADT_A01)hapiMsg;

        MSH msh = adtMsg.getMSH();

        // Retrieve some data from the MSH segment
        String msgType = msh.getMessageType().getMessageType().getValue();
        String msgTrigger = msh.getMessageType().getTriggerEvent().getValue();

        // Prints "ADT A01"
        System.out.println(msgType + " " + msgTrigger);

        /*
         * Now let's retrieve the patient's name from the parsed message.
         *
         * PN is an HL7 data type consisting of several components, such as
         * family name, given name, etc.
         */
        PN patientName = adtMsg.getPID().getPatientName();

        // Prints "SMITH"
        String familyName = patientName.getFamilyName().getValue();
        System.out.println(familyName);

View Full Code Here

         * HAPI provides several versions of the ADT_A01 class, each in a different package (note
         * the import statement above) corresponding to the HL7 version for the message.
         */
        ADT_A01 adtMsg = (ADT_A01)hapiMsg;

        MSH msh = adtMsg.getMSH();

        // Retrieve some data from the MSH segment
        String msgType = msh.getMessageType().getMessageType().getValue();
        String msgTrigger = msh.getMessageType().getTriggerEvent().getValue();

        // Prints "ADT A01"
        System.out.println(msgType + " " + msgTrigger);

        /*
 
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.
        MSH msh = (MSH)theIn.get("MSH");
        ACK retVal;
        try {
            // This method takes in the MSH segment of an incoming message, and generates an
            // appropriate ACK
            retVal = (ACK)DefaultApplication.makeACK(msh);
View Full Code Here

         * HAPI provides several versions of the ADT_A01 class, each in a different package (note
         * the import statement above) corresponding to the HL7 version for the message.
         */
        ADT_A01 adtMsg = (ADT_A01)hapiMsg;

        MSH msh = adtMsg.getMSH();

        // Retrieve some data from the MSH segment
        String msgType = msh.getMessageType().getMessageType().getValue();
        String msgTrigger = msh.getMessageType().getTriggerEvent().getValue();

        // Prints "ADT A01"
        System.out.println(msgType + " " + msgTrigger);

        /*
 
View Full Code Here

        message.getMSH().getFieldSeparator().setValue("|");

        ORU_R01_ORDER_OBSERVATION orderObservation = message.getPATIENT_RESULT().getORDER_OBSERVATION();

        // Populate the OBR
        OBR obr = orderObservation.getOBR();
        obr.getSetIDOBR().setValue("1");
        obr.getFillerOrderNumber().getEntityIdentifier().setValue("1234");
        obr.getFillerOrderNumber().getNamespaceID().setValue("LAB");
        obr.getUniversalServiceIdentifier().getIdentifier().setValue("88304");
       
        // Populate the first OBX
        OBX obx = orderObservation.getOBSERVATION(0).getOBX();
        obx.getSetIDOBX().setValue("1");
        obx.getObservationIdentifier().getIdentifier().setValue("88304");
View Full Code Here

         * reached using named accessors.
         */
        ORU_R01_ORDER_OBSERVATION orderObservation = message.getPATIENT_RESULT().getORDER_OBSERVATION();

        // Populate the OBR
        OBR obr = orderObservation.getOBR();
        obr.getSetIDOBR().setValue("1");
        obr.getFillerOrderNumber().getEntityIdentifier().setValue("1234");
        obr.getFillerOrderNumber().getNamespaceID().setValue("LAB");
        obr.getUniversalServiceIdentifier().getIdentifier().setValue("88304");
       
        /*
         * The OBX segment is in a repeating group called OBSERVATION. You can
         * use a named accessor which takes an index to access a specific
         * repetition. You can ask for an index which is equal to the
View Full Code Here

    /**
     * Creates a new ADT_AXX message with DefaultModelClassFactory.
     */
    public ADT_AXX() {
       this(new DefaultModelClassFactory());
    }
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.model.v22.segment.OBR

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.