CONTRIBUTION

Get CONTRIBUTION by id

Retrieves a CONTRIBUTION identified by contribution_uid and associated with the EHR identified by ehr_id.

Simplified Formats (FLAT / STRUCTURED)

The Accept header MAY be set to one of the Simplified Formats MIME types - application/openehr.wt.flat+json or application/openehr.wt.structured+json - in addition to the canonical application/json / application/xml.

When a Simplified Formats MIME type is requested, the CONTRIBUTION envelope itself is still returned as canonical JSON (uid, versions[] metadata, audit). Only the inner versions[i].data payload (COMPOSITION, EHR_STATUS, or FOLDER) is serialized in the chosen FLAT or STRUCTURED form. See Simplified Formats for the rules that apply to that inner payload.

get/ehr/{ehr_id}/contribution/{contribution_uid}

Path parameters

ehr_idstring uuid required
Example:7d44b88c-4199-4bad-97dc-d78268e01398

EHR identifier taken from EHR.ehr_id.value.

contribution_uidstring uuid required
Example:0826851c-c4c2-4d61-92b9-410fb8275ff0

The CONTRIBUTION uid.

Headers

Accept'application/json' | 'application/xml' | 'application/openehr.wt.flat+json' | 'application/openehr.wt.structured+json'

Response

200 OK is returned when the CONTRIBUTION is successfully retrieved.

When the request Accept header selects a Simplified Formats MIME type (application/openehr.wt.flat+json or application/openehr.wt.structured+json), the response body is still a canonical CONTRIBUTION envelope; only each versions[i].data payload is serialized in the requested FLAT or STRUCTURED form.

Example response

{
  "uid": {
    "value": "0826851c-c4c2-4d61-92b9-410fb8275ff0"
  },
  "versions": [
    {
      "id": {
        "_type": "OBJECT_VERSION_ID",
        "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::openEHRSys.example.com::1"
      },
      "namespace": "local",
      "type": "COMPOSITION"
    },
    {
      "id": {
        "_type": "OBJECT_VERSION_ID",
        "value": "abcdefgh-1323-42bc-b7f8-787f3660a0ba::openEHRSys.example.com::1"
      },
      "namespace": "local",
      "type": "FOLDER"
    }
  ],
  "audit": {
    "system_id": "9624982A-9F42-41A5-9318-AE13D5F5031F",
    "committer": {
      "_type": "PARTY_IDENTIFIED",
      "name": "A user name"
    },
    "time_committed": {
      "value": "2017-08-15T10:37:15.422+02:00"
    },
    "change_type": {
      "value": "creation",
      "defining_code": {
        "terminology_id": {
          "value": "openehr"
        },
        "code_string": "249"
      }
    },
    "description": {
      "value": "Description text"
    }
  }
}