Hi Rockdale,

This is a nice easy one.

HL7 does allow extra components after the normal number allowed by the data
type (in this case a single field as allowed by the ST data type).

To access these, just call:

ST string = ......
String component2 = string.getExtraComponents().getComponent(0);
String component3 = string.getExtraComponents().getComponent(1);

etc..

Cheers,
James

On Mon, Sep 13, 2010 at 2:52 PM, Green Dale <[email protected]>wrote:

> Hi, All:
>
> I am using HAPI to parse HL7 message that we received from varies sources.
> Most message I need to process type is ORU_R01. In the OBX segment, the
> value type (OBX-2) always "ST", but different sources have their own custom
> field for the Observation Value field (OBX -5), for example :
>
> OBX|1|ST|Custom_Field^test^test^test||comp_one^comp_two^comp_three/test^3||||||F|||20090522101333||||
>
>
>
> Since its data type is ST I can only get comp_one.  Even for same source
> the the components in OBX 5 is different depends on the OBR. It could be
>
> OBX|1|ST|Custom_Field^1^test^test||comp_one^comp_two^comp_three/test^3||||||F|||20090522101333||||
>
> OBX|2|ST|Custom_Field^2^test^test||comp_one^comp_two^comp_three^comp_four/test^3||||||F|||20090522101333||||
>
> OBX|3|ST|Custom_Field^3^test^test||comp_one^comp_two^comp_three^comp_four^comp_five/test^3||||||F|||20090522101333||||
>
>
> How could I get the "comp_one^comp_two^comp_three" field?  Should I create
> my own  "datatype" or should I create my own message or should I using terse
> to special handle this field?
>
> Any suggestion?
>
> Thanks in advance
> -rockdale
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing
> http://p.sf.net/sfu/novell-sfdev2dev
>
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to