Magikcraft / insulin-engine

Naive implementation of insulin and blood glucose interaction, for educational purposes.
https://www.magikcraft.io/minecraft-for-type-1-diabetes
1 stars 2 forks source link

BGL Range checks #1

Closed jwulf closed 7 years ago

jwulf commented 7 years ago

In mmol/L (millimols per litre - the AU measurement units), safe BGL ranges are 4 - 8.

I updated the config values, and also made the BGL range check use the config values, rather than hardcoded ones.

jwulf commented 7 years ago

I added feedback on the glycemic state and health implications of various BGL ranges. They are simplified.

DKA will not occur immediately, nor will hypoglycemic shock.

There should be a timeout in the actual implementation, to give time for the user to intervene with carbs (for hypo) or insulin (for hyper) before the full effect occurs.

T1 Diabetics carry lollies for emergency glucose to intervene when BGL is plummeting, and a special injection called glucagon to be used if they lose consciousness due to hypoglycemia.

DKA (a hyperglycemic complication) takes more than a day to manifest. Due to lack of glucose availability in the cells, the body switches to ketogenesis for energy (breaking down fat), and the by-product is acid, which builds up in the blood - leading to a DKA episode. Symptoms include vomiting, sore stomach, headache, and fever, incapacitation, if untreated it is followed by unconsciousness, irreversible brain damage, loss of sight, and death.