-
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.
adding and updating demographic spec (#99 SPECITS-70)
- Loading branch information
1 parent
2d08d55
commit be506ee
Showing
26 changed files
with
311 additions
and
96 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: | | ||
The `Location` response header indicates the URL of the PARTY resource. | ||
schema: | ||
type: string | ||
format: url | ||
example: 'https://openEHRSys.example.com/v1/demographic/party/6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2' |
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,6 @@ | ||
description: | | ||
The `Location` response header indicates the URL of the VERSION resource. | ||
schema: | ||
type: string | ||
format: url | ||
example: 'https://openEHRSys.example.com/v1/demographic/versioned_party/6cb19121-4307-4648-9da0-d62e4d51f19b/version/6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::1' |
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
operationId: party_create | ||
summary: Create PARTY | ||
description: | | ||
Creates the first version of a new PARTY. | ||
tags: | ||
- PARTY | ||
parameters: | ||
- $ref: ../parameters/header/Prefer.yaml | ||
requestBody: | ||
description: | | ||
The PARTY. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../schemas/demographic/UParty.yaml | ||
required: true | ||
responses: | ||
'201': | ||
$ref: ../responses/201_PARTY.yaml | ||
'400': | ||
$ref: ../responses/400_PARTY.yaml | ||
'422': | ||
$ref: ../responses/422_PARTY.yaml | ||
'404': | ||
$ref: ../responses/404.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,20 @@ | ||
operationId: party_delete | ||
summary: Delete PARTY | ||
description: | | ||
Deletes the PARTY identified by `uid_based_id`. | ||
The `uid_based_id` MUST be in a form of an OBJECT_VERSION_ID identifier taken from the last (most recent) VERSION.uid.value, representing the `preceding_version_uid` to be deleted. | ||
tags: | ||
- PARTY | ||
parameters: | ||
- $ref: ../parameters/path/uid_based_id_as_version_uid.yaml | ||
responses: | ||
'204': | ||
$ref: ../responses/204_PARTY_deleted.yaml | ||
'400': | ||
$ref: ../responses/400_already_deleted.yaml | ||
'404': | ||
$ref: ../responses/404.yaml | ||
'409': | ||
$ref: ../responses/409_PARTY_with_uid_based_id.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,23 @@ | ||
operationId: party_get | ||
summary: Get PARTY | ||
description: | | ||
Retrieves a version of the PARTY identified by `uid_based_id`. | ||
The `uid_based_id` can take a form of an OBJECT_VERSION_ID identifier taken from VERSION.uid.value (i.e. a `version_uid`), or a form of a HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a `versioned_object_uid`). | ||
The former is used to retrieve a specific known version of the PARTY (e.g. one identified by `8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1`), whereas the later (e.g. an identifier like `8849182c-82ad-4088-a07f-48ead4180515`) is be used to retrieve a version from the version container whenever the _version_tree_id_ is unknown or irrelevant (such as when most recent version is requested). | ||
When the `uid_based_id` has the form of a HIER_OBJECT_ID, if the `version_at_time` is supplied, retrieves the version extant _at specified time_, otherwise retrieves the _latest_ PARTY version. | ||
See [Resource identification](overview.html#tag/Resources/Resource-identification) for more details about the identifiers usage and meaning. | ||
tags: | ||
- PARTY | ||
parameters: | ||
- $ref: ../parameters/path/uid_based_id.yaml | ||
- $ref: ../parameters/query/version_at_time.yaml | ||
responses: | ||
'200': | ||
$ref: ../responses/200_PARTY_retrieved.yaml | ||
'204': | ||
$ref: ../responses/204_because_deleted_at_time.yaml | ||
'404': | ||
$ref: ../responses/404_not_found_or_no_version_at_time.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,35 @@ | ||
operationId: party_update | ||
summary: Update PARTY | ||
description: | | ||
Updates PARTY identified by `uid_based_id`. | ||
The `uid_based_id` can take only a form of an HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a `versioned_object_uid`). | ||
If the request body already contains a PARTY.uid.value, it must match the `uid_based_id` in the URL. | ||
The existing latest `version_uid` of PARTY resource (i.e. the `preceding_version_uid`) must be specified in the `If-Match` header. | ||
tags: | ||
- PARTY | ||
parameters: | ||
- $ref: ../parameters/path/uid_based_id_as_versioned_object_uid.yaml | ||
- $ref: ../parameters/header/If-Match.yaml | ||
- $ref: ../parameters/header/Prefer.yaml | ||
requestBody: | ||
description: | | ||
The new PARTY. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../schemas/demographic/UParty.yaml | ||
required: true | ||
responses: | ||
'200': | ||
$ref: ../responses/200_PARTY_updated.yaml | ||
'400': | ||
$ref: ../responses/400_PARTY.yaml | ||
'404': | ||
$ref: ../responses/404.yaml | ||
'412': | ||
$ref: ../responses/412_PARTY.yaml | ||
'422': | ||
$ref: ../responses/422_PARTY.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 @@ | ||
operationId: versioned_party_get | ||
summary: Get versioned PARTY | ||
description: | | ||
Retrieves a VERSIONED_PARTY identified by `versioned_object_uid`. | ||
tags: | ||
- PARTY | ||
parameters: | ||
- $ref: ../parameters/path/versioned_object_uid_PARTY.yaml | ||
responses: | ||
'200': | ||
$ref: ../responses/200_VERSIONED_PARTY.yaml | ||
'404': | ||
$ref: ../responses/404.yaml |
13 changes: 13 additions & 0 deletions
13
specifications/operations/versioned_party_revision_history.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 @@ | ||
operationId: versioned_party_revision_history | ||
summary: Get versioned PARTY revision history | ||
description: | | ||
Retrieves revision history of the VERSIONED_PARTY identified by `versioned_object_uid`. | ||
tags: | ||
- PARTY | ||
parameters: | ||
- $ref: ../parameters/path/versioned_object_uid_PARTY.yaml | ||
responses: | ||
'200': | ||
$ref: ../responses/200_REVISION_HISTORY.yaml | ||
'404': | ||
$ref: ../responses/404.yaml |
16 changes: 16 additions & 0 deletions
16
specifications/operations/versioned_party_version_get_at_time.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,16 @@ | ||
operationId: versioned_party_version_get_at_time | ||
summary: Get versioned PARTY version at time | ||
description: | | ||
Retrieves a VERSION from the VERSIONED_PARTY identified by `versioned_object_uid`. | ||
If `version_at_time` is supplied, retrieves the VERSION extant _at specified time_, otherwise retrieves the _latest_ VERSION. | ||
tags: | ||
- PARTY | ||
parameters: | ||
- $ref: ../parameters/path/versioned_object_uid_PARTY.yaml | ||
- $ref: ../parameters/query/version_at_time.yaml | ||
responses: | ||
'200': | ||
$ref: ../responses/200_VERSION_of_PARTY_at_time.yaml | ||
'404': | ||
$ref: ../responses/404_not_found_or_no_version_at_time.yaml |
14 changes: 14 additions & 0 deletions
14
specifications/operations/versioned_party_version_get_by_id.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,14 @@ | ||
operationId: versioned_composition_version_get_by_id | ||
summary: Get versioned PARTY version by id | ||
description: | | ||
Retrieves a VERSION identified by `version_uid` of a VERSIONED_PARTY identified by `versioned_object_uid`. | ||
tags: | ||
- PARTY | ||
parameters: | ||
- $ref: ../parameters/path/versioned_object_uid_PARTY.yaml | ||
- $ref: ../parameters/path/version_uid.yaml | ||
responses: | ||
'200': | ||
$ref: ../responses/200_VERSION_of_PARTY_by_id.yaml | ||
'404': | ||
$ref: ../responses/404.yaml |
9 changes: 9 additions & 0 deletions
9
specifications/parameters/path/versioned_object_uid_PARTY.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,9 @@ | ||
name: versioned_object_uid | ||
in: path | ||
description: | | ||
VERSIONED_PARTY identifier taken from VERSIONED_PARTY.uid.value. | ||
required: true | ||
style: simple | ||
schema: | ||
type: string | ||
example: '6cb19121-4307-4648-9da0-d62e4d51f19b' |
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 @@ | ||
description: | | ||
`200 OK` is returned when the requested PARTY is successfully retrieved. | ||
headers: | ||
ETag: | ||
$ref: ../headers/ETag.yaml | ||
Location: | ||
$ref: ../headers/Location_PARTY.yaml | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../schemas/demographic/UParty.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 @@ | ||
description: | | ||
`200 OK` is returned when the UPDATE is successfully updated and the updated resource is returned in the body when `Prefer` header value is `return=representation`. | ||
headers: | ||
ETag: | ||
$ref: ../headers/ETag.yaml | ||
Location: | ||
$ref: ../headers/Location_PARTY.yaml | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../schemas/demographic/UParty.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,6 @@ | ||
description: | | ||
`200 OK` is returned when the requested VERSIONED_PARTY is successfully retrieved. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../schemas/demographic/VersionedParty.yaml |
11 changes: 11 additions & 0 deletions
11
specifications/responses/200_VERSION_of_PARTY_at_time.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 @@ | ||
description: | | ||
`200 OK` is returned when the requested VERSION is successfully retrieved. | ||
headers: | ||
ETag: | ||
$ref: ../headers/ETag_VERSION.yaml | ||
Location: | ||
$ref: ../headers/Location_VERSIONED_PARTY_VERSION.yaml | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../schemas/demographic/UVersionOfParty.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,6 @@ | ||
description: | | ||
`200 OK` is returned when the requested VERSION is successfully retrieved. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../schemas/demographic/UVersionOfParty.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 @@ | ||
description: | | ||
`201 Created` is returned when the PARTY was created. | ||
Content body is only returned when `Prefer` header has `return=representation`, otherwise only headers are returned. | ||
headers: | ||
ETag: | ||
$ref: ../headers/ETag.yaml | ||
Location: | ||
$ref: ../headers/Location_PARTY.yaml | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../schemas/demographic/UParty.yaml |
Oops, something went wrong.