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

Add existing composition id as optional parameter to Post Composition EHRScape API #1074

Open
simonFuturePerfect opened this issue Mar 13, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@simonFuturePerfect
Copy link

Background

When importing compositions from an existing CDR (not ehrbase) we want to be able to import the composition using its existing composition identifier. This can be done with the ehr resource and its even part of the openEHR spec but you cannot do this currently with compositions.

Enhancement

We have already done this locally and its working fine. Its just a matter of adding an 'if' statement to the compositionRecord.setId(UUID.randomUUID()); in the CompositionAccess class. There are a fair number of changes in order to pass the parameter through but they are simple changes. We have made the change to the 'Post' Composition in the EHRScape API usign an optional parameter. Additionally we added a check to ensure that the composition identifier does not already exist in the CDR. Can anyone see a flaw in this approach ?

Further information

We are going to discuss this in the openEHR forums as we have a current project that needs this feature now but there is nothing to support data ingress from existing CDR platforms in the spec. We have however found a number of minor issues with how ehrbase processes existing compositions. I will add them to github separately so they can be discussed. @birgerhaarbrandt do you think this is the best approach.

@simonFuturePerfect simonFuturePerfect added the enhancement New feature or request label Mar 13, 2023
@vidi42
Copy link
Contributor

vidi42 commented Mar 13, 2023

Hey Simon

Thank you for your suggestion.

We already have on our roadmap a plan for supporting providing predefined ids during composition creation which should allow better data migration into EHRbase and hopefully will also address your need. However, I've seen that this topic is not yet clarified in the OpenEHR specifications https://discourse.openehr.org/t/rest-api-for-creating-compositions-with-id/2113/2, https://openehr.atlassian.net/browse/SPECITS-62.

Second, the EHRscape API in EHRbase, as it is right now, is planned to be deprecated and, in the future, parts of it reworked/removed since in some places it provides duplicate functionality to what the OpenEHR REST API and EHRbase REST API provide.

I will leave the ticket open for others to refer to it until there is a working solution in EHRbase.

cc: @stefanspiska @birgerhaarbrandt

@simonFuturePerfect
Copy link
Author

Ok, thanks for that @vidi42 , I'm going to see if I can 'wake' the thread on discourse. We are currently running a project to export and import for a live 'project' so its important that these issues get discussed and the standard can evolve as it should.

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

No branches or pull requests

2 participants