AlgoMarker package

AlgoMarker module

class AlgoMarker.AlgoMarker(amconfig_path, libpath=None)[source]

Bases: object

AlgoMarker object that holds full model pipeline to calculate meaningfull insights from EMR raw data.

Parameters:
  • amconfig_path (str)

  • libpath (str | None)

calculate()[source]

recieves a request for execution of the model pipeline and returns a responde

Parameters:

request_json (str)

Return type:

dict[str, Any]

discovery()[source]

returns a json specification of the AlgoMarker information, inputs, etc.

Return type:

dict[str, Any]

dispose()[source]

Release object memory - recomanded to use “with” statement

clear_data()[source]

clears AlgoMarker patient data repository memory

add_data()[source]

loads the AlgoMarker patient data repository memory with patient data

Parameters:

json_data (str)

Return type:

str | None

AlgoMarker constractor - receives AlgoMarker configuration file path “amconfig”. Optional path to C shared library file. If we want to use other version, not default library that is packed in this module.

add_data(json_data)[source]

This function recieves data json object and loads the data into the algomarker patient data repository. Errors are collected in a string - each error in separate line. When there are no errors, the output is None.

Notes

The input data json request is documented in different document and the potential errors

Parameters:

json_data (str)

Return type:

str | None

calculate(request_json)[source]

Recieved json request for calculation and returns json string responde object with the result

Notes

The input json request and json response results are documented in a different document

Parameters:

request_json (str)

Return type:

dict[str, Any]

clear_data()[source]

Frees the algomarker patient data repository

static create_request_json(patient_id, prediction_time)[source]

Creates and returns a string json request for patient_id and prediction_time

Parameters:
  • patient_id (int)

  • prediction_time (int)

Return type:

str

discovery()[source]

Returns information about the Algomarkers in json format - input signals, name, version, etc.

Return type:

dict[str, Any]

dispose()[source]

Disposes the AlgoMarker object and frees the memory

get_name()[source]

Returns information about the Algomarkers in json format - input signals, name, version, etc.

Return type:

dict[str, Any]