Skip to main content

EHRbase API (v1)

Download OpenAPI specification:Download

License: Apache 2.0

EHRbase implements the official openEHR REST API. Additionally, EHRbase provides a custom status heartbeat endpoint, an Admin API (if activated) and a Status and Metrics API (if activated) for monitoring and maintenance. Note: The openEHR REST API is documented in their official documentation, not here. Please refer to their separate documentation.

Admin - Template

updateTemplate

path Parameters
template_id
required
string

Target template id to update. The value comes from the 'template_id' property.

header Parameters
Accept
string
Default: application/xml

Client should specify expected format

Content-Type
required
string

Client may request content format

Request Body schema: application/xml
required
string

New template content to replace old one with

Responses

Response samples

Content type
No sample

deleteTemplate

path Parameters
template_id
required
string

Target template id to delete. The value comes from the 'template_id' property.

Responses

Response samples

Content type
{
  • "deleted": 0
}

deleteAllTemplates

Responses

Response samples

Content type
{ }

Admin - EHR

updateEhr

path Parameters
ehr_id
required
string

Target EHR id to update

header Parameters
Accept
string

Client requested response content type

Responses

Response samples

Content type
{
  • "updated": 0
}

deleteEhr

path Parameters
ehr_id
required
string

Target EHR id to delete

Responses

Response samples

Content type
{
  • "deleted": 0
}

Admin - Contribution

updateContribution

path Parameters
ehr_id
required
string

Target EHR id to update contribution inside.

contribution_id
required
string

Target Contribution id to update

Responses

Response samples

Content type
{
  • "updated": 0
}

Not supported since 2.0.0

path Parameters
ehr_id
required
string

Target EHR id to update contribution inside.

contribution_id
required
string

Target Contribution id to update

Responses

Response samples

Content type
{
  • "deleted": 0
}

Admin - EHR-Merge

Merge a source EHR into an existing target EHR

Request Body schema: application/json
required
source_ehr
required
string <uuid>
target_ehr
required
string <uuid>
detail_level
string
Enum: "BASIC" "FOLDER_COPY"
reversible
required
boolean
dry_run
boolean
folder_merge
string
Enum: "BASIC" "COPY"
composition_merge
string
Enum: "BASIC" "PERSISTENT"

Responses

Request samples

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

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
No sample

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": {
    }
}

Admin - Heartbeat

getStatus

Responses

Response samples

Content type
{
  • "message": "string"
}

Admin - Stored-Query

deleteStoredQuery

path Parameters
qualified_query_name
required
string
version
required
string
header Parameters
Accept
string

Responses

Admin - Directory

deleteDirectory

path Parameters
ehr_id
required
string

Target EHR ed to remove Directory from

directory_id
required
string

Target Directory id to delete

Responses

Response samples

Content type
{
  • "deleted": 0
}

Admin - Composition

deleteComposition

path Parameters
ehr_id
required
string

Target EHR id to remove composition from

composition_id
required
string

Target Composition id to remove

Responses

Response samples

Content type
{
  • "deleted": 0
}