Update EHR_STATUS tags

Replaces the full ITEM_TAG list for the target EHR_STATUS identified by uid_based_id and owned by the EHR identified by ehr_id.

Replace semantics: the supplied list becomes the complete tag set. Tags that were present but are not in the new list are removed. Sending an empty list clears all tags.

Cadasto exception: the uid_based_id must be a versioned_object_uid (HIER_OBJECT_ID). Targeting a specific version with an OBJECT_VERSION_ID is not supported.

More than one ITEM_TAG may be associated with a single target — they are uniquely identified by their (key, target_path) pair.

Path Parameters
  • ehr_id
    Type: string
    required

    EHR identifier taken from EHR.ehr_id.value.

  • uid_based_id
    Type: string Format: uuid
    required

    An identifier in the form of a HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a versioned_object_uid).

    Cadasto exception: unlike the upstream openEHR ITS-REST specification, Cadasto only accepts the versioned_object_uid form on /tags endpoints. Targeting a specific version with an OBJECT_VERSION_ID is not supported — tags are scoped to the versioned object as a whole.

Headers
  • Prefer
    Type: string

    RFC 7240 preference header. Multiple tokens may be sent in a single header as a comma-separated list (e.g. Prefer: return=representation, include_item_tags) or as repeated headers. Cadasto recognises the following tokens:

    Token Where it applies Effect
    return=representation write endpoints Return the full updated resource in the response body.
    return=minimal (default on writes) write endpoints Empty response body.
    include_item_tags (Cadasto extension) read endpoints, and write endpoints when the request does not already carry an openehr-item-tag header Emit the openehr-item-tag response header with the current tags. On writes that ship openehr-item-tag in the request, the token is implied — the response always echoes the tags. Omitted by default on reads. See the ITEM_TAG guide for details.

    The Preference-Applied response header echoes the tokens the server actually honoured (return=, plus include_item_tags / resolve_refs when applied).

Body
required
application/json
  • Type: array object[] ·
Responses
  • application/json
  • 204

    204 No Content is returned when the ITEM_TAG list has been successfully replaced and the Prefer header is missing or set to return=minimal.

  • 400

    400 Bad Request is returned when the request URL or body (if provided) could not be parsed or has invalid content.

  • 404

    404 Not Found is returned when an EHR with ehr_id does not exist, or when the uid_based_id does not exist.

Request Example for put/ehr/{ehr_id}/ehr_status/{uid_based_id}/tags
curl https://cataniamc.prod.cadasto.com/openehr/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398/ehr_status/8849182c-82ad-4088-a07f-48ead4180515/tags \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "key": "flag",
    "value": "follow-up",
    "target_path": "/composition/start_time/value"
  }
]'
[
  {
    "key": "flag",
    "value": "follow-up",
    "target": {
      "id": {
        "_type": "HIER_OBJECT_ID",
        "value": "8849182c-82ad-4088-a07f-48ead4180515"
      },
      "namespace": "local",
      "type": "EHR_STATUS"
    },
    "owner_id": {
      "id": {
        "_type": "HIER_OBJECT_ID",
        "value": "7d44b88c-4199-4bad-97dc-d78268e01398"
      },
      "namespace": "local",
      "type": "EHR"
    }
  }
]