Framingham GUI Simulation

Calculate Framingham risk score based on given input parameters and variations.

 1"""
 2Calculate Framingham risk score based on given input parameters and variations.
 3"""
 4from biomodel.models import Framingham
 5from biomodel.gui import InterfaceModel
 6from biomodel.biomodel import OMOPId
 7
 8if __name__ == '__main__':
 9
10    sex = OMOPId("sex")
11    age = OMOPId("age")
12    coltot = OMOPId(4224820)
13    hdl = OMOPId(4011133)
14    tas = OMOPId(4152194)
15    tad = OMOPId(4154790)
16    smoke = OMOPId(1585856)
17    diab = OMOPId(35817874)
18
19    current = {
20        sex: 1,
21        age: 50,
22        coltot: 250,
23        hdl: 23,
24        tas: 200,
25        tad: 100,
26        smoke: 1,
27        diab: 1,
28    }
29
30    variation = {
31        "No smoke": {smoke: 0},
32        "No smoke & CH control": {smoke: 0, coltot: 180, hdl: 50},
33        "Full control": {
34            coltot: 180,
35            hdl: 50,
36            tas: 125,
37            tad: 80,
38            smoke: 0,
39        },
40    }
41    model = InterfaceModel(Framingham(), current, variation)
42    model.run()
../_images/fr_gui.png