Hello, I am trying to build an ORU message v23 and I must be missing
something coz I cant find out the way to join PID, PV1, OBR and OBX segments
to ORU message. Here is my code: (I'll put only the section of PID segment
but I'd like to know the same for the rest)

   ca.uhn.hl7v2.model.v23.message.ORU_R01 ORU= new
ca.uhn.hl7v2.model.v23.message.ORU_R01();
                
                /*
                 * CREATING SEGMENT MSH
                 */
                ca.uhn.hl7v2.model.v23.segment.MSH mshSegmentORU = ORU.getMSH();
                mshSegmentORU.getFieldSeparator().setValue("|");
                mshSegmentORU.getEncodingCharacters().setValue("^~\\&");
        
//mshSegmentORU.getDateTimeOfMessage().getTimeOfAnEvent().setValue("200801051200");
        
mshSegmentORU.getDateTimeOfMessage().getTimeOfAnEvent().setValue("20040327110218");
        
mshSegmentORU.getSendingApplication().getNamespaceID().setValue("CPO_EMR");
        
mshSegmentORU.getReceivingApplication().getNamespaceID().setValue("CARDIOSOFT");
                //mshSegmentORU.getSequenceNumber().setValue("20040327110218");
                mshSegmentORU.getMessageType().getMessageType().setValue("ORU");
                
mshSegmentORU.getMessageControlID().setValue("20040327110218001");
                
mshSegmentORU.getProcessingID().getProcessingMode().setValue("P");
                mshSegmentORU.getVersionID().setValue("2.3");
                mshSegmentORU.getAcceptAcknowledgementType().setValue("NE");

                /*
                //CREACION DEL SEGMENTO PID
        ca.uhn.hl7v2.model.v23.segment.PID pidSegmentORU = null;//???? HOW to 
add
it to ORU message
                pidSegmentORU.getSetIDPatientID().setValue("1");
                pidSegmentORU.getPatientIDInternalID(1);
                pidSegmentORU.getRace().setValue("W");
                //OPCIONAL//pidSegmentORU.getDateOfBirth()
                pidSegmentORU.getSex().setValue("M");
             ........................

Any help will be apreciated!
thanks!
-- 
View this message in context: 
http://www.nabble.com/How-to-build-an-ORU-v23-message-tp16673085p16673085.html
Sent from the hl7api-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to