Hi, 

I'm using   the followings to get the v2.3.1 segments you mentioned:

PID pid = 
oruMsg.getPIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI().getPIDPD1NK1NTEPV1PV2().getPID();

PV1 pv1Segment = 
oruMsg.getPIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI().getPIDPD1NK1NTEPV1PV2().getPV1PV2().getPV1()

 OBR obrSegment = 
oruMsg.getPIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI().getORCOBRNTEOBXNTECTI().getOBR();

OBX obxSegment = 
oruMsg.getPIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI(j).getORCOBRNTEOBXNTECTI().getOBXNTE().getOBX();
where j goes from 0 to n.

I hope this is the answer you were looking for.

Cheers, 


----- Original Message ----
From: Lucas Gonz <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, April 14, 2008 10:00:01 AM
Subject: [HAPI-devel]  How to build an ORU v23 message


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






      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------------------------------------------------------------------
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