{
    "openapi": "3.0.4",
    "info": {
        "title": "Seegnal-Integration",
        "description": "Seegnal-Integration ASP.NET Core Web API, Build (Test)",
        "contact": {
            "name": "Seegnal eHealth ©",
            "url": "https://www.seegnal.com",
            "email": "info@seegnal.com"
        },
        "version": "v4.4.0"
    },
    "paths": {
        "/api/Catalog/UpdateMedsPortfolio": {
            "post": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Update Medications Portfolio",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/MedUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Valid Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MedUpdateResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    },
                    "502": {
                        "description": "Bad Gateway"
                    },
                    "503": {
                        "description": "Service Unavailable"
                    }
                }
            }
        },
        "/api/Therapy/ProcessTherapy": {
            "post": {
                "tags": [
                    "Therapy"
                ],
                "summary": "Process Therapy (Calculate)",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TherapyRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Valid Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TherapyResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    },
                    "502": {
                        "description": "Bad Gateway"
                    },
                    "503": {
                        "description": "Service Unavailable"
                    }
                }
            }
        },
        "/api/Therapy/UpdateEmr": {
            "post": {
                "tags": [
                    "Therapy"
                ],
                "summary": "Updates EMR with a Recommendations (if any) and Bypass (if any)",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateEmrRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Valid Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SessionSummary"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    },
                    "502": {
                        "description": "Bad Gateway"
                    },
                    "503": {
                        "description": "Service Unavailable"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "AlertGroup": {
                "type": "object",
                "properties": {
                    "alertType": {
                        "$ref": "#/components/schemas/AlertType"
                    },
                    "alertSeverity": {
                        "type": "string",
                        "nullable": true
                    },
                    "alertSynopsis": {
                        "type": "string",
                        "nullable": true
                    },
                    "involvedEntities": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/InvolvedEntity"
                        },
                        "nullable": true
                    },
                    "bypassReason": {
                        "type": "string",
                        "nullable": true
                    },
                    "bypassDescription": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "AlertType": {
                "enum": [
                    0,
                    1,
                    2,
                    3
                ],
                "type": "integer",
                "format": "int32"
            },
            "Allergy": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "nullable": true,
                        "example": "41806"
                    },
                    "name": {
                        "type": "string",
                        "nullable": true
                    },
                    "codeScheme": {
                        "$ref": "#/components/schemas/AllergyType"
                    },
                    "severity": {
                        "type": "integer",
                        "format": "int32",
                        "nullable": true,
                        "example": 5
                    },
                    "reaction": {
                        "type": "integer",
                        "format": "int32",
                        "nullable": true,
                        "example": 0
                    }
                },
                "additionalProperties": false
            },
            "AllergyType": {
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    4
                ],
                "type": "integer",
                "format": "int32"
            },
            "AuthJwtAtt": {
                "type": "object",
                "properties": {
                    "therapy_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "session_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "patient_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "user_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "user_role": {
                        "type": "string",
                        "nullable": true
                    },
                    "curr_prsc": {
                        "type": "string",
                        "nullable": true
                    },
                    "init_prsc": {
                        "type": "string",
                        "nullable": true
                    },
                    "session_scope": {
                        "type": "string",
                        "nullable": true
                    },
                    "tenant_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "tenant_name": {
                        "type": "string",
                        "nullable": true
                    },
                    "exit_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "exit_text_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "simple_exit_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "view_switch": {
                        "type": "string",
                        "nullable": true
                    },
                    "view_switch_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "feedback_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "drugs_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "allergy_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "adm_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "dosage_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "labs_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "diagnoses_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "smoking_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "lactation_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "pregnancy_format": {
                        "type": "string",
                        "nullable": true
                    },
                    "genetic_format": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "Diagnosis": {
                "type": "object",
                "properties": {
                    "codeScheme": {
                        "$ref": "#/components/schemas/DiagnosisCodeScheme"
                    },
                    "code": {
                        "type": "string",
                        "nullable": true,
                        "example": "250.0"
                    },
                    "name": {
                        "type": "string",
                        "nullable": true
                    },
                    "time": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    }
                },
                "additionalProperties": false
            },
            "DiagnosisCodeScheme": {
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    11,
                    12
                ],
                "type": "integer",
                "format": "int32"
            },
            "Diet": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "nullable": true,
                        "example": "84"
                    },
                    "codeScheme": {
                        "type": "integer",
                        "format": "int32",
                        "nullable": true,
                        "example": 0
                    }
                },
                "additionalProperties": false
            },
            "DischargeType": {
                "enum": [
                    0,
                    1,
                    2
                ],
                "type": "integer",
                "format": "int32"
            },
            "Dosage": {
                "type": "object",
                "properties": {
                    "doseUnit": {
                        "type": "string",
                        "nullable": true,
                        "example": "28"
                    },
                    "doseAmount": {
                        "type": "number",
                        "format": "double",
                        "nullable": true,
                        "example": 2000
                    },
                    "doseFrequency": {
                        "type": "number",
                        "format": "double",
                        "nullable": true,
                        "example": 20
                    },
                    "frequencyType": {
                        "$ref": "#/components/schemas/DosageFrequencyType"
                    },
                    "doseType": {
                        "$ref": "#/components/schemas/DosageDoseType"
                    },
                    "treatmentDuration": {
                        "type": "number",
                        "format": "double",
                        "nullable": true,
                        "example": 0
                    },
                    "administrationTiming": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "format": "date-time",
                        "nullable": true,
                        "example": [
                            "2019-03-13 13:18:27",
                            "2019-03-14 13:18:27",
                            "2019-03-17 16:18:27",
                            "2019-03-17 20:18:27"
                        ]
                    },
                    "timeOfDay": {
                        "type": "array",
                        "items": {
                            "type": "integer",
                            "format": "int32"
                        },
                        "nullable": true,
                        "example": [
                            1,
                            3,
                            4
                        ]
                    },
                    "onceEveryXPeriod": {
                        "type": "array",
                        "items": {
                            "type": "number",
                            "format": "double"
                        },
                        "nullable": true
                    },
                    "xDaysInPeriod": {
                        "type": "array",
                        "items": {
                            "type": "number",
                            "format": "double"
                        },
                        "nullable": true,
                        "example": [
                            5,
                            4
                        ]
                    },
                    "doseRate": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "doseRateUnit": {
                        "type": "string",
                        "nullable": true
                    },
                    "doseVolume": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "doseVolumeUnit": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "DosageDoseType": {
                "enum": [
                    0,
                    1,
                    2,
                    7
                ],
                "type": "integer",
                "format": "int32"
            },
            "DosageFrequencyType": {
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5
                ],
                "type": "integer",
                "format": "int32"
            },
            "EffectMode": {
                "enum": [
                    0,
                    1,
                    2
                ],
                "type": "integer",
                "format": "int32"
            },
            "EncounterStatus": {
                "enum": [
                    0,
                    1,
                    2
                ],
                "type": "integer",
                "format": "int32"
            },
            "EntityType": {
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9
                ],
                "type": "integer",
                "format": "int32"
            },
            "ExternalDrugCodeType": {
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    4
                ],
                "type": "integer",
                "format": "int32"
            },
            "Feedback": {
                "type": "object",
                "properties": {
                    "tenantId": {
                        "type": "string",
                        "nullable": true
                    },
                    "uiSessionId": {
                        "type": "string",
                        "nullable": true
                    },
                    "text": {
                        "type": "string",
                        "nullable": true
                    },
                    "env": {
                        "type": "string",
                        "nullable": true
                    },
                    "prescriberId": {
                        "type": "string",
                        "nullable": true
                    },
                    "prescriberRole": {
                        "type": "string",
                        "nullable": true
                    },
                    "therapyId": {
                        "type": "string",
                        "nullable": true
                    },
                    "patientId": {
                        "type": "string",
                        "nullable": true
                    },
                    "stackVersion": {
                        "type": "string",
                        "nullable": true
                    },
                    "productVersion": {
                        "type": "string",
                        "nullable": true
                    },
                    "deploymentId": {
                        "type": "string",
                        "nullable": true
                    },
                    "link": {
                        "type": "string",
                        "nullable": true
                    },
                    "internalLink": {
                        "type": "string",
                        "nullable": true
                    },
                    "time": {
                        "type": "string",
                        "format": "date"
                    },
                    "roles": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "att": {
                        "$ref": "#/components/schemas/AuthJwtAtt"
                    }
                },
                "additionalProperties": false
            },
            "Gender": {
                "enum": [
                    0,
                    1,
                    -1
                ],
                "type": "integer",
                "format": "int32"
            },
            "GeneticTest": {
                "type": "object",
                "properties": {
                    "geneticID": {
                        "type": "integer",
                        "format": "int32",
                        "nullable": true,
                        "example": 0
                    },
                    "phenotype": {
                        "type": "string",
                        "nullable": true,
                        "example": ""
                    },
                    "genotype": {
                        "type": "string",
                        "nullable": true,
                        "example": ""
                    },
                    "time": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2017-03-17"
                    }
                },
                "additionalProperties": false
            },
            "HeightUnit": {
                "enum": [
                    0,
                    1,
                    2
                ],
                "type": "integer",
                "format": "int32"
            },
            "IndicatorStatus": {
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    9,
                    -1
                ],
                "type": "integer",
                "format": "int32"
            },
            "InstitutionType": {
                "enum": [
                    0,
                    1,
                    2,
                    3
                ],
                "type": "integer",
                "format": "int32"
            },
            "IntgUpdatePayload": {
                "type": "object",
                "properties": {
                    "tenantId": {
                        "type": "string",
                        "nullable": true
                    },
                    "operation": {
                        "$ref": "#/components/schemas/OperationType"
                    },
                    "patientId": {
                        "type": "string",
                        "nullable": true
                    },
                    "prescriberId": {
                        "type": "string",
                        "nullable": true
                    },
                    "uiSessionId": {
                        "type": "string",
                        "nullable": true
                    },
                    "therapyId": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "InvolvedEntity": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "nullable": true
                    },
                    "type": {
                        "$ref": "#/components/schemas/EntityType"
                    },
                    "medCodeScheme": {
                        "$ref": "#/components/schemas/ExternalDrugCodeType"
                    },
                    "effectMode": {
                        "$ref": "#/components/schemas/EffectMode"
                    }
                },
                "additionalProperties": false
            },
            "LabTest": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "nullable": true,
                        "example": "1975-2"
                    },
                    "codeScheme": {
                        "$ref": "#/components/schemas/LabTestCodeScheme"
                    },
                    "value": {
                        "type": "number",
                        "format": "double",
                        "nullable": true,
                        "example": 2
                    },
                    "unit": {
                        "type": "string",
                        "nullable": true,
                        "example": "µmol/l"
                    },
                    "measurementTime": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    },
                    "valueTime": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    },
                    "measurementSite": {
                        "type": "string",
                        "nullable": true,
                        "example": ""
                    },
                    "testType": {
                        "$ref": "#/components/schemas/LabTestType"
                    },
                    "resultInterpretation": {
                        "type": "integer",
                        "format": "int32",
                        "nullable": true,
                        "example": 1
                    }
                },
                "additionalProperties": false
            },
            "LabTestCodeScheme": {
                "enum": [
                    0,
                    1
                ],
                "type": "integer",
                "format": "int32"
            },
            "LabTestType": {
                "enum": [
                    0,
                    1,
                    2
                ],
                "type": "integer",
                "format": "int32"
            },
            "LogOutRequest": {
                "type": "object",
                "properties": {
                    "tenantId": {
                        "type": "string",
                        "nullable": true
                    },
                    "url": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "MdsDrugMappingType": {
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    9
                ],
                "type": "integer",
                "format": "int32"
            },
            "MedActionType": {
                "enum": [
                    0,
                    1,
                    2,
                    3
                ],
                "type": "integer",
                "format": "int32"
            },
            "MedRcmd": {
                "type": "object",
                "properties": {
                    "actionType": {
                        "$ref": "#/components/schemas/MedActionType"
                    },
                    "orderId": {
                        "type": "string",
                        "nullable": true
                    },
                    "medCodeScheme": {
                        "$ref": "#/components/schemas/ExternalDrugCodeType"
                    },
                    "medCode": {
                        "type": "string",
                        "nullable": true
                    },
                    "medName": {
                        "type": "string",
                        "nullable": true
                    },
                    "dosage": {
                        "$ref": "#/components/schemas/MedRcmdDosage"
                    }
                },
                "additionalProperties": false
            },
            "MedRcmdDosage": {
                "type": "object",
                "properties": {
                    "doseUnit": {
                        "type": "string",
                        "nullable": true
                    },
                    "doseAmount": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "doseFrequency": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "frequencyType": {
                        "$ref": "#/components/schemas/DosageFrequencyType"
                    },
                    "doseType": {
                        "$ref": "#/components/schemas/DosageDoseType"
                    },
                    "treatmentDuration": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "administrationTiming": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "nullable": true
                    },
                    "timeOfDay": {
                        "type": "array",
                        "items": {
                            "type": "integer",
                            "format": "int32"
                        },
                        "nullable": true
                    },
                    "onceEveryXPeriod": {
                        "type": "array",
                        "items": {
                            "type": "number",
                            "format": "double"
                        },
                        "nullable": true
                    },
                    "xDaysInPeriod": {
                        "type": "array",
                        "items": {
                            "type": "number",
                            "format": "double"
                        },
                        "nullable": true
                    },
                    "doseRate": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "doseRateUnit": {
                        "type": "string",
                        "nullable": true
                    },
                    "doseVolume": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "doseVolumeUnit": {
                        "type": "string",
                        "nullable": true
                    },
                    "administrationRoute": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "MedSource": {
                "enum": [
                    0,
                    1,
                    2,
                    3
                ],
                "type": "integer",
                "format": "int32"
            },
            "MedStatusIndicator": {
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10
                ],
                "type": "integer",
                "format": "int32"
            },
            "MedUpdate": {
                "type": "object",
                "properties": {
                    "actionType": {
                        "$ref": "#/components/schemas/MedActionType"
                    },
                    "medCodeScheme": {
                        "$ref": "#/components/schemas/ExternalDrugCodeType"
                    },
                    "medCode": {
                        "type": "string",
                        "nullable": true
                    },
                    "seegnalRefMedCode": {
                        "type": "string",
                        "nullable": true
                    },
                    "medName": {
                        "type": "string",
                        "nullable": true
                    },
                    "medShortName": {
                        "type": "string",
                        "nullable": true
                    },
                    "mappingType": {
                        "$ref": "#/components/schemas/MdsDrugMappingType"
                    },
                    "rank": {
                        "type": "integer",
                        "format": "int32",
                        "nullable": true
                    },
                    "isActive": {
                        "type": "boolean"
                    }
                },
                "additionalProperties": false
            },
            "MedUpdateRequest": {
                "type": "object",
                "properties": {
                    "requestId": {
                        "type": "string",
                        "nullable": true
                    },
                    "tenantId": {
                        "type": "string",
                        "nullable": true
                    },
                    "medUpdates": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MedUpdate"
                        },
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "MedUpdateResponse": {
                "type": "object",
                "properties": {
                    "requestId": {
                        "type": "string",
                        "nullable": true
                    },
                    "statusCode": {
                        "$ref": "#/components/schemas/UpdateMedStatusCode"
                    },
                    "errors": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MsgItem"
                        },
                        "nullable": true
                    },
                    "successCount": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "failedCount": {
                        "type": "integer",
                        "format": "int32"
                    }
                },
                "additionalProperties": false
            },
            "Medication": {
                "type": "object",
                "properties": {
                    "orderId": {
                        "type": "string",
                        "nullable": true,
                        "example": "687b97ef-912d-4f0f-b67d-be8c0e0269e0"
                    },
                    "medCodeScheme": {
                        "$ref": "#/components/schemas/ExternalDrugCodeType"
                    },
                    "medCode": {
                        "type": "string",
                        "nullable": true,
                        "example": "267"
                    },
                    "medName": {
                        "type": "string",
                        "nullable": true
                    },
                    "medStatusIndicator": {
                        "$ref": "#/components/schemas/MedStatusIndicator"
                    },
                    "prescribedTime": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    },
                    "orderStartTime": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    },
                    "orderEndTime": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    },
                    "lastAdministrationTime": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    },
                    "purchasedTime": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    },
                    "medSource": {
                        "$ref": "#/components/schemas/MedSource"
                    },
                    "prnConditional": {
                        "type": "string",
                        "nullable": true,
                        "example": ""
                    },
                    "prnReason": {
                        "type": "string",
                        "nullable": true,
                        "example": ""
                    },
                    "administrationRoute": {
                        "type": "string",
                        "nullable": true,
                        "example": 64
                    },
                    "dosage": {
                        "$ref": "#/components/schemas/Dosage"
                    },
                    "adminRouteValid": {
                        "type": "boolean",
                        "readOnly": true
                    },
                    "dosageValid": {
                        "type": "boolean",
                        "readOnly": true
                    },
                    "medNotMap": {
                        "type": "boolean",
                        "readOnly": true
                    }
                },
                "additionalProperties": false
            },
            "MsgCode": {
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6
                ],
                "type": "integer",
                "format": "int32"
            },
            "MsgItem": {
                "type": "object",
                "properties": {
                    "code": {
                        "$ref": "#/components/schemas/MsgCode"
                    },
                    "obj": {
                        "type": "string",
                        "nullable": true
                    },
                    "prop": {
                        "type": "string",
                        "nullable": true
                    },
                    "value": {
                        "type": "string",
                        "nullable": true
                    },
                    "index": {
                        "type": "integer",
                        "format": "int32",
                        "nullable": true
                    },
                    "note": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "OperationType": {
                "enum": [
                    0,
                    1,
                    2,
                    5
                ],
                "type": "integer",
                "format": "int32"
            },
            "PatientFactor": {
                "type": "object",
                "properties": {
                    "key": {
                        "type": "integer",
                        "format": "int32",
                        "nullable": true,
                        "example": 1
                    },
                    "time": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    }
                },
                "additionalProperties": false
            },
            "PatientHeight": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "number",
                        "format": "double",
                        "nullable": true,
                        "example": 173
                    },
                    "unit": {
                        "$ref": "#/components/schemas/HeightUnit"
                    },
                    "time": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    }
                },
                "additionalProperties": false
            },
            "PatientType": {
                "enum": [
                    0,
                    1,
                    -1
                ],
                "type": "integer",
                "format": "int32"
            },
            "PatientWeight": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "number",
                        "format": "double",
                        "nullable": true,
                        "example": 82.4
                    },
                    "unit": {
                        "$ref": "#/components/schemas/WeightUnit"
                    },
                    "time": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    }
                },
                "additionalProperties": false
            },
            "PluginStateRequest": {
                "type": "object",
                "properties": {
                    "tenantId": {
                        "type": "string",
                        "nullable": true
                    },
                    "patientId": {
                        "type": "string",
                        "nullable": true
                    },
                    "prescriberId": {
                        "type": "string",
                        "nullable": true
                    },
                    "visitId": {
                        "type": "string",
                        "nullable": true
                    },
                    "encounterId": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "PrescriberRole": {
                "enum": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6
                ],
                "type": "integer",
                "format": "int32"
            },
            "RecordType": {
                "enum": [
                    0,
                    1,
                    3,
                    4,
                    6,
                    7,
                    10
                ],
                "type": "integer",
                "format": "int32"
            },
            "ResponseStatus": {
                "type": "object",
                "properties": {
                    "errorsList": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MsgItem"
                        },
                        "nullable": true
                    },
                    "succeeded": {
                        "type": "boolean"
                    }
                },
                "additionalProperties": false
            },
            "SessionSummary": {
                "type": "object",
                "properties": {
                    "therapyId": {
                        "type": "string",
                        "nullable": true
                    },
                    "uiSessionId": {
                        "type": "string",
                        "nullable": true
                    },
                    "userOperations": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/UserOperation"
                        },
                        "nullable": true
                    },
                    "indicatorStatus": {
                        "$ref": "#/components/schemas/IndicatorStatus"
                    },
                    "medRcmds": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MedRcmd"
                        },
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "SetTraceRequest": {
                "type": "object",
                "properties": {
                    "tenantId": {
                        "type": "string",
                        "nullable": true
                    },
                    "corrId": {
                        "type": "string",
                        "nullable": true
                    },
                    "category": {
                        "type": "string",
                        "nullable": true
                    },
                    "traceItems": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string",
                            "nullable": true
                        },
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "TherapyRequest": {
                "type": "object",
                "properties": {
                    "therapyId": {
                        "type": "string",
                        "nullable": true,
                        "example": "64fff6da-faf8-4695-9a04-f91b58209ffb"
                    },
                    "tenantId": {
                        "type": "string",
                        "nullable": true,
                        "example": "----"
                    },
                    "therapyRefTime": {
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    },
                    "prescriberId": {
                        "type": "string",
                        "nullable": true,
                        "example": "1234"
                    },
                    "prescriberSpecialty": {
                        "type": "string",
                        "nullable": true,
                        "example": "Doctor"
                    },
                    "patientId": {
                        "type": "string",
                        "nullable": true,
                        "example": "eedc3278-c652-498e-8f2d-679133577922"
                    },
                    "prescriberRole": {
                        "$ref": "#/components/schemas/PrescriberRole"
                    },
                    "admitTime": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    },
                    "dischargeTime": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "2019-03-17"
                    },
                    "dischargeType": {
                        "$ref": "#/components/schemas/DischargeType"
                    },
                    "encounterId": {
                        "type": "string",
                        "nullable": true,
                        "example": "ABC-1234/D"
                    },
                    "encounterStatus": {
                        "$ref": "#/components/schemas/EncounterStatus"
                    },
                    "institutionType": {
                        "$ref": "#/components/schemas/InstitutionType"
                    },
                    "departmentCode": {
                        "type": "string",
                        "nullable": true,
                        "example": "20"
                    },
                    "departmentName": {
                        "type": "string",
                        "nullable": true,
                        "example": "Cardiology"
                    },
                    "patientType": {
                        "$ref": "#/components/schemas/PatientType"
                    },
                    "birthDate": {
                        "type": "string",
                        "format": "date",
                        "nullable": true,
                        "example": "1973-03-28"
                    },
                    "neonateBirthAgeWeeks": {
                        "type": "number",
                        "format": "double",
                        "nullable": true,
                        "example": 0
                    },
                    "recordType": {
                        "$ref": "#/components/schemas/RecordType"
                    },
                    "gender": {
                        "$ref": "#/components/schemas/Gender"
                    },
                    "patientWeights": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PatientWeight"
                        },
                        "nullable": true
                    },
                    "patientHeights": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PatientHeight"
                        },
                        "nullable": true
                    },
                    "ethnicity": {
                        "type": "string",
                        "nullable": true,
                        "example": ""
                    },
                    "race": {
                        "type": "string",
                        "nullable": true,
                        "example": ""
                    },
                    "patientFactors": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PatientFactor"
                        },
                        "nullable": true
                    },
                    "allergies": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Allergy"
                        },
                        "nullable": true
                    },
                    "labTests": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LabTest"
                        },
                        "nullable": true
                    },
                    "geneticTests": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/GeneticTest"
                        },
                        "nullable": true
                    },
                    "medications": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Medication"
                        },
                        "nullable": true
                    },
                    "diagnoses": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Diagnosis"
                        },
                        "nullable": true
                    },
                    "diets": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Diet"
                        },
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "TherapyResponse": {
                "type": "object",
                "properties": {
                    "therapyId": {
                        "type": "string",
                        "nullable": true
                    },
                    "uiSessionId": {
                        "type": "string",
                        "nullable": true
                    },
                    "seegnalUrl": {
                        "type": "string",
                        "nullable": true
                    },
                    "indicatorStatus": {
                        "$ref": "#/components/schemas/IndicatorStatus"
                    },
                    "responseStatus": {
                        "$ref": "#/components/schemas/ResponseStatus"
                    },
                    "alertsCount": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "bypassCount": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "alertGroups": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AlertGroup"
                        },
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "UpdateEmrRequest": {
                "type": "object",
                "properties": {
                    "uiSessionId": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "UpdateMedStatusCode": {
                "enum": [
                    0,
                    1,
                    2
                ],
                "type": "integer",
                "format": "int32"
            },
            "UserOperation": {
                "type": "object",
                "properties": {
                    "operationType": {
                        "$ref": "#/components/schemas/OperationType"
                    },
                    "alertGroups": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AlertGroup"
                        },
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "ValidateAuthSession": {
                "type": "object",
                "properties": {
                    "tid": {
                        "type": "string",
                        "nullable": true
                    },
                    "usid": {
                        "type": "string",
                        "nullable": true
                    },
                    "key": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "ValidateJwtSession": {
                "type": "object",
                "properties": {
                    "tenantId": {
                        "type": "string",
                        "nullable": true
                    },
                    "jwt": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "additionalProperties": false
            },
            "WeightUnit": {
                "enum": [
                    0,
                    1,
                    2,
                    3
                ],
                "type": "integer",
                "format": "int32"
            }
        }
    }
}
