openEHR / specifications-ITS-REST

openEHR REST API Specifications
https://specifications.openehr.org/releases/ITS-REST/latest
Apache License 2.0
18 stars 15 forks source link

Using VERSIONED_OBJECT dimensions instead of versionSelector #27

Closed ppazos closed 6 years ago

ppazos commented 7 years ago

@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}

ppazos commented 7 years ago

For reference

RM 1.0.3 change_control package

ppazos commented 7 years ago

@openEHR/sec was the version_selector discussed in the latest meetings?

heathfrankel commented 7 years ago

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.

bostjanl commented 6 years ago

Discusses in one meetings where this parameter has been re-worked.