Hi Thomas,
Just thinking...

Why not make node ID mandatory for all nodes?
Since this will be handled by tools, I don't see the point of having to worry 
about if the node has an id or not: the tool just put some node ID on each node 
and us as developers use that fact to query and process data. It seems so much 
simple to have only one criteria, and we don't lose flexibility or 
expresiveness.


-- 
Kind regards,
Ing. Pablo Pazos Guti?rrez
LinkedIn: http://uy.linkedin.com/in/pablopazosgutierrez
Blog: http://informatica-medica.blogspot.com/
Twitter: http://twitter.com/ppazos

Date: Tue, 14 Aug 2012 17:37:02 +0100
From: thomas.be...@oceaninformatics.com
To: openehr-technical at lists.openehr.org
Subject: Re: Should not node identifiers in runtime paths be mandatory?


  
    
  
  
    On 14/08/2012 10:34, Seref Arikan
      wrote:

    
    Greetings, 

      According to adl 1.5 document on the openEHR web site (issued 25
      Jan 2012), Section 5.3.6.3, the runtime paths for single valued
      attributes can omit node identifer.

      The example given in the document uses miles per hour and km per
      hour alternatives. The thing is, if the runtime path is what is
      going to be persisted (and I can't see any other practical cases),
      the persisted data will have no information to mark the semantics
      of the selection of an option among alternatives.

    
    

    actually, this text is a bit misleading. If we have the archetype

    

    ELEMENT[at0004] matches { -- speed limit

        value matches {

            QUANTITY[at0022] matches { -- miles per hour

                magnitude matches {|0..55|}

                property matches {"velocity"}

                units matches {"mph"}

            }

            QUANTITY[at0023] matches { -- km per hour

                magnitude matches {|0..100|}

                property matches {"velocity"}

                units matches {"km/h"}

            }

        }

    }

    

    then the data instance created from the at0022 form of the QUANTITY
    will be (in dADL):

    

    items = <

        ["1"] = <                                                    
    -- ELEMENT

            archetype_node_id = <"at0004">

            value = <                                                
    -- QUANTITY

                archetype_node_id = <"at0022">

                magnitude = <25>

            >

        >

        ["2"] = <....>

        etc

    >

    

    so the path items[at0004]/value[at0022]
    will choose the quantity, although items[at0004]/value
    would do just as well. (Remember, the Xpath equivalents are 
items[@archetype_node_id='at0004']/value[@archetype_node_id='at0022'] etc - the
    [at0022] is just a shorthand selection predicate.)

    

    The paths are not 'persisted' as such - just the data. The paths are
    always derivates of the data.

    

    
      

      In case of a query such as get me all Xs where value is expressed
      as km per hour, the system can not know what which option was
      used: kmph or mph, because there is not node identifier. 

    
    

    in this case, use the path items[at0004]/value[at0022].
    

    

      
    - thomas

    

  


_______________________________________________
openEHR-technical mailing list
openEHR-technical at lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org   
                                  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20120814/7dc4acc2/attachment.html>

Reply via email to