We're updating the issue view to help you get more done.Learn more

POST /composition needs some comments about implicit CONTRIBUTION

From: https://openehrspecs.slack.com/archives/C6PBA0HNV/p1549213073001000

It seems for POST /composition there should be a CONTRIBUTION created internally, I call this "implicit CONTRIBUTION". But there are no parameters or headers specified on the REST API to pass the missing data to be able to create the CONTRIBUTION correctly.

About the things that we need to create the CONTRIBUTION and it's associated objects, like AUDIT_DETAILS and ORIGINAL_VERSION:

1. the contribution could be create internally, just needs the UID that can be assigned by the server. I suggest to add a comment about this: the server should generate the CONTRIBUTION.uid

2. for each VERSION<COMPOSITION> associated to the CONTRIBUTION (for POST /composition there will be just one VERSION<COMPOSITION>), the VERSION.uid could be assigned by the server. I also suggest to add some comment about this on the spec. But, what's the value for lifecycle_state? Should it be complete or incomplete? Or support both? (to support both, we need a param or header to pass the correct value)

3. for the CONTRIBUTION.audit and VERSION.audit, the system_id is needed, from where should we get that? Is there a system wide default value? can this be specified by the client?

4. for VERSION.audit, the change_type should match the correspondent HTTP method (POST=creation, PUT=modification|amendment ? which one?, DELETE=deleted, etc.). The case of PUT where we have many openEHR values for the change type we clearly need some extra comments on which one to be used, maybe "modification" is by default?

5.for other change_type values:
- synthesis: do we support this change type at all by using POST /composition?
- attestation: should this type be chosen by the server, for instance when attestation information is passed in the POST /composition? is this supported or should this be supported by this endpoint?

REF: https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-composition-post

Note: only headers defined today are:
Content-Type: application/json
Prefer: return={representation|minimal}

and only parameter is ehr_id.

Note 2: these concerns also apply to the SM interface I_EHR_COMPOSITION for the create_composition operation: https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_composition_interface



Thomas Beale


Pablo Pazos