Hi, James:

Thanks for the prompt reply.

I am more thinking create my custom composite datatype and then based on the
observation identifier (OBX 3) , kind like what fixOBX5 does. I want to use
the same pattern instead hard code the process for different custom fields.
(I read something about that you can create custom segment, can I create my
own custom data type and get the data from there?  Is it a good idea?  Sorry
about all these questions, I have not really deeply looked into the source
code yet, but wanted to follow the design pattern.

Thanks
-rockdale



On Mon, Sep 13, 2010 at 3:31 PM, James Agnew <ja...@jamesagnew.ca> wrote:

> 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 <rockdale.gr...@gmail.com>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
>> Hl7api-devel@lists.sourceforge.net
>> 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
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to