Update directory

Updates directory FOLDER associated with the EHR identified by ehr_id.

The existing latest version_uid of directory FOLDER resource (i.e. the preceding_version_uid) must be specified in the If-Match header.

Path Parameters
  • ehr_id
    Type: string
    required

    EHR identifier taken from EHR.ehr_id.value.

Headers
  • If-Match
    Type: string
    required

    Header to make the request conditional. Together with ETag request tag, it helps to prevent simultaneous updates of a resource from overwriting each other ("mid-air collisions"). The format is always an version_uid identifier enclosed by double quotes. The operation will be performed only if the existing latest version_uid of the resource (i.e. the preceding_version_uid) matches this header's value.

  • Prefer
    Type: stringenum

    Request header to indicate the preference over response details. The response will contain the entire resource when the Prefer header has a value of return=representation.

    values
    • return=representation
    • return=minimal
Body
required
application/json

The new directory.

A FOLDER resource

  • archetype_node_id
    Type: string
    required
  • name
    required
    • _type
      Discriminator
      enum
      const:  
      DV_TEXT
      required
      values
      • DV_TEXT
    • value
      Type: string
      required
    • encoding
      Type: object · CODE_PHRASE
    • formatting
      Type: string
    • hyperlink
    • language
      Type: object · CODE_PHRASE
    • mappings
      Type: array object[] · TERM_MAPPING[]
  • _type
    Type: string
  • archetype_details
    Type: object · ARCHETYPED
  • details
    • _type
      Discriminator
      Type: string
    • archetype_node_id
      Type: string
      required
    • item
      Type: object · ELEMENT
      required
    • name
      required
    • archetype_details
      Type: object · ARCHETYPED
    • feeder_audit
      Type: object · FEEDER_AUDIT
    • links
      Type: array object[] · LINK[]
    • uid
  • feeder_audit
    Type: object · FEEDER_AUDIT
  • folders
    Type: array object[] · FOLDER[]

    A FOLDER resource

  • items
    Type: array object[] · OBJECT_REF[]
  • Type: array object[] · LINK[]
  • uid
    • _type
      Discriminator
      enum
      const:  
      HIER_OBJECT_ID
      required
      values
      • HIER_OBJECT_ID
    • value
      Type: stringFormat: uuid
      required
Responses
  • application/json
  • 400

    400 Bad Request is returned when the request URL or body (if provided) could not be parsed or has invalid content (e.g. invalid ehr_id, or either the body of the request could not be read, or could not be converted to a valid FOLDER object).

  • 404

    404 Not Found is returned when an EHR with ehr_id does not exist.

Request Example for put/ehr/{ehr_id}/directory
curl https://cataniamc.prod.cadasto.com/openehr/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398/directory \
  --request PUT \
  --header 'If-Match: "6cb19121-4307-4648-9da0-d62e4d51f19b::cataniamc.prod.cadasto.com::1"' \
  --header 'Prefer: return=minimal' \
  --header 'Content-Type: application/json' \
  --data '{
  "archetype_node_id": "openEHR-EHR-FOLDER.directory.v1",
  "name": {
    "value": "Directory"
  },
  "uid": {
    "_type": "OBJECT_VERSION_ID",
    "value": "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1"
  },
  "items": [],
  "folders": []
}'
{
  "archetype_node_id": "openEHR-EHR-FOLDER.directory.v1",
  "name": {
    "value": "Directory"
  },
  "uid": {
    "_type": "OBJECT_VERSION_ID",
    "value": "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1"
  },
  "items": [],
  "folders": []
}