Skip to main content

Admin API (1.0.0)

Download OpenAPI specification:Download

Overview

Purpose

This specification describes service endpoints, resources and operations as well as details of requests and responses that interacts with EHR openEHR API in a RESTful manner.

Status

This specification is in the STABLE state, and can be downloaded as OpenAPI specification file (in YAML format) for validation, or for code generators. Users are encouraged to comment on and/or advise on these paragraphs as well as the main content.

The development version of this document can be found at https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html.

Composition

Delete Composition

Removes a composition and all related and not otherwise referenced data from EHRbase

path Parameters
ehr_id
required
string
composition_id
required
string
Example: {{last_composition_id_short}}

Responses

EHR

Administrative routes for EHRs

Update EHR

Sends new data for a specific EHR entry which will replace the old content of this EHR withour history entries

path Parameters
ehr_id
required
string
Example: {{ehr_id}}
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Delete EHR

Removes and EHR phyically from the database. All corresponding resources will also be removed including all history entries.

path Parameters
ehr_id
required
string
Example: {{ehr_id}}

Responses

Contribution

Update Contribution

Replaces the content of a Contribution with the new data sent with the request

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Directory

Delete directory

Delete a diretory of an EHR physically from database

path Parameters
ehr_id
required
string
directory_id
required
string
Example: {{folder_id_short}}

Responses

Template

Update template

Updated a given template by replacing the content of the template by the new sent data. If there is still data referencing the template the request will be rejected

path Parameters
template_id
required
string
Example: International Patient Summary

Responses

Delete template

Removes a given template from database physically. If there is still data referencing the template the request will be rejected

path Parameters
template_id
required
string
Example: International Patient Summary

Responses

Delete all templates

Deletes all templates from database physically if there were no more Compositions referencing templates.

Responses

Query

Delete Stored Query Version

Deletes a stored query version

path Parameters
qualified_query_name
required
string
Example: org.ehrbase::compositions_with_high_blood_pressure
version
required
string
Example: 1.0.0

Responses

Status & Management

Admin API status

Get the admin api status

Responses

EHR-Merge

Merge a source EHR into an existing target EHR

Request Body schema: application/json
required
reversible
required
boolean
source_ehr
required
string <uuid>
target_ehr
required
string <uuid>
detail_level
string
Value: "BASIC"
dry_run
boolean

Responses

Request samples

Content type
application/json
{
  • "reversible": true,
  • "source_ehr": "e41451f3-ce0a-41b1-8452-c636cac1e6f5",
  • "target_ehr": "097716e6-03df-4e2e-938b-1cedb015bb9f",
  • "detail_level": "BASIC",
  • "dry_run": true
}

Response samples

Content type
application/json
{
  • "outcome": {
    },
  • "source_ehr": "e41451f3-ce0a-41b1-8452-c636cac1e6f5",
  • "target_ehr": "097716e6-03df-4e2e-938b-1cedb015bb9f",
  • "merge_date": "2019-08-24T14:15:22Z",
  • "unmerge_data": {
    }
}

Request the EHR id that a given EHR was merged into, taking cascading into account

path Parameters
id
required
string <uuid>

EHR id to find the merge target for

Responses

Response samples

Content type
"string"

Request the merging status of a SOURCE_EHR and/or TARGET_EHR

query Parameters
source
string <uuid>

source EHR id to find merge status for

target
string <uuid>

target EHR id to find merge status for

cascaded
boolean
Default: false

whether cascaded merges shall be taken into account

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Request the details of a merge operation

query Parameters
source
required
string <uuid>

source EHR id to find merge details for

target
required
string <uuid>

target EHR id to find merge details for

unmerge_data
boolean
Default: false

if data for unmerging is to be included

Responses

Response samples

Content type
application/json
{
  • "outcome": {
    },
  • "source_ehr": "e41451f3-ce0a-41b1-8452-c636cac1e6f5",
  • "target_ehr": "097716e6-03df-4e2e-938b-1cedb015bb9f",
  • "merge_date": "2019-08-24T14:15:22Z",
  • "unmerge_data": {
    }
}