openEHR EHR STATUS API

Management of [EHR_STATUS](https://specifications.openehr.org/releases/RM/latest/ehr.html#_ehr_status_class) and [VERSIONED_EHR_STATUS](https://specifications.openehr.org/releases/RM/latest/ehr.html#_versioned_ehr_status_class) resources. Operations include retrieval by time or version, update, and inspection of revision history for the versioned status of an EHR.

Operations 7

GET /ehr/{ehr_id}/ehr_status/{version_uid} Get EHR_STATUS by version id #
GET /ehr/{ehr_id}/ehr_status Get EHR_STATUS at time #
PUT /ehr/{ehr_id}/ehr_status Update EHR_STATUS #
GET /ehr/{ehr_id}/versioned_ehr_status Get versioned EHR_STATUS #
GET /ehr/{ehr_id}/versioned_ehr_status/revision_history Get versioned EHR_STATUS revision history #
GET /ehr/{ehr_id}/versioned_ehr_status/version Get versioned EHR_STATUS version at time #
GET /ehr/{ehr_id}/versioned_ehr_status/version/{version_uid} Get versioned EHR_STATUS version by id #

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/openehr-ehr-status-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

openehr-ehr-status-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: EHR STATUS API
  version: latest
  x-status: STABLE
  x-spec: ehr
  contact:
    name: Specifications Editorial Committee openEHR
    url: https://specifications.openehr.org/
    email: info@openehr.org
  license:
    name: Creative Commons Attribution-NoDerivs 3.0 Unported
    url: https://creativecommons.org/licenses/by-nd/3.0/
  description: '## Description


    ### Purpose


    This specification describes service endpoints, resources and operations as well as details of requests and responses that interact with the openEHR EHR API in a RESTful manner.'
servers:
- url: https://{baseUrl}/v1
  description: An example openEHR server URL.
  variables:
    baseUrl:
      default: openEHRSys.example.com
      description: The (example) server base URL prefix providing openEHR services. This may contain server name, port and base path prefix.
security: []
tags:
- name: EHR_STATUS
  description: 'Management of EHR_STATUS and VERSIONED_EHR_STATUS resources.


    Operations include retrieval by time or version, update, and inspection of revision history for the versioned status of an EHR.'
paths:
  /ehr/{ehr_id}/ehr_status/{version_uid}:
    get:
      operationId: ehr_status_get_by_version_id
      summary: Get EHR_STATUS by version id
      description: 'Retrieves a particular version of the EHR_STATUS identified by `version_uid` and associated with the EHR identified by `ehr_id`.


        When there are ITEM_TAGs associated with the retrieved EHR_STATUS, they will be returned as `openehr-item-tag` and `openehr-version-item-tag` response headers, respectively - see item tags headers for more details.'
      tags:
      - EHR_STATUS
      parameters:
      - $ref: '#/components/parameters/ehr_id'
      - $ref: '#/components/parameters/version_uid'
      - $ref: '#/components/parameters/Accept_LOCATABLE'
      responses:
        '200':
          $ref: '#/components/responses/200_EHR_STATUS_retrieved'
        '404':
          $ref: '#/components/responses/404_unknown_ehr_id_or_version_uid'
  /ehr/{ehr_id}/ehr_status:
    get:
      operationId: ehr_status_get_at_time
      summary: Get EHR_STATUS at time
      description: 'Retrieves a version of the EHR_STATUS associated with the EHR identified by `ehr_id`.


        If `version_at_time` is supplied, retrieves the version extant _at specified time_, otherwise retrieves the _latest_ EHR_STATUS version.


        When there are ITEM_TAGs associated with the retrieved EHR_STATUS, they will be returned as `openehr-item-tag` and `openehr-version-item-tag` response headers, respectively - see item tags headers for more details.'
      tags:
      - EHR_STATUS
      parameters:
      - $ref: '#/components/parameters/ehr_id'
      - $ref: '#/components/parameters/version_at_time'
      - $ref: '#/components/parameters/Accept_LOCATABLE'
      responses:
        '200':
          $ref: '#/components/responses/200_EHR_STATUS_retrieved'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404_unknown_ehr_id_or_no_version_at_time'
    put:
      operationId: ehr_status_update
      summary: Update EHR_STATUS
      description: 'Updates EHR_STATUS associated with the EHR identified by `ehr_id`.


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


        A list of ITEM_TAGs can be associated with the updated EHR_STATUS, in which case a `openehr-item-tag` or `openehr-version-item-tag` request header can be set as well.

        The corresponding response header(s) will return ITEM_TAGs as they were set by the server - see item tags headers for more details.


        The response will contain the updated EHR_STATUS resource when the `Prefer` header has a value of `return=representation`.'
      tags:
      - EHR_STATUS
      parameters:
      - $ref: '#/components/parameters/ehr_id'
      - $ref: '#/components/parameters/If-Match'
      - $ref: '#/components/parameters/Prefer'
      - $ref: '#/components/parameters/Accept_LOCATABLE'
      - $ref: '#/components/parameters/ContentType_LOCATABLE'
      - $ref: '#/components/parameters/openehr-item-tag'
      - $ref: '#/components/parameters/openehr-version-item-tag'
      requestBody:
        description: 'The new EHR_STATUS.

          '
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EhrStatus'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/200_EHR_STATUS_updated'
        '204':
          $ref: '#/components/responses/204_version_updated'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404_unknown_ehr_id'
        '412':
          $ref: '#/components/responses/412_EHR_STATUS'
  /ehr/{ehr_id}/versioned_ehr_status:
    get:
      operationId: versioned_ehr_status_get
      summary: Get versioned EHR_STATUS
      description: Retrieves a VERSIONED_EHR_STATUS associated with an EHR identified by `ehr_id`.
      tags:
      - EHR_STATUS
      parameters:
      - $ref: '#/components/parameters/ehr_id'
      - $ref: '#/components/parameters/Accept_canonical'
      - $ref: '#/components/parameters/ContentType_canonical'
      responses:
        '200':
          $ref: '#/components/responses/200_VERSIONED_EHR_STATUS'
        '404':
          $ref: '#/components/responses/404_unknown_ehr_id'
  /ehr/{ehr_id}/versioned_ehr_status/revision_history:
    get:
      operationId: versioned_ehr_status_revision_history
      summary: Get versioned EHR_STATUS revision history
      description: Retrieves revision history of the VERSIONED_EHR_STATUS associated with the EHR identified by `ehr_id`.
      tags:
      - EHR_STATUS
      parameters:
      - $ref: '#/components/parameters/ehr_id'
      - $ref: '#/components/parameters/Accept_canonical'
      - $ref: '#/components/parameters/ContentType_canonical'
      responses:
        '200':
          $ref: '#/components/responses/200_REVISION_HISTORY'
        '404':
          $ref: '#/components/responses/404_unknown_ehr_id'
  /ehr/{ehr_id}/versioned_ehr_status/version:
    get:
      operationId: versioned_ehr_status_version_get_at_time
      summary: Get versioned EHR_STATUS version at time
      description: 'Retrieves a VERSION from the VERSIONED_EHR_STATUS associated with the EHR identified by `ehr_id`.


        If `version_at_time` is supplied, retrieves the VERSION extant _at specified time_, otherwise retrieves the _latest_ VERSION.'
      tags:
      - EHR_STATUS
      parameters:
      - $ref: '#/components/parameters/ehr_id'
      - $ref: '#/components/parameters/version_at_time'
      - $ref: '#/components/parameters/Accept_canonical'
      - $ref: '#/components/parameters/ContentType_canonical'
      responses:
        '200':
          $ref: '#/components/responses/200_VERSION_of_EHR_STATUS_at_time'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404_unknown_ehr_id_or_no_version_at_time'
  /ehr/{ehr_id}/versioned_ehr_status/version/{version_uid}:
    get:
      operationId: versioned_ehr_status_version_get_by_id
      summary: Get versioned EHR_STATUS version by id
      description: Retrieves a VERSION identified by `version_uid` of an EHR_STATUS associated with the EHR identified by `ehr_id`.
      tags:
      - EHR_STATUS
      parameters:
      - $ref: '#/components/parameters/ehr_id'
      - $ref: '#/components/parameters/version_uid'
      - $ref: '#/components/parameters/Accept_canonical'
      - $ref: '#/components/parameters/ContentType_canonical'
      responses:
        '200':
          $ref: '#/components/responses/200_VERSION_of_EHR_STATUS_by_id'
        '404':
          $ref: '#/components/responses/404_unknown_ehr_id_or_version_uid'
components:
  schemas:
    DvDateTime:
      title: DV_DATE_TIME
      required:
      - value
      type: object
      properties:
        _type:
          enum:
          - DV_DATE_TIME
          type: string
        normal_status:
          $ref: '#/components/schemas/CodePhrase'
        normal_range:
          $ref: '#/components/schemas/DvInterval'
        other_reference_ranges:
          type: array
          items:
            $ref: '#/components/schemas/ReferenceRange'
        magnitude_status:
          type: string
          default: '='
        accuracy:
          $ref: '#/components/schemas/DvDuration'
        value:
          type: string
          format: date-time
      example:
        _type: DV_DATE_TIME
        value: '2017-08-15T10:37:15.422+02:00'
    UMDvEhrUri:
      title: DV_EHR_URI
      required:
      - value
      - _type
      type: object
      properties:
        _type:
          enum:
          - DV_EHR_URI
          type: string
        value:
          type: string
      example:
        _type: DV_EHR_URI
        value: ehr://system_id/ehr_id/top_level_structure_locator/path_inside_top_level_structure
    VersionedEhrStatus:
      title: VERSIONED_EHR_STATUS
      type: object
      properties:
        _type:
          enum:
          - VERSIONED_EHR_STATUS
          type: string
        uid:
          $ref: '#/components/schemas/HierObjectId'
        owner_id:
          $ref: '#/components/schemas/ObjectRefOfHierObjectId'
        time_created:
          $ref: '#/components/schemas/DvDateTime'
      description: A VERSIONED_EHR_STATUS resource
      example:
        uid:
          value: 6cb19121-4307-4648-9da0-d62e4d51f19b
        owner_id:
          id:
            _type: HIER_OBJECT_ID
            value: 7d44b88c-4199-4bad-97dc-d78268e01398
          namespace: local
          type: EHR
        time_created:
          value: '2015-01-20T19:30:22.765+01:00'
      required:
      - uid
      - owner_id
      - time_created
    RevisionHistory:
      title: REVISION_HISTORY
      required:
      - items
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/RevisionHistoryItem'
      description: A REVISION_HISTORY resource
    UMImportedVersionOfEhrStatus:
      title: IMPORTED_VERSION
      required:
      - contribution
      - commit_audit
      - data
      - item
      - _type
      type: object
      properties:
        _type:
          enum:
          - IMPORTED_VERSION
          type: string
        contribution:
          $ref: '#/components/schemas/ObjectRefOfHierObjectId'
        signature:
          type: string
        commit_audit:
          $ref: '#/components/schemas/AuditDetails'
        data:
          $ref: '#/components/schemas/EhrStatus'
        item:
          $ref: '#/components/schemas/UMOriginalVersionOfEhrStatus'
    TerminologyId:
      title: TERMINOLOGY_ID
      type: object
      properties:
        _type:
          enum:
          - TERMINOLOGY_ID
          type: string
        value:
          type: string
      required:
      - value
    FeederAudit:
      title: FEEDER_AUDIT
      required:
      - originating_system_audit
      type: object
      properties:
        originating_system_item_ids:
          type: array
          items:
            $ref: '#/components/schemas/DvIdentifier'
        feeder_system_item_ids:
          type: array
          items:
            $ref: '#/components/schemas/DvIdentifier'
        original_content:
          $ref: '#/components/schemas/UDvEncapsulated'
        originating_system_audit:
          $ref: '#/components/schemas/FeederAuditDetails'
        feeder_system_audit:
          $ref: '#/components/schemas/FeederAuditDetails'
    UMPartyIdentified:
      title: PARTY_IDENTIFIED
      required:
      - _type
      type: object
      properties:
        _type:
          enum:
          - PARTY_IDENTIFIED
          type: string
        external_ref:
          $ref: '#/components/schemas/PartyRef'
        name:
          type: string
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/DvIdentifier'
      example:
        _type: PARTY_IDENTIFIED
        external_ref:
          id:
            _type: GENERIC_ID
            value: 16b74749-e6aa-4945-b760-b42bdc07098a
            scheme: pid
          namespace: openEHRSys.example.com
          type: PERSON
        name: A name
    UMPartyRelated:
      title: PARTY_RELATED
      required:
      - _type
      - relationship
      type: object
      properties:
        _type:
          enum:
          - PARTY_RELATED
          type: string
        external_ref:
          $ref: '#/components/schemas/PartyRef'
        name:
          type: string
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/DvIdentifier'
        relationship:
          $ref: '#/components/schemas/DvCodedText'
      example:
        _type: PARTY_IDENTIFIED
        external_ref:
          id:
            _type: GENERIC_ID
            value: 16b74749-e6aa-4945-b760-b42bdc07098a
            scheme: pid
          namespace: openEHRSys.example.com
          type: PERSON
        name: A name
    DvInterval:
      title: DV_INTERVAL
      required:
      - lower_unbounded
      - upper_unbounded
      - lower_included
      - upper_included
      type: object
      properties:
        _type:
          type: string
          default: DV_INTERVAL
        lower_unbounded:
          type: boolean
        upper_unbounded:
          type: boolean
        lower_included:
          type: boolean
        upper_included:
          type: boolean
    UMDvDuration:
      title: DV_DURATION
      required:
      - value
      - _type
      type: object
      properties:
        _type:
          enum:
          - DV_DURATION
          type: string
        normal_status:
          $ref: '#/components/schemas/CodePhrase'
        normal_range:
          $ref: '#/components/schemas/DvInterval'
        other_reference_ranges:
          type: array
          items:
            $ref: '#/components/schemas/ReferenceRange'
        magnitude_status:
          type: string
          default: '='
        accuracy_is_percent:
          type: boolean
        accuracy:
          type: number
        value:
          type: string
    UMDvState:
      title: DV_STATE
      required:
      - value
      - is_terminal
      - _type
      type: object
      properties:
        _type:
          enum:
          - DV_STATE
          type: string
        value:
          $ref: '#/components/schemas/DvCodedText'
        is_terminal:
          type: boolean
    RevisionHistoryItem:
      title: REVISION_HISTORY_ITEM
      required:
      - version_id
      - audits
      type: object
      properties:
        version_id:
          $ref: '#/components/schemas/ObjectVersionId'
        audits:
          type: array
          items:
            $ref: '#/components/schemas/AuditDetails'
      description: A REVISION_HISTORY_ITEM resource
      example:
        version_id:
          value: 8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1
        audits:
        - system_id: d60e2348-b083-48ce-93b9-916cef1d3a5a
          time_committed:
            value: '2015-01-20T19:30:22.765+01:00'
          change_type:
            value: creation
            defining_code:
              terminology_id:
                value: openehr
              code_string: '249'
          description:
            value: An optional description string
          committer:
            _type: PARTY_IDENTIFIED
            name: A user name
    Clstr:
      title: CLUSTER
      required:
      - name
      - archetype_node_id
      - items
      type: object
      properties:
        _type:
          enum:
          - CLUSTER
          type: string
        name:
          $ref: '#/components/schemas/UDvText'
        archetype_node_id:
          type: string
          xml:
            attribute: true
        uid:
          $ref: '#/components/schemas/UUidBasedId'
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        archetype_details:
          $ref: '#/components/schemas/Archetyped'
        feeder_audit:
          $ref: '#/components/schemas/FeederAudit'
        items:
          type: array
          items:
            $ref: '#/components/schemas/UItem'
    UMDvText:
      title: DV_TEXT
      required:
      - value
      - _type
      type: object
      properties:
        _type:
          enum:
          - DV_TEXT
          type: string
        value:
          type: string
        hyperlink:
          $ref: '#/components/schemas/UDvUri'
        formatting:
          type: string
        mappings:
          type: array
          items:
            $ref: '#/components/schemas/TermMapping'
        language:
          $ref: '#/components/schemas/CodePhrase'
        encoding:
          $ref: '#/components/schemas/CodePhrase'
      example:
        _type: DV_TEXT
        value: Text value
    ObjectVersionId:
      title: OBJECT_VERSION_ID
      required:
      - value
      type: object
      properties:
        _type:
          enum:
          - OBJECT_VERSION_ID
          type: string
        value:
          type: string
      example:
        value: 6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2
    Identifier:
      title: Identifier
      required:
      - uid
      type: object
      properties:
        uid:
          type: string
          description: The (version) resource identifier.
      example:
        uid: 6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2
    AuditDetails:
      title: AUDIT_DETAILS
      required:
      - system_id
      - time_committed
      - change_type
      - committer
      type: object
      properties:
        _type:
          type: string
          default: AUDIT_DETAILS
        system_id:
          type: string
        time_committed:
          $ref: '#/components/schemas/DvDateTime'
        change_type:
          $ref: '#/components/schemas/DvCodedText'
        description:
          $ref: '#/components/schemas/UDvText'
        committer:
          $ref: '#/components/schemas/UPartyProxy'
      description: The set of attributes required to document the committal of an information item to a repository.
      example:
        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
    ReferenceRange:
      title: REFERENCE_RANGE
      required:
      - meaning
      - range
      type: object
      properties:
        meaning:
          $ref: '#/components/schemas/UDvText'
        range:
          $ref: '#/components/schemas/DvInterval'
    PartyRef:
      title: PARTY_REF
      type: object
      properties:
        namespace:
          type: string
        type:
          pattern: ^PERSON|ORGANISATION|GROUP|AGENT|ROLE|PARTY|ACTOR$
          type: string
        id:
          $ref: '#/components/schemas/UMHierObjectId'
      description: Identifier for parties in a demographic or identity service.
      example:
        id:
          _type: HIER_OBJECT_ID
          value: b52b9408-7048-4ec8-94bd-831fb0727e67
        namespace: local
        type: PERSON
      required:
      - namespace
      - type
      - id
    UDvText:
      title: DV_TEXT
      type: object
      oneOf:
      - $ref: '#/components/schemas/UMDvText'
      - $ref: '#/components/schemas/UMDvCodedText'
      discriminator:
        propertyName: _type
        mapping:
          DV_TEXT: '#/components/schemas/UMDvText'
          DV_CODED_TEXT: '#/components/schemas/UMDvCodedText'
    EhrStatus:
      title: EHR_STATUS
      required:
      - name
      - archetype_node_id
      - subject
      - is_queryable
      - is_modifiable
      type: object
      properties:
        _type:
          enum:
          - EHR_STATUS
          type: string
        name:
          $ref: '#/components/schemas/UDvText'
        archetype_node_id:
          type: string
          xml:
            attribute: true
        uid:
          $ref: '#/components/schemas/UUidBasedId'
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        archetype_details:
          $ref: '#/components/schemas/Archetyped'
        feeder_audit:
          $ref: '#/components/schemas/FeederAudit'
        subject:
          $ref: '#/components/schemas/UPartyProxy'
        is_queryable:
          type: boolean
          default: true
        is_modifiable:
          type: boolean
          default: true
        other_details:
          $ref: '#/components/schemas/UItemStructure'
      description: An EHR_STATUS resource
      example:
        archetype_node_id: openEHR-EHR-EHR_STATUS.generic.v1
        name:
          value: EHR status
        uid:
          _type: OBJECT_VERSION_ID
          value: 8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1
        subject:
          _type: PARTY_SELF
        is_queryable: true
        is_modifiable: true
    UItemStructure:
      title: ITEM_STRUCTURE
      type: object
      oneOf:
      - $ref: '#/components/schemas/ItemSingle'
      - $ref: '#/components/schemas/ItemList'
      - $ref: '#/components/schemas/ItemTable'
      - $ref: '#/components/schemas/ItemTree'
      discriminator:
        propertyName: _type
        mapping:
          ITEM_SINGLE: '#/components/schemas/ItemSingle'
          ITEM_LIST: '#/components/schemas/ItemList'
          ITEM_TABLE: '#/components/schemas/ItemTable'
          ITEM_TREE: '#/components/schemas/ItemTree'
    DvEhrUri:
      title: DV_EHR_URI
      type: object
      properties:
        _type:
          enum:
          - DV_EHR_URI
          type: string
        value:
          type: string
      example:
        _type: DV_EHR_URI
        value: ehr://system_id/ehr_id/top_level_structure_locator/path_inside_top_level_structure
      required:
      - value
    UMDvParsable:
      title: DV_PARSABLE
      required:
      - _type
      - value
      - formalism
      type: object
      properties:
        _type:
          enum:
          - DV_PARSABLE
          type: string
        charset:
          $ref: '#/components/schemas/CodePhrase'
        language:
          $ref: '#/components/schemas/CodePhrase'
        value:
          type: string
        formalism:
          type: string
    UMDvUri:
      title: DV_URI
      required:
      - value
      - _type
      type: object
      properties:
        _type:
          enum:
          - DV_URI
          type: string
        value:
          type: string
      example:
        _type: DV_URI
        value: https://www.example.com
    DvIdentifier:
      title: DV_IDENTIFIER
      required:
      - id
      type: object
      properties:
        _type:
          enum:
          - DV_IDENTIFIER
          type: string
        issuer:
          type: string
        assigner:
          type: string
        id:
          type: string
        type:
          type: string
      description: 'Type for representing identifiers of real-world entities. Typical identifiers include drivers licence number, social security number, veterans affairs number, prescription id, order id, and so on.


        DV_IDENTIFIER is used to represent any identifier of a real thing, issued by some authority or agency.

        '
      example:
        id: 16b74749-e6aa-4945-b760-b42bdc07098a
        type: Patient
    UItem:
      title: ITEM
      type: object
      oneOf:
      - $ref: '#/components/schemas/Element'
      - $ref: '#/components/schemas/Clstr'
      discriminator:
        propertyName: _type
        mapping:
          ELEMENT: '#/components/schemas/Element'
          CLUSTER: '#/components/schemas/Clstr'
    ItemTable:
      title: ITEM_TABLE
      type: object
      properties:
        _type:
          enum:
          - ITEM_TABLE
          type: string
        name:
          $ref: '#/components/schemas/UDvText'
        archetype_node_id:
          type: string
          xml:
            attribute: true
        uid:
          $ref: '#/components/schemas/UUidBasedId'
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        archetype_details:
          $ref: '#/components/schemas/Archetyped'
        feeder_audit:
          $ref: '#/components/schemas/FeederAudit'
        items:
          type: array
          items:
            $ref: '#/components/schemas/Clstr'
      required:
      - name
      - archetype_node_id
    TemplateId:
      title: TEMPLATE_ID
      type: object
      properties:
        _type:
          enum:
          - TEMPLATE_ID
          type: string
        value:
          type: string
      required:
      - value
    UUidBasedId:
      title: UID_BASED_ID
      type: object
      oneOf:
      - $ref: '#/components/schemas/UMHierObjectId'
      - $ref: '#/components/schemas/UMObjectVersionId'
      discriminator:
        propertyName: _type
        mapping:
          HIER_OBJECT_ID: '#/components/schemas/UMHierObjectId'
          OBJECT_VERSION_ID: '#/components/schemas/UMObjectVersionId'
    UDvUri:
      title: DV_URI
      type: object
      oneOf:
      - $ref: '#/components/schemas/UMDvUri'
      - $ref: '#/components/schemas/UMDvEhrUri'
      discriminator:
        propertyName: _type
        mapping:
          DV_URI: '#/components/schemas/UMDvUri'
          DV_EHR_URI: '#/components/schemas/UMDvEhrUri'
    HierObjectId:
      title: HIER_OBJECT_ID
      required:
      - value
      type: object
      properties:
        _type:
          enum:
          - HIER_OBJECT_ID
          type: string
        value:
          type: string
          format: uuid
      example:
        value: 6cb19121-4307-4648-9da0-d62e4d51f19b
    Element:
      title: ELEMENT
      type: object
      properties:
        _type:
          enum:
          - ELEMENT
          type: string
        name:
          $ref: '#/components/schemas/UDvText'
        archetype_node_id:
          type: string
          xml:
            attribute: true
        uid:
          $ref: '#/components/schemas/UUidBasedId'
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        archetype_details:
          $ref: '#/components/schemas/Archetyped'
        feeder_audit:
          $ref: '#/components/schemas/FeederAudit'
        null_flavour:
          $ref: '#/components/schemas/DvCodedText'
        value:
          $ref: '#/components/schemas/UDataValue'
        null_reason:
          $ref: '#/components/schemas/UDvText'
      required:
      - name
      - archetype_node_id
    UMOriginalVersionOfEhrStatus:
      title: ORIGINAL_VERSION
      required:
      - contribution
      - commit_audit
      - data
      - uid
      - lifecycle_state
      - _type
      type: object
      properties:
        _type:
          enum:
          - ORIGINAL_VERSION
          type: string
        contribution:
          $ref: '#/components/schemas/ObjectRefOfHierObjectId'
        signature:
          type: string
        commit_audit:
          $ref: '#/components/schemas/AuditDetails'
        data:
          $ref: '#/components/schemas/EhrStatus'
        uid:
          $ref: '#/components/schemas/ObjectVersionId'
        preceding_version_uid:
          $ref: '#/components/schemas/ObjectVersionId'
        other_input_version_uids:
          type: array
          items:
            $ref: '#/components/schemas/ObjectVersionId'
        lifecycle_state:
          $ref: '#/components/schemas/DvCodedText'
        attestations:
          type: array
          items:
            $ref: '#/components/schemas/Attestation'
    Archetyped:
      title: ARCHETYPED
      required:
      - archetype_id
      - rm_version
      type: object
      properties:
        archetype_id:
          $ref: '#/components/schemas/ArchetypeId'
        template_id:
          $ref: '#/components/schemas/TemplateId'
        rm_version:
          type: string
      example:
        archetype_id:
          value: openEHR-EHR-COMPOSITION.encounter.v1
        template_id:
          value: Example.v1::c7ec861c-c413-39ff-9965-a198ebf44747
        rm_version: 1.0.2
      additionalProperties: false
    ArchetypeId:
      title: ARCHETYPE_ID
      type: object
      properties:
        _type:
          enum:
          - ARCHETYPE_ID
          type: string
        value:
          type: string
      required:
      - value
    DvCodedText:
      title: DV_CODED_TEXT
      required:
      - value
      - defining_code
      type: object
      properties:
        _type:
          enum:
          - DV_CODED_TEXT
          type: string
        value:
          type: string
        hyperlink:
          $ref: '#/components/schemas/UDvUri'
        formatting:
          type: string
        mappings:
          type: array
          items:
            $ref: '#/components/schemas/TermMapping'
        language:
          $ref: '#/components/schemas/CodePhrase'
        encoding:
          $ref: '#/components/schemas/CodePhrase'
        defining_code:
          $ref: '#/components/schemas/CodePhrase'
      example:
        value: Coded text value
        defining_code:
          terminology_id:
            value: local
          code_string: at0001
    ObjectRefOfHierObjectId:
      title: OBJECT_REF
      type: object
      properties:
        namespace:
          type: string
        type:
          type: string
        id:
          $ref: '#/components/schemas/UMHierObjectId'
      example:
        id:
          _type: HIER_OBJECT_ID
          value: 6cb19121-4307-4648-9da0-d62e4d51f19b
        namespace: local
        type: CONTRIBUTION
      required:
      - namespace
      - type
      - id
    DvDuration:
      title: DV_DURATION
      required:
      - value
      type: object
      properties:
        _type:
          enum:
          - DV_DURATION
          type: string
        normal_status:
          $ref: '#/components/schemas/CodePhrase'
        normal_range:
          $ref: '#/components/schemas/DvInterval'
        other_reference_ranges:
          type: array
          items:
            $ref: '#/components/schemas/ReferenceRange'
        magnitude_status:
          type: string
          default: '='
        accuracy_is_percent:
          type: boolean
        accuracy:
          type: number
        value:
          type: string
    ItemTree:
      title: ITEM_TREE
      type: object
      properties:
        _type:
          enum:
          - ITEM_TREE
          type: string
        name:
          $ref: '#/components/schemas/UDvText'
        archetype_node_id:
          type: string
          xml:
            attribute: true
        uid:
          $ref: '#/components/schemas/UUidBasedId'
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        archetype_details:
          $ref: '#/components/schemas/Archetyped'
        feeder_audit:
          $ref: '#/components/schemas/FeederAudit'
        items:
          type: array
          items:
            $ref: '#/components/schemas/UItem'
          description: See [ITEM](#tag/ITEM_schema) schema details.
      required:
      - name
      - archetype_node_id
    ItemSingle:
      title: ITEM_SINGLE
      required:
      - name
      - archetype_node_id
      - item
      type: object
      properties:
        _type:
          enum:
          - ITEM_SINGLE
          type: string
        name:
          $ref: '#/components/schemas/UDvText'
        archetype_node_id:
          type: string
          xml:
            attribute: true
        uid:
          $ref: '#/components/schemas/UUidBasedId'
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        archetype_details:
          $ref: '#/components/schemas/Archetyped'
        feeder_audit:
          $ref: '#/components/schemas/FeederAudit'
        item:
          $ref: '#/components/schemas/Element'
    Error:
      title: Error
      required:
      - message
      - validationErrors
      type: object
      properties:
        message:
          type: string
        validationErrors:
          type: array
          items:
            type: string
          description: ''
      example:
        message: Error message
      

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/openehr/refs/heads/main/openapi/openehr-ehr-status-api-openapi.yml