Infermedica API
Empower your healthcare services with intelligent diagnostic insights of Infermedica API
COMMUNITYNO AUTH0 INSTALLS
OpenAPI Specificationv3.0
{
"swagger": "2.0",
"schemes": [
"https"
],
"host": "api.infermedica.com",
"basePath": "/v2",
"info": {
"contact": {
"x-twitter": "Infermedica"
},
"description": "Empower your healthcare services with intelligent diagnostic insights of Infermedica API.",
"title": "Infermedica API",
"version": "v2",
"x-logo": {
"backgroundColor": "#1576D1",
"url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_Infermedica_profile_image.png"
},
"x-origin": [
{
"format": "swagger",
"url": "https://api.infermedica.com/v2/swagger.json",
"version": "2.0"
}
],
"x-providerName": "infermedica.com"
},
"tags": [
{
"name": "info"
},
{
"name": "diagnosis"
},
{
"name": "explain"
},
{
"name": "conditions"
},
{
"name": "symptoms"
},
{
"name": "lab_tests"
},
{
"name": "risk_factors"
},
{
"name": "search"
},
{
"name": "parse"
},
{
"name": "lookup"
},
{
"name": "concepts"
},
{
"name": "rationale"
},
{
"name": "recommend_specialist"
},
{
"name": "red_flags"
},
{
"name": "triage"
},
{
"name": "suggest"
}
],
"paths": {
"/concepts": {
"get": {
"operationId": "getConcepts",
"parameters": [
{
"description": "ids",
"in": "query",
"name": "ids",
"required": false,
"type": "string"
},
{
"description": "types",
"in": "query",
"name": "types",
"required": false,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"headers": {},
"schema": {
"items": {
"$ref": "#/definitions/ConceptItemModel_Public"
},
"type": "array",
"uniqueItems": true
}
}
},
"tags": [
"concepts"
]
}
},
"/concepts/{id}": {
"get": {
"operationId": "getConcept",
"parameters": [
{
"description": "concept id",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"headers": {},
"schema": {
"$ref": "#/definitions/ConceptItemModel_Public"
}
}
},
"tags": [
"concepts"
]
}
},
"/conditions": {
"get": {
"description": "Returns a list of all available conditions.",
"operationId": "getAllConditions",
"parameters": [
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
},
{
"description": "enable 5-level triage values",
"in": "query",
"name": "enable_triage_5",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"items": {
"$ref": "#/definitions/Condition_Public"
},
"type": "array"
}
}
},
"summary": "List all conditions",
"tags": [
"conditions"
]
}
},
"/conditions/{id}": {
"get": {
"description": "Returns details of a single condition specified by id parameter.",
"operationId": "getCondition",
"parameters": [
{
"description": "condition id",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
},
{
"description": "enable 5-level triage values",
"in": "query",
"name": "enable_triage_5",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Condition_Details"
}
},
"400": {
"description": "Invalid id specified"
},
"404": {
"description": "Condition not found"
}
},
"summary": "Get condition by id",
"tags": [
"conditions"
]
}
},
"/diagnosis": {
"post": {
"consumes": [
"application/json"
],
"description": "Suggests possible diagnoses and relevant observations based on provided patient information.",
"operationId": "computeDiagnosis",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DiagnosisRequest"
}
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/DiagnosisResponse_Public"
}
}
},
"summary": "Query diagnostic engine",
"tags": [
"diagnosis"
]
}
},
"/explain": {
"post": {
"consumes": [
"application/json"
],
"description": "Explains which evidence impact probability of selected condition.",
"operationId": "computeExplanation",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ExplanationRequest"
}
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/ExplanationResponse"
}
}
},
"summary": "Query diagnostic engine for explanation",
"tags": [
"explain"
]
}
},
"/info": {
"get": {
"description": "Returns information about data used by diagnostic engine.",
"operationId": "getDatabaseInfo",
"parameters": [
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Info_Public"
}
}
},
"summary": "Get database information",
"tags": [
"info"
]
}
},
"/lab_tests": {
"get": {
"description": "Returns a list of all available lab tests.",
"operationId": "getAllLabTests",
"parameters": [
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"items": {
"$ref": "#/definitions/LabTest_Public"
},
"type": "array"
}
}
},
"summary": "List all lab tests",
"tags": [
"lab_tests"
]
}
},
"/lab_tests/{id}": {
"get": {
"description": "Returns details of a single lab test specified by id parameter.",
"operationId": "getLabTest",
"parameters": [
{
"description": "lab test id",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/LabTest_Details"
}
},
"400": {
"description": "Invalid id specified"
},
"404": {
"description": "Lab test not found"
}
},
"summary": "Get lab test by id",
"tags": [
"lab_tests"
]
}
},
"/lookup": {
"get": {
"description": "Returns a single observation matching given phrase.",
"operationId": "getMatchingObservation",
"parameters": [
{
"description": "phrase to match",
"in": "query",
"name": "phrase",
"required": true,
"type": "string"
},
{
"description": "sex filter",
"enum": [
"male",
"female"
],
"in": "query",
"name": "sex",
"required": false,
"type": "string"
},
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/SearchResult"
}
},
"400": {
"description": "Phrase missing or invalid sex specified"
},
"404": {
"description": "No observation matches given phrase"
}
},
"summary": "Find observation matching given phrase",
"tags": [
"lookup"
]
}
},
"/parse": {
"post": {
"consumes": [
"application/json"
],
"description": "Returns list of mentions of observation found in given text.",
"operationId": "getMentions",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ParseRequest"
}
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/ParseResponse"
}
},
"400": {
"description": "Text too long"
}
},
"summary": "Find mentions of observations in given text",
"tags": [
"parse"
]
}
},
"/rationale": {
"post": {
"consumes": [
"application/json"
],
"description": "Returns rationale behind the question asked by the system.",
"operationId": "computeRationale",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RationaleRequest"
}
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/RationaleResponse"
}
}
},
"summary": "Query diagnostic engine for question rationale",
"tags": [
"rationale"
]
}
},
"/red_flags": {
"post": {
"consumes": [
"application/json"
],
"description": "Suggests possible red flag symptoms based on provided patient information.",
"operationId": "computeRedFlags",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DiagnosisRequest"
}
},
{
"default": 8,
"description": "maximum number of results",
"format": "int32",
"in": "query",
"name": "max_results",
"required": false,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"items": {
"$ref": "#/definitions/SuggestResult"
},
"type": "array"
}
}
},
"summary": "Query the diagnostic engine for possible red flag symptoms",
"tags": [
"red_flags"
]
}
},
"/risk_factors": {
"get": {
"description": "Returns a list of all available risk factors.",
"operationId": "getAllRiskFactors",
"parameters": [
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
},
{
"description": "enable 5-level triage values",
"in": "query",
"name": "enable_triage_5",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"items": {
"$ref": "#/definitions/RiskFactor_Public"
},
"type": "array"
}
}
},
"summary": "List all risk factors",
"tags": [
"risk_factors"
]
}
},
"/risk_factors/{id}": {
"get": {
"description": "Returns details of a single risk factor specified by id parameter.",
"operationId": "getRiskFactor",
"parameters": [
{
"description": "risk factor id",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
},
{
"description": "enable 5-level triage values",
"in": "query",
"name": "enable_triage_5",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/RiskFactor_Details"
}
},
"400": {
"description": "Invalid id specified"
},
"404": {
"description": "Risk factor not found"
}
},
"summary": "Get risk factor by id",
"tags": [
"risk_factors"
]
}
},
"/search": {
"get": {
"description": "Returns list of observations matching the given phrase.",
"operationId": "getMatchingObservations",
"parameters": [
{
"description": "phrase to match",
"in": "query",
"name": "phrase",
"required": true,
"type": "string"
},
{
"description": "sex filter",
"enum": [
"male",
"female"
],
"in": "query",
"name": "sex",
"required": false,
"type": "string"
},
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
},
{
"default": 8,
"description": "maximum number of results",
"format": "int32",
"in": "query",
"name": "max_results",
"required": false,
"type": "integer"
},
{
"collectionFormat": "multi",
"description": "type of results",
"in": "query",
"items": {
"enum": [
"symptom",
"risk_factor",
"lab_test"
],
"type": "string"
},
"name": "type",
"required": false,
"type": "array"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"items": {
"$ref": "#/definitions/SearchResult"
},
"type": "array"
}
},
"400": {
"description": "Phrase missing or invalid sex specified"
}
},
"summary": "Find observations matching given phrase",
"tags": [
"search"
]
}
},
"/suggest": {
"post": {
"consumes": [
"application/json"
],
"description": "Suggests possible symptoms based on provided patient information.",
"operationId": "getSuggestions",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SuggestRequest"
}
},
{
"default": 8,
"description": "maximum number of results",
"format": "int32",
"in": "query",
"name": "max_results",
"required": false,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"items": {
"$ref": "#/definitions/SuggestResult"
},
"type": "array"
}
}
},
"summary": "Query diagnostic engine for related symptoms",
"tags": [
"suggest"
]
}
},
"/symptoms": {
"get": {
"description": "Returns a list of all available symptoms.",
"operationId": "getAllSymptoms",
"parameters": [
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
},
{
"description": "enable 5-level triage values",
"in": "query",
"name": "enable_triage_5",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"items": {
"$ref": "#/definitions/Symptom_Public"
},
"type": "array"
}
}
},
"summary": "List all symptoms",
"tags": [
"symptoms"
]
}
},
"/symptoms/{id}": {
"get": {
"description": "Returns details of a single symptom specified by id parameter.",
"operationId": "getSymptom",
"parameters": [
{
"description": "symptoms id",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "age value",
"format": "int32",
"in": "query",
"name": "age.value",
"required": false,
"type": "integer",
"x-example": 18
},
{
"default": "year",
"description": "unit in which age value was provided",
"enum": [
"year",
"month"
],
"in": "query",
"name": "age.unit",
"required": false,
"type": "string",
"x-example": "year"
},
{
"description": "enable 5-level triage values",
"in": "query",
"name": "enable_triage_5",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Symptom_Details"
}
},
"400": {
"description": "Invalid id specified"
},
"404": {
"description": "symptom not found"
}
},
"summary": "Get symptoms by id",
"tags": [
"symptoms"
]
}
},
"/triage": {
"post": {
"consumes": [
"application/json"
],
"description": "Estimates triage level based on provided patient information.",
"operationId": "computeTriage",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DiagnosisRequest"
}
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/TriageResponse"
}
}
},
"summary": "Query diagnostic engine for triage level",
"tags": [
"triage"
]
}
}
},
"definitions": {
"Choice_Public": {
"properties": {
"id": {
"enum": [
"present",
"absent",
"unknown"
],
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"id",
"label"
],
"type": "object"
},
"ConceptItemModel_Public": {
"properties": {
"common_name": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"enum": [
"condition",
"symptom",
"risk_factor",
"lab_test"
],
"type": "string"
}
},
"type": "object"
},
"ConditionProbability_Public": {
"properties": {
"common_name": {
"description": "condition common name",
"type": "string"
},
"id": {
"description": "condition id",
"type": "string"
},
"name": {
"description": "condition name",
"type": "string"
},
"probability": {
"format": "double",
"type": "number"
}
},
"required": [
"id",
"name",
"probability"
],
"type": "object"
},
"Condition_Details": {
"properties": {
"acuteness": {
"enum": [
"chronic",
"chronic_with_exacerbations",
"acute_potentially_chronic",
"acute"
],
"type": "string"
},
"categories": {
"items": {
"type": "string"
},
"type": "array"
},
"common_name": {
"type": "string"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"description": "additional content, like custom properties or images",
"type": "object"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"prevalence": {
"enum": [
"very_rare",
"rare",
"moderate",
"common"
],
"type": "string"
},
"severity": {
"enum": [
"mild",
"moderate",
"severe"
],
"type": "string"
},
"sex_filter": {
"enum": [
"both",
"male",
"female"
],
"type": "string"
},
"triage_level": {
"enum": [
"emergency_ambulance",
"emergency",
"consultation_24",
"consultation",
"self_care"
],
"type": "string"
}
},
"required": [
"categories",
"id",
"name",
"sex_filter"
],
"type": "object"
},
"Condition_Public": {
"properties": {
"acuteness": {
"enum": [
"chronic",
"chronic_with_exacerbations",
"acute_potentially_chronic",
"acute"
],
"type": "string"
},
"categories": {
"items": {
"type": "string"
},
"type": "array"
},
"common_name": {
"type": "string"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"description": "additional content, like custom properties or images",
"type": "object"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"prevalence": {
"enum": [
"very_rare",
"rare",
"moderate",
"common"
],
"type": "string"
},
"severity": {
"enum": [
"mild",
"moderate",
"severe"
],
"type": "string"
},
"sex_filter": {
"enum": [
"both",
"male",
"female"
],
"type": "string"
},
"triage_level": {
"enum": [
"emergency_ambulance",
"emergency",
"consultation_24",
"consultation",
"self_care"
],
"type": "string"
}
},
"required": [
"categories",
"id",
"name",
"sex_filter"
],
"type": "object"
},
"DiagnosisRequest": {
"properties": {
"age": {
"example": "18",
"type": "object"
},
"evaluated_at": {
"description": "time when diagnosis was evaluated in ISO 8601 format",
"example": "2020-06-02",
"readOnly": true,
"type": "string"
},
"evidence": {
"items": {
"$ref": "#/definitions/Evidence"
},
"type": "array"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"type": "object"
},
"sex": {
"enum": [
"male",
"female"
],
"type": "string"
}
},
"required": [
"age",
"sex"
],
"type": "object"
},
"DiagnosisResponse_Public": {
"properties": {
"conditions": {
"items": {
"$ref": "#/definitions/ConditionProbability_Public"
},
"type": "array"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"type": "object"
},
"question": {
"$ref": "#/definitions/Question_Public"
},
"should_stop": {
"type": "boolean"
}
},
"type": "object"
},
"Evidence": {
"properties": {
"choice_id": {
"enum": [
"present",
"absent",
"unknown"
],
"type": "string"
},
"id": {
"description": "id of observation or condition",
"example": "s_1",
"type": "string"
},
"observed_at": {
"description": "time when evidence was observed in ISO 8601 format",
"example": "2020-06-02",
"type": "string"
},
"source": {
"description": "Flag describing evidence origin",
"enum": [
"initial",
"suggest",
"predefined",
"red_flags"
],
"type": "string"
}
},
"required": [
"choice_id",
"id"
],
"type": "object"
},
"ExplanationEvidence": {
"properties": {
"common_name": {
"description": "observation common name",
"type": "string"
},
"id": {
"description": "observation id",
"type": "string"
},
"name": {
"description": "observation name",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"ExplanationRequest": {
"properties": {
"age": {
"example": "18",
"type": "object"
},
"evaluated_at": {
"description": "time when diagnosis was evaluated in ISO 8601 format",
"example": "2020-06-02",
"readOnly": true,
"type": "string"
},
"evidence": {
"items": {
"$ref": "#/definitions/Evidence"
},
"type": "array"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"type": "object"
},
"sex": {
"enum": [
"male",
"female"
],
"type": "string"
},
"target": {
"description": "target condition id",
"example": "c_1",
"type": "string"
}
},
"required": [
"age",
"sex",
"target"
],
"type": "object"
},
"ExplanationResponse": {
"properties": {
"conflicting_evidence": {
"description": "conflicting evidence",
"items": {
"$ref": "#/definitions/ExplanationEvidence"
},
"type": "array"
},
"supporting_evidence": {
"description": "supporting evidence",
"items": {
"$ref": "#/definitions/ExplanationEvidence"
},
"type": "array"
},
"unconfirmed_evidence": {
"description": "unconfirmed evidence",
"items": {
"$ref": "#/definitions/ExplanationEvidence"
},
"type": "array"
}
},
"required": [
"conflicting_evidence",
"supporting_evidence",
"unconfirmed_evidence"
],
"type": "object"
},
"Info_Public": {
"properties": {
"api_version": {
"description": "version of api release",
"type": "string"
},
"conditions_count": {
"format": "int32",
"type": "integer"
},
"lab_tests_count": {
"format": "int32",
"type": "integer"
},
"risk_factors_count": {
"format": "int32",
"type": "integer"
},
"symptoms_count": {
"format": "int32",
"type": "integer"
},
"updated_at": {
"description": "time of last model update in ISO 8601 format",
"type": "string"
}
},
"required": [
"conditions_count",
"lab_tests_count",
"risk_factors_count",
"symptoms_count",
"updated_at"
],
"type": "object"
},
"LabTestResult_Details": {
"properties": {
"id": {
"type": "string"
},
"type": {
"enum": [
"very_low",
"low",
"normal",
"high",
"very_high",
"absent",
"present"
],
"type": "string"
}
},
"required": [
"id",
"type"
],
"type": "object"
},
"LabTestResult_Public": {
"properties": {
"id": {
"type": "string"
},
"type": {
"enum": [
"very_low",
"low",
"normal",
"high",
"very_high",
"absent",
"present"
],
"type": "string"
}
},
"required": [
"id",
"type"
],
"type": "object"
},
"LabTest_Details": {
"properties": {
"category": {
"type": "string"
},
"common_name": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"results": {
"items": {
"$ref": "#/definitions/LabTestResult_Details"
},
"type": "array"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"LabTest_Public": {
"properties": {
"category": {
"type": "string"
},
"common_name": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"results": {
"items": {
"$ref": "#/definitions/LabTestResult_Public"
},
"type": "array"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"ObservationMention": {
"properties": {
"choice_id": {
"enum": [
"present",
"absent",
"unknown"
],
"type": "string"
},
"common_name": {
"description": "observation common name",
"type": "string"
},
"head_position": {
"format": "int32",
"type": "integer"
},
"id": {
"description": "observation id",
"type": "string"
},
"name": {
"description": "observation name",
"type": "string"
},
"orth": {
"type": "string"
},
"positions": {
"items": {
"format": "int32",
"type": "integer"
},
"type": "array"
}
},
"required": [
"choice_id",
"head_position",
"id",
"name",
"orth",
"positions"
],
"type": "object"
},
"ParseRequest": {
"properties": {
"concept_types": {
"description": "list of concept types that should be captured",
"items": {
"enum": [
"symptom",
"risk_factor"
],
"type": "string"
},
"type": "array"
},
"context": {
"description": "ordered list of ids of present symptoms that were already captured and can be used as context",
"items": {
"type": "string"
},
"type": "array"
},
"correct_spelling": {
"description": "correct spelling of input text before proper analysis",
"type": "boolean"
},
"include_tokens": {
"description": "include tokenization details in output",
"type": "boolean"
},
"text": {
"description": "user text to process",
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
"ParseResponse": {
"properties": {
"mentions": {
"description": "list of recognized symptom or risk factor mentions",
"items": {
"$ref": "#/definitions/ObservationMention"
},
"type": "array"
},
"obvious": {
"description": "indicates that entire input text has been parsed successfully and unambiguously",
"type": "boolean"
},
"tokens": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"mentions",
"obvious"
],
"type": "object"
},
"QuestionItem_Public": {
"properties": {
"choices": {
"description": "list of available answer choices",
"items": {
"$ref": "#/definitions/Choice_Public"
},
"type": "array"
},
"id": {
"description": "observation id",
"type": "string"
},
"name": {
"description": "name or alias of observation",
"type": "string"
}
},
"required": [
"choices",
"id",
"name"
],
"type": "object"
},
"Question_Public": {
"properties": {
"extras": {
"additionalProperties": {
"type": "object"
},
"description": "additional content, like images or HTML",
"type": "object"
},
"items": {
"description": "one or more observations to evaluate",
"items": {
"$ref": "#/definitions/QuestionItem_Public"
},
"type": "array"
},
"text": {
"description": "question text",
"type": "string"
},
"type": {
"enum": [
"single",
"group_single",
"group_multiple"
],
"type": "string"
}
},
"required": [
"items",
"text"
],
"type": "object"
},
"RationaleParam": {
"properties": {
"common_name": {
"description": "observation or condition common name",
"type": "string"
},
"id": {
"description": "observation or condition id",
"type": "string"
},
"name": {
"description": "observation or condition name",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"RationaleRequest": {
"properties": {
"age": {
"example": "18",
"type": "object"
},
"evaluated_at": {
"description": "time when diagnosis was evaluated in ISO 8601 format",
"example": "2020-06-02",
"readOnly": true,
"type": "string"
},
"evidence": {
"items": {
"$ref": "#/definitions/Evidence"
},
"type": "array"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"type": "object"
},
"sex": {
"enum": [
"male",
"female"
],
"type": "string"
}
},
"required": [
"age",
"sex"
],
"type": "object"
},
"RationaleResponse": {
"properties": {
"condition_params": {
"description": "condition params",
"items": {
"$ref": "#/definitions/RationaleParam"
},
"type": "array"
},
"observation_params": {
"description": "observation params",
"items": {
"$ref": "#/definitions/RationaleParam"
},
"type": "array"
},
"type": {
"description": "type",
"enum": [
"r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"RiskFactor_Details": {
"properties": {
"category": {
"type": "string"
},
"common_name": {
"type": "string"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"description": "additional content, like custom properties or images",
"type": "object"
},
"id": {
"type": "string"
},
"image_source": {
"type": "string"
},
"image_url": {
"type": "string"
},
"name": {
"type": "string"
},
"question": {
"description": "only available in object details, not in listing",
"type": "string"
},
"sex_filter": {
"enum": [
"both",
"male",
"female"
],
"type": "string"
}
},
"required": [
"id",
"name",
"question",
"sex_filter"
],
"type": "object"
},
"RiskFactor_Public": {
"properties": {
"category": {
"type": "string"
},
"common_name": {
"type": "string"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"description": "additional content, like custom properties or images",
"type": "object"
},
"id": {
"type": "string"
},
"image_source": {
"type": "string"
},
"image_url": {
"type": "string"
},
"name": {
"type": "string"
},
"sex_filter": {
"enum": [
"both",
"male",
"female"
],
"type": "string"
}
},
"required": [
"id",
"name",
"sex_filter"
],
"type": "object"
},
"SearchResult": {
"properties": {
"id": {
"type": "string"
},
"label": {
"description": "matched phrase, name or its synonym",
"type": "string"
}
},
"required": [
"id",
"label"
],
"type": "object"
},
"SeriousObservation": {
"properties": {
"common_name": {
"description": "observation common name",
"type": "string"
},
"id": {
"description": "observation id",
"type": "string"
},
"is_emergency": {
"type": "boolean"
},
"name": {
"description": "observation name",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"SuggestRequest": {
"properties": {
"age": {
"example": "18",
"type": "object"
},
"evaluated_at": {
"description": "time when diagnosis was evaluated in ISO 8601 format",
"example": "2020-06-02",
"readOnly": true,
"type": "string"
},
"evidence": {
"items": {
"$ref": "#/definitions/Evidence"
},
"type": "array"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"type": "object"
},
"sex": {
"enum": [
"male",
"female"
],
"type": "string"
}
},
"type": "object"
},
"SuggestResult": {
"properties": {
"common_name": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"Symptom_Details": {
"properties": {
"category": {
"type": "string"
},
"children": {
"description": "list of child symptoms",
"type": "object"
},
"common_name": {
"type": "string"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"description": "additional content, like custom properties or images",
"type": "object"
},
"id": {
"type": "string"
},
"image_source": {
"type": "string"
},
"image_url": {
"type": "string"
},
"name": {
"type": "string"
},
"parent_id": {
"description": "id of parent symptom",
"type": "string"
},
"parent_relation": {
"description": "type of relation with parent symptom",
"enum": [
"base",
"duration",
"severity",
"character",
"exacerbating_factor",
"diminishing_factor",
"location",
"radiation"
],
"type": "string"
},
"question": {
"description": "only available in object details, not in listing",
"type": "string"
},
"sex_filter": {
"enum": [
"both",
"male",
"female"
],
"type": "string"
}
},
"required": [
"id",
"name",
"question",
"sex_filter"
],
"type": "object"
},
"Symptom_Public": {
"properties": {
"category": {
"type": "string"
},
"children": {
"description": "list of child symptoms",
"type": "object"
},
"common_name": {
"type": "string"
},
"extras": {
"additionalProperties": {
"type": "object"
},
"description": "additional content, like custom properties or images",
"type": "object"
},
"id": {
"type": "string"
},
"image_source": {
"type": "string"
},
"image_url": {
"type": "string"
},
"name": {
"type": "string"
},
"parent_id": {
"description": "id of parent symptom",
"type": "string"
},
"parent_relation": {
"description": "type of relation with parent symptom",
"enum": [
"base",
"duration",
"severity",
"character",
"exacerbating_factor",
"diminishing_factor",
"location",
"radiation"
],
"type": "string"
},
"sex_filter": {
"enum": [
"both",
"male",
"female"
],
"type": "string"
}
},
"required": [
"id",
"name",
"sex_filter"
],
"type": "object"
},
"TriageResponse": {
"properties": {
"root_cause": {
"enum": [
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
"r8",
"r9",
"r10",
"r11",
"r12"
],
"type": "string"
},
"serious": {
"items": {
"$ref": "#/definitions/SeriousObservation"
},
"type": "array",
"uniqueItems": true
},
"teleconsultation_applicable": {
"type": "boolean"
},
"triage_level": {
"enum": [
"emergency_ambulance",
"emergency",
"consultation_24",
"consultation",
"self_care"
],
"type": "string"
}
},
"type": "object"
}
}
}