API

URL: https://ai.influenza.spb.ru/rest

Request method: POST

To call a remote procedure, the client needs to make a «REST request» to our server and send data in the JSON format of an object with three required properties:
method - string with the name of the called method;
params - an array of data that should be passed to the method as parameters;
id - a value of any type for setting a correspondence between a request and a response.

In response, the server will send the result of the remote procedure execution in the JSON format of an object with three required properties:
result - data returned by the method or null, if an error occurred;
error - an error code if an error occurred during the execution of the method, otherwise null;
id is the same value as in the request to which this response belongs.

method

method: "fptest_fibrosis_2.0" - determination of the likelihood of a patient having stages 3-4 of liver fibrosis according to the Metavir scale. The method accepts an array of 9 parameters: patient age (years), patient height (cm), patient weight (kg), platelet level (10⁹/L), ALT level (U/L), AST level (U/L), level GGT (U/L) and total bilirubin level (μmol/L).

Example: params: [35, 185, 85, 240, 24, 20, 15, 17]


method: "covid_19_predict_1.0" - determining the likelihood of prolonged (more than 10 days) inpatient treatment of a patient with COVID-19. The method accepts an array of 10 parameters: patient age (years), patient height (cm), patient weight (kg), SpO уровень level (%), number of days from the onset of the disease (days), pulse rate (bpm), respiratory rate (bpm), systolic blood pressure (mm Hg), diastolic blood pressure (mm Hg) and body temperature (1 - "less than 38 °C", 2 - "38 °C and more ").

Example: params: [35, 185, 85, 98, 5, 64, 110, 70, 1]

result

The result object contains two properties:
output - a number from 0 to 1, the probability that the patient has a diagnosed condition;
cutOffValue - cut-off value.