Great question, I would also like to know if there is a way of doing this.
Right now I need to check each element for null.
Lansdale Redmond wrote:
>
> How can I check if a segment is present in a message..when I do the
> following code it always returns a value then if I read a field the vlue
> is null..very similar to if it was there...how do you know the
> difference
>
>
>
> PID seg = (PID) hapiMessage.get("PID");
>
> if ( seg == null)
>
> return false;
>
> else
>
> return true;
>
>
> -------------------------------------------------------------------------
> 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
>
>
:-)
--
View this message in context:
http://www.nabble.com/How-to-check-if-a-segmen-tis-present-in-a-message-tp17042576p17105751.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