It's because in contrast to most fields, which have a pre-specified
data type, the data type for OBX-5 is defined at message time (in
OBX-2).

Bryan

On Wed, Feb 25, 2009 at 1:58 PM, Dayu Han <[email protected]> wrote:
> Thanks for the code and it worked just fine. However, I wonder if anyone
> knows WHY for OBX-5, we have to do something like this.
>
> On 24-Feb-09, at 4:48 PM, Cameron Freiner wrote:
>
> Did that help?
>
> On Tue, Feb 24, 2009 at 3:32 PM, Cameron Freiner <[email protected]> wrote:
>>
>> Yes,
>>
>> Here is a code sample from 2.3 that works..  Hope this helps
>>
>> OBX obx = ((ORU_R01)
>> message).getRESPONSE(x++).getORDER_OBSERVATION().getOBSERVATION().getOBX();
>>
>> // OBX2 (assume you are using String otherwise modify appropriately
>> obx.getValueType().setValue("ST");
>> ST st = new ST(obx.getMessage());
>> st.setValue(string);
>> obx.getObservationValue(0).setData(st);
>>
>> DefaultModelClassFactory factory = new DefaultModelClassFactory();
>> Varies.fixOBX5(obx, factory);
>>
>>
>> On Tue, Feb 24, 2009 at 3:26 PM, Dayu Han <[email protected]> wrote:
>>>
>>> Hi All
>>> I have trouble to populate a value on OBX-5 field using HAPI (HL7 2.5).
>>>  This is what I am trying to do:
>>>
>>> oru.getPATIENT_RESULT(0).getORDER_OBSERVATION(0).getOBSERVATION(index).getOBX().getObservationValue(0)
>>> where oru being the ORU segment.
>>> From the above code, there seems no way just to set a value on the field.
>>> Anyone has any idea what goes wrong here.
>>> Many thanks
>>> --
>>> Dayu Han
>>> Software Developer
>>> Strata Health Solutions
>>> Phone: 403.261.0855 ext 2102
>>> http://www.stratahealth.com
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
>>> CA
>>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>>> Enterprise
>>> -Strategies to boost innovation and cut costs with open source
>>> participation
>>> -Receive a $600 discount off the registration fee with the source code:
>>> SFAD
>>> http://p.sf.net/sfu/XcvMzF8H
>>> _______________________________________________
>>> Hl7api-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>>>
>>
>
>
> --
> Dayu Han
> Software Developer
> Strata Health Solutions
> Phone: +1 403.261.0855 ext 2102
> http://www.stratahealth.com
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to