On 15/01/2015 09:28, Alessandro Torrisi 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? >
An earlier private response to Alessandro before he posted: > the first question is: is the patient sex and location stored in the > EHR in the system? If so, it's just standard EHR-based query. > > I'm assuming that the location / address is not however. So a normal > query can be written to do everything except the 'living in Alkmaar' bit. > > That last item will need a traversal of the reference > PARTY_PROXY.external_ref > <http://www.openehr.org/local/releases/1.0.1/uml/Browsable/_9_5_1_76d0249_1140169202660_257304_813Report.html>, > > if you have it set. But you might not have it set - we don't in most > of our systems, due to privacy / security. In our Ocean system we > would deal with this bit of the query by a special query that takes > the EHR id and then runs it through the EHR Index service, to convert > EHR ids to subject ids, and then a query has to be done on those > (something like another AQL query) to get the ones who have an Alkmaar > postcode or however you test that. > > This clearly isn't well defined yet in a standard way. It might be interesting to find out what other implementers are doing. - thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20150116/317455a1/attachment.html>

