NLP Sandbox Data Node API (1.2.0)

Download OpenAPI specification:Download

NLP Sandbox Team: team@nlpsandbox.io URL: https://nlpsandbox.io License: Apache 2.0

Overview

The NLP Sandbox Data Node is a repository of data used to benchmark NLP Tools like the NLP Sandbox Date Annotator and Person Name Annotator.

The resources that can be stored in this Data Node and the operations supported are listed below:

  • Create and manage datasets - Create and manage FHIR stores
    • Store and retrieve FHIR patient profiles
    • Store and retrieve clinical notes
  • Create and manage annotation stores
    • Store and retrieve text annotations

Annotation

Operations about annotations

Create an annotation

Create an annotation

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

annotationStoreId
required
string (AnnotationStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-annotation-store

The ID of the annotation store

query Parameters
annotationId
required
string (AnnotationId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: annotationId=awesome-annotation

The ID of the annotation that is being created

Request Body schema: application/json
required
object (AnnotationSource)

The source of an annotation record

Array of objects (TextDateAnnotation)

Date annotations in a text

Array of objects (TextPersonNameAnnotation)

Person name annotations in a text

Array of objects (TextLocationAnnotation)

Location annotations in a text

Array of objects (TextIdAnnotation)

ID annotations in a text

Array of objects (TextContactAnnotation)

Contact annotations in a text

Array of objects (TextCovidSymptomAnnotation)

COVID symptom annotations in a text

Responses

Request samples

Content type
application/json
{
  • "annotationSource": {
    },
  • "textDateAnnotations": [
    ],
  • "textPersonNameAnnotations": [
    ],
  • "textLocationAnnotations": [
    ],
  • "textIdAnnotations": [
    ],
  • "textContactAnnotations": [
    ],
  • "textCovidSymptomAnnotations": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "datasets/awesome-dataset/annotationStores/awesome-annotation-store/annotations/awesome-annotation"
}

List the annotations in an annotation store

Returns the annotations in an annotation store

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

annotationStoreId
required
string (AnnotationStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-annotation-store

The ID of the annotation store

query Parameters
limit
integer (PageLimit) [ 10 .. 100 ]
Default: 10

Maximum number of results returned

offset
integer (PageOffset) >= 0
Default: 0

Index of the first result that must be returned

Responses

Response samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 10,
  • "links": {},
  • "totalResults": 0,
  • "annotations": [
    ]
}

Get an annotation

Returns the annotation specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

annotationStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the annotation store

annotationId
required
string (AnnotationId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-annotation

The ID of the annotation

Responses

Response samples

Content type
application/json
{
  • "name": "datasets/awesome-dataset/annotationStores/awesome-annotation-store/annotations/awesome-annotation",
  • "annotationSource": {
    },
  • "textDateAnnotations": [
    ],
  • "textPersonNameAnnotations": [
    ],
  • "textLocationAnnotations": [
    ],
  • "textIdAnnotations": [
    ],
  • "textContactAnnotations": [
    ],
  • "textCovidSymptomAnnotations": [
    ]
}

Delete an annotation

Deletes the annotation specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

annotationStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the annotation store

annotationId
required
string (AnnotationId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-annotation

The ID of the annotation

Responses

Response samples

Content type
application/json
{ }

AnnotationStore

Operations about annotation stores

Create an annotation store

Create an annotation store with the ID specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

query Parameters
annotationStoreId
required
string (AnnotationStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: annotationStoreId=awesome-annotation-store

The ID of the annotation store that is being created.

Request Body schema: application/json
object (AnnotationStoreCreateRequest)

An empty object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "name": "datasets/awesome-dataset/annotationStores/awesome-annotation-store"
}

List the annotation stores in a dataset

Returns the annotation stores

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

query Parameters
limit
integer (PageLimit) [ 10 .. 100 ]
Default: 10

Maximum number of results returned

offset
integer (PageOffset) >= 0
Default: 0

Index of the first result that must be returned

Responses

Response samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 10,
  • "links": {},
  • "totalResults": 0,
  • "annotationStores": [
    ]
}

Get an annotation store

Returns the annotation store specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

annotationStoreId
required
string (AnnotationStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-annotation-store

The ID of the annotation store

Responses

Response samples

Content type
application/json
{
  • "name": "datasets/awesome-dataset/annotationStores/awesome-annotation-store"
}

Delete an annotation store

Deletes the annotation store specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

annotationStoreId
required
string (AnnotationStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-annotation-store

The ID of the annotation store

Responses

Response samples

Content type
application/json
{ }

Dataset

Operations about datasets

Create a dataset

Create a dataset with the name specified

query Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: datasetId=awesome-dataset

The ID of the dataset that is being created

Request Body schema: application/json
object (DatasetCreateRequest)

An empty object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "name": "datasets/awesome-dataset"
}

Get all datasets

Returns the datasets

query Parameters
limit
integer (PageLimit) [ 10 .. 100 ]
Default: 10

Maximum number of results returned

offset
integer (PageOffset) >= 0
Default: 0

Index of the first result that must be returned

Responses

Response samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 10,
  • "links": {},
  • "totalResults": 0,
  • "datasets": [
    ]
}

Get a dataset by ID

Returns the dataset for a given ID

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

Responses

Response samples

Content type
application/json
{
  • "name": "datasets/awesome-dataset"
}

Delete a dataset by ID

Deletes the dataset for a given ID

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

Responses

Response samples

Content type
application/json
{ }

FhirStore

Operations about FHIR stores

Create a FHIR store

Create a FHIR store with the ID specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

query Parameters
fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: fhirStoreId=awesome-fhir-store

The ID of the FHIR store that is being created.

Request Body schema: application/json
object (FhirStoreCreateRequest)

An empty object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "name": "datasets/awesome-dataset/fhirStores/awesome-fhir-store"
}

List the FHIR stores in a dataset

Returns the FHIR stores

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

query Parameters
limit
integer (PageLimit) [ 10 .. 100 ]
Default: 10

Maximum number of results returned

offset
integer (PageOffset) >= 0
Default: 0

Index of the first result that must be returned

Responses

Response samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 10,
  • "links": {},
  • "totalResults": 0,
  • "fhirStores": [
    ]
}

Get a FHIR store

Returns the FHIR store specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the FHIR store

Responses

Response samples

Content type
application/json
{
  • "name": "datasets/awesome-dataset/fhirStores/awesome-fhir-store"
}

Delete a FHIR store

Deletes the FHIR store specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the FHIR store

Responses

Response samples

Content type
application/json
{ }

HealthCheck

Operations about health checks

Get health check information

Get information about the health of the service

Responses

Response samples

Content type
application/json
{
  • "status": "pass"
}

Note

Operations about notes

Create a note

Create a note

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the FHIR store

query Parameters
noteId
required
string (NoteId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: noteId=awesome-note

The ID of the note that is being created

Request Body schema: application/json
text
required
string

The content of the clinical note

type
required
string

The note type (LOINC concept)

patientId
required
string (PatientId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The ID of the FHIR patient

Responses

Request samples

Content type
application/json
{
  • "text": "On 12/26/2020, Ms. Chloe Price met with Dr. Prescott in Seattle.",
  • "type": "loinc:LP29684-5",
  • "patientId": "awesome-patient"
}

Response samples

Content type
application/json
{
  • "name": "datasets/awesome-dataset/fhirStores/awesome-fhir-store/Note/awesome-note"
}

List notes

Returns the notes in a FHIR store

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the FHIR store

query Parameters
limit
integer (PageLimit) [ 10 .. 100 ]
Default: 10

Maximum number of results returned

offset
integer (PageOffset) >= 0
Default: 0

Index of the first result that must be returned

Responses

Response samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 10,
  • "links": {},
  • "totalResults": 0,
  • "notes": [
    ]
}

Get a note

Returns the note specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the FHIR store

noteId
required
string (NoteId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-note

The ID of the note

Responses

Response samples

Content type
application/json
{
  • "identifier": "awesome-note",
  • "text": "On 12/26/2020, Ms. Chloe Price met with Dr. Prescott in Seattle.",
  • "type": "loinc:LP29684-5",
  • "patientId": "awesome-patient"
}

Delete a note

Deletes the note specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the FHIR store

noteId
required
string (NoteId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-note

The ID of the note

Responses

Response samples

Content type
application/json
{ }

Patient

Operations about patients

Create a FHIR patient

Create a FHIR patient

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the FHIR store

query Parameters
patientId
required
string (PatientId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: patientId=awesome-patient

The ID of the patient that is being created

Request Body schema: application/json
gender
string
Enum: "male" "female" "other" "unknown"

Gender of the patient

Responses

Request samples

Content type
application/json
{
  • "gender": "male"
}

Response samples

Content type
application/json
{
  • "name": "datasets/awesome-dataset/fhirStores/awesome-fhir-store/Patient/507f1f77bcf86cd799439011"
}

List the Patients in a FHIR store

Returns the Patients in a FHIR store

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the FHIR store

query Parameters
limit
integer (PageLimit) [ 10 .. 100 ]
Default: 10

Maximum number of results returned

offset
integer (PageOffset) >= 0
Default: 0

Index of the first result that must be returned

Responses

Response samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 10,
  • "links": {},
  • "totalResults": 0,
  • "patients": [
    ]
}

Get a FHIR patient

Returns the FHIR patient specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the FHIR store

patientId
required
string (PatientId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-patient

The ID of the FHIR patient

Responses

Response samples

Content type
application/json
{
  • "identifier": "awesome-patient",
  • "gender": "male"
}

Delete a FHIR patient

Deletes the FHIR patient specified

path Parameters
datasetId
required
string (DatasetId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-dataset

The ID of the dataset

fhirStoreId
required
string (FhirStoreId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-fhir-store

The ID of the FHIR store

patientId
required
string (PatientId) [ 3 .. 60 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example: awesome-patient

The ID of the FHIR patient

Responses

Response samples

Content type
application/json
{ }