-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
805ef11
commit adf5c43
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
tests/robot/AQL_TESTS/WHERE/SIMPLE_COMPARE/compare_by_dv_ordered_cdr_1404.robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
*** Settings *** | ||
Documentation WHERE - SIMPLE COMPARE - Compare by DV_ORDERED - CDR-1404 | ||
... - Covers the following: | ||
... - https://vitagroup-ag.atlassian.net/browse/CDR-1404 | ||
Resource ../../../_resources/keywords/aql_keywords.robot | ||
|
||
|
||
*** Variables *** | ||
${query} SELECT o/data/events/data/items/value/magnitude | ||
... FROM OBSERVATION o [openEHR-EHR-OBSERVATION.conformance_observation.v0] | ||
... WHERE o/data[at0001]/events[at0002]/data[at0003]/items[at0008]/value = 82.0 | ||
|
||
|
||
*** Test Cases *** | ||
CDR-1404: ${query} | ||
[Documentation] - *Precondition:* 1. Create OPT; 2. Create EHR; 3. Create Composition | ||
... - Send AQL '${query}' | ||
... - Check if actual response == expected response | ||
... - *Postcondition:* Delete EHR using ADMIN endpoint. This is deleting compositions linked to EHR. | ||
[Setup] Precondition | ||
Set AQL And Execute Ad Hoc Query ${query} | ||
${expected_result} Set Variable ${EXPECTED_JSON_DATA_SETS}/where/expected_compare_by_dv_ordered_cdr_1404.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 | ||
Set Library Search Order For Tests | ||
Upload OPT For AQL conformance_ehrbase.de.v0.opt | ||
Create EHR For AQL | ||
Commit Composition For AQL conformance_ehrbase.de.v0_max_v2.json | ||
Set Suite Variable ${c_uid1} ${composition_short_uid} |
21 changes: 21 additions & 0 deletions
21
.../test_data_sets/aql/fields_and_results/where/expected_compare_by_dv_ordered_cdr_1404.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"meta": { | ||
"_type": "RESULTSET", | ||
"_schema_version": "1.0.4", | ||
"_created": "2024-04-24T14:34:40.4377847+03:00", | ||
"_executed_aql": "SELECT o/data/events/data/items/value/magnitude FROM OBSERVATION o[openEHR-EHR-OBSERVATION.conformance_observation.v0] WHERE o/data[at0001]/events[at0002]/data[at0003]/items[at0008]/value = 82.0", | ||
"resultsize": 1 | ||
}, | ||
"q": "SELECT o/data/events/data/items/value/magnitude FROM OBSERVATION o[openEHR-EHR-OBSERVATION.conformance_observation.v0] WHERE o/data[at0001]/events[at0002]/data[at0003]/items[at0008]/value = 82.0", | ||
"columns": [ | ||
{ | ||
"path": "o/data/events/data/items/value/magnitude", | ||
"name": "#0" | ||
} | ||
], | ||
"rows": [ | ||
[ | ||
82.0 | ||
] | ||
] | ||
} |