Hi, I’m working on EHRServer, trying to improve how the XML is committed and processed to simplify querying.
Right now I have a web app that commits a list of VERSIONs to the EHRServer. That service is based on the Ocean’s commitContribution service http://www.openehr.org/wiki/display/spec/Ocean+Informatics+EHR+Service+Interface
The CONTRIBUTION instance for the committed VERSIONs is created by the EHRServer, but the VERSIONs come in XML format. Looking at the openEHR XSDs, each VERSION needs an OBJECT_REF to a CONTRIBUTION. Since the CONTRIBUTION is created by the EHRServer, the VERSION XML doesn’t have the OBJECT_REF, so it’s invalid against the openEHR XSDs.
What can I do?
- Create the CONTRIBUTION at the client side and commit both, CONTRIBUTION and VERSIONs.
- Add dummy XML to each VERSION just to pass the XSD validation.
- Modify the openEHR schemas to add minOccurs=0 to the version.contribution element.
- Other?
Why I think these solutions are not so good:
- IMO the role of the server is to create the CONTRIBUTION, because it’s like a log for the commit, also the Ocean’s service doesn’t receive a CONTRIBUTION object.
- I don’t like adding stuff I will not use but seems the less problematic solution.
- For me this is terrible, I want to play with the openEHR rules, not make my own, but it is just for the commit, so if I want to send compositions to an external system, that will be valid against the original openEHR XSDs because in the EHRServer I have the CONTRIBUTION.
What do you think? Do you have a better solution? Thanks!