Hi Seref, 
Thank you for the explanation. I actually had forgotten than it may be more 
than one unit for an item in an archetype. What you mentioned here does make 
sense to me now.
As I understood, for the moment, nothing is retrieved from the ADL.
What is the suggested run time approach? Should the unit be set in the 
application layer then? for instance as an attribute of the input in the view 
layer or so.


Best Regards
Pariya

MSc; PhD Candidate
Department of Computing  Science and Engineering 
Chalmers University of Technology
http://www.ait.gu.se/kontaktaoss/personal/hajar-kashfi/







On Jan 12, 2011, at 1:49 AM, Seref Arikan wrote:

> Hi Pariya, 
> An archetype may introduce a constraint so that during the recording of data, 
> you may use a quantity and one of the allowed units. 
> Just think about the difference between Fahrenheit and Celsius degrees 
> (Thomas Beale's example). 
> Wrappers do have access to ADL, but in these kind of situations, ADL provides 
> more than one option, so the wrapper can't know which unit it is going to 
> use. If there is only one option, the wrapper should automatically use that. 
> I don't think I've added that convenience, so that is probably what got you 
> confused. 
> 
> Kind regards
> Seref
> 
> 
> On Tue, Jan 11, 2011 at 5:16 PM, Pariya Kashfi <hajar.kashfi at chalmers.se> 
> wrote:
> Hello,
> 
> As far as I understand, in opereffa,  unit of an item is not retreived from 
> the ADL file and should be set manually like :
> pArchetypeWrapper.getElementAtNode(path).setUnitOfQuantity(....);
> 
> Am I missing something here, or is it the way it works?
> I think since the unit and type of each item is already stored in the ADL 
> file, while parsing the ADL file to the ArchetypeWrapper, these types of 
> information should be set automatically in ElementWrappers in that 
> ArchetypeWrapper.
> 
> 
> Best Regards
> Pariya
> 
> MSc; PhD Candidate
> Department of Computing  Science and Engineering 
> Chalmers University of Technology
> http://www.ait.gu.se/kontaktaoss/personal/hajar-kashfi/
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> openEHR-technical mailing list
> openEHR-technical at openehr.org
> http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical
> 
> 
> <ATT00001..txt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.openehr.org/mailman/private/openehr-technical_lists.openehr.org/attachments/20110112/05e1ea1d/attachment.html>

Reply via email to