Description
AI4DM is an AI predictive modelling service that, by assessing the condition of older adults suffering from diabetes, and under a time sensitive intervention and operational plan, will detect risks from short (hypoglycaemias).
AI4DM is an AI predictive modelling service that, by assessing the condition of older adults suffering from diabetes, and under a time sensitive intervention and operational plan, will detect risks from short (hypoglycaemias).
You are not logged in
{
"openapi": "3.0.0",
"info": {
"title": "Gatekeeper DM4All Predictive API",
"description": "The AI4DM’s prediction service is the core service responsible for a prediction of the likelihood of a hypoglicemic episode in a given patient with a short to medium-long gap of time. It is based entirely in a JSON API over HTTP (REST). nnSecurity n• For secure and reliable communication between clients and the service, all HTTP requests are to be made over TLS (HTTPS). n• All exposed services are JSON format over REST. nnAuthorization nAuthentication is the mechanism of associating from which incoming request with a set of identifying credentials, such as user the request came from, or the token that it was signed with. nnThe only authentication schema allowed is a Bearer Authentication schema This authentication scheme uses a simple token-based HTTP Authentication scheme. nnFor clients to authenticate, the token key should be included in the Authorization HTTP header. The key should be prefixed by the string literal "Token", with whitespace separating the two strings. For example: nnAuthorization: Bearer 123abc n n nUnauthenticated responses that are denied permission will result in an HTTPn401. Unauthorized response with an appropriate WWW-Authenticate header. n n n",
"contact": {
"email": "alexandar.anguelov@promptlyhealth.com"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "0.0.1"
},
"servers": [
{
"url": "https://kc8cgsc0m0.execute-api.eu-central-1.amazonaws.com/Prod/",
"description": "Staging Environment"
},
{
"url": "https://virtserver.swaggerhub.com/anguelov/test/1.0.0",
"description": "SwaggerHub API Auto Mocking"
}
],
"tags": [
{
"name": "prediction data",
"description": "Prediction data root resource path"
},
{
"name": "patients",
"description": "Patients root resource path"
}
],
"paths": {
"/patients/{id}/predict": {
"get": {
"tags": [
"patients"
],
"summary": "Predicts hypoglicemic episode",
"operationId": "calculatePrediction",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of patient",
"required": true,
"style": "simple",
"explode": false,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PredictionData"
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
}
}
}
},
"401": {
"description": "Missing Authentication",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MissingAuthentication"
}
}
}
},
"404": {
"description": "not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
}
}
}
}
},
"security": [
{
"api_key": []
}
]
}
},
"/prediction-data": {
"post": {
"tags": [
"prediction data"
],
"summary": "Creates a new prediction data document",
"operationId": "addPredictionData",
"requestBody": {
"$ref": "#/components/requestBodies/PredictionData"
},
"responses": {
"201": {
"description": "Created successfully"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
}
}
}
},
"401": {
"description": "Missing Authentication",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MissingAuthentication"
}
}
}
},
"404": {
"description": "not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
}
}
}
}
},
"security": [
{
"api_key": []
}
]
},
"patch": {
"tags": [
"prediction data"
],
"summary": "updates prediction data for a given patient",
"description": "updates prediction data. Can send any key with values to update from PredictionData schema. if a key is the same, the value will be updated. if no key is provided, original prediction data will not be updated for that key",
"operationId": "updatePredictionData",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/predictiondata_body"
}
}
}
},
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PredictionResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
}
}
}
},
"401": {
"description": "Missing Authentication",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MissingAuthentication"
}
}
}
},
"404": {
"description": "not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
}
}
}
}
},
"security": [
{
"api_key": []
}
]
}
},
"/prediction-data/{id}": {
"get": {
"tags": [
"prediction data"
],
"summary": "Fetches a previously created prediction data",
"operationId": "fetchPatient",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of patient",
"required": true,
"style": "simple",
"explode": false,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PredictionData"
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
}
}
}
},
"401": {
"description": "Missing Authentication",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MissingAuthentication"
}
}
}
},
"404": {
"description": "not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
}
}
}
}
},
"security": [
{
"api_key": []
}
]
}
}
},
"components": {
"schemas": {
"PredictionData": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "unique patient prediction data identifier",
"format": "uuid"
},
"patient_id": {
"type": "string",
"description": "unique patient identifier"
},
"cgm": {
"$ref": "#/components/schemas/PredictionData_cgm"
}
}
},
"PredictionResponse": {
"type": "object",
"properties": {
"description": {
"type": "string"
}
}
},
"BadRequest": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Invalid sex value for prediction data"
}
}
},
"MissingAuthentication": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Authentication credentials not provided"
}
}
},
"NotFound": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Not found"
}
}
},
"predictiondata_cgm": {
"type": "object",
"properties": {
"2021-03-11T12:13:59.670Z": {
"type": "integer",
"description": "as has a new datetime, this key will be created in original prediction-data schema",
"example": 142
},
"2021-03-11T11:44:55.170Z": {
"type": "integer",
"description": "as this is a existent datetime in the already created prediction-data, this value will be updated",
"example": 155
}
}
},
"predictiondata_body": {
"type": "object",
"properties": {
"cgm": {
"$ref": "#/components/schemas/predictiondata_cgm"
}
}
},
"PredictionData_weight": {
"type": "object",
"properties": {
"2021-03-11": {
"type": "integer",
"example": 82
}
}
},
"PredictionData_cgm": {
"type": "object",
"properties": {
"2021-03-11T12:13:27.670Z": {
"type": "integer",
"example": 140
},
"2021-03-11T11:44:55.170Z": {
"type": "integer",
"description": "date-time key followed by the glucose value",
"example": 123
}
}
},
"PredictionData_carbohydrates_intake": {
"type": "object",
"properties": {
"2021-03-11T09:00:00.670Z": {
"type": "integer",
"example": 30
},
"2021-03-11T11:13:25.670Z": {
"type": "integer",
"description": "date-time key followed by the carbohydrates intake value in grams",
"example": 50
}
}
},
"PredictionData_steps": {
"type": "object",
"properties": {
"2021-03-11": {
"type": "integer",
"description": "date key followed by the daily steps count",
"example": 5660
},
"2021-03-10": {
"type": "integer",
"example": 7854
}
}
},
"PredictionData_heart_rate": {
"type": "object",
"properties": {
"2021-03-11T12:13:27.670Z": {
"type": "integer",
"example": 65
},
"2021-03-11T12:14:27.670Z": {
"type": "integer",
"example": 66
}
}
},
"PredictionData_systolic_blood_pressure": {
"type": "object",
"properties": {
"2021-03-11T12:13:27.670Z": {
"type": "integer",
"example": 123
},
"2021-03-12T12:14:27.670Z": {
"type": "integer",
"example": 145
}
}
},
"PredictionData_diastolic_blood_pressure": {
"type": "object",
"properties": {
"2021-03-11T12:13:27.670Z": {
"type": "integer",
"example": 65
},
"2021-03-12T12:14:27.670Z": {
"type": "integer",
"example": 82
}
}
},
"PredictionData_insulin_dose_20210311T195340.670Z": {
"type": "object",
"properties": {
"t_begin": {
"type": "string",
"example": "2021-03-11T19:53:40.670Z"
},
"t_end": {
"type": "string",
"example": "2021-03-11T19:53:40.670Z"
}
}
},
"PredictionData_insulin_dose": {
"type": "object",
"properties": {
"2021-03-11T12:00:34.670Z": {
"type": "string",
"example": "normal"
},
"2021-03-11T19:53:40.670Z": {
"$ref": "#/components/schemas/PredictionData_insulin_dose_20210311T195340.670Z"
}
}
},
"PredictionData_stress": {
"type": "object",
"properties": {
"2021-03-11": {
"type": "string",
"example": "balanced"
}
}
}
},
"requestBodies": {
"PredictionData": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PredictionData"
}
}
},
"required": true
}
},
"securitySchemes": {
"api_key": {
"type": "apiKey",
"name": "api_key",
"in": "header"
}
}
}
} Got a question? Ask The GK Virtual Agent
Reviews
There are no reviews yet.