//////////////////////////////////////////////////
//
// This file lists scripts to which shortcuts will
// be shown on the 'Diseases' menu. The first line
// of text is the description of the disease model,
// and the following lines are interpreted with
// the script language, once.
//
//////////////////////////////////////////////////

//Diseases = Make diabetic, Small heart attack, Large heart attack, Diarrhoea, Nephrotic syndrome, Emphysema, Septic shock, Gastroenteritis

Diseases = Respiratory, Cardiac, Renal, Hypertension, Endocrine, Gastrointestinal, \
           Raised intracranial pressure, Septic shock
Respiratory = Emphysema, Pneumothorax, Pneumonia, Pulmonary embolism
Cardiac = Small heart attack, Left-sided heart attack, Right-sided heart attack, \
          Tamponade, Heart transplant
Hypertension = Essential hypertension, Pulmonary hypertension, Malignant hypertension
Renal = Nephrotic syndrome, Renal artery stenosis, Acute tubular necrosis
Endocrine = Hyperthyroidism, Hypothyroidism, Diabetes mellitus, \
            Diabetes insipidus, Secretion of inappropriate ADH
Gastrointestinal = Malabsorption, Gastroenteritis, Secretory diarrhoea, Constipation, Liver failure


//////////////////
//
// Endocrine diseases
//

[Diabetes mellitus]
Description = The pancreas is unable to secrete insulin, causing uncontrolled increase in blood glucose following meals.
//Icon = SmallMan.gif
gitract.glucoseTolerance = gitract.glucoseTolerance/2;
kidney.glomerularLeak=0.003
;

[Hyperthyroidism]
Description=Increased production of thyroid hormone
controllers.forVariableNames("Thyr", "Temp").setConstant(0.10)
;

[Hypothyroidism]
Description=Decreased production of thyroid hormone
controllers.forVariableNames("Thyr", "Temp").setConstant(-0.10)
;

[Diabetes insipidus]
Description= Renal insensitivity to ADH
brain.diabetesInsipidus=true
;

[Secretion of inappropriate ADH]
Description= Excessive antidiuretic hormone produced by the pituitary gland, leading to water retention
controllers.forVariableNames("ADH","POsm").setConstant(70E-12);
;


///////////////
//
// Cardiac diseases
//

[Small heart attack]
Description = Decreases the contractility of the heart by 20%
CVS.heart.left.starling.maximalSV = CVS.heart.left.starling.maximalSV * 0.8

[Left-sided heart attack]
Description = Decreases the contractility of the heart by 50%
CVS.heart.left.starling.maximalSV = CVS.heart.left.starling.maximalSV * 0.5

[Right-sided heart attack]
Description = Decreases the contractility of the heart by 50%
CVS.heart.right.starling.maximalSV = CVS.heart.right.starling.maximalSV * 0.5

[Tamponade]
Description = Fluid in the pericardial space impairs diastolic filling
actions.startGradualChange("CVS.heart.pericVol", 0.150, 0.005);

[Heart transplant]
Description=The heart is denervated and receives no baroreceptor input from the brain.
controllers.forVariableNames("HR", "APL").setGain(0);


////////////
//
// Gastrointestinal diseases
//

[Malabsorption]
Description = Increases the gut motility to double the rate.
gitract.motilityRate = body.gitract.motilityRate * 10

[Gastroenteritis]
Description=This reduces the stomach's capacity for a period of time, causing vomiting.
gitract.stomachCapacity=0;
actions.startGradualChange("gitract.stomachCapacity", 1.5, 0.001)

[Secretory diarrhoea]
Description = The colon secretes fluid into the stool, comprising, sodium, potassium, bicarbonate and protein
gitract.colonSecretion=0.0008

[Constipation]
Description = Decreases the gut motility to half the rate.
gitract.motilityRate = body.gitract.motilityRate / 10

[Liver failure]
Description = Impaired protein and sugar metabolism, with increased nitrogenous waste products
;

///////////////
//
// Lung diseases
//

[Emphysema]
Description = This causes increased airways resistance, worse on expiration, with hyperinflation and decreased alveolar permeability
lungs.CO2Permeability = 8.5;
lungs.FRC = lungs.FRC * 1.3;
lungs.DdSp = lungs.DdSp * 1.5;
//lungs.initialFractionEquilibration=0.09;
lungs.initialFractionEquilibration=0.15;
lungs.airwayResistance = lungs.airwayResistance * 1.7;
lungs.expiratoryResistanceRatio = lungs.expiratoryResistanceRatio * 1.4;
lungs.compliance = lungs.compliance * 1.15;

[Pneumonia]
Description=This increases the physiological shunting in the lung, accompanied by a systemic inflammatory response
actions.startGradualChange("lungs.Shunt", 0.2, 0.001);
actions.interferon

[Pulmonary embolism]
Description = A clot in the pulmonary arterial tree causes an increased pulmonary vascular resistance and inflammation causing increased shunting of blood away from aerated lung
controllers.forVariableNames("PVR", "SPAP").setConstant(0.0085);
oldShunt=lungs.Shunt;
lungs.Shunt=oldShunt+0.2;
actions.startGradualChange("lungs.Shunt", oldShunt, 0.001);

[Pneumothorax]
Description = A decreased total lung volume accompanied by partial collapse
lungs.compliance = lungs.compliance * 0.7;
lungs.FRC = lungs.FRC * 0.7;
lungs.FVC = lungs.FVC * 0.7;


///////////
//
// Renal disease
//

[Nephrotic syndrome]
Description=The glomeruli leak protein into the renal tubules, causing the triad of proteinuria, hypoalbuminaemia, and peripheral oedema.
kidney.glomerularLeak=0.10

[Renal artery stenosis]
Description= Increased resistance in the renal artery causes renin-induced hypertension and impaired renal perfusion
controllers.forVariableName("ReRes", "AngII").setConstant(1.0);


[Acute tubular necrosis]
Description= Oliguric proteinuric acute renal failure is followed by polyuric phase of impaired electrolyte reabsorption
;


////////////
//
// Misc
//

[Septic shock]
Description=This causes vasodilation
actions.startGradualChange("CVS.VCT", 0.1, 0.0001)
brain.fever=1

[Raised intracranial pressure]
Description = Gradually raises intracranial pressure
;

[Essential hypertension]
Description = High blood pressure set-point - extremely common, but underlying cause is not clear. 
CVS.AP.initialValue=0.120 
;

[Pulmonary hypertension]
Description = Increased pulmonary vascular resistance causes pulmonary hypertension
controllers.forVariableNames("PVR", "SPAP").setConstant(0.010);

[Malignant hypertension]
Description = Usually secondary to another cause. We 
;
