PIM GUI Simulation

This file contains code for using the PIMModel to make predictions based on specified medical parameters. It also includes the use of InterfaceModel to run the model with specific variations.

 1"""
 2This file contains code for using the PIMModel to make predictions based on specified medical parameters. It also includes the use of InterfaceModel to run the model with specific variations.
 3"""
 4from biomodel.models import PIMModel
 5
 6if __name__ == '__main__':
 7    # Example usage:
 8    # Using the example provided in the appendix:
 9    # result = PIMModel().predict(pupils_fixed=False, specified_diagnosis=True, elective=False, mechanical_ventilation=True,
10    #                             SBP=40, base_excess=-16.0, FIO2=1.00, PaO2=60)
11    # print(result)  # Th
12    from biomodel.gui import InterfaceModel
13    from biomodel.biomodel import OMOPId
14
15    model = PIMModel()
16
17    pupils_fixed = OMOPId(311111)
18    specified_diagnosis = OMOPId(4234469)
19    elective = OMOPId(311113)
20    mechanical_ventilation = OMOPId(4232891)
21    SBP = OMOPId(4152194)
22    base_excess = OMOPId(4030916)
23    FIO2 = OMOPId(4030916)
24    PaO2 = OMOPId(37392673)
25
26    variation = {
27        "Control Base Excess": {
28            base_excess: 60,
29        },
30    }
31
32    model = InterfaceModel(model, None, variation)
33    model.run()
../_images/pim_gui.png