Skip to Navigation | Skip to Content

openEHR-Clinical mailing list archives

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: AQL query to archetype and it's specializations in slot


Hi Igor,

 

AQL allows string RegEx pattern in an archetype predicate. RegEx pattern needs to be enclosed by ‘{/’ RegEx ‘/}’. For your scenario, the AQL may include something like:

 

 ...[openEHR-EHR-CLUSTER.a.v1]    /items[{/openEHR-EHR-CLUSTER\.b(-[a-zA-Z0-9])*\.v1/}]     / items[at0003]/value

 

Or something like the one below. The _expression_ below is for retrieving both element [at0003] instance value and the specialization of this element if the specialized archetype has specialization of element at0003 (such as at0003.1):

 

...[openEHR-EHR-CLUSTER.a.v1]    /items[{/openEHR-EHR-CLUSTER\.b(-[a-zA-Z0-9])*\.v1/}]     / items[{/at0003([0-9.]+)*/}]/value

 

Hope this helps. Please let me know if you have more questions.

 

Regards,

 

Chunlan

 

From: openehr-clinical-bounces@openehr.org [mailto:openehr-clinical-bounces@openehr.org] On Behalf Of ????? ???????
Sent: Monday, 28 June 2010 1:30 PM
To: openehr-clinical@openehr.org
Subject: AQL query to archetype and it's specializations in slot

 

Hi!

I have an archetype 'A' with slot named 'Slot In A'.
There is constraint for possible archetypes for this slot: "B and specializations of B".

I know that in archetype B (and in all of it's specializations) there is field 'at0003' named 'Field In B'

I know only about B and particular clients has their own independent specializations 'B-spec'.

Now I want to build a query like this:

...[openEHR-EHR-CLUSTER.a.v1]    /items[openEHR-EHR-CLUSTER.b.v1]     / items[at0003]/value

And I want something like "Archetype of this type and it's specializations" instead of just this "items[openEHR-EHR-CLUSTER.b.v1]".

The question is: how :-)


--
Best regards,
Igor Lizunov

_______________________________________________
openEHR-clinical mailing list
openEHR-clinical@openehr.org
http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-clinical