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 <harveyk...@gmail.com> 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?
>
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel