Posting IMPORTED_VERSION with CONTRIBUTION

In the openEHR REST API, the “Create CONTRIBUTION” is using UPDATE_VERSION for the versions array payload. The properties for UPDATE_VERSION represent most of the attributes of ORIGINAL_VERSION.

The question is, how do we post a CONTRIBUTION with IMPORTED_VERSIONs?

Based on 6.2.5. Contributions I would expect that imported versions are committed with contributions.

What appears to be missing is the IMPORTED_VERSION.item attribute.

Should there be two different object types for the array of versions (e.g., UPDATE_ORIGINAL_VERSION and UPDATE_IMPORTED_VERSION)?

Another alternative might be to use the existing UPDATE_VERSION for IMPORTED_VERSIONs and treating the UPDATE_VERSION as IMPORTED_VERSION.item. This approach would require UPDATE_VERSION._type attribute to specify if the contents is ORIGINAL_VERSION or IMPORTED_VERSION.

You are also right about this, there is no obvious support for imported version.
I dont know yet the solution, probably we’ll need to have a deeper discussion in a REST API WG around it. On a first sight, I think adding that optional .itemsounds ok, but need to find a way of properly specify what the semantic of that is.
Just for the record, the UPDATE_VERSION is just a REST API type to distinguish a concreate VERSION that is not yet persisted (so is not “binded” to any RM type)