From: James A. <ja...@ja...> - 2014-09-10 21:39:28
|
Hi Harvey, The datatypes change a little but from version to version of HL7. If you're using version 2.2 MSH-3 is ST, whereas in version 2.3 it is HD (which is what the code above is expecting). If you're using HL7 2.2 you can call getSendingApplication().setValue("foo"); directly. Cheers, James On Wed, Sep 10, 2014 at 3:15 PM, King Harvey <har...@gm...> wrote: > > Good afternoon, > > I am trying to create an HL7 message using the HAPI library and I was > hoping to get some insight about the way your examples are creating them. > The first question at the moment deals with the following lines: > MSH mshSegment = adt.getMSH(); > mshSegment.getSendingApplication().getNamespaceID().setValue( > "TestSendingSystem"); > > How/why are you chaining getNamespaceID() if the getSendingApplication > method is of type ST? This class does not inherit the HD class nor does the > MSH class. Thank you for your attention and I apologize in advance if I've > overlooked the reasoning. Does it have something to do with Serializable? > |