From 411dc5858a6ebdcaf8afed9a0a3f91696e64c57e Mon Sep 17 00:00:00 2001 From: vladislavploaia Date: Tue, 13 Feb 2024 15:39:40 +0200 Subject: [PATCH] feat: CDR-1299 add Robot tests with comparison operators --- .../as_in_result.robot | 140 ++- ...base.org.v0_contains_with_compo_uid_1.json | 978 +++++++++++++++++ ...base.org.v0_contains_with_compo_uid_2.json | 978 +++++++++++++++++ ...position_full_uid_not_existing_system.json | 17 - ...osition_partial_uid_without_system_id.json | 998 ++++++++++++++++++ ...sitions_with_fixed_uid_different_than.json | 21 + ...ns_with_fixed_uid_greater_equals_than.json | 24 + ...positions_with_fixed_uid_greater_than.json | 21 + ...ions_with_fixed_uid_lower_equals_than.json | 24 + ...ompositions_with_fixed_uid_lower_than.json | 24 + 10 files changed, 3201 insertions(+), 24 deletions(-) create mode 100644 tests/robot/_resources/test_data_sets/aql/data_load/compositions/aql-conformance-ehrbase.org.v0_contains_with_compo_uid_1.json create mode 100644 tests/robot/_resources/test_data_sets/aql/data_load/compositions/aql-conformance-ehrbase.org.v0_contains_with_compo_uid_2.json delete mode 100644 tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_composition_full_uid_not_existing_system.json create mode 100644 tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_composition_partial_uid_without_system_id.json create mode 100644 tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_different_than.json create mode 100644 tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_greater_equals_than.json create mode 100644 tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_greater_than.json create mode 100644 tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_lower_equals_than.json create mode 100644 tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_lower_than.json diff --git a/tests/robot/AQL_TESTS/SELECT/AS_GENERAL_KEYWORDS_A_D/as_in_result.robot b/tests/robot/AQL_TESTS/SELECT/AS_GENERAL_KEYWORDS_A_D/as_in_result.robot index 93f76d3e..a7f293d5 100644 --- a/tests/robot/AQL_TESTS/SELECT/AS_GENERAL_KEYWORDS_A_D/as_in_result.robot +++ b/tests/robot/AQL_TESTS/SELECT/AS_GENERAL_KEYWORDS_A_D/as_in_result.robot @@ -36,6 +36,36 @@ Check Composition Is Returned For Full Composition Uid Should Be Empty ${diff} msg=DIFF DETECTED! [Teardown] Admin Delete EHR For AQL +Check Composition Is Returned For Partial Composition Uid - Without System Id + [Documentation] - *Precondition:* 1. Create OPT; 2. Create EHR; 3. Create Composition + ... - Send AQL "SELECT c AS partial_without_system_id FROM COMPOSITION c WHERE c/uid/value='{compo_uid}'" + ... - Check if actual response == expected response + ... - *Postcondition:* Delete EHR using ADMIN endpoint. This is deleting compositions linked to EHR. + ... - https://vitagroup-ag.atlassian.net/browse/CDR-1299 + [Setup] Precondition + ${query} Set Variable SELECT c AS partial_without_system_id FROM COMPOSITION c WHERE c/uid/value='${compo_id}::::1' + Set AQL And Execute Ad Hoc Query ${query} + ${expected_result} Set Variable ${EXPECTED_JSON_DATA_SETS}/select/expected_composition_partial_uid_without_system_id.json + ${exclude_paths} Create List root['meta'] root['q'] root['rows'][0][0]['uid'] + ${diff} compare json-string with json-file + ... ${resp_body_actual} ${expected_result} exclude_paths=${exclude_paths} + Should Be Empty ${diff} msg=DIFF DETECTED! + [Teardown] Admin Delete EHR For AQL + +Check Composition Is Not Returned For Partial Composition Uid - Without Version Id + [Documentation] - *Precondition:* 1. Create OPT; 2. Create EHR; 3. Create Composition + ... - Send AQL "SELECT c AS partial_without_version_id FROM COMPOSITION c WHERE c/uid/value='{compo_uid}'" + ... - Check if error is returned with status code *400* and error message containing *is not a valid OBJECT_VERSION_ID/UID* + ... - *Postcondition:* Delete EHR using ADMIN endpoint. This is deleting compositions linked to EHR. + ... - https://vitagroup-ag.atlassian.net/browse/CDR-1299 + [Setup] Precondition + ${query} Set Variable SELECT c AS partial_without_version_id FROM COMPOSITION c WHERE c/uid/value='${compo_id}::${CREATING_SYSTEM_ID}::' + ${err_msg} Run Keyword And Expect Error * + ... Set AQL And Execute Ad Hoc Query ${query} + Should Contain ${err_msg} 400 != 200 + Should Contain ${err_msg} is not a valid OBJECT_VERSION_ID/UID + [Teardown] Admin Delete EHR For AQL + Check Composition Is Not Returned For Full Composition Uid - Non Existing Version Id [Documentation] - *Precondition:* 1. Create OPT; 2. Create EHR; 3. Create Composition ... - Send AQL "SELECT c AS full FROM COMPOSITION c WHERE c/uid/value='{compo_uid}'" version id not existing @@ -60,12 +90,10 @@ Check Composition Is Not Returned For Full Composition Uid - Non Existing System ... - https://vitagroup-ag.atlassian.net/browse/CDR-1291 [Setup] Precondition ${query} Set Variable SELECT c AS full FROM COMPOSITION c WHERE c/uid/value='${compo_id}::non-existing-system::1' - Set AQL And Execute Ad Hoc Query ${query} - ${expected_result} Set Variable ${EXPECTED_JSON_DATA_SETS}/select/expected_composition_full_uid_not_existing_system.json - ${exclude_paths} Create List root['meta'] root['q'] root['rows'][0][0]['uid'] - ${diff} compare json-string with json-file - ... ${resp_body_actual} ${expected_result} exclude_paths=${exclude_paths} - Should Be Empty ${diff} msg=DIFF DETECTED! + ${err_msg} Run Keyword And Expect Error * + ... Set AQL And Execute Ad Hoc Query ${query} + Should Contain ${err_msg} 400 != 200 + Should Contain ${err_msg} does not match this server (local.ehrbase.org) [Teardown] Admin Delete EHR For AQL Check Composition Is Returned For Full Composition Uid - Complex Query @@ -92,10 +120,108 @@ Check Composition Is Returned For Full Composition Uid - Complex Query ... Remove File ${EXPECTED_JSON_DATA_SETS}/select/expected_composition_full_uid_complex_query_tmp.json ... AND Admin Delete EHR For AQL +Check Two Composition UIDs Are Returned - AQL With Lower Than Sign + [Documentation] - *Precondition:* 1. Create OPT; 2. Create EHR; + ... 3. Create Composition with fixed uid 1; 4. Create Composition with fixed uid 2 + ... - Send AQL "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value<'d037bf7c-0ecb-40fb-aada-fc7d559815ea::::1'" + ... - Check if actual response == expected response (2 items in rows) + ... - Rows to have 2 items: ["c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1"],["b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1"] + ... - *Postcondition:* Delete EHR using ADMIN endpoint. This is deleting compositions linked to EHR. + ... - https://vitagroup-ag.atlassian.net/browse/CDR-1299 + [Setup] Precondition - Add 2 Compositions With Fixed UIDs + ${query} Set Variable SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value<'d037bf7c-0ecb-40fb-aada-fc7d559815ea::::1' + Set AQL And Execute Ad Hoc Query ${query} + ${expected_result} Set Variable ${EXPECTED_JSON_DATA_SETS}/select/expected_compositions_with_fixed_uid_lower_than.json + ${exclude_paths} Create List root['meta'] root['q'] root['rows'][0][0]['uid'] + ${diff} compare json-string with json-file + ... ${resp_body_actual} ${expected_result} exclude_paths=${exclude_paths} + Should Be Empty ${diff} msg=DIFF DETECTED! + [Teardown] Admin Delete EHR For AQL + +Check One Composition UID Is Returned - AQL With Greater Than Sign + [Documentation] - *Precondition:* 1. Create OPT; 2. Create EHR; + ... 3. Create Composition with fixed uid 1; 4. Create Composition with fixed uid 2 + ... - Send AQL "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value>'b037bf7c-0ecb-40fb-aada-fc7d559815ea::${CREATING_SYSTEM_ID}::1'" + ... - Check if actual response == expected response (1 item in rows) + ... - Rows to have 1 item: ["c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1"] + ... - *Postcondition:* Delete EHR using ADMIN endpoint. This is deleting compositions linked to EHR. + ... - https://vitagroup-ag.atlassian.net/browse/CDR-1299 + [Setup] Precondition - Add 2 Compositions With Fixed UIDs + ${query} Set Variable SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value>'b037bf7c-0ecb-40fb-aada-fc7d559815ea::${CREATING_SYSTEM_ID}::1' + Set AQL And Execute Ad Hoc Query ${query} + ${expected_result} Set Variable ${EXPECTED_JSON_DATA_SETS}/select/expected_compositions_with_fixed_uid_greater_than.json + ${exclude_paths} Create List root['meta'] root['q'] root['rows'][0][0]['uid'] + ${diff} compare json-string with json-file + ... ${resp_body_actual} ${expected_result} exclude_paths=${exclude_paths} + Should Be Empty ${diff} msg=DIFF DETECTED! + [Teardown] Admin Delete EHR For AQL + +Check Two Composition UIDs Are Returned - AQL With Lower Equals Sign + [Documentation] - *Precondition:* 1. Create OPT; 2. Create EHR; + ... 3. Create Composition with fixed uid 1; 4. Create Composition with fixed uid 2 + ... - Send AQL "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value<='c037bf7c-0ecb-40fb-aada-fc7d559815ea::${CREATING_SYSTEM_ID}::1'" + ... - Check if actual response == expected response (2 items in rows) + ... - Rows to have 2 items: ["c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1"], ["b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1"] + ... - *Postcondition:* Delete EHR using ADMIN endpoint. This is deleting compositions linked to EHR. + ... - https://vitagroup-ag.atlassian.net/browse/CDR-1299 + [Setup] Precondition - Add 2 Compositions With Fixed UIDs + ${query} Set Variable SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value<='c037bf7c-0ecb-40fb-aada-fc7d559815ea::${CREATING_SYSTEM_ID}::1' + Set AQL And Execute Ad Hoc Query ${query} + ${expected_result} Set Variable ${EXPECTED_JSON_DATA_SETS}/select/expected_compositions_with_fixed_uid_lower_equals_than.json + ${exclude_paths} Create List root['meta'] root['q'] root['rows'][0][0]['uid'] + ${diff} compare json-string with json-file + ... ${resp_body_actual} ${expected_result} exclude_paths=${exclude_paths} + Should Be Empty ${diff} msg=DIFF DETECTED! + [Teardown] Admin Delete EHR For AQL + +Check Two Composition UIDs Are Returned - AQL With Greater Equals Sign + [Documentation] - *Precondition:* 1. Create OPT; 2. Create EHR; + ... 3. Create Composition with fixed uid 1; 4. Create Composition with fixed uid 2 + ... - Send AQL "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value>='b037bf7c-0ecb-40fb-aada-fc7d559815ea::::1'" + ... - Check if actual response == expected response (2 items in rows) + ... - Rows to have 2 items: ["c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1"], ["b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1"] + ... - *Postcondition:* Delete EHR using ADMIN endpoint. This is deleting compositions linked to EHR. + ... - https://vitagroup-ag.atlassian.net/browse/CDR-1299 + [Setup] Precondition - Add 2 Compositions With Fixed UIDs + ${query} Set Variable SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value>='b037bf7c-0ecb-40fb-aada-fc7d559815ea::::1' + Set AQL And Execute Ad Hoc Query ${query} + ${expected_result} Set Variable ${EXPECTED_JSON_DATA_SETS}/select/expected_compositions_with_fixed_uid_greater_equals_than.json + ${exclude_paths} Create List root['meta'] root['q'] root['rows'][0][0]['uid'] + ${diff} compare json-string with json-file + ... ${resp_body_actual} ${expected_result} exclude_paths=${exclude_paths} + Should Be Empty ${diff} msg=DIFF DETECTED! + [Teardown] Admin Delete EHR For AQL + +Check One Composition UID Is Returned - AQL With Different Than Sign + [Documentation] - *Precondition:* 1. Create OPT; 2. Create EHR; + ... 3. Create Composition with fixed uid 1; 4. Create Composition with fixed uid 2 + ... - Send AQL "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value != 'c037bf7c-0ecb-40fb-aada-fc7d559815ea::::1'" + ... - Check if actual response == expected response (1 item in rows) + ... - Rows to have 1 item: ["b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1"] + ... - *Postcondition:* Delete EHR using ADMIN endpoint. This is deleting compositions linked to EHR. + ... - https://vitagroup-ag.atlassian.net/browse/CDR-1299 + [Setup] Precondition - Add 2 Compositions With Fixed UIDs + ${query} Set Variable SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value!='c037bf7c-0ecb-40fb-aada-fc7d559815ea::::1' + Set AQL And Execute Ad Hoc Query ${query} + ${expected_result} Set Variable ${EXPECTED_JSON_DATA_SETS}/select/expected_compositions_with_fixed_uid_different_than.json + ${exclude_paths} Create List root['meta'] root['q'] root['rows'][0][0]['uid'] + ${diff} compare json-string with json-file + ... ${resp_body_actual} ${expected_result} exclude_paths=${exclude_paths} + Should Be Empty ${diff} msg=DIFF DETECTED! + [Teardown] Admin Delete EHR For AQL + *** Keywords *** Precondition Upload OPT For AQL aql-conformance-ehrbase.org.v0.opt Create EHR For AQL Commit Composition For AQL aql-conformance-ehrbase.org.v0_contains.json - Set Test Variable ${compo_id} ${composition_short_uid} \ No newline at end of file + Set Test Variable ${compo_id} ${composition_short_uid} + +Precondition - Add 2 Compositions With Fixed UIDs + Upload OPT For AQL aql-conformance-ehrbase.org.v0.opt + Create EHR For AQL + Commit Composition For AQL aql-conformance-ehrbase.org.v0_contains_with_compo_uid_1.json + Log ${composition_short_uid} + Commit Composition For AQL aql-conformance-ehrbase.org.v0_contains_with_compo_uid_2.json + Log ${composition_short_uid} \ No newline at end of file diff --git a/tests/robot/_resources/test_data_sets/aql/data_load/compositions/aql-conformance-ehrbase.org.v0_contains_with_compo_uid_1.json b/tests/robot/_resources/test_data_sets/aql/data_load/compositions/aql-conformance-ehrbase.org.v0_contains_with_compo_uid_1.json new file mode 100644 index 00000000..3a88e087 --- /dev/null +++ b/tests/robot/_resources/test_data_sets/aql/data_load/compositions/aql-conformance-ehrbase.org.v0_contains_with_compo_uid_1.json @@ -0,0 +1,978 @@ +{ + "_type": "COMPOSITION", + "name": { + "_type": "DV_TEXT", + "value": "aql-conformance-ehrbase.org.v0" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-COMPOSITION.conformance_composition_.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "territory": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_3166-1" + }, + "code_string": "DE" + }, + "category": { + "_type": "DV_CODED_TEXT", + "value": "event", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "433" + } + }, + "composer": { + "_type": "PARTY_IDENTIFIED", + "name": "Max Mustermann" + }, + "context": { + "_type": "EVENT_CONTEXT", + "start_time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "end_time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "setting": { + "_type": "DV_CODED_TEXT", + "value": "home", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "225" + } + }, + "health_care_facility": { + "_type": "PARTY_IDENTIFIED", + "name": "DOE, John" + } + }, + "content": [ + { + "_type": "SECTION", + "name": { + "_type": "DV_TEXT", + "value": "conformance section" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-SECTION.conformance_section.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "INTERVAL_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "conformance cluster" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "labresult" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0003" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "ANY" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0005" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + } + ], + "archetype_node_id": "at0003" + }, + "width": { + "_type": "DV_DURATION", + "value": "PT42H" + }, + "math_function": { + "_type": "DV_CODED_TEXT", + "value": "minimum", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "145" + } + }, + "archetype_node_id": "at0002" + }, + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "conformance cluster" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "labresult" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0003" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "ANY" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0005" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "893506a7-462b-40b8-9638-0aa3990642d9" + } + }, + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "INTERVAL_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "width": { + "_type": "DV_DURATION", + "value": "PT42H" + }, + "math_function": { + "_type": "DV_CODED_TEXT", + "value": "minimum", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "145" + } + }, + "archetype_node_id": "at0002" + }, + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "d4cccdfc-9c90-402f-b4bb-94e8dc4ea429" + } + }, + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Blood pressure" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.blood_pressure.v2" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "state": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "state structure" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Position" + }, + "value": { + "_type": "DV_CODED_TEXT", + "value": "Standing", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "local" + }, + "code_string": "at1000" + } + }, + "archetype_node_id": "at0008" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Confounding factors" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at1052" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "conformance cluster" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "labresult" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0003" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "ANY" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0005" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Sleep status" + }, + "value": { + "_type": "DV_CODED_TEXT", + "value": "Awake", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "local" + }, + "code_string": "at1044" + } + }, + "archetype_node_id": "at1043" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Tilt" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "deg", + "magnitude": 0.0 + }, + "archetype_node_id": "at1005" + } + ], + "archetype_node_id": "at0007" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "blood pressure" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Systolic" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Diastolic" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at0005" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Mean arterial pressure" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at1006" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Pulse pressure" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at1007" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Clinical interpretation" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at1059" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0033" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0006" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.blood_pressure.v2", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "2183807d-af68-41c5-9bfe-28cd150d62f7" + } + } + ], + "archetype_node_id": "openEHR-EHR-SECTION.conformance_section.v0" + }, + { + "_type": "SECTION", + "name": { + "_type": "DV_TEXT", + "value": "Section 1" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-SECTION.adhoc.v1" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "55415141-17e4-4c71-9429-aa0fe6694c83" + } + } + ], + "archetype_node_id": "openEHR-EHR-SECTION.adhoc.v1" + }, + { + "_type": "SECTION", + "name": { + "_type": "DV_TEXT", + "value": "Section 2" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-SECTION.adhoc.v1" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "94c0e756-e892-4985-884b-46829605a236" + } + } + ], + "archetype_node_id": "openEHR-EHR-SECTION.adhoc.v1" + } + ], + "uid": { + "_type": "OBJECT_VERSION_ID", + "value": "b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1" + }, + "archetype_node_id": "openEHR-EHR-COMPOSITION.conformance_composition_.v0" +} \ No newline at end of file diff --git a/tests/robot/_resources/test_data_sets/aql/data_load/compositions/aql-conformance-ehrbase.org.v0_contains_with_compo_uid_2.json b/tests/robot/_resources/test_data_sets/aql/data_load/compositions/aql-conformance-ehrbase.org.v0_contains_with_compo_uid_2.json new file mode 100644 index 00000000..4a7e6bff --- /dev/null +++ b/tests/robot/_resources/test_data_sets/aql/data_load/compositions/aql-conformance-ehrbase.org.v0_contains_with_compo_uid_2.json @@ -0,0 +1,978 @@ +{ + "_type": "COMPOSITION", + "name": { + "_type": "DV_TEXT", + "value": "aql-conformance-ehrbase.org.v0" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-COMPOSITION.conformance_composition_.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "territory": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_3166-1" + }, + "code_string": "DE" + }, + "category": { + "_type": "DV_CODED_TEXT", + "value": "event", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "433" + } + }, + "composer": { + "_type": "PARTY_IDENTIFIED", + "name": "Max Mustermann" + }, + "context": { + "_type": "EVENT_CONTEXT", + "start_time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "end_time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "setting": { + "_type": "DV_CODED_TEXT", + "value": "home", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "225" + } + }, + "health_care_facility": { + "_type": "PARTY_IDENTIFIED", + "name": "DOE, John" + } + }, + "content": [ + { + "_type": "SECTION", + "name": { + "_type": "DV_TEXT", + "value": "conformance section" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-SECTION.conformance_section.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "INTERVAL_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "conformance cluster" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "labresult" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0003" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "ANY" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0005" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + } + ], + "archetype_node_id": "at0003" + }, + "width": { + "_type": "DV_DURATION", + "value": "PT42H" + }, + "math_function": { + "_type": "DV_CODED_TEXT", + "value": "minimum", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "145" + } + }, + "archetype_node_id": "at0002" + }, + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "conformance cluster" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "labresult" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0003" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "ANY" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0005" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "893506a7-462b-40b8-9638-0aa3990642d9" + } + }, + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "INTERVAL_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "width": { + "_type": "DV_DURATION", + "value": "PT42H" + }, + "math_function": { + "_type": "DV_CODED_TEXT", + "value": "minimum", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "145" + } + }, + "archetype_node_id": "at0002" + }, + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "d4cccdfc-9c90-402f-b4bb-94e8dc4ea429" + } + }, + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Blood pressure" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.blood_pressure.v2" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "state": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "state structure" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Position" + }, + "value": { + "_type": "DV_CODED_TEXT", + "value": "Standing", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "local" + }, + "code_string": "at1000" + } + }, + "archetype_node_id": "at0008" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Confounding factors" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at1052" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "conformance cluster" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "labresult" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0003" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "ANY" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0005" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Sleep status" + }, + "value": { + "_type": "DV_CODED_TEXT", + "value": "Awake", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "local" + }, + "code_string": "at1044" + } + }, + "archetype_node_id": "at1043" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Tilt" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "deg", + "magnitude": 0.0 + }, + "archetype_node_id": "at1005" + } + ], + "archetype_node_id": "at0007" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "blood pressure" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Systolic" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Diastolic" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at0005" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Mean arterial pressure" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at1006" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Pulse pressure" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at1007" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Clinical interpretation" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at1059" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0033" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0006" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.blood_pressure.v2", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "2183807d-af68-41c5-9bfe-28cd150d62f7" + } + } + ], + "archetype_node_id": "openEHR-EHR-SECTION.conformance_section.v0" + }, + { + "_type": "SECTION", + "name": { + "_type": "DV_TEXT", + "value": "Section 1" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-SECTION.adhoc.v1" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "55415141-17e4-4c71-9429-aa0fe6694c83" + } + } + ], + "archetype_node_id": "openEHR-EHR-SECTION.adhoc.v1" + }, + { + "_type": "SECTION", + "name": { + "_type": "DV_TEXT", + "value": "Section 2" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-SECTION.adhoc.v1" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "94c0e756-e892-4985-884b-46829605a236" + } + } + ], + "archetype_node_id": "openEHR-EHR-SECTION.adhoc.v1" + } + ], + "uid": { + "_type": "OBJECT_VERSION_ID", + "value": "c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1" + }, + "archetype_node_id": "openEHR-EHR-COMPOSITION.conformance_composition_.v0" +} \ No newline at end of file diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_composition_full_uid_not_existing_system.json b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_composition_full_uid_not_existing_system.json deleted file mode 100644 index 0d7f087d..00000000 --- a/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_composition_full_uid_not_existing_system.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "meta": { - "_type": "RESULTSET", - "_schema_version": "1.0.4", - "_created": "2024-02-09T11:29:53.8497995+02:00", - "_executed_aql": "SELECT c AS full FROM COMPOSITION c WHERE c/uid/value = '2aaee84f-703a-4585-8b2f-5b02de80cf0c::non-existing-system::1'", - "resultsize": 0 - }, - "q": "SELECT c AS full FROM COMPOSITION c WHERE c/uid/value = '2aaee84f-703a-4585-8b2f-5b02de80cf0c::non-existing-system::1'", - "columns": [ - { - "path": "c", - "name": "full" - } - ], - "rows": [] -} \ No newline at end of file diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_composition_partial_uid_without_system_id.json b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_composition_partial_uid_without_system_id.json new file mode 100644 index 00000000..79107235 --- /dev/null +++ b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_composition_partial_uid_without_system_id.json @@ -0,0 +1,998 @@ +{ + "meta": { + "_type": "RESULTSET", + "_schema_version": "1.0.4", + "_created": "2024-02-13T11:33:59.8045921+02:00", + "_executed_aql": "SELECT c AS partial_without_system_id FROM COMPOSITION c WHERE c/uid/value = 'd11aa7bf-12cc-4391-88b1-ae8038ff577a::::1'", + "resultsize": 1 + }, + "q": "SELECT c AS partial_without_system_id FROM COMPOSITION c WHERE c/uid/value = 'd11aa7bf-12cc-4391-88b1-ae8038ff577a::::1'", + "columns": [ + { + "path": "c", + "name": "partial_without_system_id" + } + ], + "rows": [ + [ + { + "_type": "COMPOSITION", + "name": { + "_type": "DV_TEXT", + "value": "aql-conformance-ehrbase.org.v0" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-COMPOSITION.conformance_composition_.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "territory": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_3166-1" + }, + "code_string": "DE" + }, + "category": { + "_type": "DV_CODED_TEXT", + "value": "event", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "433" + } + }, + "composer": { + "_type": "PARTY_IDENTIFIED", + "name": "Max Mustermann" + }, + "context": { + "_type": "EVENT_CONTEXT", + "start_time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "end_time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "setting": { + "_type": "DV_CODED_TEXT", + "value": "home", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "225" + } + }, + "health_care_facility": { + "_type": "PARTY_IDENTIFIED", + "name": "DOE, John" + } + }, + "content": [ + { + "_type": "SECTION", + "name": { + "_type": "DV_TEXT", + "value": "conformance section" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-SECTION.conformance_section.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "INTERVAL_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "conformance cluster" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "labresult" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0003" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "ANY" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0005" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + } + ], + "archetype_node_id": "at0003" + }, + "width": { + "_type": "DV_DURATION", + "value": "PT42H" + }, + "math_function": { + "_type": "DV_CODED_TEXT", + "value": "minimum", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "145" + } + }, + "archetype_node_id": "at0002" + }, + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "conformance cluster" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "labresult" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0003" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "ANY" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0005" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "893506a7-462b-40b8-9638-0aa3990642d9" + } + }, + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "INTERVAL_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "width": { + "_type": "DV_DURATION", + "value": "PT42H" + }, + "math_function": { + "_type": "DV_CODED_TEXT", + "value": "minimum", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "145" + } + }, + "archetype_node_id": "at0002" + }, + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "d4cccdfc-9c90-402f-b4bb-94e8dc4ea429" + } + }, + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Blood pressure" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.blood_pressure.v2" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "state": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "state structure" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Position" + }, + "value": { + "_type": "DV_CODED_TEXT", + "value": "Standing", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "local" + }, + "code_string": "at1000" + } + }, + "archetype_node_id": "at0008" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Confounding factors" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at1052" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "conformance cluster" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "labresult" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0003" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "ANY" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0005" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.conformance_cluster.v0" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Sleep status" + }, + "value": { + "_type": "DV_CODED_TEXT", + "value": "Awake", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "local" + }, + "code_string": "at1044" + } + }, + "archetype_node_id": "at1043" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Tilt" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "deg", + "magnitude": 0.0 + }, + "archetype_node_id": "at1005" + } + ], + "archetype_node_id": "at0007" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "blood pressure" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Systolic" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Diastolic" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at0005" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Mean arterial pressure" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at1006" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Pulse pressure" + }, + "value": { + "_type": "DV_QUANTITY", + "units": "mm[Hg]", + "magnitude": 500.0 + }, + "archetype_node_id": "at1007" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Clinical interpretation" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at1059" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Comment" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0033" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0006" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.blood_pressure.v2", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "2183807d-af68-41c5-9bfe-28cd150d62f7" + } + } + ], + "archetype_node_id": "openEHR-EHR-SECTION.conformance_section.v0" + }, + { + "_type": "SECTION", + "name": { + "_type": "DV_TEXT", + "value": "Section 1" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-SECTION.adhoc.v1" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "55415141-17e4-4c71-9429-aa0fe6694c83" + } + } + ], + "archetype_node_id": "openEHR-EHR-SECTION.adhoc.v1" + }, + { + "_type": "SECTION", + "name": { + "_type": "DV_TEXT", + "value": "Section 2" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-SECTION.adhoc.v1" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "items": [ + { + "_type": "OBSERVATION", + "name": { + "_type": "DV_TEXT", + "value": "Conformance Observation" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-OBSERVATION.conformance_observation.v0" + }, + "template_id": { + "value": "aql-conformance-ehrbase.org.v0" + }, + "rm_version": "1.0.4" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "en" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "name": { + "_type": "DV_TEXT", + "value": "History" + }, + "origin": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "events": [ + { + "_type": "POINT_EVENT", + "name": { + "_type": "DV_TEXT", + "value": "Any event" + }, + "time": { + "_type": "DV_DATE_TIME", + "value": "2022-02-03T04:05:06" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "DV_TEXT" + }, + "value": { + "_type": "DV_TEXT", + "value": "Lorem ipsum" + }, + "archetype_node_id": "at0004" + } + ], + "archetype_node_id": "at0003" + }, + "archetype_node_id": "at0002" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-OBSERVATION.conformance_observation.v0", + "uid": { + "_type": "HIER_OBJECT_ID", + "value": "94c0e756-e892-4985-884b-46829605a236" + } + } + ], + "archetype_node_id": "openEHR-EHR-SECTION.adhoc.v1" + } + ], + "archetype_node_id": "openEHR-EHR-COMPOSITION.conformance_composition_.v0", + "uid": { + "_type": "OBJECT_VERSION_ID", + "value": "d11aa7bf-12cc-4391-88b1-ae8038ff577a::local.ehrbase.org::1" + } + } + ] + ] +} \ No newline at end of file diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_different_than.json b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_different_than.json new file mode 100644 index 00000000..a9926e12 --- /dev/null +++ b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_different_than.json @@ -0,0 +1,21 @@ +{ + "meta": { + "_type": "RESULTSET", + "_schema_version": "1.0.4", + "_created": "2024-02-13T15:37:24.9114458+02:00", + "_executed_aql": "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value != 'c037bf7c-0ecb-40fb-aada-fc7d559815ea::::1'", + "resultsize": 1 + }, + "q": "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value != 'c037bf7c-0ecb-40fb-aada-fc7d559815ea::::1'", + "columns": [ + { + "path": "c/uid/value", + "name": "full" + } + ], + "rows": [ + [ + "b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1" + ] + ] +} \ No newline at end of file diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_greater_equals_than.json b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_greater_equals_than.json new file mode 100644 index 00000000..3f5500e5 --- /dev/null +++ b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_greater_equals_than.json @@ -0,0 +1,24 @@ +{ + "meta": { + "_type": "RESULTSET", + "_schema_version": "1.0.4", + "_created": "2024-02-13T15:30:02.8524608+02:00", + "_executed_aql": "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value >= 'b037bf7c-0ecb-40fb-aada-fc7d559815ea::::1'", + "resultsize": 2 + }, + "q": "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value >= 'b037bf7c-0ecb-40fb-aada-fc7d559815ea::::1'", + "columns": [ + { + "path": "c/uid/value", + "name": "full" + } + ], + "rows": [ + [ + "c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1" + ], + [ + "b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1" + ] + ] +} \ No newline at end of file diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_greater_than.json b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_greater_than.json new file mode 100644 index 00000000..147593d1 --- /dev/null +++ b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_greater_than.json @@ -0,0 +1,21 @@ +{ + "meta": { + "_type": "RESULTSET", + "_schema_version": "1.0.4", + "_created": "2024-02-13T13:39:46.2607525+02:00", + "_executed_aql": "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value > 'b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1'", + "resultsize": 1 + }, + "q": "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value > 'b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1'", + "columns": [ + { + "path": "c/uid/value", + "name": "full" + } + ], + "rows": [ + [ + "c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1" + ] + ] +} \ No newline at end of file diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_lower_equals_than.json b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_lower_equals_than.json new file mode 100644 index 00000000..58bb15bf --- /dev/null +++ b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_lower_equals_than.json @@ -0,0 +1,24 @@ +{ + "meta": { + "_type": "RESULTSET", + "_schema_version": "1.0.4", + "_created": "2024-02-13T15:08:54.5559286+02:00", + "_executed_aql": "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value <= 'c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1'", + "resultsize": 2 + }, + "q": "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value <= 'c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1'", + "columns": [ + { + "path": "c/uid/value", + "name": "full" + } + ], + "rows": [ + [ + "c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1" + ], + [ + "b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1" + ] + ] +} \ No newline at end of file diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_lower_than.json b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_lower_than.json new file mode 100644 index 00000000..b5b2632a --- /dev/null +++ b/tests/robot/_resources/test_data_sets/aql/fields_and_results/select/expected_compositions_with_fixed_uid_lower_than.json @@ -0,0 +1,24 @@ +{ + "meta": { + "_type": "RESULTSET", + "_schema_version": "1.0.4", + "_created": "2024-02-13T13:31:09.4833011+02:00", + "_executed_aql": "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value < 'd037bf7c-0ecb-40fb-aada-fc7d559815ea::::1'", + "resultsize": 2 + }, + "q": "SELECT c/uid/value AS full FROM COMPOSITION c WHERE c/uid/value < 'd037bf7c-0ecb-40fb-aada-fc7d559815ea::::1'", + "columns": [ + { + "path": "c/uid/value", + "name": "full" + } + ], + "rows": [ + [ + "c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1" + ], + [ + "b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1" + ] + ] +} \ No newline at end of file