forked from ethercis/VirtualEhr
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix composition instance check in step, add scenario for select instr…
…uction
- Loading branch information
1 parent
f6e2964
commit e187924
Showing
5 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
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
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
35 changes: 35 additions & 0 deletions
35
...ts/src/test/resources/test_data/code4health/queries/population-composition-evaluation.aql
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,35 @@ | ||
select | ||
e/ehr_id/value as ehrId, | ||
e/ehr_status/subject/external_ref/id/value as subjectId, | ||
e/ehr_status/subject/external_ref/namespace as subjectNamespace, | ||
|
||
a/context/start_time/value as compositionStartTime, | ||
a/uid/value as compositionId, | ||
a/composer/name as composerName, | ||
a/composer/external_ref/id/value as composerId, | ||
a/composer/external_ref/namespace as composerNamespace, | ||
|
||
b_a/uid/value as entryId, | ||
b_a/protocol[at0042]/items[at0062]/value/value as AssertedDate, | ||
b_a/data[at0001]/items[at0002] as Causative_agent, | ||
b_a/data[at0001]/items[at0063]/value/defining_code/code_string as Status_code, | ||
b_a/data[at0001]/items[at0101]/value/defining_code/code_string as Criticality_code, | ||
b_a/data[at0001]/items[at0120]/value/defining_code/code_string as Category_code, | ||
b_a/data[at0001]/items[at0117]/value/value as Onset_of_last_reaction, | ||
b_a/data[at0001]/items[at0058]/value/defining_code/code_string as Reaction_mechanism_code, | ||
b_a/data[at0001]/items[at0006]/value/value as Comment, | ||
b_a/data[at0001]/items[at0009]/items[at0010] as Specific_substance, | ||
b_a/data[at0001]/items[at0009]/items[at0021]/value/defining_code/code_string as Certainty_code, | ||
b_a/data[at0001]/items[at0009]/items[at0011] as Manifestation, | ||
b_a/data[at0001]/items[at0009]/items[at0012]/value/value as Reaction_description, | ||
b_a/data[at0001]/items[at0009]/items[at0027]/value/value as Onset_of_reaction, | ||
b_a/data[at0001]/items[at0009]/items[at0089]/value/defining_code/code_string as Severity_code, | ||
b_a/data[at0001]/items[at0009]/items[at0106] as Route_of_exposure, | ||
b_a/data[at0001]/items[at0009]/items[at0032]/value/value as Adverse_reaction_risk_Comment | ||
|
||
from EHR e | ||
contains COMPOSITION a[openEHR-EHR-COMPOSITION.adverse_reaction_list.v1] | ||
|
||
contains EVALUATION b_a[openEHR-EHR-EVALUATION.adverse_reaction_risk.v1] | ||
|
||
where a/name/value='Adverse reaction list' |
2 changes: 1 addition & 1 deletion
2
...on-tests/src/test/resources/test_data/code4health/queries/select_complete_composition.aql
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
10 changes: 10 additions & 0 deletions
10
...on-tests/src/test/resources/test_data/code4health/queries/select_complete_instruction.aql
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,10 @@ | ||
SELECT | ||
b_a as instruction | ||
FROM | ||
EHR e [ehr_id/value = '{{ehrId}}'] | ||
|
||
CONTAINS COMPOSITION a[{{compositionArchetypeIdId}}] | ||
|
||
CONTAINS INSTRUCTION b_a[{{instructionArchetypeId}}] | ||
WHERE | ||
a/name/value='{{compositionName}}' |