Closed ppazos closed 6 years ago
For reference
@openEHR/sec was the version_selector discussed in the latest meetings?
I agree with this suggestion for the versioned object endpoints, in particular the version_at_time and latest_trunk_version. I assume the response will be a VERSION resource? I don't think we need the equivalent on the ehr/.../compositions endpoint as we can just use this more advanced versioned_composition endpoint when selecting a specific version is required. The compositions endpoint can be kept for the simple, most common use cases.
Discusses in one meetings where this parameter has been re-worked.
@openEHR/sec versionSelector URL param is used on a lot of endpoints related to VERSIONED_XXX resources.
It can take different values of different types: string value of a VERSION unique identifier, a specific timestamp or the string LATEST_TRUNK_VERSION.
It seems to be a development shorthand, but for the official openEHR API it would be clearer to use the names of the VERSIONED_OBJECT methods to comply with the same requirements.
Example:
Current:
GET /ehr/{ehrId}/versioned_ehr_status/version/versionSelector=ISO8601_datetime|LATEST_TRUNK_VERSION|uuid
Proposed:
Using VERSIONED_OBJECT method names version_at_time, latest_trunk_version or the uid property.
(ISO8601 versionSelector) GET /ehr/{ehrId}/versioned_ehr_status/version_at_time/{ISO8601_datetime}
(LATEST_TRUNK_VERSION versionSelector) GET /ehr/{ehrId}/versioned_ehr_status/latest_trunk_version
(VERSIONED_XXX uid) GET /ehr/{ehrId}/versioned_ehr_status/{uid}