{"openapi":"3.1.0","info":{"title":"EHRbase API","description":"EHRbase implements the [official openEHR REST API](https://specifications.openehr.org/releases/ITS-REST/latest/). Additionally, EHRbase provides a custom `status` heartbeat endpoint, an [Admin API](https://docs.ehrbase.org/docs/EHRbase/Explore/Admin-REST) (if activated) and a [Status and Metrics API](https://docs.ehrbase.org/docs/EHRbase/Explore/Status-And-Metrics) (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.","license":{"name":"Apache 2.0","url":"https://github.com/ehrbase/ehrbase/blob/develop/LICENSE.md"},"version":"v1"},"externalDocs":{"description":"EHRbase Documentation","url":"https://docs.ehrbase.org/"},"servers":[{"url":"https://sandkiste.ehrbase.org/ehrbase","description":"Generated server url"}],"paths":{"/rest/openehr/v1/ehr/{ehr_id}":{"get":{"tags":["EHR"],"summary":"Get EHR by id","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#tag/EHR/operation/ehr_get_by_id"},"operationId":"getEhrById","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK, is returned when the requested EHR resource is successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ehr"}}}},"404":{"description":"Not Found, is returned when an EHR with ehr_id does not exist."}}},"put":{"tags":["EHR"],"summary":"Create EHR with id","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/1.0.3/ehr.html#tag/EHR/operation/ehr_get_by_id"},"operationId":"createEhrWithId","parameters":[{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhrStatus"}}}},"responses":{"201":{"description":"Created, is returned when the EHR has been successfully created. The new EHR resource is returned in the body when the request's Prefer header value is return=representation , otherwise only headers are returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ehr"}}}},"400":{"description":"Bad Request, is returned when the request URL or body (if provided) could not be parsed or has invalid content."},"409":{"description":"Conflict, Unable to create a new EHR due to a conflict with an already existing EHR with the same subject id, namespace pair, whenever EHR_STATUS is supplied."}}}},"/rest/openehr/v1/ehr/{ehr_id}/ehr_status":{"get":{"tags":["EHR_STATUS"],"summary":"Get EHR_STATUS version by time","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-ehr_status-get"},"operationId":"getEhrStatusVersionByTime","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version_at_time","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK, is returned when the requested EHR_STATUS is successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhrStatus"},"example":{"archetype_node_id":"openEHR-EHR-EHR_STATUS.generic.v1","name":{"value":"EHR status"},"uid":{"_type":"OBJECT_VERSION_ID","value":"9e3eb79b-1caa-4ab9-8cd4-d374b7c42bb4::local.ehrbase.org::1"},"subject":{"_type":"PARTY_SELF"},"is_queryable":true,"is_modifiable":true}}}},"400":{"description":"Bad Request, is returned when the request has invalid content such as an invalid version_at_time format."},"404":{"description":"Not Found, is returned when an EHR with ehr_id does not exist, or when a version of the resource identified by the request parameters (at specified version_at_time) does not exist."}}},"put":{"tags":["EHR_STATUS"],"summary":"Update EHR_STATUS","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-ehr_status-put"},"operationId":"updateEhrStatus","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhrStatus"},"example":{"archetype_node_id":"openEHR-EHR-EHR_STATUS.generic.v1","name":{"value":"EHR status"},"uid":{"_type":"OBJECT_VERSION_ID","value":"9e3eb79b-1caa-4ab9-8cd4-d374b7c42bb4::local.ehrbase.org::1"},"subject":{"_type":"PARTY_SELF"},"is_queryable":true,"is_modifiable":true}}},"required":true},"responses":{"200":{"description":"OK, is returned when the EHR_STATUS is successfully updated, and the updated resource is returned in the body when Prefer header value is return=representation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhrStatus"},"example":{"archetype_node_id":"openEHR-EHR-EHR_STATUS.generic.v1","name":{"value":"EHR status"},"uid":{"_type":"OBJECT_VERSION_ID","value":"9e3eb79b-1caa-4ab9-8cd4-d374b7c42bb4::local.ehrbase.org::1"},"subject":{"_type":"PARTY_SELF"},"is_queryable":true,"is_modifiable":true}}}},"204":{"description":"No Content, is returned when the Prefer header is missing or is set to return=minimal"},"400":{"description":"Bad Request, is returned when the request URL or body (if provided) could not be parsed or has invalid content."},"404":{"description":"Not Found, is returned when an EHR with ehr_id does not exist."},"412":{"description":"Precondition Failed, is returned when If-Match request header doesn't match the latest version on the service side. Returns also latest version_uid in the Location and headers."}}}},"/rest/openehr/v1/ehr/{ehr_id}/directory":{"get":{"tags":["DIRECTORY"],"summary":"Get folder in directory version at time","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#directory-directory-get-1"},"operationId":"getFolderInDirectoryVersionAtTime","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version_at_time","in":"query","required":false,"schema":{"type":"string"}},{"name":"path","in":"query","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"204":{"description":"No Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}}},"put":{"tags":["DIRECTORY"],"summary":"Update directory","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#directory-directory-put"},"operationId":"updateDirectory","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":true,"schema":{"$ref":"#/components/schemas/ObjectVersionId"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string","default":"return=minimal"}},{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"204":{"description":"No Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"412":{"description":"Precondition Failed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}}},"post":{"tags":["DIRECTORY"],"summary":"Create directory","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#directory-directory-post"},"operationId":"createDirectory","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string","default":"return=minimal"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}}},"delete":{"tags":["DIRECTORY"],"summary":"Delete directory","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#directory-directory-delete"},"operationId":"deleteDirectory","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"}},{"name":"If-Match","in":"header","required":true,"schema":{"$ref":"#/components/schemas/ObjectVersionId"}}],"responses":{"204":{"description":"No Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"412":{"description":"Precondition Failed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/composition/{versioned_object_uid}":{"get":{"tags":["COMPOSITION"],"summary":"Get composition at time","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-composition-get"},"operationId":"getComposition","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versioned_object_uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Composition format","required":false,"schema":{"type":"string","enum":["JSON","XML","STRUCTURED","FLAT"]}},{"name":"version_at_time","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/openehr.wt.flat.schema+json":{"schema":{"type":"string"}},"application/openehr.wt.structured.schema+json":{"schema":{"type":"string"}}}}}},"put":{"tags":["COMPOSITION"],"summary":"Update composition","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-composition-put"},"operationId":"updateComposition","parameters":[{"name":"openehrVersion","in":"query","required":true,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versioned_object_uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"templateId","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Composition format","required":false,"schema":{"type":"string","enum":["JSON","XML","STRUCTURED","FLAT"]}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/openehr.wt.flat.schema+json":{"schema":{"type":"string"}},"application/openehr.wt.structured.schema+json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/openehr.wt.flat.schema+json":{"schema":{"type":"string"}},"application/openehr.wt.structured.schema+json":{"schema":{"type":"string"}}}}}}},"/rest/openehr/v1/definition/query/{qualified_query_name}/{version}":{"get":{"tags":["STORED_QUERY"],"summary":"Get stored query and info/metadata","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definitions.html#definitions-stored-query-get-1"},"operationId":"getStoredQueryVersion","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}}}}},"put":{"tags":["STORED_QUERY"],"summary":"Store a query","description":"Content type application/json is still supported but it's deprecated, please use text/plain instead.","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definitions.html#definitions-stored-query-put"},"operationId":"putStoredQuery","parameters":[{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"query_type","in":"query","required":false,"schema":{"type":"string","default":"AQL"}}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}}}}}},"/rest/openehr/v1/definition/query/{qualified_query_name}":{"get":{"tags":["STORED_QUERY"],"summary":"List stored queries","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/Query/operation/definition_query_list"},"operationId":"getStoredQueryList","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}}}}}},"put":{"tags":["STORED_QUERY"],"summary":"Store a query","description":"Content type application/json is still supported but it's deprecated, please use text/plain instead.","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definitions.html#definitions-stored-query-put"},"operationId":"putStoredQuery_1","parameters":[{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"query_type","in":"query","required":false,"schema":{"type":"string","default":"AQL"}}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}}}}}},"/rest/openehr/v1/query/{qualified_query_name}/{version}":{"get":{"tags":["QUERY"],"summary":"Execute stored query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-get-1"},"operationId":"executeStoredQuery","parameters":[{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"fetch","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}},"post":{"tags":["QUERY"],"summary":"Execute stored query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-post-1"},"operationId":"executeStoredQuery_1","parameters":[{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}},"application/xml":{"schema":{"type":"object","additionalProperties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}}},"/rest/openehr/v1/query/{qualified_query_name}":{"get":{"tags":["QUERY"],"summary":"Execute stored query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-get-1"},"operationId":"executeStoredQuery_2","parameters":[{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"fetch","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}},"post":{"tags":["QUERY"],"summary":"Execute stored query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-post-1"},"operationId":"executeStoredQuery_3","parameters":[{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}},"application/xml":{"schema":{"type":"object","additionalProperties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}}},"/rest/openehr/v1/query/aql":{"get":{"tags":["QUERY"],"summary":"Execute ad-hoc (non-stored) AQL query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-get"},"operationId":"executeAdHocQuery","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"fetch","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}},"post":{"tags":["QUERY"],"summary":"Execute ad-hoc (non-stored) AQL query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-post"},"operationId":"executeAdHocQuery_1","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}},"application/xml":{"schema":{"type":"object","additionalProperties":{}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}}},"/rest/openehr/v1/ehr":{"get":{"tags":["EHR"],"summary":"Get EHR summary by subject id and namespace","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#tag/EHR/operation/ehr_get_by_subject"},"operationId":"getEhrBySubject","parameters":[{"name":"subject_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"subject_namespace","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK, is returned when the requested EHR resource is successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ehr"}}}},"404":{"description":"Not Found, is returned when an EHR with supplied subject parameters does not exist."}}},"post":{"tags":["EHR"],"summary":"Create EHR","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#tag/EHR/operation/ehr_create"},"operationId":"createEhr","parameters":[{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string","default":"return=minimal"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhrStatus"}}}},"responses":{"201":{"description":"Created, is returned when the EHR has been successfully created. The new EHR resource is returned in the body when the request's Prefer header value is return=representation , otherwise only headers are returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ehr"}}}},"400":{"description":"Bad Request, is returned when the request URL or body (if provided) could not be parsed or has invalid content."},"409":{"description":"Conflict, Unable to create a new EHR due to a conflict with an already existing EHR with the same subject id, namespace pair, whenever EHR_STATUS is supplied."}}}},"/rest/openehr/v1/ehr/{ehr_id}/contribution":{"post":{"tags":["CONTRIBUTION"],"summary":"Create contribution","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#contribution-contribution-post"},"operationId":"createContribution","parameters":[{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/CONTRIBUTION"}},"application/json":{"schema":{"$ref":"#/components/schemas/CONTRIBUTION"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contribution"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Contribution"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/composition":{"post":{"tags":["COMPOSITION"],"summary":"Create composition","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-composition-post"},"operationId":"createComposition","parameters":[{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"templateId","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Composition format","required":false,"schema":{"type":"string","enum":["JSON","XML","STRUCTURED","FLAT"]}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/openehr.wt.flat.schema+json":{"schema":{"type":"string"}},"application/openehr.wt.structured.schema+json":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}},"application/xml":{"schema":{"type":"object"}},"application/openehr.wt.flat.schema+json":{"schema":{"type":"object"}},"application/openehr.wt.structured.schema+json":{"schema":{"type":"object"}}}}}}},"/rest/openehr/v1/definition/template/adl2":{"get":{"tags":["ADL 2 TEMPLATE"],"summary":"List templates","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/ADL2/operation/definition_template_adl2_get"},"operationId":"getTemplatesNew","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateResponseData"}}}}}},"post":{"tags":["ADL 2 TEMPLATE"],"summary":"Upload a template","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/ADL2/operation/definition_template_adl2_upload"},"operationId":"createTemplateNew","parameters":[{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string"}},{"name":"version","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TemplateResponseData"}}}}}}},"/rest/openehr/v1/definition/template/adl1.4":{"get":{"tags":["ADL 1.4 TEMPLATE"],"summary":"List templates","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/ADL1.4/operation/definition_template_adl1.4_list"},"operationId":"getTemplatesClassic","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TemplateMetaDataDto"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TemplateMetaDataDto"}}}}}}},"post":{"tags":["ADL 1.4 TEMPLATE"],"summary":"Upload a template","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/ADL1.4/operation/definition_template_adl1.4_upload"},"operationId":"createTemplateClassic","parameters":[{"name":"Prefer","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/xml":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/versioned_ehr_status":{"get":{"tags":["VERSIONED_EHR_STATUS"],"summary":"Get versioned EHR_STATUS","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-versioned_ehr_status-get"},"operationId":"retrieveVersionedEhrStatusByEhr","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionedEhrStatus"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VersionedEhrStatus"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/versioned_ehr_status/version":{"get":{"tags":["VERSIONED_EHR_STATUS"],"summary":"Get versioned EHR_STATUS version by time","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-versioned_ehr_status-get-2"},"operationId":"retrieveVersionOfEhrStatusByTime","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_at_time","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginalVersionEhrStatus"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OriginalVersionEhrStatus"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/versioned_ehr_status/version/{version_uid}":{"get":{"tags":["VERSIONED_EHR_STATUS"],"summary":"Get versioned EHR_STATUS version by id","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-versioned_ehr_status-get-3"},"operationId":"retrieveVersionOfEhrStatusByVersionUid","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginalVersionEhrStatus"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OriginalVersionEhrStatus"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/versioned_ehr_status/revision_history":{"get":{"tags":["VERSIONED_EHR_STATUS"],"summary":"Get versioned EHR_STATUS revision history","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-versioned_ehr_status-get-1"},"operationId":"retrieveVersionedEhrStatusRevisionHistoryByEhr","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionHistory"}},"application/xml":{"schema":{"$ref":"#/components/schemas/RevisionHistory"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}":{"get":{"tags":["VERSIONED_COMPOSITION"],"summary":"Get versioned composition","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-versioned_composition-get"},"operationId":"retrieveVersionedCompositionByVersionedObjectUid","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versioned_object_uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VERSIONED_COMPOSITION"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VERSIONED_COMPOSITION"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version":{"get":{"tags":["VERSIONED_COMPOSITION"],"summary":"Get versioned composition version at time","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-versioned_ehr_status-get-3"},"operationId":"retrieveVersionOfCompositionByTime","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versioned_object_uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_at_time","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginalVersionComposition"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OriginalVersionComposition"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version/{version_uid}":{"get":{"tags":["VERSIONED_COMPOSITION"],"summary":"Get versioned composition version by id","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-versioned_composition-get-2"},"operationId":"retrieveVersionOfCompositionByVersionUid","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versioned_object_uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginalVersionComposition"}},"application/xml":{"schema":{"$ref":"#/components/schemas/OriginalVersionComposition"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/revision_history":{"get":{"tags":["VERSIONED_COMPOSITION"],"summary":"Get versioned composition revision history","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-versioned_composition-get-1"},"operationId":"retrieveVersionedCompositionRevisionHistoryByEhr","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versioned_object_uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionHistory"}},"application/xml":{"schema":{"$ref":"#/components/schemas/RevisionHistory"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/ehr_status/{version_uid}":{"get":{"tags":["EHR_STATUS"],"summary":"Get EHR_STATUS by version id","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-ehr_status-get-1"},"operationId":"getEhrStatusByVersionId","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version_uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK, is returned when the requested EHR_STATUS is successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhrStatus"},"example":{"archetype_node_id":"openEHR-EHR-EHR_STATUS.generic.v1","name":{"value":"EHR status"},"uid":{"_type":"OBJECT_VERSION_ID","value":"9e3eb79b-1caa-4ab9-8cd4-d374b7c42bb4::local.ehrbase.org::1"},"subject":{"_type":"PARTY_SELF"},"is_queryable":true,"is_modifiable":true}}}},"404":{"description":"Not Found, is returned when an EHR with ehr_id does not exist, or when the version_uid does not exist."}}}},"/rest/openehr/v1/ehr/{ehr_id}/directory/{version_uid}":{"get":{"tags":["DIRECTORY"],"summary":"Get folder in directory version","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#directory-directory-get"},"operationId":"getFolderInDirectory","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version_uid","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectVersionId"}},{"name":"path","in":"query","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/contribution/{contribution_uid}":{"get":{"tags":["CONTRIBUTION"],"summary":"Get contribution by id","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#contribution-contribution-get"},"operationId":"getContribution","parameters":[{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"contribution_uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contribution"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Contribution"}}}}}}},"/rest/openehr/v1/definition/template/adl2/{template_id}/{version_pattern}":{"get":{"tags":["ADL 2 TEMPLATE"],"summary":"Get template","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definitions.html#definitions-stored-query-get-1"},"operationId":"getTemplateNew","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_pattern","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TemplateResponseData"}}}}}}},"/rest/openehr/v1/definition/template/adl1.4/{template_id}":{"get":{"tags":["ADL 1.4 TEMPLATE"],"summary":"Get template","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/ADL1.4/operation/definition_template_adl1.4_get"},"operationId":"getTemplateClassic","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/xml":{"schema":{"type":"object"}},"application/json":{"schema":{"type":"object"}},"application/openehr.wt+json":{"schema":{"type":"object"}}}}}}},"/rest/openehr/v1/definition/template/adl1.4/{template_id}/webtemplate":{"get":{"tags":["TEMPLATE"],"summary":"Deprecated since 2.2.0 and marked for removal","description":"Replaced by [/rest/openehr/v1/definition/template/adl1.4/{template_id}](./index.html?urls.primaryName=1.%20openEHR%20API#/ADL%201.4%20TEMPLATE/getTemplateClassic)","operationId":"getWebTemplate","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebTemplate"}},"application/openehr.wt+json":{"schema":{"$ref":"#/components/schemas/WebTemplate"}}}}},"deprecated":true}},"/rest/openehr/v1/definition/template/adl1.4/{template_id}/example":{"get":{"tags":["ADL 1.4 TEMPLATE"],"summary":"Get an example composition for the specified template","operationId":"getTemplateExample","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Composition format","required":false,"schema":{"type":"string","enum":["JSON","XML","STRUCTURED","FLAT"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/openehr.wt.structured.schema+json":{"schema":{"type":"string"}},"application/openehr.wt.flat.schema+json":{"schema":{"type":"string"}}}}}}},"/rest/openehr/v1/definition/query":{"get":{"tags":["STORED_QUERY"],"summary":"List stored queries","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/Query/operation/definition_query_list"},"operationId":"getStoredQueryList_1","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/composition/{preceding_version_uid}":{"delete":{"tags":["COMPOSITION"],"summary":"Delete composition","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-composition-delete"},"operationId":"deleteComposition","parameters":[{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"preceding_version_uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content","content":{"application/json":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/openehr.wt.flat.schema+json":{"schema":{"type":"string"}},"application/openehr.wt.structured.schema+json":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"ArchetypeID":{"type":"object","properties":{"qualified_rm_entity":{"type":"string","writeOnly":true},"domain_concept":{"type":"string","writeOnly":true},"rm_originator":{"type":"string","writeOnly":true},"rm_name":{"type":"string","writeOnly":true},"rm_entity":{"type":"string","writeOnly":true},"specialisation":{"type":["string","null"]},"versionId":{"type":["string","null"]},"value":{"type":"string"},"namespace":{"type":["string","null"]},"qualifiedRmEntity":{"type":["string","null"]},"domainConcept":{"type":["string","null"]},"rmOriginator":{"type":["string","null"]},"rmName":{"type":["string","null"]},"rmEntity":{"type":["string","null"]},"semanticId":{"type":"string"},"fullId":{"type":"string"}}},"Archetyped":{"type":"null","properties":{"archetypeId":{"$ref":"#/components/schemas/ArchetypeID"},"templateId":{"$ref":"#/components/schemas/TemplateId"},"rmVersion":{"type":"string"}}},"CodePhrase":{"type":"null","properties":{"terminologyId":{"$ref":"#/components/schemas/TerminologyId"},"codeString":{"type":"string"},"preferredTerm":{"type":["string","null"]}}},"DvCodedText":{"type":"null","properties":{"value":{"type":"string"},"hyperlink":{"$ref":"#/components/schemas/DvURI"},"formatting":{"type":["string","null"]},"language":{"$ref":"#/components/schemas/CodePhrase"},"encoding":{"$ref":"#/components/schemas/CodePhrase"},"definingCode":{"$ref":"#/components/schemas/CodePhrase"}}},"DvDateTime":{"type":"null","properties":{"normalStatus":{"$ref":"#/components/schemas/CodePhrase"},"normalRange":{"$ref":"#/components/schemas/DvIntervalDvDateTime"},"otherReferenceRanges":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ReferenceRangeDvDateTime"}},"magnitudeStatus":{"type":["string","null"]},"accuracy":{"$ref":"#/components/schemas/DvDuration"},"value":{}}},"DvDuration":{"type":"null","properties":{"normalStatus":{"$ref":"#/components/schemas/CodePhrase"},"normalRange":{"$ref":"#/components/schemas/DvIntervalDvDuration"},"otherReferenceRanges":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ReferenceRangeDvDuration"}},"magnitudeStatus":{"type":["string","null"]},"accuracy":{"type":["number","null"],"format":"double"},"accuracyIsPercent":{"type":["boolean","null"]},"value":{"type":"object","properties":{"units":{"type":"array","items":{"type":"object","properties":{"durationEstimated":{"type":"boolean"},"duration":{"type":"string"},"timeBased":{"type":"boolean"},"dateBased":{"type":"boolean"}}}}}}}},"DvEHRURI":{"type":"object","properties":{"value":{"type":"string","format":"uri"}}},"DvEncapsulated":{"type":"null","properties":{"charset":{"$ref":"#/components/schemas/CodePhrase"},"language":{"$ref":"#/components/schemas/CodePhrase"}}},"DvIdentifier":{"type":"object","properties":{"issuer":{"type":["string","null"]},"assigner":{"type":["string","null"]},"id":{"type":"string"},"type":{"type":["string","null"]}}},"DvIntervalDvDateTime":{"type":"null","properties":{"lower":{"$ref":"#/components/schemas/DvDateTime"},"upper":{"$ref":"#/components/schemas/DvDateTime"},"lowerUnbounded":{"type":"boolean"},"upperUnbounded":{"type":"boolean"},"lowerIncluded":{"type":"boolean"},"upperIncluded":{"type":"boolean"}}},"DvIntervalDvDuration":{"type":"null","properties":{"lower":{"$ref":"#/components/schemas/DvDuration"},"upper":{"$ref":"#/components/schemas/DvDuration"},"lowerUnbounded":{"type":"boolean"},"upperUnbounded":{"type":"boolean"},"lowerIncluded":{"type":"boolean"},"upperIncluded":{"type":"boolean"}}},"DvText":{"type":"object","properties":{"value":{"type":"string"},"hyperlink":{"$ref":"#/components/schemas/DvURI"},"formatting":{"type":["string","null"]},"mappings":{"type":["array","null"],"items":{"$ref":"#/components/schemas/TermMapping"}},"language":{"$ref":"#/components/schemas/CodePhrase"},"encoding":{"$ref":"#/components/schemas/CodePhrase"}}},"DvURI":{"type":"null","properties":{"value":{"type":"string","format":"uri"}}},"EhrStatus":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/DvText"},"archetypeNodeId":{"type":"string"},"uid":{"$ref":"#/components/schemas/UIDBasedId"},"archetypeDetails":{"$ref":"#/components/schemas/Archetyped"},"feederAudit":{"$ref":"#/components/schemas/FeederAudit"},"links":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Link"}},"subject":{"$ref":"#/components/schemas/PartySelf"},"otherDetails":{"$ref":"#/components/schemas/ItemStructure"},"path":{"type":"string"},"is_modifiable":{"type":"boolean"},"is_queryable":{"type":"boolean"}}},"FeederAudit":{"type":"null","properties":{"originatingSystemItemIds":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DvIdentifier"}},"feederSystemItemIds":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DvIdentifier"}},"originalContent":{"$ref":"#/components/schemas/DvEncapsulated"},"originatingSystemAudit":{"$ref":"#/components/schemas/FeederAuditDetails"},"feederSystemAudit":{"$ref":"#/components/schemas/FeederAuditDetails"}}},"FeederAuditDetails":{"type":"null","properties":{"systemId":{"type":"string"},"location":{"$ref":"#/components/schemas/PartyIdentified"},"provider":{"$ref":"#/components/schemas/PartyIdentified"},"subject":{"$ref":"#/components/schemas/PartyProxy"},"time":{"$ref":"#/components/schemas/DvDateTime"},"versionId":{"type":["string","null"]},"otherDetails":{"$ref":"#/components/schemas/ItemStructure"}}},"Item":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/DvText"},"archetypeNodeId":{"type":"string"},"uid":{"$ref":"#/components/schemas/UIDBasedId"},"archetypeDetails":{"$ref":"#/components/schemas/Archetyped"},"feederAudit":{"type":"null"},"links":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Link"}},"path":{"type":"string"}}},"ItemStructure":{"type":"null","properties":{"name":{"$ref":"#/components/schemas/DvText"},"archetypeNodeId":{"type":"string"},"uid":{"$ref":"#/components/schemas/UIDBasedId"},"archetypeDetails":{"$ref":"#/components/schemas/Archetyped"},"feederAudit":{"type":"null"},"links":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Link"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"path":{"type":"string"}}},"Link":{"type":"object","properties":{"meaning":{"$ref":"#/components/schemas/DvText"},"type":{"$ref":"#/components/schemas/DvText"},"target":{"$ref":"#/components/schemas/DvEHRURI"}}},"ObjectId":{"type":"object","properties":{"value":{"type":"string"}}},"PartyIdentified":{"type":"null","properties":{"externalRef":{"$ref":"#/components/schemas/PartyRef"},"name":{"type":["string","null"]},"identifiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DvIdentifier"}}}},"PartyProxy":{"type":"null","properties":{"externalRef":{"$ref":"#/components/schemas/PartyRef"}}},"PartyRef":{"type":"null","properties":{"namespace":{"type":"string"},"type":{"type":"string"},"id":{"$ref":"#/components/schemas/ObjectId"}}},"PartySelf":{"type":"object","properties":{"externalRef":{"$ref":"#/components/schemas/PartyRef"}}},"ReferenceRangeDvDateTime":{"type":"object","properties":{"range":{"$ref":"#/components/schemas/DvIntervalDvDateTime"},"meaning":{"$ref":"#/components/schemas/DvText"}}},"ReferenceRangeDvDuration":{"type":"object","properties":{"range":{"$ref":"#/components/schemas/DvIntervalDvDuration"},"meaning":{"$ref":"#/components/schemas/DvText"}}},"TemplateId":{"type":"null","properties":{"value":{"type":"string"}}},"TermMapping":{"type":"object","properties":{"match":{"type":"string"},"purpose":{"$ref":"#/components/schemas/DvCodedText"},"target":{"$ref":"#/components/schemas/CodePhrase"}}},"TerminologyId":{"type":"object","properties":{"value":{"type":"string"}}},"UIDBasedId":{"type":"null","properties":{"value":{"type":"string"}}},"Ehr":{"type":"object","properties":{"systemId":{"$ref":"#/components/schemas/HierObjectId"},"ehrId":{"$ref":"#/components/schemas/HierObjectId"},"contributions":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ObjectRefObjectId"}},"ehrStatus":{"$ref":"#/components/schemas/ObjectRefObjectId"},"ehrAccess":{"$ref":"#/components/schemas/ObjectRefObjectId"},"compositions":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ObjectRefObjectId"}},"directory":{"$ref":"#/components/schemas/ObjectRefObjectId"},"folders":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ObjectRefObjectId"}},"timeCreated":{"$ref":"#/components/schemas/DvDateTime"}}},"HierObjectId":{"type":"object","properties":{"value":{"type":"string"}}},"ObjectRefObjectId":{"type":"object","properties":{"namespace":{"type":"string"},"type":{"type":"string"},"id":{"$ref":"#/components/schemas/ObjectId"}}},"ObjectVersionId":{"type":"object","properties":{"value":{"type":"string"}}},"Folder":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/DvText"},"archetypeNodeId":{"type":"string"},"uid":{"$ref":"#/components/schemas/UIDBasedId"},"archetypeDetails":{"$ref":"#/components/schemas/Archetyped"},"feederAudit":{"$ref":"#/components/schemas/FeederAudit"},"links":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Link"}},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ObjectRefObjectId"}},"folders":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Folder"}},"details":{"$ref":"#/components/schemas/ItemStructure"},"path":{"type":"string"}}},"QueryDefinitionResponseData":{"type":"object","properties":{"q":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"string"},"saved":{"type":"string"}}},"MetaData":{"type":"object","properties":{"_href":{"type":"string"},"_type":{"type":"string"},"_schema_version":{"type":"string"},"_created":{"type":"string","format":"date-time"},"_generator":{"type":"string"},"_executed_aql":{"type":"string"}}},"QueryResponseData":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/MetaData"},"q":{"type":"string"},"name":{"type":"string"},"columns":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},"rows":{"type":"array","items":{"type":"array","items":{}}}}},"Attestation":{"type":"object","properties":{"systemId":{"type":"string"},"timeCommitted":{"$ref":"#/components/schemas/DvDateTime"},"changeType":{"$ref":"#/components/schemas/DvCodedText"},"description":{"$ref":"#/components/schemas/DvText"},"committer":{"$ref":"#/components/schemas/PartyProxy"},"attestedView":{"$ref":"#/components/schemas/DvMultimedia"},"proof":{"type":["string","null"]},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DvEHRURI"}},"reason":{"$ref":"#/components/schemas/DvText"},"pending":{"type":"boolean"}}},"AuditDetails":{"type":"object","properties":{"systemId":{"type":"string"},"timeCommitted":{"$ref":"#/components/schemas/DvDateTime"},"changeType":{"$ref":"#/components/schemas/DvCodedText"},"description":{"$ref":"#/components/schemas/DvText"},"committer":{"$ref":"#/components/schemas/PartyProxy"}}},"CONTRIBUTION":{"type":"object","properties":{"uid":{"$ref":"#/components/schemas/HierObjectId"},"audit":{"$ref":"#/components/schemas/AuditDetails"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/OriginalVersionRMObject"}}}},"DvMultimedia":{"type":"null","properties":{"charset":{"$ref":"#/components/schemas/CodePhrase"},"language":{"$ref":"#/components/schemas/CodePhrase"},"alternateText":{"type":["string","null"]},"uri":{"$ref":"#/components/schemas/DvURI"},"data":{"type":["string","null"],"format":"byte"},"mediaType":{"$ref":"#/components/schemas/CodePhrase"},"compressionAlgorithm":{"$ref":"#/components/schemas/CodePhrase"},"integrityCheck":{"type":["string","null"],"format":"byte"},"integrityCheckAlgorithm":{"$ref":"#/components/schemas/CodePhrase"},"size":{"type":"integer","format":"int32"},"thumbnail":{"$ref":"#/components/schemas/DvMultimedia"}}},"OriginalVersionRMObject":{"type":"object","properties":{"contribution":{"$ref":"#/components/schemas/ObjectRefObjectId"},"signature":{"type":["string","null"]},"commitAudit":{"$ref":"#/components/schemas/AuditDetails"},"uid":{"$ref":"#/components/schemas/ObjectVersionId"},"precedingVersionUid":{"$ref":"#/components/schemas/ObjectVersionId"},"otherInputVersionUids":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ObjectVersionId"}},"lifecycleState":{"$ref":"#/components/schemas/DvCodedText"},"attestations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Attestation"}},"data":{"$ref":"#/components/schemas/RMObject"},"branch":{"type":"boolean"},"canonicalForm":{"type":"string"}}},"RMObject":{"type":"null"},"Contribution":{"type":"object","properties":{"uid":{"$ref":"#/components/schemas/HierObjectId"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ObjectRefObjectId"}},"audit":{"$ref":"#/components/schemas/AuditDetails"}}},"TemplateResponseData":{},"VersionedEhrStatus":{"type":"object","properties":{"uid":{"$ref":"#/components/schemas/HierObjectId"},"ownerId":{"$ref":"#/components/schemas/ObjectRefObjectId"},"timeCreated":{"$ref":"#/components/schemas/DvDateTime"}}},"OriginalVersionEhrStatus":{"type":"object","properties":{"contribution":{"$ref":"#/components/schemas/ObjectRefObjectId"},"signature":{"type":["string","null"]},"commitAudit":{"$ref":"#/components/schemas/AuditDetails"},"uid":{"$ref":"#/components/schemas/ObjectVersionId"},"precedingVersionUid":{"$ref":"#/components/schemas/ObjectVersionId"},"otherInputVersionUids":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ObjectVersionId"}},"lifecycleState":{"$ref":"#/components/schemas/DvCodedText"},"attestations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Attestation"}},"data":{"$ref":"#/components/schemas/EhrStatus"},"branch":{"type":"boolean"},"canonicalForm":{"type":"string"}}},"RevisionHistory":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RevisionHistoryItem"}}}},"RevisionHistoryItem":{"type":"object","properties":{"versionId":{"$ref":"#/components/schemas/ObjectVersionId"},"audits":{"type":"array","items":{"$ref":"#/components/schemas/AuditDetails"}}}},"VERSIONED_COMPOSITION":{"type":"object","properties":{"uid":{"$ref":"#/components/schemas/HierObjectId"},"owner_id":{"$ref":"#/components/schemas/ObjectRefObjectId"},"time_created":{"type":"string"},"_type":{"type":"string"}}},"Composition":{"type":"null","properties":{"name":{"$ref":"#/components/schemas/DvText"},"archetypeNodeId":{"type":"string"},"uid":{"$ref":"#/components/schemas/UIDBasedId"},"archetypeDetails":{"$ref":"#/components/schemas/Archetyped"},"feederAudit":{"$ref":"#/components/schemas/FeederAudit"},"links":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Link"}},"language":{"$ref":"#/components/schemas/CodePhrase"},"territory":{"$ref":"#/components/schemas/CodePhrase"},"category":{"$ref":"#/components/schemas/DvCodedText"},"composer":{"$ref":"#/components/schemas/PartyProxy"},"context":{"$ref":"#/components/schemas/EventContext"},"content":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ContentItem"}},"path":{"type":"string"}}},"ContentItem":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/DvText"},"archetypeNodeId":{"type":"string"},"uid":{"$ref":"#/components/schemas/UIDBasedId"},"archetypeDetails":{"$ref":"#/components/schemas/Archetyped"},"feederAudit":{"$ref":"#/components/schemas/FeederAudit"},"links":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Link"}},"path":{"type":"string"}}},"EventContext":{"type":"null","properties":{"startTime":{"$ref":"#/components/schemas/DvDateTime"},"endTime":{"$ref":"#/components/schemas/DvDateTime"},"location":{"type":["string","null"]},"setting":{"$ref":"#/components/schemas/DvCodedText"},"otherContext":{"$ref":"#/components/schemas/ItemStructure"},"healthCareFacility":{"$ref":"#/components/schemas/PartyIdentified"},"participations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Participation"}},"path":{"type":"string"},"pathSegments":{"type":"array","items":{"$ref":"#/components/schemas/PathSegment"}}}},"OriginalVersionComposition":{"type":"object","properties":{"contribution":{"$ref":"#/components/schemas/ObjectRefObjectId"},"signature":{"type":["string","null"]},"commitAudit":{"$ref":"#/components/schemas/AuditDetails"},"uid":{"$ref":"#/components/schemas/ObjectVersionId"},"precedingVersionUid":{"$ref":"#/components/schemas/ObjectVersionId"},"otherInputVersionUids":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ObjectVersionId"}},"lifecycleState":{"$ref":"#/components/schemas/DvCodedText"},"attestations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Attestation"}},"data":{"$ref":"#/components/schemas/Composition"},"branch":{"type":"boolean"},"canonicalForm":{"type":"string"}}},"Participation":{"type":"object","properties":{"function":{"$ref":"#/components/schemas/DvText"},"mode":{"$ref":"#/components/schemas/DvCodedText"},"time":{"$ref":"#/components/schemas/DvIntervalDvDateTime"},"performer":{"$ref":"#/components/schemas/PartyProxy"}}},"PathSegment":{"type":"object","properties":{"nodeName":{"type":"string"},"nodeId":{"type":"string"},"archetypeRef":{"type":"string"},"index":{"type":"integer","format":"int32"}}},"TemplateMetaDataDto":{"type":"object","properties":{"concept":{"type":"string"},"template_id":{"type":"string"},"archetype_id":{"type":"string"},"created_timestamp":{"type":"string","format":"date-time"}}},"WebTemplate":{"type":"object","properties":{"templateId":{"type":"string"},"version":{"type":"string"},"defaultLanguage":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}},"tree":{"$ref":"#/components/schemas/WebTemplateNode"}}},"WebTemplateAnnotation":{"type":"object","properties":{"comment":{"type":"string"},"other":{"type":"object","additionalProperties":{"type":"string"}}}},"WebTemplateInput":{"type":"object","properties":{"suffix":{"type":"string"},"type":{"type":"string"},"list":{"type":"array","items":{"$ref":"#/components/schemas/WebTemplateInputValue"}},"listOpen":{"type":"boolean"},"validation":{"$ref":"#/components/schemas/WebTemplateValidation"},"terminology":{"type":"string"},"defaultValue":{"type":"string"}}},"WebTemplateInputValue":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"localizedLabels":{"type":"object","additionalProperties":{"type":"string"}},"localizedDescriptions":{"type":"object","additionalProperties":{"type":"string"}},"termBindings":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WebTemplateTerminology"}},"ordinal":{"type":"integer","format":"int32"},"currentStates":{"type":"array","items":{"type":"string"}},"validation":{"$ref":"#/components/schemas/WebTemplateValidation"}}},"WebTemplateInterval":{"type":"object","properties":{"min":{},"minOp":{"type":"string","enum":[">=",">","<=","<"]},"max":{},"maxOp":{"type":"string","enum":[">=",">","<=","<"]}}},"WebTemplateNode":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"localizedName":{"type":"string"},"rmType":{"type":"string"},"nodeId":{"type":"string"},"min":{"type":"integer","format":"int32"},"max":{"type":"integer","format":"int32"},"localizedNames":{"type":"object","additionalProperties":{"type":"string"}},"localizedDescriptions":{"type":"object","additionalProperties":{"type":"string"}},"aqlPath":{"type":"string"},"children":{"type":"array","items":{"$ref":"#/components/schemas/WebTemplateNode"}},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/WebTemplateInput"}},"inContext":{"type":"boolean"},"termBindings":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WebTemplateTerminology"}},"dependsOn":{"type":"array","items":{"type":"string"}},"annotations":{"$ref":"#/components/schemas/WebTemplateAnnotation"},"proportionTypes":{"type":"array","items":{"type":"string","enum":["ratio","unitary","percent","fraction","integer_fraction"]}},"cardinalities":{"type":"array","items":{"$ref":"#/components/schemas/WebtemplateCardinality"}}}},"WebTemplateTerminology":{"type":"object","properties":{"value":{"type":"string"},"terminologyId":{"type":"string"}}},"WebTemplateValidation":{"type":"object","properties":{"precision":{"$ref":"#/components/schemas/WebTemplateInterval"},"range":{"$ref":"#/components/schemas/WebTemplateInterval"},"pattern":{"type":"string"}}},"WebtemplateCardinality":{"type":"object","properties":{"min":{"type":"integer","format":"int32"},"max":{"type":"integer","format":"int32"},"ids":{"type":"array","items":{"type":"string"}},"excludeFromWebTemplate":{"type":"boolean"}}}}}}