Closed shafeef closed 7 years ago
'a/context/start_time/value as date_created' works fine. but 'a/context/health_care_facility/identifier/value as Healthcare' throws an error.
Is that the correct syntax to query the healthcare facility identifier?
The supported syntax is one of : a/context/facility/name/value a/context/facility/id/namespace a/context/facility/id/ref a/context/facility/id/scheme a/context/facility/id/type
now im getting this error:
Problem accessing /ehr/rest/v1/query. Reason:
#1.0.0 Invocation exception to method:query:java.lang.IllegalArgumentException: AQL exception:**ERROR: table name "event_context" specified more than once**
Aql query:-
/rest/v1/query?aql=select a/ehr_id/value as EHRid, a/context/facility/name/value as organization from EHR e contains COMPOSITION a[openEHR-EHR-COMPOSITION.review.v1] contains ( OBSERVATION b_a[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]) WHERE a/archetype_details/template_id/value='EHRN Episode details.v0' AND a/context/start_time/value < '2018-01-01' AND a/context/start_time/value > '2017-09-01' ORDER BY date_created DESC
Could you please post an example composition for me to reproduce the problem locally?
here it is:-
{ "composition": { "/composer|identifier": "1234-5678", "/composer|name": "Composer", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0.137]/items[at0.136]|value": "2080-02-01T00:00:00.000Z", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0.137]/items[at0.138]|value": "local::at0.134|Planned|", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0.137]/items[at0071]|value": "2070-01-01T00:00:00.000Z", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0.139]/items[at0.140]|value": "NewSPAPackage", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0.139]/items[at0002.1]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0013]|value": "local::at0014|Accident|", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0023]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0025]/items[at0099]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0025]/items[at0100]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0025]/items[at0120]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0041.1]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0049]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0051]/items[at0099.3]|value": "org.openehr.rm.datatypes.basic.DvIdentifier@5e0e8ae[\n issuer=DEFAULT_ISSUER\n assigner=DEFAULT_ASSIGNER\n id=DEFAULT_ID\n type=DEFAULT_TYPE\n]", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0051]/items[at0100]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0051]/items[at0120]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0061.1]|value": "local::at0062|Govt. health insurance|", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0066]|value": "local::at9999|DEFAULT_CODED_TEXT_VALUE|", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0074]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0077]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0078]|value": "500", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0079]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0081]|value": "local::at0082|Clinic|", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0084]/items[at0085]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0084]/items[at0086]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0084]/items[at0087]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0084]/items[at0088]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0084]/items[at0089]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0101]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0102]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0103]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0104]/items[at0105]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0104]/items[at0106]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0073.1]/items[at0104]/items[at0107]|value": "local::at0108|DNS|", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0074]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0077]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0078]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0079]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0095]/items[at0085]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0095]/items[at0086]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0095]/items[at0087]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0095]/items[at0088]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0095]/items[at0089]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0101]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0102]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0103]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0119]/items[at0105]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0119]/items[at0106]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0094]/items[at0119]/items[at0107]|value": "local::at0108|DNS|", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0098]/items[at0099.1]|value": "org.openehr.rm.datatypes.basic.DvIdentifier@2c3ea34e[\n issuer=DEFAULT_ISSUER\n assigner=DEFAULT_ASSIGNER\n id=DEFAULT_ID\n type=DEFAULT_TYPE\n]", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0098]/items[at0100.1]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0098]/items[at0120]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0121]/items[at0099.2]|value": "org.openehr.rm.datatypes.basic.DvIdentifier@5a858753[\n issuer=DEFAULT_ISSUER\n assigner=DEFAULT_ASSIGNER\n id=DEFAULT_ID\n type=DEFAULT_TYPE\n]", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0121]/items[at0100]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]/data[at0001]/items[at0121]/items[at0120]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0002]|value": "local::at0013|Stress management|", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0003]|value": "local::at0017|Standard agenda|", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0004]/items[at0007]|value": "false", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0004]/items[at0008]|value": "true", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0004]/items[at0009]|value": "true", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0004]/items[at0010]|value": "true", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0004]/items[at0011]|value": "true", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0004]/items[at0012]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0005]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0006]|value": "DEFAULT_TEXT_VALUE", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0026]/items[at0027]|value": "true", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0026]/items[at0029]|value": "true", "/content[openEHR-EHR-ADMIN_ENTRY.episode_preferences.v0]/data[at0001]/items[at0026]/items[at0030]|value": "true", "/context/health_care_facility|identifier": "123456-123", "/context/health_care_facility|name": "FACILITY", "/context/setting": "openehr::238|other care|", "/context/start_time": "2017-09-12T11:22:38.105+05:30", "/language": "en", "/territory": "GB" }, "meta": { "href": "rest/v1/composition?uid=25d1d993-ea40-4d56-a7a3-3d0a25b301b6::vm01.ethercis.org::1" }, "format": "ECISFLAT", "templateId": "EHRN Episode details.v0" }
Thanks but,
Thanks
okay,
here is the composition i used to post:-
{
"ctx/language":"en",
"review/_uid": "b506d738-5291-4a7d-bbc2-9f034ef1adfe::example.ethercis.com::1",
"review/language|code": "en", "review/language|terminology": "ISO_639-1", "review/territory|code": "GB", "review/territory|terminology": "ISO_3166-1", "review/context/_health_care_facility|id": "123456-123", "review/context/_health_care_facility|id_scheme": "ETHERCIS-SCHEME", "review/context/_health_care_facility|id_namespace": "DEMOGRAPHIC", "review/context/_health_care_facility|name": "FACILITY", "review/context/start_time": "2017-09-12T11:22:38.105+05:30", "review/context/setting|code": "238", "review/context/setting|value": "Other Care", "review/context/setting|terminology": "openehr", "review/extended_admission:0/admission_class/class": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/admission_class/package": "NewSPAPackage", "review/extended_admission:0/episode_status/status|code": "at0.134", "review/extended_admission:0/episode_status/status|value": "Planned", "review/extended_admission:0/episode_status/status|terminology": "local", "review/extended_admission:0/episode_status/admit_date_time": "2070-01-01T00:00:00.000Z", "review/extended_admission:0/episode_status/discharge_date_time": "2080-02-01T00:00:00.000Z", "review/extended_admission:0/assigned_location/point_of_care_unit": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/ward": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/room": "500", "review/extended_admission:0/assigned_location/bed": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/facility/namespace_id": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/facility/universal_id": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/facility/universal_id_type|code": "at0108", "review/extended_admission:0/assigned_location/facility/universal_id_type|value": "DNS", "review/extended_admission:0/assigned_location/facility/universal_id_type|terminology": "local", "review/extended_admission:0/assigned_location/building": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/floor": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/location_description": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/address/street": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/address/city": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/address/state_province": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/address/post_code": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/address/country": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/assigned_location/location_type|code": "at0082", "review/extended_admission:0/assigned_location/location_type|value": "Clinic", "review/extended_admission:0/assigned_location/location_type|terminology": "local", "review/extended_admission:0/admission_type|code": "at0014", "review/extended_admission:0/admission_type|value": "Accident", "review/extended_admission:0/admission_type|terminology": "local", "review/extended_admission:0/pre-admit_number": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/facility/namespace_id": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/facility/universal_id": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/facility/universal_id_type|code": "at0108", "review/extended_admission:0/prior_patient_location/facility/universal_id_type|value": "DNS", "review/extended_admission:0/prior_patient_location/facility/universal_id_type|terminology": "local", "review/extended_admission:0/prior_patient_location/adress/street": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/adress/city": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/adress/state_province": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/adress/post_code": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/adress/country": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/point_of_care_unit": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/ward": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/room": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/bed": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/building": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/floor": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/prior_patient_location/location_description": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/attending_doctor:0/id": "DEFAULT_ID", "review/extended_admission:0/attending_doctor:0/id|issuer": "DEFAULT_ISSUER", "review/extended_admission:0/attending_doctor:0/id|assigner": "DEFAULT_ASSIGNER", "review/extended_admission:0/attending_doctor:0/id|type": "DEFAULT_TYPE", "review/extended_admission:0/attending_doctor:0/family_name": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/attending_doctor:0/last_name": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/referring_doctor/last_name": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/referring_doctor/id": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/referring_doctor/family_name": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/consulting_doctor:0/id": "DEFAULT_ID", "review/extended_admission:0/consulting_doctor:0/id|issuer": "DEFAULT_ISSUER", "review/extended_admission:0/consulting_doctor:0/id|assigner": "DEFAULT_ASSIGNER", "review/extended_admission:0/consulting_doctor:0/id|type": "DEFAULT_TYPE", "review/extended_admission:0/consulting_doctor:0/family_name": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/consulting_doctor:0/last_name": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/hospital_department": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/admit_source": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/admitting_doctor/id": "DEFAULT_ID", "review/extended_admission:0/admitting_doctor/id|issuer": "DEFAULT_ISSUER", "review/extended_admission:0/admitting_doctor/id|assigner": "DEFAULT_ASSIGNER", "review/extended_admission:0/admitting_doctor/id|type": "DEFAULT_TYPE", "review/extended_admission:0/admitting_doctor/family_name": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/admitting_doctor/last_name": "DEFAULT_TEXT_VALUE", "review/extended_admission:0/financial_class|code": "at0062", "review/extended_admission:0/financial_class|value": "Govt. health insurance", "review/extended_admission:0/financial_class|terminology": "local", "review/extended_admission:0/charge_price_indicator|code": "at9999", "review/extended_admission:0/charge_price_indicator|value": "DEFAULT_CODED_TEXT_VALUE", "review/extended_admission:0/charge_price_indicator|terminology": "local", "review/extended_admission:0/language|code": "en", "review/extended_admission:0/language|terminology": "ISO_639-1", "review/extended_admission:0/encoding|code": "UTF-8", "review/extended_admission:0/encoding|terminology": "IANA_character-sets", "review/episode_preferences:0/main_reason_for_episode|code": "at0013", "review/episode_preferences:0/main_reason_for_episode|value": "Stress management", "review/episode_preferences:0/main_reason_for_episode|terminology": "local", "review/episode_preferences:0/other_interests/learn_yoga_and_meditation": true, "review/episode_preferences:0/other_interests/wellness_break": true, "review/episode_preferences:0/other_interests/develop_yoga_habit": true, "review/episode_preferences:0/planning_preference|code": "at0017", "review/episode_preferences:0/planning_preference|value": "Standard agenda", "review/episode_preferences:0/planning_preference|terminology": "local", "review/episode_preferences:0/reminders/morning_alarm/value": false, "review/episode_preferences:0/reminders/yoga_meditation_sessions": true, "review/episode_preferences:0/reminders/meals": true, "review/episode_preferences:0/reminders/working_with_nature": true, "review/episode_preferences:0/reminders/community_sessions": true, "review/episode_preferences:0/reminders/others": "DEFAULT_TEXT_VALUE", "review/episode_preferences:0/special_requests": "DEFAULT_TEXT_VALUE", "review/episode_preferences:0/comments": "DEFAULT_TEXT_VALUE", "review/episode_preferences:0/language|code": "en", "review/episode_preferences:0/language|terminology": "ISO_639-1", "review/episode_preferences:0/encoding|code": "UTF-8", "review/episode_preferences:0/encoding|terminology": "IANA_character-sets", "review/composer|id": "1234-5678", "review/composer|id_scheme": "ETHERCIS-TEST", "review/composer|id_namespace": "DEMOGRAPHIC", "review/composer|name": "Composer", "review/composer/_identifier:0": "1234-5678", "review/composer/_identifier:0|issuer": "ETHERCIS", "review/composer/_identifier:0|assigner": "dummy", "review/composer/_identifier:0|type": "dummy" }
Please note I need the template to be able to post this composition. thanks
here it is:-
<?xml version="1.0" encoding="utf-8"?>
Hmmm... not usable. Could you send it to christian at adoc dot co dot th ?
sorry here it is.
I fail to post the composition with the body you gave. Could you please send me a POST body that you have successfully used to post the composition?
On Tue, Sep 19, 2017 at 11:03 AM, shafeef notifications@github.com wrote:
EHRN Episode details.opt.zip https://github.com/ethercis/ethercis/files/1313004/EHRN.Episode.details.opt.zip
sorry here it is.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ethercis/ethercis/issues/46#issuecomment-330423055, or mute the thread https://github.com/notifications/unsubscribe-auth/Acq-uLqDFhR2sTFsRKoWX3hgkEr6zLrAks5sjz0bgaJpZM4PabVb .
just now i tried committing again, it works for me.
Here i had attached composition i used to commit
here is the response i got:-
{ "compositionUid": "89fcf066-f1d5-42ef-bbd3-e796ff569483::vm01.ethercis.org::1", "meta": { "href": "rest/v1/composition?uid=89fcf066-f1d5-42ef-bbd3-e796ff569483::vm01.ethercis.org::1" }, "action": "CREATE" }
Yes this one works, thanks!
Okay
I've posted a fix. please test
Okay thanks, it's working now.
one more doubt, is there any aql operator for fetching only unique value
like :-
/rest/v1/query?aql=select DISTINCT a/ehr_id/value as EHRid from EHR e contains COMPOSITION a[openEHR-EHR-COMPOSITION.review.v1] contains ( OBSERVATION b_a[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]) WHERE a/archetype_details/template_id/value='EHRN Episode details.v0'
http://www.openehr.org/releases/QUERY/latest/docs/AQL/AQL.html#_aql_variables
Distinct is not currently part of the spec but is supported by Marand AQL - I would vote for it to go in.
Okay Thanks
The following Aql query returns an interpret field error:
Error:
#1.0.0 Invocation exception to method:query:java.lang.IllegalArgumentException: Could not interpret field:context/health_care_facility/identifier/value
AQL query:
{{serverURL}}/rest/v1/query?aql=select a/ehr_id/value as EHRid, a/context/start_time/value as date_created, a/context/health_care_facility/identifier/value as Healthcare from EHR e contains COMPOSITION a[openEHR-EHR-COMPOSITION.review.v1] contains ( OBSERVATION b_a[openEHR-EHR-ADMIN_ENTRY.admission-extended.v1]) WHERE a/archetype_details/template_id/value='EHRN Episode details.v0' ORDER BY date_created DESC