Skip to main content



      Home
Home » Archived » OHF » Set Value?
Set Value? [message #48838] Thu, 09 October 2008 00:18 Go to next message
Eclipse UserFriend
XML:<value xsi:type="PQ" value="155" unit="mm[hg]"/>
Creating a datatype PQ pq,I can use pq.setUnit("mm[hg]"),but the
parameter of the pq.setValue is an object.I do not known how to create the
right object.
Can someone help me?
Re: Set Value? [message #48900 is a reply to message #48838] Thu, 09 October 2008 05:16 Go to previous messageGo to next message
Eclipse UserFriend
<value xsi:type="RTO_PQ_PQ">
<numerator value="88"/>
<denominator value="1" unit="min"/>
</value>

How to Create the value element? The getValue.add() can add the PQ,but the
PQ do not have the setNumerator or getNumerator?

I do not find the way to create the value element and the way to set the
element value.Can someone help me?
Re: Set Value? [message #48962 is a reply to message #48900] Thu, 09 October 2008 10:51 Go to previous message
Eclipse UserFriend
The 'value' element in the observation is of type 'ANY' which is the
base data type of every underlying datatype in the CDA. So you need to
create an instance of the datatype of your choice and then the mehtods
should be available to you. Numbers use their object wrapper types.

PQ quantityValue = CDAR2Factory.eINSTANCE.createPQ();
quantityValue.setValue(new Double(1.234567890));
quantityValue.setUnit("mg/Hg");

- Sarah


RobertHua wrote:
> <value xsi:type="RTO_PQ_PQ">
> <numerator value="88"/>
> <denominator value="1" unit="min"/>
> </value>
>
> How to Create the value element? The getValue.add() can add the PQ,but
> the PQ do not have the setNumerator or getNumerator?
> I do not find the way to create the value element and the way to set the
> element value.Can someone help me?
>
Re: Set Value? [message #587888 is a reply to message #48838] Thu, 09 October 2008 05:16 Go to previous message
Eclipse UserFriend
<value xsi:type="RTO_PQ_PQ">
<numerator value="88"/>
<denominator value="1" unit="min"/>
</value>

How to Create the value element? The getValue.add() can add the PQ,but the
PQ do not have the setNumerator or getNumerator?

I do not find the way to create the value element and the way to set the
element value.Can someone help me?
Re: Set Value? [message #587901 is a reply to message #48900] Thu, 09 October 2008 10:51 Go to previous message
Eclipse UserFriend
The 'value' element in the observation is of type 'ANY' which is the
base data type of every underlying datatype in the CDA. So you need to
create an instance of the datatype of your choice and then the mehtods
should be available to you. Numbers use their object wrapper types.

PQ quantityValue = CDAR2Factory.eINSTANCE.createPQ();
quantityValue.setValue(new Double(1.234567890));
quantityValue.setUnit("mg/Hg");

- Sarah


RobertHua wrote:
> <value xsi:type="RTO_PQ_PQ">
> <numerator value="88"/>
> <denominator value="1" unit="min"/>
> </value>
>
> How to Create the value element? The getValue.add() can add the PQ,but
> the PQ do not have the setNumerator or getNumerator?
> I do not find the way to create the value element and the way to set the
> element value.Can someone help me?
>
Previous Topic:How to Create Organization Information
Next Topic:Will SAT be maintained
Goto Forum:
  


Current Time: Fri Apr 25 00:08:25 EDT 2025

Powered by FUDForum. Page generated in 0.03413 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top