-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
da4afa8
commit 4f8ad18
Showing
14 changed files
with
249 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
case "${1:-}" in | ||
overview|ehr|query|definition|resources) | ||
overview|ehr|query|definition|resources|demographic) | ||
docker-compose run -d --rm -w "/spec/specifications" -p 80:80 -p 32201:32201 redocly preview-docs "$1".openapi.yaml -h 0.0.0.0 -p 80 | ||
;; | ||
"") | ||
echo "Usage: watch.sh [overview|ehr|query|definition]" | ||
echo "Usage: watch.sh [overview|ehr|query|definition|resources|demographic]" | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Demographic API | ||
version: latest | ||
x-status: DRAFT | ||
x-spec: ehr | ||
contact: | ||
name: Specifications Editorial Committee openEHR | ||
url: 'https://specifications.openehr.org/' | ||
email: [email protected] | ||
license: | ||
name: Creative Commons Attribution-NoDerivs 3.0 Unported | ||
url: 'https://creativecommons.org/licenses/by-nd/3.0/' | ||
#description: | ||
# $ref: ./docs/ehr/Intro.md | ||
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: [] | ||
paths: | ||
'/demographic/actor': | ||
post: | ||
$ref: ./operations/actor_create.yaml | ||
# '/ehr/{ehr_id}/composition/{uid_based_id}': | ||
# get: | ||
# $ref: ./operations/composition_get.yaml | ||
# put: | ||
# $ref: ./operations/composition_update.yaml | ||
# delete: | ||
# $ref: ./operations/composition_delete.yaml | ||
# '/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}': | ||
# get: | ||
# $ref: ./operations/versioned_composition_get.yaml | ||
# '/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/revision_history': | ||
# get: | ||
# $ref: ./operations/versioned_composition_revision_history.yaml | ||
# '/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version': | ||
# get: | ||
# $ref: ./operations/versioned_composition_version_get_at_time.yaml | ||
# '/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version/{version_uid}': | ||
# get: | ||
# $ref: ./operations/versioned_composition_version_get_by_id.yaml | ||
# '/ehr/{ehr_id}/directory': | ||
# post: | ||
# $ref: ./operations/directory_create.yaml | ||
# put: | ||
# $ref: ./operations/directory_update.yaml | ||
# delete: | ||
# $ref: ./operations/directory_delete.yaml | ||
# get: | ||
# $ref: ./operations/directory_get_at_time.yaml | ||
# '/ehr/{ehr_id}/directory/{version_uid}': | ||
# get: | ||
# $ref: ./operations/directory_get_by_version_id.yaml | ||
# '/ehr/{ehr_id}/contribution': | ||
# post: | ||
# $ref: ./operations/contribution_create.yaml | ||
# '/ehr/{ehr_id}/contribution/{contribution_uid}': | ||
# get: | ||
# $ref: ./operations/contribution_get.yaml | ||
# tags: TODO: add demographic tags | ||
# - name: DIRECTORY | ||
# description: | | ||
# Management of the [directory](https://specifications.openehr.org/releases/RM/latest/ehr.html#_directory) [FOLDER](https://specifications.openehr.org/releases/RM/latest/common.html#_folder_class) resource. | ||
# Actions upon resources of this group are also formally described in the [I_EHR_DIRECTORY](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_directory_interface) Abstract Service Model interface. | ||
# - name: CONTRIBUTION | ||
# description: | | ||
# Management of [CONTRIBUTION](https://specifications.openehr.org/releases/RM/latest/common.html#_contribution_class) resource. | ||
# Actions upon resources of this group are also formally described in the [I_EHR_CONTRIBUTION](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_contribution_interface) Abstract Service Model interface. | ||
# - name: DIRECTORY_schema | ||
# x-displayName: DIRECTORY | ||
# description: | ||
# $ref: ./tags/DIRECTORY_schema.md | ||
# - name: CONTRIBUTION_schema | ||
# x-displayName: CONTRIBUTION | ||
# description: | ||
# $ref: ./tags/CONTRIBUTION_schema.md | ||
x-tagGroups: | ||
- name: Resource endpoints | ||
tags: | ||
- DEMOGRAPHIC | ||
- ACTOR | ||
- DIRECTORY | ||
- CONTRIBUTION | ||
- name: Resource schemas | ||
tags: | ||
- DEMOGRAPHIC_schema | ||
- DIRECTORY_schema | ||
- CONTRIBUTION_schema | ||
# components: | ||
# schemas: | ||
# UAbstractItemStructure: | ||
# $ref: ./schemas/data_structures/UAbstractItemStructure.yaml | ||
# UAbstractContentItem: | ||
# $ref: ./schemas/ehr/UAbstractContentItem.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
operationId: actor_create | ||
summary: Create ACTOR | ||
description: | | ||
Creates the first version of a new ACTOR. | ||
tags: | ||
- ACTOR | ||
parameters: | ||
- $ref: ../parameters/header/Prefer.yaml | ||
# FIXME: missing header openEHR-AUDIT_DETAILS.committer | ||
requestBody: | ||
description: | | ||
The ACTOR. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../schemas/demographic/Actor.yaml | ||
required: true | ||
# responses: | ||
# '201': | ||
# $ref: ../responses/201_ACTOR.yaml | ||
# '400': | ||
# $ref: ../responses/400_ACTOR.yaml | ||
# '422': | ||
# $ref: ../responses/422_ACTOR.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
title: DV_INTERVAL_of_DATE | ||
type: object | ||
allOf: | ||
- $ref: ../data_types/DvInterval.yaml | ||
properties: | ||
_type: | ||
type: string | ||
default: DV_INTERVAL | ||
lower: | ||
$ref: ./UMDvDate.yaml | ||
upper: | ||
$ref: ./UMDvDate.yaml | ||
x-discriminator-value: DV_INTERVAL_of_DATE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
title: ACTOR | ||
type: object | ||
allOf: | ||
- $ref: Party.yaml | ||
required: | ||
- languages | ||
properties: | ||
languages: | ||
type: array | ||
items: | ||
$ref: ../data_types/UDvText.yaml | ||
roles: | ||
#for the API roles are embedded in the actor | ||
type: array | ||
items: | ||
$ref: Role.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
title: ADDRESS | ||
type: object | ||
allOf: | ||
- $ref: ../common/Locatable.yaml | ||
properties: | ||
details: | ||
# FIXME: I don't know which item structure schema to use, there are 3 options | ||
$ref: ../data_structures/UItemStructure.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
title: CAPABILITY | ||
type: object | ||
allOf: | ||
- $ref: ../common/Locatable.yaml | ||
required: | ||
- credentials | ||
properties: | ||
credentials: | ||
# FIXME: I don't know which item structure schema to use, there are 3 options | ||
$ref: ../data_structures/UItemStructure.yaml | ||
time_validity: | ||
$ref: ../data_types/DvIntervalOfDate.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
title: CONTACT | ||
type: object | ||
allOf: | ||
- $ref: ../common/Locatable.yaml | ||
properties: | ||
time_validity: | ||
$ref: ../data_types/DvIntervalOfDate.yaml | ||
addresses: | ||
type: array | ||
items: | ||
$ref: Address.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
title: PARTY | ||
type: object | ||
allOf: | ||
- $ref: ../common/Locatable.yaml | ||
properties: | ||
details: | ||
# FIXME: I don't know which item structure schema to use, there are 3 options | ||
$ref: ../data_structures/UItemStructure.yaml | ||
identities: | ||
type: array | ||
items: | ||
$ref: PartyIdentity.yaml | ||
contacts: | ||
type: array | ||
items: | ||
$ref: Contact.yaml | ||
x-cg-discriminator: | ||
propertyName: _type | ||
mapping: | ||
#ROLE is not allowed on purpose, for the API it's embedded in the ACTOR payload | ||
PERSON: '#/components/schemas/Actor' | ||
ORGANISATION: '#/components/schemas/Actor' | ||
GROUP: '#/components/schemas/Actor' | ||
AGENT: '#/components/schemas/Actor' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
title: PARTY_IDENTITY | ||
type: object | ||
allOf: | ||
- $ref: ../common/Locatable.yaml | ||
properties: | ||
details: | ||
# FIXME: I don't know which item structure schema to use, there are 3 options | ||
$ref: ../data_structures/UItemStructure.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
title: ROLE | ||
type: object | ||
allOf: | ||
- $ref: Party.yaml | ||
required: | ||
- languages | ||
properties: | ||
time_validity: | ||
$ref: ../data_types/DvIntervalOfDate.yaml | ||
performer: | ||
$ref: ../base_types/PartyRef.yaml | ||
capabilities: | ||
type: array | ||
items: | ||
$ref: Capability.yaml |