Hi Alessandro Very good question. I know that some implementers store 'basic query demographics' in a single persistent composition with an archetype representing dob, sex, gender etc, to get around this although it to some extent weakens the ehr / Demographics split.
One approach I would like to see pursued is that we develop a standardised approach using similar archetypes in a 'demographics composition' but allowing the backend system to choose whether the data was sourced from the EHR that composition, or retrieved virtually from a seaprate Demographics engine as Thomas was suggesting. That would let us standardise the AQL statements but allow implementers to meet the needs of different groups as Karsten was suggesting. Patient registries is an example of where it is more compelling to hold some demographics data in situ. I have done a little work on this for the EU PARENT project. This is the anonymised patient details archetype http://www.openehr.org/ckm/#showArchetype_1013.1.1745 and seen in use at http://www.openehr.org/ckm/#showTemplate_1013.26.16 For review purposes, in this template, the anonymised archetype is carried in the same composition - this would not be the case in a run time example. So in this case a standard AQL could be used to retrieve "Give me all female patients living in Paris and with no allergies and a the last labresult of type Kreatine is < 20 but within a year" but how the age, sex, location data is actually resolved is implementation dependent. Ian Dr Ian McNicoll mobile +44 (0)775 209 7859 office +44 (0)1536 414994 skype: ianmcnicoll email: ian at freshehr.com twitter: @ianmcnicoll Director, freshEHR Clinical Informatics Director, openEHR Foundation Director, HANDIHealth CIC Hon. Senior Research Associate, CHIME, UCL On 15 January 2015 at 09:28, Alessandro Torrisi <alessandro at code24.nl> wrote: > Hello, > > did any off you thought about how a query should look like suppose I want > such like this : > > "Give me all female patients living in Paris and with no allergies and a the > last labresult of type Kreatine is < 20 but within a year" > > The hardest part is to combine the demographic information with the medical > information. Should you be able to do it with AQL? > > -- > Alessandro Torrisi > > _______________________________________________ > openEHR-technical mailing list > openEHR-technical at lists.openehr.org > http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

