-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dataset, FHIR stores and annotations stores and related resources (…
…#71) * Add Text, make Note extend Text, update date-annotator to take as input one note * The date annotator takes as input Text instead of Notes * Add post and get all datasets * Add get one dataset by id and delete one dataset * Add annotation store * Add endpoints to manage annotations * Shave Annotation and DateAnnotation schemas from DB-related fields * Add note stores and notes * Date annotator now takes one Text object as input * Add StoredAnnotation and StoredDateAnnotation schemas * Add IBM OpenAPI Validator * Fix errors reported by IBM validators * Fix some warnings returned by IBM OpenAPI Validator * Fix operationIds * Fix pagination AllOf * Add missing descriptions * Fix last warnings returned by IBM validator for the data node API * Update before refactoring dataset endpoints * Add endpoints to create and list FHIR stores * Add endpoint to get and delete a FHIR store * Add endpoints to create and list FHIR patients * Add endpoints to get and delete a FHIR patient * Add endpoints to manipulate notes in FHIR store * Restore annotation store endpoints * Major update after introduction of readOnly * Keep only CI/CD for data-node for now * Update annotation schemas * Dataset and store names are no longer readOnly * Array in page now named according to the type of objects * Successful post request now returns 201 * Note path comes ../fhir/Note * Now returning paginated annotation stores * Update annotation schemas and endpoints * Add option to filter annotations to be returned by annotationType * Enable poster to set annotation id; rename PageResponse to ResponsePageMetadata * Text annotation object is now a property of the annotation record * Remove health endpoint from date annotator * Remove commons path health * Fix case sensitive issue * Fix date annotator API * Use Google bundle schema approach for Annotation * Make name of dataset and stores readOnly * The poster no longer specify an annotationId * Fix PageOfAnnotations * Add annotation examples * Replace PageOfAnnotations.items by PageOfAnnotations.annotations
- Loading branch information
1 parent
b6ddafe
commit 1c429ca
Showing
51 changed files
with
3,627 additions
and
329 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"shared": { | ||
"operations": { | ||
"no_operation_id": "error", | ||
"operation_id_case_convention": [ | ||
"warning", | ||
"lower_camel_case" | ||
], | ||
"no_summary": "warning", | ||
"no_array_responses": "error", | ||
"parameter_order": "warning", | ||
"undefined_tag": "warning", | ||
"unused_tag": "warning", | ||
"operation_id_naming_convention": "warning" | ||
}, | ||
"pagination": { | ||
"pagination_style": "error" | ||
}, | ||
"parameters": { | ||
"no_parameter_description": "error", | ||
"param_name_case_convention": [ | ||
"error", | ||
"lower_camel_case" | ||
], | ||
"invalid_type_format_pair": "error", | ||
"content_type_parameter": "error", | ||
"accept_type_parameter": "error", | ||
"authorization_parameter": "warning", | ||
"required_param_has_default": "warning" | ||
}, | ||
"paths": { | ||
"missing_path_parameter": "error", | ||
"duplicate_path_parameter": "error", | ||
"snake_case_only": "off", | ||
"paths_case_convention": [ | ||
"warning", | ||
"lower_camel_case" | ||
] | ||
}, | ||
"responses": { | ||
"inline_response_schema": "error" | ||
}, | ||
"security_definitions": { | ||
"unused_security_schemes": "warning", | ||
"unused_security_scopes": "warning" | ||
}, | ||
"security": { | ||
"invalid_non_empty_security_array": "error" | ||
}, | ||
"schemas": { | ||
"invalid_type_format_pair": "warning", | ||
"snake_case_only": "off", | ||
"no_schema_description": "warning", | ||
"no_property_description": "warning", | ||
"description_mentions_json": "warning", | ||
"array_of_arrays": "warning", | ||
"inconsistent_property_type": "off", | ||
"property_case_convention": [ | ||
"error", | ||
"lower_camel_case" | ||
], | ||
"property_case_collision": "error", | ||
"enum_case_convention": [ | ||
"error", | ||
"lower_snake_case" | ||
], | ||
"undefined_required_properties": "warning" | ||
}, | ||
"walker": { | ||
"no_empty_descriptions": "error", | ||
"has_circular_references": "warning", | ||
"$ref_siblings": "off", | ||
"duplicate_sibling_description": "warning", | ||
"incorrect_ref_pattern": "warning" | ||
} | ||
}, | ||
"swagger2": { | ||
"operations": { | ||
"no_consumes_for_put_or_post": "error", | ||
"get_op_has_consumes": "warning", | ||
"no_produces": "warning" | ||
} | ||
}, | ||
"oas3": { | ||
"operations": { | ||
"no_request_body_content": "error", | ||
"no_request_body_name": "warning" | ||
}, | ||
"parameters": { | ||
"no_in_property": "error", | ||
"invalid_in_property": "error", | ||
"missing_schema_or_content": "error", | ||
"has_schema_and_content": "error" | ||
}, | ||
"responses": { | ||
"no_response_codes": "error", | ||
"no_success_response_codes": "warning", | ||
"no_response_body": "warning", | ||
"ibm_status_code_guidelines": "warning" | ||
}, | ||
"schemas": { | ||
"json_or_param_binary_string": "warning" | ||
} | ||
}, | ||
"spectral": { | ||
"rules": {} | ||
} | ||
} |
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,18 +1,24 @@ | ||
type: object | ||
description: An annotation in a text | ||
allOf: | ||
- $ref: Entity.yaml | ||
- type: object | ||
properties: | ||
noteId: | ||
description: The note ID | ||
type: integer | ||
start: | ||
description: The position of the first character | ||
type: integer | ||
length: | ||
description: The length of the annotation | ||
type: integer | ||
text: | ||
description: The string annotated | ||
type: string | ||
description: An annotation record | ||
properties: | ||
name: | ||
description: Resource name of the annotation record, of the form datasets/{datasetId}/annotationStores/{annotationStoreId}/annotations/{annotationId} | ||
type: string | ||
readOnly: true | ||
annotationSource: | ||
$ref: AnnotationSource.yaml | ||
textDateAnnotations: | ||
description: Date annotations in a text | ||
type: array | ||
items: | ||
$ref: TextDateAnnotation.yaml | ||
textPersonNameAnnotations: | ||
description: Person name annotations in a text | ||
type: array | ||
items: | ||
$ref: TextPersonNameAnnotation.yaml | ||
textPhysicalAddressAnnotations: | ||
description: Physical address annotations in a text | ||
type: array | ||
items: | ||
$ref: TextPhysicalAddressAnnotation.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 @@ | ||
type: object | ||
description: The source of an annotation record | ||
properties: | ||
name: | ||
description: The source of the annotation record | ||
type: string |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
type: object | ||
description: Problem details (tools.ietf.org/html/rfc7807) | ||
properties: | ||
title: | ||
type: string | ||
|
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
type: object | ||
description: A clinical note | ||
allOf: | ||
- $ref: Entity.yaml | ||
- type: object | ||
properties: | ||
text: | ||
description: The content of the note | ||
type: string | ||
example: On 09-03-1999, Ms Chloe Price met with Dr Joe. | ||
type: | ||
description: The note type | ||
type: string | ||
enum: | ||
- pathology | ||
- phone_call | ||
# required: | ||
# - text | ||
properties: | ||
id: | ||
description: The ID of the note | ||
type: string | ||
readOnly: true | ||
text: | ||
description: A text | ||
type: string | ||
example: "This is a text." | ||
noteType: | ||
description: The note type (LOINC concept) | ||
type: string | ||
example: "loinc:LP29684-5" | ||
patientId: | ||
description: The patient ID | ||
type: string |
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,18 @@ | ||
type: object | ||
description: A FHIR Patient | ||
properties: | ||
id: | ||
description: The patient ID | ||
type: string | ||
readOnly: true | ||
identifier: | ||
description: An identifier for this patient | ||
type: string | ||
gender: | ||
description: Gender of the patient | ||
type: string | ||
enum: | ||
- male | ||
- female | ||
- other | ||
- unknown |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
openapi/commons/components/schemas/PhysicalAddressAnnotation.yaml
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
openapi/commons/components/schemas/ResponsePageMetadata.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,21 @@ | ||
type: object | ||
description: A page of results | ||
properties: | ||
offset: | ||
description: Index of the first result that must be returned | ||
type: integer | ||
limit: | ||
description: Maximum number of results returned | ||
type: integer | ||
links: | ||
description: Links to navigate to different pages of results | ||
type: object | ||
properties: | ||
next: | ||
description: Link to the next page of results | ||
type: string | ||
format: uri | ||
required: | ||
- offset | ||
- limit | ||
- links |
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 @@ | ||
type: object | ||
description: An annotation in a text | ||
properties: | ||
start: | ||
description: The position of the first character | ||
type: integer | ||
length: | ||
description: The length of the annotation | ||
type: integer | ||
text: | ||
description: The string annotated | ||
type: string |
9 changes: 7 additions & 2 deletions
9
...ns/components/schemas/DateAnnotation.yaml → ...omponents/schemas/TextDateAnnotation.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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
type: object | ||
description: A date annotation in a text | ||
allOf: | ||
- $ref: Annotation.yaml | ||
- $ref: TextAnnotation.yaml | ||
- type: object | ||
properties: | ||
format: | ||
dateFormat: | ||
description: Date format (ISO 8601) | ||
type: string | ||
example: | ||
start: 42 | ||
length: 10 | ||
text: 10/26/2020 | ||
dateFormat: "MM/DD/YYYY" |
8 changes: 8 additions & 0 deletions
8
openapi/commons/components/schemas/TextPersonNameAnnotation.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 @@ | ||
type: object | ||
description: A person name annotation in a text | ||
allOf: | ||
- $ref: TextAnnotation.yaml | ||
example: | ||
start: 42 | ||
length: 11 | ||
text: Chloe Price |
Oops, something went wrong.