Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with AQL on other_context extension cluster #185

Open
dileep-ehr opened this issue Apr 10, 2019 · 2 comments
Open

Problem with AQL on other_context extension cluster #185

dileep-ehr opened this issue Apr 10, 2019 · 2 comments

Comments

@dileep-ehr
Copy link

EHRC - Complaints.zip
Please see the attached template set. We have added a custom cluster to extend the context information (openEHR-EHR-CLUSTER.ehrc_metadata.v0).
While building the AQL, if we include this in CONTAINS we get '204 No Content'.

{"aql":"select a/uid/value as uid, a/composer/name as author, a/name/value as concept, a/context/start_time/value as date_created, c/items[at0001]/value/magnitude as confidentialLeve FROM EHR e[ehr_id/value ='{{ehrId}}' ] CONTAINS COMPOSITION a[openEHR-EHR-COMPOSITION.encounter.v1] CONTAINS EVALUATION b[openEHR-EHR-EVALUATION.medication_summary.v0] AND CLUSTER c[openEHR-EHR-CLUSTER.ehrc_metadata.v0]"
}

We are able to get the result properly if we remove the cluster from CONTAINS and give full path in the AQL

{"aql":"select a/uid/value as uid, a/composer/name as author, a/name/value as concept, a/context/start_time/value as date_created, a/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0001]/value/magnitude as confidentialLeve FROM EHR e[ehr_id/value ='{{ehrId}}' ] CONTAINS COMPOSITION a[openEHR-EHR-COMPOSITION.encounter.v1] CONTAINS EVALUATION b[openEHR-EHR-EVALUATION.medication_summary.v0]"
}

We have tried different options for the CONTAINS, but are getting the same results

@chevalleyc
Copy link
Contributor

Interesting request. Would it be possible to get the operational template (.opt) and an example POST payload for a corresponding composition? Thanks

@dileep-ehr
Copy link
Author

Example ECISFLAT payload

{
"/language": "en",
"/territory": "IN",    
"/composer|identifier": "123456-1::UUID::EHR.Network::UUID",
"/composer|name": "Dileep",
"/context/start_time": "2019-03-07T05:00:31.461Z",
"/context/end_time": "2019-03-07T05:15:31.461Z",
"/context/health_care_facility|identifier": "123456-1::UUID::EHR.Network::UUID",
"/context/health_care_facility|name": "HealtheLife",
"/context/setting": "openehr::228|primary medical care|",
"/context/location": "Room101",    "/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0001]|value": "7",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0002]|value": "MHMS",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0003]|value": "456789", 
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0004]|value": "234567-123",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0005]|value": "123456-123",
"/content[openEHR-EHR-OBSERVATION.story.v1]/data[at0001]/events[at0002]/data[at0003]/items[openEHR-EHR-CLUSTER.symptom_sign.v1]/items[at0001]|value": "Knee pain2", 
"/content[openEHR-EHR-OBSERVATION.story.v1]/data[at0001]/events[at0002]/data[at0003]/items[openEHR-EHR-CLUSTER.symptom_sign.v1]/items[at0003]|value": "Text Describing duration 2"
}

OPT attached
EHRC - Complaints.v0.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants