Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bea382e
fix: adjust keywords and tests to get ehr_status separately
vladislavploaia Mar 3, 2026
19da152
fix: adjust keywords
vladislavploaia Mar 3, 2026
07d7191
fix: adjust keywords
vladislavploaia Mar 3, 2026
9b6fb89
fix: adjust tests
vladislavploaia Mar 3, 2026
57e3556
weird diff
vmueller-vg Mar 3, 2026
09ab8c6
fix: adjust tests
vladislavploaia Mar 3, 2026
fb69455
Merge branch 'feature/CDR-2253_adjust_tests' of https://github.com/eh…
vladislavploaia Mar 3, 2026
94d3ad9
fix: adjust tests
vladislavploaia Mar 3, 2026
37806ec
fix: adjust tests and keywords
vladislavploaia Mar 4, 2026
c3d6957
fix: adjust tests and keywords
vladislavploaia Mar 4, 2026
4e20f2f
fix: adjust tests and keywords
vladislavploaia Mar 4, 2026
bf098cc
fix: adjust tests and keywords
vladislavploaia Mar 4, 2026
bdf73ad
fix: set ehr_status JSON obj in a var
vladislavploaia Mar 4, 2026
a968134
fix: adjust test cases and keywords
vladislavploaia Mar 4, 2026
5cc4530
fix: adjust EHR_SERVICE_TESTS
vladislavploaia Mar 4, 2026
ad0b295
fix: adjust keywords and tests
vladislavploaia Mar 4, 2026
f53e94a
fix: kw 'Create EHR With Subject External Ref With Multitenant Token'
vladislavploaia Mar 5, 2026
e0bcbdb
fix: adjust keywords
vladislavploaia Mar 5, 2026
195b4f0
fix: adjust keyword
vladislavploaia Mar 5, 2026
467247b
fix: adjust 'extract ehrstatus_uid (JSON)' kw to set ehrstatus_uid in…
vladislavploaia Mar 9, 2026
bf6c3b1
CDR-2190 adjust stored query definition api tests to correct response…
vmueller-vg Mar 9, 2026
2790b5b
CDR-2190 fix keywork for stored query definition retrieval
vmueller-vg Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ Precondition
generate random ehr_id
Create EHR For AQL ehr_id=${ehr_id}
Set Suite Variable ${resp_json} ${response.json()}
Set Suite Variable ${ehr_status_uid} ${resp_json['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_uid} ${resp_json['uid']['value']}
Set Suite Variable ${ehr_status_subject_id}
... ${resp_json['ehr_status']['subject']['external_ref']['id']['value']}
... ${resp_json['subject']['external_ref']['id']['value']}
Set Suite Variable ${ehr_status_subject_namespace}
... ${resp_json['ehr_status']['subject']['external_ref']['namespace']}
Set Suite Variable ${ehr_time_created} ${resp_json['time_created']['value']}
... ${resp_json['subject']['external_ref']['namespace']}
Set Suite Variable ${ehr_time_created} ${resp.json()['time_created']['value']}

Execute Query
[Arguments] ${path} ${expected_file} ${nr_of_results}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ Precondition
generate random ehr_id
Create EHR For AQL ehr_id=${ehr_id}
Set Suite Variable ${resp_json} ${response.json()}
Set Suite Variable ${ehr_status_uid} ${resp_json['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_uid} ${resp_json['uid']['value']}
Set Suite Variable ${ehr_status_subject_id}
... ${resp_json['ehr_status']['subject']['external_ref']['id']['value']}
... ${resp_json['subject']['external_ref']['id']['value']}
Set Suite Variable ${ehr_status_subject_namespace}
... ${resp_json['ehr_status']['subject']['external_ref']['namespace']}
Set Suite Variable ${ehr_time_created} ${resp_json['time_created']['value']}
... ${resp_json['subject']['external_ref']['namespace']}

Execute Query
[Arguments] ${path} ${expected_file} ${nr_of_results}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Precondition
###
Create EHR For AQL
Set Suite Variable ${ehr_id3} ${ehr_id}
Set Suite Variable ${ehr_status_id3} ${response.json()['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_id3} ${resp_json['uid']['value']}
Update EHR Status For EHR
... ehr_id=${ehr_id3} ehrstatus_uid=${ehr_status_id3} ehr_status_file=status3.json
###
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Precondition
###
Create EHR For AQL
Set Suite Variable ${ehr_id3} ${ehr_id}
Set Suite Variable ${ehr_status_id3} ${response.json()['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_id3} ${resp_json['uid']['value']}
Update EHR Status For EHR
... ehr_id=${ehr_id3} ehrstatus_uid=${ehr_status_id3} ehr_status_file=status3.json
###
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ Precondition
Set Library Search Order For Tests
Create EHR For AQL
Set Suite Variable ${ehr_id1} ${ehr_id}
Set Suite Variable ${ehr_status_id1} ${response.json()['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_id1} ${resp_json['uid']['value']}
Set Suite Variable ${ehr_status_id1_subject_external_ref_id}
... ${response.json()['ehr_status']['subject']['external_ref']['id']['value']}
... ${response.json()['subject']['external_ref']['id']['value']}
Create EHR For AQL
Set Suite Variable ${ehr_id2} ${ehr_id}
Set Suite Variable ${ehr_status_id2} ${response.json()['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_id2} ${resp_json['uid']['value']}
Admin Delete EHR For AQL ${ehr_id2}
Create EHR For AQL
Set Suite Variable ${ehr_id3} ${ehr_id}
Set Suite Variable ${ehr_status_id3} ${response.json()['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_id3} ${resp_json['uid']['value']}
Update EHR Status For EHR
... ehr_id=${ehr_id3} ehrstatus_uid=${ehr_status_id3} ehr_status_file=status3.json
Set Suite Variable ${ehr_status_id3_version2} ${response.json()['uid']['value']}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ Precondition
Set Library Search Order For Tests
Create EHR For AQL
Set Suite Variable ${ehr_id1} ${ehr_id}
Set Suite Variable ${ehr_status_id1} ${response.json()['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_id1} ${resp_json['uid']['value']}
Set Suite Variable ${ehr_status_id1_subject_external_ref_id}
... ${response.json()['ehr_status']['subject']['external_ref']['id']['value']}
... ${response.json()['subject']['external_ref']['id']['value']}
Create EHR For AQL
Set Suite Variable ${ehr_id2} ${ehr_id}
Set Suite Variable ${ehr_status_id2} ${response.json()['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_id2} ${resp_json['uid']['value']}
Admin Delete EHR For AQL ${ehr_id2}
Create EHR For AQL
Set Suite Variable ${ehr_id3} ${ehr_id}
Set Suite Variable ${ehr_status_id3} ${response.json()['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_id3} ${resp_json['uid']['value']}
Update EHR Status For EHR
... ehr_id=${ehr_id3} ehrstatus_uid=${ehr_status_id3} ehr_status_file=status3.json
Set Suite Variable ${ehr_status_id3_version2} ${response.json()['uid']['value']}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Precondition
###
Create EHR For AQL
Set Suite Variable ${ehr_id3} ${ehr_id}
Set Suite Variable ${ehr_status_id3} ${response.json()['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_id3} ${resp_json['uid']['value']}
Update EHR Status For EHR
... ehr_id=${ehr_id3} ehrstatus_uid=${ehr_status_id3} ehr_status_file=status3.json
###
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Precondition
###
Create EHR For AQL
Set Suite Variable ${ehr_id3} ${ehr_id}
Set Suite Variable ${ehr_status_id3} ${response.json()['ehr_status']['uid']['value']}
Set Suite Variable ${ehr_status_id3} ${resp_json['uid']['value']}
Update EHR Status For EHR
... ehr_id=${ehr_id3} ehrstatus_uid=${ehr_status_id3} ehr_status_file=status3.json
###
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ Main flow create new event COMPOSITION FLAT
check response: is negative indicating does not allow modification
[Teardown] Run Keywords (admin) delete ehr AND (admin) delete all OPTs


*** Keywords ***
Precondition
Set Library Search Order For Tests
Upload OPT nested/nested.opt
create EHR
create EHR
Get EHR_STATUS Of EHR And Store Subject External Ref Value
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Force Tags
Alternative flow delete event COMPOSITION when EHR status is_modifiable is False
Upload OPT minimal/minimal_observation.opt
create EHR
Get EHR_STATUS Of EHR And Store Subject External Ref Value
commit composition (JSON) minimal/minimal_observation.composition.participations.extdatetimes.xml
check content of composition (JSON)
update EHR: set ehr-status modifiable ${FALSE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ Force Tags COMPOSITION_get_versioned

get revision history of versioned composition of EHR by UID ${versioned_object_uid}
Should Be Equal As Strings ${response.status_code} 200
${length} = Get Length ${response.json()}
${length} = Get Length ${response.json()['items']}
Should Be Equal As Integers ${length} 1

${item1} = Get From List ${response.json()} 0
${item1} = Get From List ${response.json()['items']} 0
Should Be Equal As Strings ${version_uid} ${item1['version_id']['value']}
Should Contain Any ${item1['audits'][0]['time_committed']['value']} + - Z timezone not present in timestamp
[Teardown] Run Keywords (admin) delete ehr AND (admin) delete all OPTs
Expand All @@ -64,13 +64,13 @@ Force Tags COMPOSITION_get_versioned

get revision history of versioned composition of EHR by UID ${versioned_object_uid}
Should Be Equal As Strings ${response.status_code} 200
${length} = Get Length ${response.json()}
${length}= Get Length ${response.json()['items']}
Should Be Equal As Integers ${length} 2

${item1} = Get From List ${response.json()} 0
${item1} = Get From List ${response.json()['items']} 0
Should Be Equal As Strings ${version_uid[0:-1]}2 ${item1['version_id']['value']}

${item2} = Get From List ${response.json()} 1
${item2} = Get From List ${response.json()['items']} 1
Should Be Equal As Strings ${version_uid[0:-1]}1 ${item2['version_id']['value']}
[Teardown] Run Keywords (admin) delete ehr AND (admin) delete all OPTs AND
... TRACE JIRA ISSUE CDR-413
Expand All @@ -86,19 +86,19 @@ Force Tags COMPOSITION_get_versioned

get revision history of versioned composition of EHR by UID ${versioned_object_uid}
Should Be Equal As Strings ${response.status_code} 200
${length} = Get Length ${response.json()}
${length} = Get Length ${response.json()['items']}
Should Be Equal As Integers ${length} 2

# comment: Attention: the following code is depending on the order of the array!
${item1} = Get From List ${response.json()} 0
${item1} = Get From List ${response.json()['items']} 0
Should Be Equal As Strings ${version_uid[0:-1]}2 ${item1['version_id']['value']}
# comment: check if change type is "creation"
${audit1} = Get From List ${item1['audits']} 0
Should Be Equal As Strings creation ${audit1['change_type']['value']}
# comment: save timestamp to compare later
${timestamp1} = Convert Date ${audit1['time_committed']['value']} result_format=%Y-%m-%dT%H:%M:%S.%f

${item2} = Get From List ${response.json()} 1
${item2} = Get From List ${response.json()['items']} 1
Should Be Equal As Strings ${version_uid[0:-1]}1 ${item2['version_id']['value']}
# comment: check if change type is "modification"
${audit2} = Get From List ${item2['audits']} 0
Expand Down Expand Up @@ -157,6 +157,6 @@ Force Tags COMPOSITION_get_versioned

get revision history of versioned composition of EHR by UID ${versioned_object_uid}
Should Be Equal As Strings ${response.status_code} 200
${item1} Get From List ${response.json()} 0
${item1} Get From List ${response.json()['items']} 0
Should Contain Any ${item1['audits'][0]['time_committed']['value']} + - Z timezone not present in timestamp
[Teardown] Run Keywords (admin) delete ehr AND (admin) delete all OPTs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Alternative flow update existing event COMPOSITION when EHR status is_modifiable
Upload OPT minimal/minimal_observation.opt

create EHR

Get EHR_STATUS Of EHR And Store Subject External Ref Value
commit composition (JSON) minimal/minimal_observation.composition.participations.extdatetimes.xml
check content of composition (JSON)
update EHR: set ehr-status modifiable ${FALSE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Main flow: successfully commit CONTRIBUTION with EHR status Modifiable True

Upload OPT minimal/minimal_evaluation.opt
create EHR
Get EHR_STATUS Of EHR And Store Subject External Ref Value
update EHR: set ehr-status modifiable ${TRUE}
commit CONTRIBUTION (JSON) minimal/minimal_evaluation.contribution.json
check response: is positive - returns version id
Expand All @@ -66,6 +67,7 @@ Main flow: does not allow to commit CONTRIBUTION with EHR status Modifiable Fals

Upload OPT minimal/minimal_evaluation.opt
create EHR
Get EHR_STATUS Of EHR And Store Subject External Ref Value
update EHR: set ehr-status modifiable ${FALSE}
commit CONTRIBUTION (JSON) is modifiable false minimal/minimal_evaluation.contribution.json
check response: is negative indicating does not allow modification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Force Tags
*** Test Cases ***
Alternative flow: create directory on empty EHR, with is_modifiable set to False
create EHR
Get EHR_STATUS Of EHR And Store Subject External Ref Value
update EHR: set ehr-status modifiable ${FALSE}
create DIRECTORY (JSON) empty_directory.json isModifiable=${FALSE}
Status Should Be 409
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Force Tags
Alternative flow : delete directory from EHR with directory and is_modifiable False

create EHR

Get EHR_STATUS Of EHR And Store Subject External Ref Value
create DIRECTORY (JSON) subfolders_in_directory_items.json
update EHR: set ehr-status modifiable ${FALSE}
delete DIRECTORY (JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Alternative flow: update directory from EHR with directory, second update with i
Preconditions
Set Library Search Order For Tests
create EHR
Get EHR_STATUS Of EHR And Store Subject External Ref Value
create DIRECTORY (JSON) update/1_create_empty_directory.json


Expand Down
8 changes: 5 additions & 3 deletions tests/robot/EHRSCAPE_TESTS/ehrscape_crud_ehr.robot
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ Main Flow Create EHR
Extract Template Id From OPT File
Get Web Template By Template Id (ECIS) ${template_id}
Create EHR With EHR Status
Set Suite Variable ${subject_id} ${response.json()["ehr_status"]["subject"]["external_ref"]["id"]["value"]}
Set Suite Variable ${subject_namespace} ${response.json()["ehr_status"]["subject"]["external_ref"]["namespace"]}
Get EHR_STATUS Of EHR And Store Subject External Ref Value
Set Suite Variable ${subject_id} ${ehr_status_subject_external_ref_value}
Set Suite Variable ${subject_namespace} ${response.json()["subject"]["external_ref"]["namespace"]}
${externalTemplate} Set Variable ${template_id}
Set Test Variable ${externalTemplate}

Expand Down Expand Up @@ -69,4 +70,5 @@ Get EHR Using Ehr Id And By Subject Id, Namespace
Create EHR With EHR Status
[Documentation] Create EHR with EHR_Status and other details, so it can contain correct subject object.
prepare new request session JSON
create new EHR with ehr_status ${VALID EHR DATA SETS}/000_ehr_status_with_other_details.json
create new EHR with ehr_status ${VALID EHR DATA SETS}/000_ehr_status_with_other_details.json
Get EHR_STATUS Of EHR And Store Subject External Ref Value
Loading