How to express a LINK?

Hi everybody,

I'm trying to model the class LINK in Openehr and I'm doubting about
how to do it.
According to its syntax in ADL, a LINK could be expressed as the
following (use_node...), isn't it?

ELEMENT[at0008] occurrences matches {0 ..1} matches {
       value matches {
  DV_CODED_TEXT matches {
     defining_code matches {
    [local::
    at0009, -- Chemistry
    at0010] -- Microbiology
     }
  }
              use_node ELEMENT
/data[at0001]/events[at0002]/data[at0003]/items[at0013]
      }

A LINK could also appear in any property (value, defining_code....etc)
of any "element" which inherit from LOCATABLE ?

If it'd be in that way, I'd have to check in each property if it was a
LINK. Another easier way could be to express the LINK with links
property:

ELEMENT[at0008] occurrences matches {0 ..1} matches {
       value matches {
  DV_CODED_TEXT matches {
     defining_code matches {
    [local::
    at0009, -- Chemistry
    at0010] -- Microbiology
     }
  }
       links matches{
use_node ELEMENT /data[at0001]/events[at0002]/data[at0003]/items[at0013]
       }
      }

But in that way, my implementation wouldn't be compatible with the previous way.

Thank you very much for your help.

Cati Martínez wrote:

Hi everybody,

I'm trying to model the class LINK in Openehr and I'm doubting about
how to do it.
According to its syntax in ADL, a LINK could be expressed as the
following (use_node...), isn't it?

no, use_node has nothing to do with LINK. use_node is a way of reusing a
previously defined part of an archetype later in the same archetype. See
e.g. the Apgar archetype. LINK is a class of its own, from the Common
Information Model. Currently noone has constrained LINKs in archetypes,
but it can be done just as for any other class.

- thomas beale

Ok, then It wasn't what I was thinking... My question now is, which is
the correspondence with an "ARCHETYPE_INTERNAL_REF" (use_node) in the
OpenEHR reference model?

Thank you again.

Cati Martínez wrote:

Ok, then It wasn't what I was thinking... My question now is, which is
the correspondence with an "ARCHETYPE_INTERNAL_REF" (use_node) in the
OpenEHR reference model?

an ARCHETYPE_INTERNAL_REF does not correspond to anything in the RM, it
gives the capability to create a reference in an archetype to a
preivously defined part of the same archetype, allowing the later
section to re-use the definition from earlier. It is a reuse mechanism.

- thomas

Ok, so the "element" which the reference of the
ARCHETYPE_INTERNAL_REFERENCE point to, should be present in the
archetype itself or in its parent/s, shouldn't it?

Thank you for your help.

Cati Martínez wrote:

Ok, so the "element" which the reference of the
ARCHETYPE_INTERNAL_REFERENCE point to, should be present in the
archetype itself or in its parent/s, shouldn't it?

*Correct.

- thomas beale

HI Cati

The LINK class is a data class that allows instance data in a ‘locatable class’ to point to any other ‘locatable class’. It is my view that this will be less used in archetypes than in data - where clinicians can use it to make references to other parts of the health record (even in different locations). There is also the EHR_URI class that is a datatype - so if you want an explicit link in an archetype then it is probably best to use this data type (and potentially make it mandatory).

The Ocean archetype editor will allow links from the root of the entry class in the source code but it is not enabled in the release at present - we are not sure that we want these expressed in archetypes but the community may seek that in future.

Cheers, Sam

Cati Martínez wrote:

(attachments)

OceanCsmall.png