- Create ehr
- Create directory
folder_simple_hierarchy
- Run Query
SELECT f/uid/value, f/name/value, f/archetype_node_id FOLDER f
- check result is in any order
f/uid/value | f/name/value | f/archetype_node_id |
---|---|---|
10e952ca-a5b2-4f24-8d37-59240fd37020 | root1 | openEHR-EHR-FOLDER.generic.v1 |
d936409e-901f-4994-8d33-ed104d460151 | subfolder1 | openEHR-EHR-FOLDER.generic.v1 |
0cc504b1-4d6d-4cd5-81d9-0ef1b870edb3 | subsubfolder1 | openEHR-EHR-FOLDER.episode_of_care.v1 |
-
Create ehr
-
Create directory
folder_simple_hierarchy
-
Run Query
SELECT f/uid/value from FOLDER f where f/name/value = {name}
-
check for each parameter
{name} f/uid/value root1 10e952ca-a5b2-4f24-8d37-59240fd37020 subfolder1 d936409e-901f-4994-8d33-ed104d460151 subsubfolder1 0cc504b1-4d6d-4cd5-81d9-0ef1b870edb3
- Create ehr
- Create directory
folder_simple_hierarchy
- Run Query
SELECT f/uid/value from FOLDER f[openEHR-EHR-FOLDER.episode_of_care.v1]
- Check result one row with 0cc504b1-4d6d-4cd5-81d9-0ef1b870edb3
- Create ehr
- Create directory
folder_complex_hierarchy
- Run Query "SELECT f1/uid/value, f1/name/value,f2/uid/value, f2/name/value from FOLDER f1 contains Folder f2"
- Check result contains in any order
f1/uid/value | f1/name/value | f2/uid/value | f2/name/value |
---|---|---|---|
10e952ca-a5b2-4f24-8d37-59240fd37020 | root1 | d936409e-901f-4994-8d33-ed104d460151 | subfolder1 |
10e952ca-a5b2-4f24-8d37-59240fd37020 | root1 | 0cc504b1-4d6d-4cd5-81d9-0ef1b870edb3 | subsubfolder1 |
10e952ca-a5b2-4f24-8d37-59240fd37020 | root1 | 3cb9efa5-fe71-49e9-a02f-d38835c27d1b | subsubfolder2 |
10e952ca-a5b2-4f24-8d37-59240fd37020 | root1 | ac1e12cb-b9db-4f15-a8aa-4e62a9d97231 | subfolder2 |
10e952ca-a5b2-4f24-8d37-59240fd37020 | root1 | 13661fe2-1e16-4c75-a10d-9b8040487a72 | subsubfolder1 |
10e952ca-a5b2-4f24-8d37-59240fd37020 | root1 | e9ae5700-d969-430a-b4f2-445e3091a901 | subsubfolder2 |
d936409e-901f-4994-8d33-ed104d460151 | subfolder1 | 0cc504b1-4d6d-4cd5-81d9-0ef1b870edb3 | subsubfolder1 |
d936409e-901f-4994-8d33-ed104d460151 | subfolder1 | 3cb9efa5-fe71-49e9-a02f-d38835c27d1b | subsubfolder2 |
ac1e12cb-b9db-4f15-a8aa-4e62a9d97231 | subfolder2 | 13661fe2-1e16-4c75-a10d-9b8040487a72 | subsubfolder1 |
ac1e12cb-b9db-4f15-a8aa-4e62a9d97231 | subfolder2 | e9ae5700-d969-430a-b4f2-445e3091a901 | subsubfolder2 |
- Create ehr
- Create directory
folder_complex_hierarchy
- Run Query
SELECT f2/uid/value, f2/name/value FROM FOLDER f1[{predicate1}] CONTAINS FOLDER f2[{predicate2}]
{predicate1} | {predicate2} | Result |
---|---|---|
openEHR-EHR-FOLDER.generic.v1,'root1' | openEHR-EHR-FOLDER.episode_of_care.v1 | {0cc504b1-4d6d-4cd5-81d9-0ef1b870edb3 , subsubfolder1}; {3cb9efa5-fe71-49e9-a02f-d38835c27d1b, subsubfolder2};{13661fe2-1e16-4c75-a10d-9b8040487a72, subsubfolder1 };{e9ae5700-d969-430a-b4f2-445e3091a901,subsubfolder2 } |
openEHR-EHR-FOLDER.generic.v1,'subfolder1' | openEHR-EHR-FOLDER.episode_of_care.v1 | {0cc504b1-4d6d-4cd5-81d9-0ef1b870edb3 , subsubfolder1}; {3cb9efa5-fe71-49e9-a02f-d38835c27d1b, subsubfolder2} |
openEHR-EHR-FOLDER.generic.v1,'subfolder2' | openEHR-EHR-FOLDER.episode_of_care.v1 | {13661fe2-1e16-4c75-a10d-9b8040487a72, subsubfolder1 };{e9ae5700-d969-430a-b4f2-445e3091a901,subsubfolder2 } |
openEHR-EHR-FOLDER.generic.v1,'root1' | openEHR-EHR-FOLDER.episode_of_care.v1,'subsubfolder1' | {0cc504b1-4d6d-4cd5-81d9-0ef1b870edb3 , subsubfolder1}; {13661fe2-1e16-4c75-a10d-9b8040487a72, subsubfolder1 } |
- Create ehr and save {ehr_id1}
- Create directory
folder_complex_hierarchy
- Create ehr and save {ehr_id2}
- Create directory
folder_complex_hierarchy2
- Run Query
SELECT e/ehr_id/value, f/uid/value FROM EHR e CONTAINS FOLDER f[openEHR-EHR-FOLDER.episode_of_care.v1,'subsubfolder1']
- Check result is in any order
e/uid/value | f/uid/value |
---|---|
{ehr_id1} | 0cc504b1-4d6d-4cd5-81d9-0ef1b870edb3 |
{ehr_id1} | 13661fe2-1e16-4c75-a10d-9b8040487a72 |
{ehr_id2} | 04689137-90bf-456b-8afc-7c5774843919 |
{ehr_id2} | 59bbd141-c51b-435a-9cbb-85d953ebfcd3 |
- Upload
conformance_ehrbase.de.v0.opt
if not exist - Create ehr
- Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id1}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id2}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id3}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id4}
. - Create directory
folder_with_compositions.json
replacing the parameters - Run Query
SELECT c/uid/value , f/name/value from FOLDER f contains COMPOSITION c
- Check result is in any order
f/name/value | c/uid/value |
---|---|
root1 | {comp_id1} |
root1 | {comp_id2} |
root1 | {comp_id3} |
root1 | {comp_id4} |
subfolder1 | {comp_id1} |
subfolder1 | {comp_id2} |
subfolder1 | {comp_id3} |
subfolder1 | {comp_id4} |
subsubfolder1 | {comp_id2} |
subsubfolder1 | {comp_id4} |
subsubfolder2 | {comp_id3} |
subsubsubfolder1 | {comp_id4} |
- Upload
conformance_ehrbase.de.v0.opt
if not exist - Create ehr
- Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id1}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id2}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id3}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id4}
. - Create directory
folder_with_compositions.json
replacing the parameters - Run Query
SELECT c/uid/value from FOLDER f contains COMPOSITION c where f/name/value = {name}
{name} | result in any order |
---|---|
root1 | {comp_id1} ,{comp_id2} ,{comp_id3} ,{comp_id4} |
subfolder1 | {comp_id1} ,{comp_id2} ,{comp_id3} ,{comp_id4} |
subsubfolder1 | {comp_id2} ,{comp_id4} |
subsubfolder2 | {comp_id3} |
subsubsubfolder1 | {comp_id4} |
- Upload
conformance_ehrbase.de.v0.opt
if not exist - Create ehr
- Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id1}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id2}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id3}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id4}
. - Create directory
folder_with_compositions.json
replacing the parameters - Run Query
SELECT c/uid/value from FOLDER f1[openEHR-EHR-FOLDER.episode_of_care.v1] contains Folder f2[openEHR-EHR-FOLDER.episode_of_care.v1] contains COMPOSITION c
- Check result is one row with
{comp_id4}
.
- Upload
conformance_ehrbase.de.v0.opt
if not exist - Create ehr save {ehr_id1}
- Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id1}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id2}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id3}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id4}
. - Create directory
folder_with_compositions.json
replacing the parameters - Create composition
conformance_ehrbase.de.v0_max.json
- Create ehr save {ehr_id2}
- Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id1b}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id2b}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id3b}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id4b}
. - Create directory
folder_with_compositions.json
replacing the parameters - Create composition
conformance_ehrbase.de.v0_max.json
- Run Query
SELECT e/ehr_id/value ,c/uid/value from EHR e contains FOLDER f contains COMPOSITION c where f/name/value = 'subsubsubfolder1'
- Result in any order
e/ehr_id/value | c/uid/value |
---|---|
ehr_id1} | {comp_id4} |
ehr_id2} | {comp_id4b} |
- Upload
conformance_ehrbase.de.v0.opt
if not exist - Create ehr
- Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id1}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id2}
. - Create directory
folder_multi_compositions
replacing the parameters - Create composition
conformance_ehrbase.de.v0_max.json
- Run Query
SELECT c/uid/value from FOLDER f contains COMPOSITION c
- Result is in any order
{comp_id1}
,{comp_id2}
- Create ehr
- Create directory
folder_details
- Run Query
SELECT {path} from FOLDER f
{path} | result |
---|---|
f | 2 rows with json of type folder |
f/items/id/value | null,7c0a9df0-564f-4f34-8e65-92586c64ef56,c68131a3-72da-41fe-8d11-c4fccfd2d2d0 |
f/items | null,json arry with 2 elements |
f/details | 2 rows with json of type ITEM_TREE |
f/details[at0003]/items[at0004]/value/value | value1,value2 |
- Create ehr
- Upload
conformance_ehrbase.de.v0.opt
if not exist - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id1}
. - Create composition
conformance_ehrbase.de.v0_max.json
and save{comp_id2}
. - Create directory
folder_multi_compositions
replacing the parameters - Create composition
conformance_ehrbase.de.v0_max.json
- Run Query
SELECT f/uid/value, f/name/value, f/archetype_node_id, f/items/id/value from FOLDER f
- check result is in any order
f/uid/value | f/name/value | f/archetype_node_id | f/items/id/value |
---|---|---|---|
10e952ca-a5b2-4f24-8d37-59240fd37020 | root1 | openEHR-EHR-FOLDER.generic.v1 | {comp_id1} |
10e952ca-a5b2-4f24-8d37-59240fd37020 | root1 | openEHR-EHR-FOLDER.generic.v1 | {comp_id2} |
-
Create ehr
-
Create directory
folder_details
-
Run Query
SELECT f/uid/value, f/name/value, f/items/id/value FROM FOLDER f WHERE f/items/id/value = '7c0a9df0-564f-4f34-8e65-92586c64ef56'
-
Check result to be the same as below
f/uid/value f/name/value f/items/id/value d936409e-901f-4994-8d33-ed104d460151 subfolder1 7c0a9df0-564f-4f34-8e65-92586c64ef56