Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please provide a working ECISFLAT example for prescription operational template #10

Open
serefarikan opened this issue Dec 24, 2017 · 0 comments

Comments

@serefarikan
Copy link
Collaborator

The prescription operational template distributed with the installation of EtherCIS has a modified cardinality of 2..* for the following path:

/content[openEHR-EHR-SECTION.medications.v1]/items[openEHR-EHR-INSTRUCTION.medication.v1]/activities[at0001]/description[openEHR-EHR-ITEM_TREE.medication_mod.v1]/items

This requires test code to add two items under description but the syntax for doing this is not clear. Based on the examples here I tried:


kvPairs.put("/content[openEHR-EHR-SECTION.medications.v1]/items[openEHR-EHR-INSTRUCTION.medication.v1]/activities[at0001]" +
                "/description[openEHR-EHR-ITEM_TREE.medication_mod.v1]/items[at0001]:0", "aspirin");
kvPairs.put("/content[openEHR-EHR-SECTION.medications.v1]/items[openEHR-EHR-INSTRUCTION.medication.v1]/activities[at0001]" +
                "/description[openEHR-EHR-ITEM_TREE.medication_mod.v1]/items[at0001]:1", "aspirin");

But this does not work because current code tries to use items[at0001]:0 as the path. If I do:


        kvPairs.put("/content[openEHR-EHR-SECTION.medications.v1]/items[openEHR-EHR-INSTRUCTION.medication.v1]/activities[at0001]" +
            "/description[openEHR-EHR-ITEM_TREE.medication_mod.v1]/items[at0002]", "aspirin1");

Then insertion works but retrieval fails with 'invalid db state' or a similar error which is low level (jooq).

I had to modify the prescription opt to set a cardinality of 1..* to work around this issue and get a test scenario working but I'm unclear about what the correct syntax should be for adding > 1 items under an item tree, which is what the description[...] above is.

A working example of ECISFLAT representation that satisfies the criteria above (cardinality >= 2 for description) would really help. Otherwise, it is really hard to figure this out by reading code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant