//////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2013-2017 Dawson Dean // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // //////////////////////////////////////////////////////////////////////////////// // // This is the top-level module. It initiates the entire UI and also does all // the layout of HTML elements in the UI. This layout is done initially when the // UI opens, but also may change the UI elements dynamically in response to user // actions. // ///////////////////////////////////////////////////////////////////////////// // // Live strings // These are the latest lab values and computed values. // GetLabValueStringForPlan returns a value suitable for a plan, so it returns // "xxx" if no value is known. // GetLabValue returns numbers so you can use this in if-statements. // A value of -1 always means the value is not known. // // // BMP // GetLabValueStringForPlan('Sodium') // GetLabValueStringForPlan('Potassium') // GetLabValueStringForPlan('Chloride') // GetLabValueStringForPlan('HCO3') // GetLabValueStringForPlan('BUN') // GetLabValueStringForPlan('Creatinine') // GetLabValueStringForPlan('Glucose') // GetLabValueStringForPlan('ReportedGFR') // GetLabValueStringForPlan('ReportedAfricanGFR') // // LFT // GetLabValueStringForPlan('ALT') // GetLabValueStringForPlan('AST') // GetLabValueStringForPlan('ALP') // GetLabValueStringForPlan('TBili') // GetLabValueStringForPlan('TProtein') // GetLabValueStringForPlan('Albumin') // GetLabValueStringForPlan('INR') // GetLabValueStringForPlan('PT') // GetLabValueStringForPlan('UricAcid') // // Urine // GetLabValueStringForPlan('UrineUrea') // GetLabValueStringForPlan('UrineSodium') // GetLabValueStringForPlan('UrineCreatinine') // GetLabValueStringForPlan('UrinePotassium') // GetLabValueStringForPlan('UrineChloride') // GetLabValueStringForPlan('UrineProtein') // GetLabValueStringForPlan('UrineAlbumin') // GetLabValueStringForPlan('UrineOsm') // GetLabValueStringForPlan('UrineVolume') // GetLabValueStringForPlan('UrineCalcium') // GetLabValueStringForPlan('UrinePhos') // GetLabValueStringForPlan('UrineUrate') // // Vitals // GetLabValueStringForPlan('Age') // GetLabValueStringForPlan('WeightInKg') // GetLabValueStringForPlan('HeightInCm') // GetLabValueStringForPlan('SystolicBP') // GetLabValueStringForPlan('DiastolicBP') // GetLabValueStringForPlan('HR') // // MBD // GetLabValueStringForPlan('Calcium') // GetLabValueStringForPlan('Phos') // GetLabValueStringForPlan('Mag') // GetLabValueStringForPlan('VitD') // GetLabValueStringForPlan('PTH') // // Dialysis // GetLabValueStringForPlan('PreBUN') // GetLabValueStringForPlan('PostBUN') // GetLabValueStringForPlan('HDTimeInMin') // GetLabValueStringForPlan('PreHDWeightInKg') // GetLabValueStringForPlan('PostHDWeightInKg') // GetLabValueStringForPlan('FilterSelect') // GetLabValueStringForPlan('BloodFlowSelect') // GetLabValueStringForPlan('HDFreqSelect') // // ABG // GetLabValueStringForPlan('pH') // GetLabValueStringForPlan('PaCO2') // GetLabValueStringForPlan('PaO2') // // CBC // GetLabValueStringForPlan('WBC') // GetLabValueStringForPlan('CBCHgb') // GetLabValueStringForPlan('Platelet') // // Markers // GetLabValueStringForPlan('CystatinC') // GetLabValueStringForPlan('HgbA1c') // // Lipids // GetLabValueStringForPlan('LDL') // GetLabValueStringForPlan('HDL') // GetLabValueStringForPlan('TChol') // // Patient Questionaire // GetLabValueStringForPlan('IsMale') // GetLabValueStringForPlan('IsCaucasian') // GetLabValueStringForPlan('OnHTNMeds') // GetLabValueStringForPlan('IsDiabetic') // GetLabValueStringForPlan('IsSmoker') // GetLabValueStringForPlan('IsOnDialysis') // GetLabValueStringForPlan('AscitesSelect') // GetLabValueStringForPlan('EncephalopathySelect') // // Output Values // GetLabValueStringForPlan('CreatinineClearance') // GetLabValueStringForPlan('FENa') // GetLabValueStringForPlan('FEUrea') // GetLabValueStringForPlan('GFR'); // GetLabValueStringForPlan('AnionGap') // GetLabValueStringForPlan('UrineAnionGap') // GetLabValueStringForPlan('AdjustedAnionGap') // GetLabValueStringForPlan('AdjustedNa') // GetLabValueStringForPlan('AdjustedCa') // GetLabValueStringForPlan('Est2YearESRDRisk') // GetLabValueStringForPlan('Est5YearESRDRisk') // GetLabValueStringForPlan('UreaReductionRatio') // GetLabValueStringForPlan('EstimatedKtV') // GetLabValueStringForPlan('SingleCompartmentKtV') // GetLabValueStringForPlan('EquilibratedKtV') // GetLabValueStringForPlan('StandardKtV') // GetLabValueStringForPlan('ChildPugh') // GetLabValueStringForPlan('DiscriminantFunction') // GetLabValueStringForPlan('MELD') // GetLabValueStringForPlan('FreeWaterDeficit') // GetLabValueStringForPlan('TransTubularKGradient') // GetLabValueStringForPlan('ComputedSerumOsm') // GetLabValueStringForPlan('FraminghamOutput') // GetLabValueStringForPlan('AaGradientOutput') // GetLabValueStringForPlan('ElectrolyteFreeWaterClearance') // // // // //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // // [PrintAKIPlan] // //////////////////////////////////////////////////////////////////////////////// function PrintAKIPlan() { StartNewPlanSection("Acute Kidney Injury", null); WriteComment("On admission Cr=" + GetLabValueStringForPlan('Creatinine') + ", baseline Cr=xxx, baseline GFR=xxx"); WriteComment("Over the past 24hrs, urine output was: "); WriteComment("This is KDIGO Stage 1 (Cr rose 0.3 or 1.5x to 2x baseline within 48hrs or urine output below 0.5 mg/kg/hr for 6 hours)"); WriteComment("This is KDIGO Stage 2 (Cr rose 2x to 3x baseline within 48hrs or urine output below 0.5 mg/kg/hr for 12 hours)"); WriteComment("This is KDIGO Stage 3 (Cr rose over 3x baseline within 48hrs or rose over 0.5 and now is over 4.0 or anuric for 12 hours or urine output below 0.3 mg/kg/hr for 24 hours)"); WriteComment("Urine Prot/Cr ratio is xxxxx, suggesting approximately xxxx grams daily proteinuria"); WriteRenalLabsTable(); WriteComment("Serum Creatinine began to rise on: "); WriteComment("Recent medication changes: "); WriteComment("Infection diagnosed on: "); WriteComment("Hypotension on: "); WriteComment("Net negative fluid status on: "); WriteComment("NSAIDs were started on: "); WriteComment("Chemotherapy started on: "); WriteComment("Most recent CT with contrast was: "); WriteComment("Surgery was: "); WriteComment("The possible causes include:"); WriteComment(" Pre-renal (low cardiac output, hypovolemia, blood loss, sepsis)"); WriteComment(" Intrinsic renal (infection, toxicity)"); WriteComment(" Post-renal (obstruction)"); WriteComment(" "); WriteAction("- Check Urinalysis"); WriteAction("- Check urine Cr, Urea, Na, Protein. Check these daily"); WriteAction("- Check CPK level"); WriteAction("- Check Urine Wright stain"); WriteComment("- If abdomen is tense, then check bladder pressure. Pressures over 12mm indicated intra-abdominal hypertension, which may be due to liver disease, large volume IV fluids or more."); WriteAction("- Renal Ultrasound to estimate degree of CKD with renal atrophy and degree of cortical thickening, also to rule hydronephrosis (which may be asymptomatic) and include dopplers to rule out Renal Artery Stenosis and Renal Vein Thrombosis"); WriteAction("- Hold Losartan and Lisinopril"); WriteAction("- Titrate medications to the new reduced renal clearance (such as Gabapentin, Metformin, Colchicine, Antibiotics)"); WriteAction("- Rule out Renal Vein Thrombosis (get US with dopplers)."); WriteComment("There is no indication for renal replacement therapy today. Specifically, the patient is not severely volume overloaded, and is oxygenating well. There are no significant electrolyte abnormalities, or acid-base abnormalities that cannot be medically managed and there are no clinical signs of uremia (no pericardial rub or encephalopathy)."); // The real issue is whether this is ATN from recent infection and hypovolemia or HRS, and examining the urine sediment will help distinguish between these two. //WriteComment("BUN = xxxx. The elevated BUN may be due to steroids (they stimulate protein catabolism, resulting in increased waste Nitrogen in the form of urea)"); //WriteComment(" "); //WriteComment("This is likely a post-ATN diuresis (while injured, the kidney lost salt gradient in the interstitium and so now cannot reabsorb water effectively until this gradient is restored over the next few days)."); //WriteComment("Match 1/2 to 2/3 of daily output with IV fluids. Daily total output was x mL. We will taper down the replacement fluid so as not to perpetuate high urinary output."); //WriteComment(" "); } // PrintAKIPlan //////////////////////////////////////////////////////////////////////////////// // // [PrintCKDPlan] // //////////////////////////////////////////////////////////////////////////////// function PrintCKDPlan() { var pStr; var estGFR = GetLabValue('GFR'); pStr = "Chronic Kidney Disease, Stage "; if ((estGFR > 0) && (estGFR < 15)) { pStr = pStr + "Stage 5 (GFR=" + estGFR + ")"; } else if ((estGFR >= 15) && (estGFR < 30)) { pStr = pStr + "Stage 4 (GFR=" + estGFR + ")"; } else if ((estGFR >= 30) && (estGFR < 60)) { pStr = pStr + "Stage 3 (GFR=" + estGFR + ")"; } StartNewPlanSection(pStr, null); WriteComment("The possible original causes include: Diabetes, Hypertension, and more"); WriteComment("Serum Creatinine=" + GetLabValueStringForPlan('Creatinine') + ", baseline Cr=xxx, baseline GFR=xxx"); WriteRenalLabsTable(); WriteComment("The renal disease is stable with no signs of progression."); var est2YearRisk = GetLabValue('Est2YearESRDRisk'); var est5YearRisk = GetLabValue('Est5YearESRDRisk'); if (est2YearRisk > 0) { WriteComment("The risk of ESRD within two years is " + est2YearRisk + " percent"); } if (est5YearRisk > 0) { WriteComment("The risk of ESRD within five years is " + est5YearRisk + " percent"); } WriteComment("Urine Prot/Cr ratio is " + GetLabValueStringForPlan('UrineProtein') + "/" + GetLabValueStringForPlan('UrineCreatinine') + ", suggesting approximately xxxx grams daily proteinuria. Already on an ACE/ARB (Lisinopril)"); WriteComment("Serum CO2 is " + GetLabValueStringForPlan('HCO3') + ", and the target is anything over 22."); WriteComment("We will continue to control the renal disease by managing risk factors including diabetes and hypertension and avoid NSAIDs and IV Contrast"); WriteAction("- Check Phos, Mg, PTH, Vitamin D"); WriteAction("- ACE inhibitor if microalbumin/Cr over 30 mcg/mg"); WriteAction("- Adjust medications if GFR below 45 (stop SKLT2 inhibitors (like Empagliflozin), Halve dose of Metformin)"); WriteAction("- Adjust medications if GFR below 30 (stop Metformin, switch diuretics from Thiazide to loop, renally dose Gabapentin and Ranitidine)"); WriteAction("- If HCO3 below 20 and GFR below 30, then start Sodium Bicarb 650mg PO TID (see de Brito-Ashurst et al, Bicarbonate Supplementation Slows Progression of CKD and Improves Nutritional Status)"); WriteAction("- If Hgb below 10 and CKD 3 or more, then rule out other anemia causes in anticipation of starting erythrocyte stimulating agent"); WriteAction("- If over 50 years old, start a statin (KDIGO 2013), no benefit seen in non-statin meds"); WriteAction("- Sevelamer if Phos is elevated"); WriteAction(" "); WriteAction("- If GFR is below 30 and not stable then refer to transplant"); WriteAction("- Time on transplant list starts accruing when GFR is below 20. See US Dept of Health & Human Services - Educational Guidance on Patient Referral to Kidney Transplantation - https://optn.transplant.hrsa.gov/resources/guidance/educational-guidance-on-patient-referral-to-kidney-transplantation/"); } // PrintCKDPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteRenalLabsTable] // //////////////////////////////////////////////////////////////////////////////// function WriteRenalLabsTable() { var pTabStr = " "; // "    "; var pUProtStr = GetLabValueStringForPlan("UrineProtein"); var pUCrStr = GetLabValueStringForPlan("UrineCreatinine"); WriteComment("x/x/2016:" + pTabStr + "Creatine=" + GetLabValueStringForPlan('Creatinine') + pTabStr + "eGFR=" + GetLabValueStringForPlan('GFR') + pTabStr + "UrineOutput=x" + pTabStr + "FENa=" + GetLabValueStringForPlan('FENa') + pTabStr + "FEUrea=" + GetLabValueStringForPlan('FEUrea') + pTabStr + "Urine Protein/Creat=" + GetLabValueStringForPlan('UrineProtein') + "/" + GetLabValueStringForPlan('UrineCreatinine')); } // WriteRenalLabsTable //////////////////////////////////////////////////////////////////////////////// // // [WriteHypokalemiaPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteHypokalemiaPlan() { StartNewPlanSection("Hypokalemia", null); WriteComment("Most recent serum potassium: " + GetLabValueStringForPlan('Potassium')); WriteComment("Most recent serum Magnesium is: " + GetLabValueStringForPlan('Magnesium')); WriteComment("Bicarb is xxxx, which is acidotic or alkalotic, suggesting a low or high Aldosterone state"); WriteComment("BP is xxxx, which suggests a high or low Aldosterone state"); WriteComment("Decide whether the kidneys are responding appropriately."); WriteComment("Urine chloride is xxxx, and if it is below 25 in an alkalotic patient then the kidneys are retaining volume, and so have a high Aldo state."); WriteComment("Why do we look at Urine chloride? If a patient is alkalotic, then the kidneys will waste bicarb, as HCO3-, but this is an anion so to keep urine electrically neutral it wastes a cation, sodium, or NaHCO3"); WriteComment("So, Na will be high in an alkalotic patient, so to assess volume status look at urine Cl. If the kidneys hold onto Na for retaining volume in response to high Aldo, then they also retain an anion Cl-. So urine Cl- tells us how much Na is being wasted for volume management independant of how much Na is being wasted for acid/base management."); WriteComment(" "); WriteComment("The differential includes GI loss (diarrhea) or renal loss."); WriteComment("The differential for renal loss includes high Aldo state or renal wasting (like diuretics)"); WriteComment("The differential for high Aldo state includes hyper-aldo or high renin due to renal artery stenosis. Note that RAS could be due to many causes (atherosclerosis, fibromuscular dysplasia, inflammation like PAN or Scleroderma renal crisis)"); WriteComment(" "); WriteAction("- Check serum Mg"); WriteAction("- Check urine trans-tubular potassium gradient (urine-K / Serum-K) / (urine-Osm / serum-Osm). If TTKG is over 3, then the kidneys are wasting K and this may be nephrogenic."); WriteAction("- Check urine K and Cr. If urine Urine-K (in mEq) / Urine-Cr (in grams) ratio is over 13 mEq/g, then this is likely nephrogenic loss. (1mEq potassium is 39mg)"); } // WriteHypokalemiaPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteHypERkalemiaPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteHypERkalemiaPlan() { StartNewPlanSection("Hyperkalemia", null); WriteComment("Most recent serum potassium: " + GetLabValueStringForPlan('Potassium')); WriteAction("- Check EKG"); WriteComment("The EKG shows peaked T-waves"); WriteAction("- Check urine trans-tubular potassium gradient (urine-K / Serum-K) / (urine-Osm / serum-Osm). If TTKG is below 10, then the kidneys are not compensating and this may be nephrogenic."); WriteComment("If nephrogenic, consider an RTA type 4 (hypo-Aldo) which may be due to Diabetes or NSAIDs"); WriteComment("Other possible causes include Seizures, Tumor Lysis, Salt-substitute (this is often Potassium Chloride), Digoxin (inhibits Na/K-ATPase so leaves K outside the cell)"); WriteAction("- Calcium Gluconate 2g once now"); WriteAction("- Sodium polystyrene sulfonate (Kayexalate). This removes potassium from the body, but is slow to take effect"); WriteAction("- Acutely give 50mL D50W with 10u Regular Insulin, then follow with D10W at 70 mL/hr for the next several hours. This will only shift potassium intracellularly"); WriteAction("- Sodium Bicarbonate - shift potassium into cells"); WriteAction("- Albuterol - shift potassium into cells but at a very high dose. 10-20mg in 4mL solution (a typical asthma dose is 2.5mg)"); WriteAction("- Furosemide"); } // WriteHypERkalemiaPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteHTNPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteHTNPlan() { StartNewPlanSection("Hypertension", null); WriteComment("[Stage I (below 160/100) Stage II (over 160/100) Urgency Uncontrolled]. Resistant (on 3 agents including a diuretic)"); if (g_InPatient) { WriteComment("On admission, BP=xxx/xxx, today BP=xxx/xxx"); WriteComment("Home medication regimen: "); WriteComment("In Hypertensive urgency, target 20% reduction in the first 24hrs, so goal BP=xxx"); WriteComment("This is resistant (3 meds, one of which is a diuretic)"); WriteComment("This is primary, and the differential includes: salt-sensitive, hyper-aldo, apoL1 mutation"); WriteComment("Daily salt-intake is approximately (23 x 24-hour urine Na in mEq)"); WriteAction("- Hold all antihypertensives if septic"); WriteAction("- EKG"); WriteAction("- Chest XRay"); WriteAction("- Continue current medications: "); WriteAction("- PRN Labetaolol (for SBP over 185 or DBP over 110, hold for HR under 60)"); WriteAction("- Check urine drugs of abuse screen"); } else { WriteComment("Today in clinic, BP=xxx"); WriteAction("- Continue current medications: "); } WriteComment("Avoid Thiazide due to history of Gout"); WriteAction("- Check urine microalbumin/Cr ratio"); WriteAction("- Check 24-hour urine Na"); WriteAction("- If resistant, check Renin/Aldosterone ratio. If over 25 then possible primary hyper-aldo"); WriteAction("- If hyper-Aldo, check Renal artery dopplers"); WriteAction("- If resistant, consider other causes like OSA or NSAIDs"); } // WriteHTNPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteHyponatremiaPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteHyponatremiaPlan() { StartNewPlanSection("Hyponatremia", "HyponatremiaPlan"); WriteComment("Current sodium=" + GetLabValueStringForPlan('Sodium')); WriteComment("Adjusted Sodium=" + GetLabValueStringForPlan('AdjustedNa') + ", given Glc=" + GetLabValueStringForPlan('Glucose') + " (increase Na by 1.6 for each 100mmol Glc over 100)"); WriteComment("Hyponatremia is an excess of free water, not a deficiency of sodium - the total body sodium is likely normal, but the kidneys are retaining too much free water which dilutes the blood and lowers sodium concentration."); WriteComment("Urine osmolality=xxx, serum osmolality=xxx"); WriteComment("On physical exam, the patient appears euvolemic with no JVD or edema or pulmonary rales."); WriteComment("The patient is hypotensive, and blood pressure is xxxxx"); WriteComment("Urine sodium is " + GetLabValueStringForPlan('UrineSodium') + " (low), so the kidneys are retaining (not wasting) sodium - there is an excess of Aldo. "); WriteComment("Urine osm is xxxx (high), so the kidneys are retaining volume as well - there is an excess of ADH. This may be appropriate (in the case of hypovolemia) or inappropriate (in the case of SIADH)"); WriteComment("BP is xxxx, which suggests a high or low Aldosterone or low Cortisol state"); WriteComment("Serum bicarb is elevated at xxxxx which might suggest contraction, and thus hypovolemia."); WriteComment("Serum urate is low at xxxxx which might suggest dilution, and thus hypervolemia. If the concentration is low, then this is SIADH because free water diluted urate. If it is normal or high, then this is more likely hypovolemia because it is concentrated."); WriteComment("Urine output over the past 24hrs increased from xxxxx to xxxxxx, so" + g_hisHer + "urine output increased since starting gentle fluids, again consistent with hypovolemia."); WriteComment("The patient is taking medications typically associated with SIADH (SSRIs, TCAs, Ciprofloxacin, Haloperidol, Cyclophosphamide, vincristine, vinblastine, Cisplatin, methotrexate, imatinib)"); WriteComment("Serum Na {increased/decreased} with a small fluid challenge (xxx mL IV NS)"); WriteComment("BUN is xxxx, Albumin is xxxxx. The kidneys cannot excrete pure water, instead they need a minimal solute load to make urine and excrete free water. The minimal urine osmolality is typically 50 mOsm or more, so the patient does not take in enough solute then they cannot remove free water. It is ok to give tube feeds or salt tablets."); WriteComment(" "); WriteComment("Free water clearance is 24hr-Urine-Volume * (1 - ((Urine-Na + Urine-K) / (Serum-Na))"); WriteComment("If Free water clearance is negative then the patient is retaining free water and Na will drop, and if it is positive then the patient is wasting free water and Na will rise."); WriteComment(" "); WriteComment("This may be a multifactorial hyponatremia, including:"); WriteComment("1. Hypotension, possibly from excess medication (intentional or accidental). This would lead to volume depletion and increased ADH, The ADH will lead to free water retention. "); WriteComment("2. Volume depletion, possibly due to poor PO intake. This would lead to an excess of ADH in addition to Aldosterone."); WriteComment("3. Chronic Sodium deficiency, likely due to poor nutrition and reduced nutritional intake. This may limit the ability to excrete free water."); WriteComment("4. Diuretic abuse (specifically thiazide)"); WriteComment(" "); WriteComment("Target 6 (six) mEq correction in 24hrs, so by xxx on xxx, the Na should be xxx"); WriteComment("If you overcorrect, give D5W, and if severe add 1 microgram of DDAVP"); WriteAction("- Check sodium Q4h"); WriteAction("- Check lipid panel, both hypertriglyceridemia and hypercholesterolemia can cause pseudo-hyponatremia"); WriteAction("- Check TSH (hypothyroid may cause a hypoosmolar hyponatremia, unclear mechanism)"); WriteAction("- Check serum osmolality and urine osmolality"); WriteAction("- Check urine Na, and Cr"); WriteAction("- Check serum uric acid"); WriteAction("- Check AM cortisol"); WriteAction("- Neuro checks Q2h"); WriteAction("- Seizure precautions"); WriteAction("- If symptomatic, then 100mL of 3 percent saline. Typically 100 mL of 3 percent Na will increase serum Na by 2-3 mEq"); WriteAction("- Free water restriction to 1.5L per day. This may require concentrating any medication drips. Note it is alright to drink water with electrolytes, like fruit juice or milk, and those should not be part of the fluid restriction"); WriteAction("- IV Furosemide (urine is roughly half-normal saline, so diuretics lose more fluid than salt). Typically start this when urine Osm is over 500"); WriteComment("Avoid thiazides, as they worsen the hyponatremia. A Thiazide preserves interstitial gradient so aquaporins reabsorb free water, while a loop diuretic will wash out the interstitial gradient and so free water is not reabsorbed even when Aquaporins are open. Thus, Thiazides preserve free water reabsorption and continue the lower sodium."); WriteComment("I try to avoid Demeclocycline 300mg BID because it is nephrotoxic (this is a tetracycline that blocks ADH receptors, causing a mild DI)"); WriteAction("- Salt tablets if "); WriteAction("- If cirrhotic, then just restrict fluids and diuretics - vaptans are contraindicated"); WriteAction("- PRN IV D5W 250mL for sodium over xxxxx"); WriteAction("- PRN DDAVP 0.5mcg (Desmopressin, an ADH/Vasopressin analog) PRN for serum sodium over xxxxx"); } // WriteHyponatremiaPlan //////////////////////////////////////////////////////////////////////////////// // // [PrintHyperNatremiaPlan] // //////////////////////////////////////////////////////////////////////////////// function PrintHyperNatremiaPlan() { StartNewPlanSection("Hypernatremia", null); WriteComment("Hypernatremia is a deficiency of free water, not a deficit of sodium - the total body sodium is likely normal, but there is not enough free water so the serum is over-concentrated"); WriteComment("Current sodium=" + GetLabValueStringForPlan('Sodium')); WriteComment("Over the past 24hrs, urine output was: "); WriteComment("Current urine sodium=" + GetLabValueStringForPlan('UrineSodium')); WriteComment("Urine osmolality=xxx, serum osmolality=xxx"); WriteComment("BUN is xxxx and Uric Acid is high at xxxxx which might suggest concentration"); WriteComment("BP is xxxx, which suggests a high or low Aldosterone or Cortisol state"); WriteComment(" "); WriteComment("Free Water Deficit is TBW * ((Serum-Na / 140) - 1), where TBW is 0.5-0.6 x standing weight"); WriteComment(" "); WriteComment("Free water clearance is 24hr-Urine-Volume * (1 - ((Urine-Na + Urine-K) / (Serum-Na))"); WriteComment("If Free water clearance is negative then the patient is retaining free water and Na will drop, and if it is positive then the patient is wasting free water and Na will rise."); WriteComment(" "); WriteComment("Causes of hypernatremia (free water loss) include Osmotic diarrea (lose free water), osmotic diuresis (TPN), excess loss (burns), insufficient water intake (geriatrics, newborns, CNS lesion), Post ATN diuresis, Diabetes Insipidis (Lithium, Cisplatin)"); WriteComment("Check to see if the kidneys are responding"); WriteComment("If urine Osm is below 800, then this is inappropriately low, and loss of free water is due to renal wasting (DI or Osmotic diuresis)"); WriteComment("If urine Osm is below 800, then this is appropriate, so loss of free water is extra-renal (diarrhea or water deprivation)"); WriteComment(" "); WriteAction("- If this is due to DI (serum Na is high with Polyuria) then consider DDAVP 0.5mcg (Desmopressin, an ADH/Vasopressin analog)"); WriteAction("- If this is due to DI (serum Na is high with Polyuria) then consider DDAVP 0.5mcg (Desmopressin, an ADH/Vasopressin analog)"); } // PrintHyperNatremiaPlan //////////////////////////////////////////////////////////////////////////////// // // [PrintDiabetesPlan] // //////////////////////////////////////////////////////////////////////////////// function PrintDiabetesPlan() { StartNewPlanSection("Diabetes", null); WriteComment("[Type 1, Type 2, Type 2 insulin dependant], Controlled/Uncontrolled"); WriteAction("- Check Hgb A1c"); if (g_InPatient) { WriteComment("Home regimen is Glargine xxx units QHS and Lispro xxx units TID with meals."); WriteComment("We will dose 60% of home regimen while the patient is in the hospital, and is acutely ill and on a different diet."); WriteAction("- Glargine xxx units QHS and Lispro xxx units TID with meals."); WriteAction("- Sliding scale Insulin"); WriteAction("- Holding home PO Medications while inpatient"); WriteAction("- Urine microalbumin/Cr ratio to screen for Diabetic Nephropathy"); } else { WriteComment("Diagnosed xxx, if type 2 anticipate gradual beta cell dysfunction over time"); WriteAction("- Continue: "); WriteAction("- Outpatient followup with Ophthomology and Podiatry"); WriteAction("- Annual urine microalbumin/Cr ratio to screen for Diabetic Nephropathy"); } } // PrintDiabetesPlan //////////////////////////////////////////////////////////////////////////////// // // [WritePreventionPlan] // //////////////////////////////////////////////////////////////////////////////// function WritePreventionPlan() { var patientAge = GetLabValue("Age"); var isMale = GetLabValue("IsMale"); StartNewPlanSection("Prevention", null); ///////////////////////////// // Vaccinations WriteAction("- Influenza vaccine: "); WriteAction("- Pneumovax: "); WriteAction("- Last Td/Tdap: "); WriteAction("- Check A1c: "); ///////////////////////////// // Colon Cancer if (patientAge < 0) { WriteAction("- Colon Cancer Screening: Last Colonoscopy "); } else if ((patientAge > 0) && (patientAge >= 40) && (patientAge < 50)) { WriteAction("- Colon Cancer Screening if 1st degree relative with colorectal cancer: Last Colonoscopy "); } else if ((patientAge > 0) && (patientAge > 50) && (patientAge < 75)) { WriteAction("- Colon Cancer Screening with colonoscopy Q10yr: Last Colonoscopy "); } else if ((patientAge > 0) && (patientAge > 75)) { WriteAction("- Colon Cancer Screening no longer required"); } ///////////////////////////// // Breast Cancer if (!isMale) { if (patientAge < 0) { WriteAction("- Breast Cancer Screening mammogram Q2yr: Last Mammogram "); } else if ((patientAge > 0) && (patientAge > 50) && (patientAge < 75)) { WriteAction("- Breast Cancer Screening mammogram Q2yr: Last Mammogram "); } else if ((patientAge > 0) && (patientAge > 75)) { WriteAction("- Breast Cancer Screening no longer required"); } } // Female ///////////////////////////// // Prostate Cancer if ((isMale) && (patientAge > 0) && (patientAge >= 50) && (patientAge <= 75)) { WriteAction("- Prostate cancer Screening PSA Q1yr: Patient declines annual PSA"); } ///////////////////////////// // Lung Cancer if ((patientAge > 0) && (patientAge >= 50) && (patientAge <= 75)) { WriteAction("- Lung Cancer Screening with low power CT Q1yr if over 30 pack years"); } ///////////////////////////// // Cervical Cancer if (!isMale) { if (patientAge < 0) { WriteAction("- Cervical Cancer Screening"); } else if ((patientAge > 0) && (patientAge >= 21) && (patientAge < 30)) { WriteAction("- Cervical Cancer Screening (Pap Q3yr): Last Pap "); } else if ((patientAge > 0) && (patientAge >= 30) && (patientAge <= 65)) { WriteAction("- Cervical Cancer Screening (Pap Q3yr or Pap with HPV Q5ys): Last Pap "); } else if ((patientAge > 0) && (patientAge > 65)) { WriteAction("- Cervical Cancer Screening no longer required"); } } // Female ///////////////////////////// // AAA if ((isMale) && (patientAge > 0) && (patientAge >= 65) && (patientAge <= 75)) { WriteAction("- AAA Screening"); } ///////////////////////////// // Bone Density if ((!isMale) && (patientAge >= 65) && (patientAge <= 75)) { WriteAction("- Bone density screening (DEXA Q2yr): Last DEXA "); } // Female ///////////////////////////// // Lipids if (((isMale) && (patientAge >= 35)) || ((!isMale) && (patientAge >= 55))) { WriteAction("- Lipid screening (FLP): Last lipid panel (LDL=, HDL=)"); WriteAction("- Check LDL-Direct"); } ///////////////////////////// // Geriatrics if ((patientAge >= 60)) { WriteAction("- Zoster vaccine"); } if ((patientAge >= 65)) { WriteAction("- Fall Prevention: Last Vitamin D"); WriteAction("- Pneumovax"); } // Geriatrics ///////////////////////////// // Diabetics if (DiabetesPlanButtonState) { WriteAction("- Annual urine microalbumin/Cr ratio in diabetics to screen for CKD"); } } // WritePreventionPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteCHFPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteCHFPlan() { StartNewPlanSection("Heart Failure", null); WriteComment("[ACC Stage C,D] [NYHA Class I,II,III,IV] [left-sided, right-sided] [ischemic, non-ischemic] [systolic, diastolic] [LVEF=]"); WriteComment("ASCVD score=xxx (http://tools.cardiosource.org/ASCVD-Risk-Estimator/)"); WriteComment("Home medication regimen: "); WriteComment("The possible triggers for this exacerbation include "); WriteComment("The possible underlying causes include: Diabetes, Hypertension, EtOH, Drug effects, and more"); WriteAction("- Chest XRay"); if (g_InPatient) { WriteAction("- Furosemide 40mg IV BID (home furosemide dose is xxx)"); WriteAction("If resistant, then combine diuretics to stop fluid reabsorption at several parts of the nephron"); WriteAction("- Loop of Henle blockade: Furosemide 40mg IV BID"); WriteAction("- Distal Tubule blockade: Metolazone 5mg"); } else { WriteAction("- Furosemide 40mg PO daily"); } if (g_InPatient) { WriteAction("- Metoprolol Tartrate 25mg PO BID"); WriteAction("- Lisinopril 10mg PO"); } else { WriteAction("- Metoprolol Tartrate 25mg PO BID (target 200mg daily)"); WriteAction("- Lisinopril 10mg PO (target 20-40mg daily)"); } WriteComment("It is OK to give Albumin + Lasix, but give them at the SAME time. It doesn't have to be in the same vein, but temporally at the same time."); WriteAction("- Lisinopril or Losartan (ejection fraction is reduced)"); WriteAction("- If NYHA IV and LVEF under 35%, Spironolactone 25mg PO (unless Cr over 2.5 or K over 5 per RALES study)"); WriteAction("- If NYHA II and LVEF under 30% or under 35% and QRS over 120mSec, Spironolactone 25mg PO (unless GFR under 30 or K over 5 per EMPHASIS-HF study)"); if (g_InPatient) { WriteAction("- Risk stratify with lipid panel"); WriteAction("- Strict In&Out, and daily standing weight"); WriteAction("- 2g sodium diet with 2L fluid restriction"); WriteAction("- CHF Education"); WriteAction("- Compression stockings (20-40mm Hg) on discharge"); } else { WriteAction("- Risk stratify with lipid panel"); WriteAction("- Compression stockings"); } } // WriteCHFPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteCOPDPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteCOPDPlan() { StartNewPlanSection("COPD", null); WriteComment("FEV1= xxx (Stage 1 (greater than 80%), 2 (50-80%), 3 (30-50%), 4 (less than 30%) COPD)"); if (g_InPatient) { WriteComment("This is an acute exacerbation, with increased sputum production, purulent sputum, and increased dyspnea"); WriteComment("The exacerbation is mild(1 criteria) moderate(2 criteria) severe(3 criteria)"); //WriteComment("BODE Index = (BMI, Obstruction, Dyspnea, Exercise)"); WriteComment("The possible triggers include: infection, medication non-compliance, smoking, cardiac (CHF or others), and more"); WriteComment("Home medication regimen: "); WriteAction("- Check ABG"); WriteAction("- Culture blood, sputum"); WriteAction("- Check urine antigens for legionella, strep pneumo"); WriteAction("- Check Influenza screen and Respiratory Viral Panel"); WriteAction("- Check ProCalcitonin to possibly rule out bacterial infection"); WriteAction("- Prednisone 40mg PO x5days"); WriteAction("- Levofloxacin (Strep pneumo and gram negative coverage)"); WriteAction("- Rapid-Acting Bronchodilators: scheduled Albuterol/Ipratropium nebs Q4h and Albuterol nebs PRN Q2h"); WriteAction("- Long-Acting Bronchodilators: Budesonide/Fortmoterol BID"); WriteAction("- Guaifenesin"); WriteAction("- Titrate O2 for SpO2 between 89 and 92%"); WriteAction("- Esomeprazole while on steroids"); } else { WriteAction("- Stage 1: Albuterol/Ipratropium HFA"); WriteAction("- Stage 2: Tiotropium"); WriteAction("- Stage 3: Budesonide/Fortmoterol BID"); WriteAction("- Stage 4: Home O2 eval"); WriteAction("- Guaifenesin"); } } // WriteCOPDPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteChestPainPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteChestPainPlan() { var pStr; var patientAge = GetLabValue("Age"); var isMale = GetLabValue("IsMale"); StartNewPlanSection("Chest pain", null); WriteComment("The possible causes include: NSTEMI, PE, dissection, GERD, pneumonia, costochondritis, and more"); WriteComment("- The pain is {non-cardiac(0,1 features), atypical(2 features), typical(3 features)} angina, where features are substernal, aggravated by exertion, relieved by rest."); if (patientAge < 0) { WriteComment("- Pretest probability of CAD for non-cardiac angina for a male: 30-39yo 4%, 40-49yo: 13%, 50-59yo: 20%, 60-69yo: 27%"); WriteComment("- Pretest probability of CAD for non-cardiac angina for a female: 30-39yo 2%, 40-49yo: 3%, 50-59yo: 7%, 60-69yo: 14%"); WriteComment("- Pretest probability of CAD for atypical angina for a male: 30-39yo 34%, 40-49yo: 51%, 50-59yo: 65%, 60-69yo: 72%"); WriteComment("- Pretest probability of CAD for atypical angina for a female: 30-39yo 12%, 40-49yo: 22%, 50-59yo: 31%, 60-69yo: 51%"); WriteComment("- Pretest probability of CAD for typical angina for a male: 30-39yo 76%, 40-49yo: 87%, 50-59yo: 93%, 60-69yo: 94%"); WriteComment("- Pretest probability of CAD for typical angina for a female: 30-39yo 26%, 40-49yo: 55%, 50-59yo: 73%, 60-69yo: 86%"); // If patientAge is valid, then we ASSUME that the sex is correctly set. } else if (patientAge < 40) { if (isMale) { WriteComment("- Pretest probability of CAD for a 30-39yo male with angina that is non-cardiac is 4%, atypical is 34%, typical is 76%"); } else { WriteComment("- Pretest probability of CAD for a 30-39yo female with angina that is non-cardiac is 2%, atypical is 12%, typical is 26%"); } } else if (patientAge < 50) { if (isMale) { WriteComment("- Pretest probability of CAD for a 40-49yo male with angina that is non-cardiac is 13%, atypical is 51%, typical is 87%"); } else { WriteComment("- Pretest probability of CAD for a 40-49yo female with angina that is non-cardiac is 3%, atypical is 22%, typical is 55%"); } } else if (patientAge < 60) { if (isMale) { WriteComment("- Pretest probability of CAD for a 50-59yo male with angina that is non-cardiac is 20%, atypical is 65%, typical is 93%"); } else { WriteComment("- Pretest probability of CAD for a 50-59yo female with angina that is non-cardiac is 7%, atypical is 31%, typical is 73%"); } } else { if (isMale) { WriteComment("- Pretest probability of CAD for a 60-69yo male with angina that is non-cardiac is 27%, atypical is 72%, typical is 94%"); } else { WriteComment("- Pretest probability of CAD for a 60-69yo female with angina that is non-cardiac is 14%, atypical is 51%, typical is 86%"); } } pStr = "- There are cardiac risk factors: (Diabetes, Hypertension, tobacco, "; if (GetLabValue("LDL") < 0) { pStr = pStr + "high LDL, "; } else { pStr = pStr + "high LDL (LDL=" + GetLabValue("LDL") + "), "; } if (GetLabValue("HDL") < 0) { pStr = pStr + "HDL under 40, "; } else { pStr = pStr + "HDL under 40 (HDL=" + GetLabValue("HDL") + "), "; } if (patientAge < 0) { pStr = pStr + "over 65yo male)"; } else { pStr = pStr + "over 65yo male (" + patientAge + "yo)"; } WriteComment(pStr); WriteComment("- The TIMI score is xxx (Troponins, EKG changes, 3 or more risk factors, age over 65yo, known CAD, on aspirin, 2+ episodes in 24hrs)"); WriteAction("- EKG"); WriteAction("- Chest XRay"); WriteAction("- Trend troponins (Q8h x3)"); WriteAction("- EKG in the morning"); WriteAction("- Check urine drugs of abuse screen"); WriteAction("- Medically manage: Aspirin 325mg, Metoprolol Tartrate 25mg BID, Lisinopril 10mg, Atorvastatin 40mg"); WriteComment("Contraindications to NTG: Sildenafil or other erectile dysfunction med in past 7 days, Bradycardia (HR below 60), Hypotension, R-side or inferior wall MI"); WriteComment("Do not anticoagulate in a Type-2 NSTEMI caused by Hypertensive Urgency, as it increases risk of hemorrhagic stroke"); WriteAction("- Clopidogrel (PGY12 blockade) with loading dose 300mg, then 150mg daily for 12 months (see ACC/AHA Guidelines update to guidelines for UA/NSTEMI, (for example p14 of 2012 update))"); WriteAction("- Heparin drip if TIMI is over 5"); WriteAction("- IIb/IIIa inhibitor (abciximab, eptifibatide, tirofiban) if TIMI is over 5 and no Cath is planned"); WriteAction("- Hold all non-sterodials while managing possible acute infarction"); WriteAction("- Cardiac (trans-thoracic) Echo"); WriteAction("- Risk stratify, and check HgbA1c, Lipid panel, TSH"); WriteAction("- Check Mg and PO4, and supplement to keep Mg over 2, and K over 4"); WriteAction("- Continuous bedside Telemetry"); WriteAction("- Stress test either as inpatient or outpatient. Exercise if pt is able. EKG is resting EKG is normal."); } // WriteChestPainPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteAFibPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteAFibPlan() { StartNewPlanSection("Atrial Fibrillation", null); WriteComment("The differential includes: Volume overload from CHF, OSA, Valvular disease, Hypo- or Hyper- thyroid, Low potassium, EtOH, or Drugs of abuse (cocaine, amphetamines)"); WriteComment("There is a history of valvular disease (mitral stenosis)"); WriteComment("Clinically, the patient appears hypervolemic, with rales, edema and JVD on physical exam"); WriteComment("Neck Circumference= , BMI=, Mallampati Score="); WriteComment("STOP-BANG score= (Snoring, Tired, Observed apnea, Pressure(Hypertension), BMI over 35, Age over 50yo, Neck over 40cm (16in), Gender=male) (3+ items means high risk)"); WriteAction("- EKG"); WriteAction("- Cardiac Echo to rule out valvular disease and assess chamber dilation"); WriteAction("- Check TSH to rule out thyroid causes"); WriteAction("- Check urine drugs of abuse screen"); WriteAction("- Check K, Mg, and Ca, and supplement to keep K over 4"); WriteComment("If RVR - Target heart rate below 110bpm"); WriteAction("- Rate control with Metoprolol/Diltiazem/Digoxin. Avoid calcium channel blockers if reduced ejection fraction"); WriteComment("CHADS2VASc = Do NOT use if valvular - (CHF, Hypertension, Age over 75(2pts), Diabetes, Stroke(2pts), PVD, Age over 65, Sex=Female)"); WriteAction("- Anti-Thrombotics: Aspirin 81mg, Direct Xa Inhibitors (Rivaroxaban, Apixaban), Thrombin Inhibitors (Dabigatran) or VitaminK Antagonists (Coumadin, INR=xxx)"); WriteAction("- VitaminK Antagonists only since this is valvular (Coumadin, INR=xxx)"); WriteAction("Manage volume overload: Furosemide"); } // WriteAFibPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteEtOHPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteEtOHPlan() { StartNewPlanSection("Alcohol Abuse", null); WriteComment("Consumes xxx per day, last drink was xxx"); WriteComment("Past history of DT withdrawals"); WriteAction("- PRN Lorazepam per CIWA protocol"); WriteAction("- Thiamine 100mg daily x3days"); WriteAction("- Folate 1mg daily"); WriteAction("- Prenatal vitamin"); WriteAction("Consider Baclofen to reduce EtOH craving (5mg PO TID x3 days, then 10mg PO TID daily)"); } // WriteEtOHPlan //////////////////////////////////////////////////////////////////////////////// // // [WritePancreatitisPlan] // //////////////////////////////////////////////////////////////////////////////// function WritePancreatitisPlan() { StartNewPlanSection("Pancreatitis", null); WriteComment("Meets criteria with abdominal pain, radiographic evidence, lipase over 3x upper normal limit (lipase=xxx)"); WriteComment("APACHE Score on admission = "); WriteComment("Ransons Score on admission = (WBC over 16, Glc over 200, age over 55, AST over 250, LDH over 350)"); WriteComment("Ransons Score at 48hrs = (Hct drop over 10%, BUN increase over 5, Ca below 8, PaO2 below 60mm, (24-HCO3) over 4, IVF over 6L)"); WriteAction("- IV Fluids"); WriteAction("- PRN Morphine"); WriteAction("- PRN Ondansetron"); WriteAction("- NPO, and advance diet as tolerated"); } // WritePancreatitisPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteSyncopePlan] // //////////////////////////////////////////////////////////////////////////////// function WriteSyncopePlan() { StartNewPlanSection("Syncope", null); WriteComment("The differential includes neurologic (CVA, seizure), cardiogenic (arrhythmia, MI, neurocardiogenic, valvular), hematologic (hypovolemia, anemia), endocrine and more"); WriteAction("- IV Fluids"); WriteAction("- Check EKG"); WriteAction("- Check electrolytes, including BMP, Mg and PO4"); WriteAction("- Check CBC"); WriteAction("- Telemetry"); } // WriteSyncopePlan //////////////////////////////////////////////////////////////////////////////// // // [WriteGERDPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteGERDPlan() { StartNewPlanSection("Gastroesophageal Reflux Disease", null); WriteAction("- Continue current medications: Esomeprazole (UNLESS on Clopidogrel)"); } // WriteGERDPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteBPHPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteBPHPlan() { StartNewPlanSection("Benign Prostatic Hyperplasia", null); WriteComment("Home medication regimen: "); WriteAction("- Continue current medications: Tamsulosin, Finasteride"); } // WriteBPHPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteVitaminDPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteVitaminDPlan() { var patientAge = GetLabValue("Age"); StartNewPlanSection("Vitamin D Deficiency", null); WriteComment("Vit D=" + GetLabValueStringForPlan('VitD')); WriteComment("Last T-score: "); if ((!GetLabValue("IsMale")) && (patientAge >= 65) && (patientAge <= 75)) { WriteAction("- Bone density screening (DEXA Q2yr): Last DEXA "); } // Female WriteAction("- Continue current medications: Ergocalciferol"); } // WriteVitaminDPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteGoutPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteGoutPlan() { StartNewPlanSection("Gout", null); WriteComment("Last Gout flare was xxx, last serum Urate was xxx on xxx"); WriteComment("Home medication regimen: "); WriteComment("Titrate Allopurinol for serum urate at below 6 if 1 attack in the past year and CKD-2, or 2 attacks in the past year and CKD-1 (per ACR 2012 Guidelines)"); WriteComment("Consider Febuxostat if the patient cannot tolerate Allopurinol or Pegloticase if the patient has flares resistant to purine lowering"); WriteComment("Counsel patient to avoid excessive protein (such as protein shakes)"); WriteAction("Discontinue and avoid medications that can trigger a flare: Hydrochlorothiazide"); WriteAction("- Prevention: Allopurinol 100mg PO daily"); WriteAction("- Abortive: Prednisone 60mg PO daily x5 days, then Colchicine"); } // WriteGoutPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteObesityPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteObesityPlan() { StartNewPlanSection("Obesity", null); WriteComment("BMI="); WriteAction("- Screen for OSA, dyslipidemia"); WriteAction("- Dietician consult"); } // WriteObesityPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteEncephalopathyPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteEncephalopathyPlan() { StartNewPlanSection("Acute Encephalopathy", null); //WriteComment("The patient has been intubated to protect their airway"); WriteAction("- Check CMP, as many intoxications may cause an acidosis"); WriteAction("- Check EKG, as many intoxications may also cause arrhythmias"); WriteAction("- Check CPK, as encephalopathic patients are at risk for rhabdomyolysis"); WriteAction("- Rule out CNS causes: Head CT, EEG"); WriteAction("- Rule out metabolic causes: CMP, serum Osmolality, and NH3"); WriteAction("- Rule out intoxication: Check serum EtOH, salicylate level, acetaminophen level, urine drug screen"); WriteAction("- If acidotic, then rule out intoxications with metabolic acidosis: check serum volatile screen, serum osmolality"); WriteAction("- Rule out infectious causes: UA, blood, urine and sputum cultures"); WriteAction("- Rule out endocrine causes: Check TSH"); WriteAction("- Rule out CO toxicity, check Carboxyhemoglobin level"); WriteAction("- Rule out cardiac causes: Check VBG, and pulse ox"); WriteAction("- Rule out medication causes (particularly in CKD patients): Check serum Gabapentin, Lithium level, Digoxin level, Amitriptylene levels"); WriteAction("- Seizure precautions"); WriteAction("- Thiamine 100mg once now stat and daily"); WriteAction("- Lorazepam 1mg IV PRN agitation and Haloperidol 4mg IV PRN agitation (Qtc=xxx)"); } // WriteEncephalopathyPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteDepressionPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteDepressionPlan() { StartNewPlanSection("Depression", null); WriteComment("Axis I (clinical syndromes like mood, anxiety, eating disorders): None"); WriteComment("Axis II (personality disorders): None"); WriteComment("Axis IIII (medical conditions): None"); WriteComment("Axis IV (social and environmental problems): None"); WriteComment(""); WriteComment("- PHQ-9 score (anhedonia + SIGECAPS, give a score 0=none,1=several days,2=over half days,3=nearly all days)Score over 9 is moderate depression"); WriteComment("- Rule out suicidal/homicidal ideation"); WriteComment("- Rule out manic episodes (no episodes of lack of sleep, increased energy, hypersexuality, risk taking)"); WriteComment("- Rule out PTSD"); WriteAction("- Check TSH to rule out hypothyroid"); WriteAction("- Rule out comorbid anxiety"); WriteAction("- Start SSRI"); WriteAction("- Continue current outpatient regimen: "); } // WriteDepressionPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteTobaccoPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteTobaccoPlan() { StartNewPlanSection("Tobacco", null); WriteComment("Currently smokes ppd, and started smoking when xxyo"); WriteComment("At precontemplation/contemplation/preparation/action/maintenance stage"); WriteAction("- Counseled cessation"); WriteAction("- Varencycline"); WriteAction("- Nicotine replacement (gum, patch)"); WriteAction("- Refer to smoking cessation program"); } // WriteTobaccoPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteAnxietyPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteAnxietyPlan() { StartNewPlanSection("Anxiety", null); WriteAction("- SSRI"); WriteAction("- Refer to Midtown for concurrant CBT"); } // WriteAnxietyPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteHypothyroidPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteHypothyroidPlan() { StartNewPlanSection("Hypothyroid", null); WriteComment("Last TSH="); WriteAction("- Continue current medications: Levothyroxine"); } // WriteHypothyroidPlan //////////////////////////////////////////////////////////////////////////////// // // [WritePreOpPlan] // //////////////////////////////////////////////////////////////////////////////// function WritePreOpPlan() { StartNewPlanSection("Preop Clearance", null); WriteComment("This surgery is emergent(less than 6hrs) urgent(6-24hrs) time-sensitive(1-6 weeks) elective"); WriteComment("The surgery risk is low(cataracts, colonoscopy, dental) elevated (ortho, vascular, thoracic, abdominal)"); WriteComment("The patients functional status is Excellent(over 10 Mets) Good(7-10 Mets) Moderate(4-6 Mets) Poor(below 4 Mets)"); WriteComment("The patient has xxx cardiac risk factors (CHF, CAD, CVA, Insulin dependant DM, CKD with Cr over 2.0, High risk surgery)"); WriteComment("The patient has xxx pulmonary risk factors (COPD, OSA, tobacco)"); WriteComment(" "); WriteAction("- Check EKG (due to history of CAD or CHF)"); WriteAction("- Check BMP (due to history of CKD)"); WriteAction("- Cardiac Echo (to workup undiagnosed murmur)"); WriteAction("- Cardiac Stress Test (to workup dyspnea, angina, CAD)"); WriteAction("- If Rheumatoid, then get a recent cervical spine XRay"); WriteComment(" "); WriteAction("- Maintain BP below 180/110"); WriteAction("- Start beta blocker if 3 or more cardiac risk factors"); WriteAction("- Smoking cessation 6-8 weeks before elective surgery"); WriteComment(" "); WriteAction("- If bare-metal stent, may need to postpone surgery for 1 month while on Clopidogral"); WriteAction("- If drug-eluting-metal stent, may need to postpone surgery for 6 months while on Clopidogral"); WriteComment(" "); WriteAction("- Continue beta blocker day of surgery"); WriteAction("- Hold ACE-inhibitor or ARB on day of surgery"); WriteAction("- Hold diuretics on day of surgery"); WriteAction("- Hold SSRI on day of surgery"); WriteAction("- Give one-half insulin dose on day of surgery"); WriteAction("- Hold PO diabetic meds (metformin, glyburide) day of surgery"); WriteAction("- Hold all NSAIDs 3 days before surgery"); WriteAction("- Continue benzos, Hydrocodone, Seizure medications day of surgery"); WriteAction("- Stop Coumadin 5 days before surgery and resume day after surgery. If CHADS score 5 or more or avtive thrombus, then bridge with Heparin"); } // WritePreOpPlan //////////////////////////////////////////////////////////////////////////////// // // [WritePalliativePlan] // //////////////////////////////////////////////////////////////////////////////// function WritePalliativePlan() { StartNewPlanSection("Palliative", null); WriteComment("Tumor Lysis Syndrome"); WriteAction("- Check Urate, Phos, K"); WriteAction("- IV fluids"); WriteAction("- Allopurinol 300mg PO daily"); WriteComment("Nutrition - the patient is malnourished - Albumin=xxx"); WriteAction("- Check Vit D, PO4"); WriteAction("- Dietary supplements with all meals (Ensure or similar)"); WriteAction("- Vitamin D supplements and daily Multivitamin"); WriteComment("Advance planning - The patient has/does not have a health care representative, has/does not have an advance directive"); WriteComment("Code status has been discussed and is/is not documented"); WriteComment("The patient wants all resuscitation/does NOT want CPR/does NOT want intubation"); WriteComment("The patient wants/does not want feeding tubes in the future if needed"); WriteComment("The patient wants/does not want antibiotics in the future if needed"); WriteComment("Symptom Management"); WriteAction("Pain: The patient can use PO morphine, Creatinine=xxx"); WriteAction("Scheduled long acting analgesic (PO Morphine SR Q12h/Fentanyl Patch 25mcg/hr) with PRN for breakthrough pain (PO Morphine IR Q4h PRN)"); WriteAction("Constipation: Docusate/Senna 2 tabs PO BID"); WriteAction("Nausea: Scheduled Ondansetron 4mg PO Q12h, with PRN PO Prochlorperazine for breakthrough"); } // WritePalliativePlan //////////////////////////////////////////////////////////////////////////////// // // [WriteOSAPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteOSAPlan() { StartNewPlanSection("Obstructive Sleep Apnea", null); WriteComment("Neck Circumference= , BMI=, Mallampati Score="); WriteComment("STOP-BANG score= (Snoring, Tired, Observed apnea, Pressure(Hypertension), BMI over 35, Age over 50yo, Neck over 40cm (16in), Gender=male) (3+ items means high risk)"); WriteAction("- Check ABG"); WriteAction("- Continue CPAP at night (home setting xxx cm H2O)"); WriteAction("- Flonase when using CPAP"); WriteAction("- Overnight oximetry study"); WriteAction("- Refer to outpatient sleep study"); } // WriteOSAPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteMenorrhagiaPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteMenorrhagiaPlan() { StartNewPlanSection("Metromenorrhagia", null); WriteAction("- Check beta-hCG"); WriteAction("- Check TSH (to rule out elevated TRH which causes prolactin release)"); WriteAction("- Check Prolactin level"); } // WriteMenorrhagiaPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteSepsisPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteSepsisPlan() { StartNewPlanSection("SIRS", null); WriteComment("SIRS (HR, RR, Temp, WBC over 12,000), and source"); WriteComment("The possible sources of infection include: pneumonia, UTI, cellulitis, and more"); WriteAction("- Chest XRay"); WriteAction("- Culture blood, sputum, urine"); WriteAction("- Urine antigens for legionella, strep pneumo"); WriteAction("- If diarrhea, then check stool C diff PCR"); WriteAction("- If immunosuppressed, then check serum beta glucan, galactomannan"); WriteAction("- Check UA, serum lactate"); WriteAction("- IV fluid challenge, starting with 30 mL/Kg initial bolus of crystalloid"); WriteAction("- Start empiric antibiotics, and narrow when cultures return"); WriteVancomycinPlan(true, true); WritePipTazoPlan(true); WriteAction("- Azithromycin (cover atypicals) 500mg IV x3days"); WriteAction("- Hold ALL antihypertensives, PRN Labetalol for BP over 185/105, hold for HR below 60"); } // WriteSepsisPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteStrokePlan] // //////////////////////////////////////////////////////////////////////////////// function WriteStrokePlan() { StartNewPlanSection("Stroke", null); // AHA/ASA 2013 Guidelines //https://www.aan.com/Guidelines/Home/GetGuidelineContent/581 WriteComment("Onset of symptoms: "); WriteComment("NIHSS Stroke Scale: "); // Level of conciousness: 0 - 3 // Ask month and age: 0 - 2 // Blink eyes and squeeze hands: 0 - 2 // Horizontal Extraocular movements: 0 - 2 // Visual Fields: 0 - 3 // Facial Palsy: 0 - 3 // Left arm motor drift: 0 - 4 // Right arm motor drift: 0 - 4 // Left leg motor drift: 0 - 4 // Right leg motor drift: 0 - 4 // Limb ataxia (FNF and Heel/shin) 0 - 2 // Sensation: 0 - 2 // Language/aphasia: 0 - 3 // Dysarthria: 0 - 2 // Inattention: 0 - 2 WriteAction("- Head CT without contrast"); WriteAction("- Check Troponin and EKG"); WriteAction("- MRI"); WriteAction("- Carotid angiography"); WriteAction("- Echo with bubble study"); WriteAction("- Carotid Dopplers"); WriteAction("- Check peripheral smear, complement levels, platelets, Hgb to rule out MAHA such as TMA or APL"); WriteAction("- Aspirin 325mg on day 2 if no tPA but wait until day 3 if given tPA, then 81mg daily"); WriteAction("- Atorvastatin 80mg"); WriteAction("- Check LDL and HDL"); WriteAction("- Check PT/INR and PTT"); WriteAction("- Hold antihypertensives for first day, PRN Labetalol for BP over 220/120 (185/105 if tPA), hold for HR below 60."); WriteAction("- Slowly resume antihypertensives after first day"); WriteAction("- Admit to Telemetry"); WriteAction("- PT/OT"); WriteAction("- NPO (with PO meds and sips of water OK) until Swallow study"); WriteAction("- IV fluids - NS maintenance at 80 mL/hr"); WriteAction("- Hold anticoagulation for 24hrs after admission if given tPA"); WriteAction("- Compression devices for ppx"); // No keppra ppx unless symptoms of seizure // tPA within 3-4.5 hours of onset unless: // Age over 80yo // Oral anticoagulants (regardless of INR), or any dose within the past 2 days // NIHSS score over 25 // Past history of stroke and diabetes // Imaging shows infarct covering more than 1/3 of the MCA territory } // WriteStrokePlan //////////////////////////////////////////////////////////////////////////////// // // [WriteDKAPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteDKAPlan() { StartNewPlanSection("Diabetic Ketoacidosis", null); WriteComment("The possible causes include: med non-compliance, infection, and more"); WriteAction("- CMP once now along with Mg and Phos now, and ABG once now"); WriteAction("- Fingerstick glucose every hour"); WriteAction("- VBG Q2h"); WriteAction("- BMP, Mg, Phos Q4h"); WriteAction("- IV Fluids. Bolus 1L NS, then run 20 ml/kg/hr. Change from NS to 1/2 NS if sodium drops below 133."); WriteComment("When serum Glc is below 200, change IV fluids from NS to D5 1/2NS at 150-200 mL per hr "); WriteAction("- Insulin. Do not start insulin until K is over 3.3"); WriteAction("Bolus 0.1 unit per Kg once now, then insulin drip at 0.1 unit per Kg per hour."); WriteComment("Expect Glc to drop 50-75 mg/L per hour. Titrate insulin and D5 1/2NS drips to keep Glc between 150 and 200 until gap closes"); WriteComment("When anion gap closes, and patient is able to take PO food, switch to subcu insulin."); WriteAction("Continue insulin drip for 2 hours after starting subcu insulin."); WriteAction("Start patient on home insulin regimen, or if there is none then start 0.1 unit/kg Q2hr of rapid acting insulin"); WriteAction("If insulin naive, then start 0.5u/kg, and divide this between half basal (glargine QHS) and half divided into 3 prandial doses."); WriteComment("I prefer Glargine to NPH because although it can only be titrated once per day, it is closer to the discharge regimen and the patient may dc home soon."); WriteComment("- Potassium. Maintain Potassium between 4 and 5"); WriteAction("While Potassium is below 5.3, give 20 mEQ KCl with each liter of IV fluid"); WriteAction("- HCO3. If pH below 7.0, then give 50 mmol HCO3 in 200mL water with 10 mEq KCl"); WriteComment("If pH below 6.9, then give 100 mmol HCO3 in 400mL water with 20 mEq KCl"); WriteAction("- Phos. Give 30 mEq KPhos when serum PO4 is below 1.0 mg/dL"); WriteAction("- Strict In&Out, and daily standing weight"); } // WriteDKAPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteAsthmaPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteAsthmaPlan() { StartNewPlanSection("Asthma", null); WriteComment("This is an acute exacerbation that is Mild (dyspnea with activity), Moderate (Dyspnea limits usual activity), Severe (Dyspnea at rest, interferes with speaking)"); WriteComment("This is Intermittent (use PRN albuterol less than 2x per week, less than 2 per nocturnal attacks per month), Mild Persistent (use PRN albuterol not daily, nocturnal attacks less frequently than weekly), Moderate Persistent (daily), Severe Persistent (throughout the day)"); if (g_InPatient) { WriteAction("- Get CBC with diff to measure Eosinophil level"); WriteAction("- Check ABG. Consider intubation if ABG has pH below 7.2, CO2 over 55 to 70mm Hg, or O2 below 60mm Hg"); WriteAction("- Albuterol/Ipratropium nebs Q4h during initial acute exacerbation, and only while in ER"); WriteAction("- Albuterol nebs Q4h PRN"); WriteAction("- Budesonide/Formoterol 160 BID"); WriteAction("- Systemic Steroids: Methylprednisolone 80mg IV Q12h x4 doses of Prednisone 40mg PO x5 days"); WriteAction("- Mg 2g IV once"); WriteAction("- H1 blocker: Cetirizine (Zyrtec), Loratadine (Claritin), Fexofenadine (Allegra)"); WriteAction("- H2 blocker: Famotidine (Pepcid), Ranitidine (Zantac)"); WriteAction("- Guaifenesin and Fluticasone nasal spray"); WriteComment("- If this is an exacerbation, then give a Pneumonia vaccine before discharge"); } else { WriteAction("- Intermittent - PRN Albuterol HFA"); WriteAction("- Mild Persistent - Beclomethasone"); WriteAction("- Moderate Persistent, Budesonide/Formoterol 80 BID, and PRN Albuterol HFA"); WriteAction("- Severe Persistent - Budesonide/Formoterol 160 BID, and PRN Albuterol HFA"); WriteAction("- H1 blocker: Loratadine (Claritin), Fexofenadine (Allegra)"); WriteAction("- Guaifenesin, Fluticasone nasal spray"); } } // WriteAsthmaPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteCirrhosisPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteCirrhosisPlan() { StartNewPlanSection("Cirrhosis", null); WriteComment("Child-Pugh Class (A,B,C) MELD Score = xxx Maddrey Score = xxx"); WriteComment("The possible causes include: Alcohol, NASH, chronic infection (viral), autoimmune, and more"); WriteAction("Check immunization status for Hepatitis A/B/C"); WriteComment("Varices: "); WriteComment("- If bleed, then manage as discussed under GI bleed"); WriteAction("- Propranolol (unless active bleed), target 20mg BID. Change selective beta blockers to Propranolol. Titrate antihypertensives to target a MAP over 82"); WriteAction("- If bleed, then Ceftriaxone 1g IV daily x7days"); WriteComment("Hepatitis: Manage as per Hepatitis section"); WriteComment("Ascites: "); WriteAction("- Paracentesis (if any ascites) with labs on the ascitic fluid for albumin, total protein, LDH, cell count and gram-stain/culture to identify source and also rule out SBP"); WriteAction("- Diuretics. Spironolactone 100mg and Furosemide 40mg, (or doses in 100:40 ratio up to 400:160). But, do NOT give diuretics if there is GI bleeding or hepatic encephalopathy or renal dysfunction (avoid hepatorenal)"); WriteAction("- Albumin 25g weekly"); WriteAction("- If possible SBP, 3rd generation cephalosporin, preferably Cefotaxime 2g IV Q8h. One study showed Ceftriaxone (1g IV BID x5d)"); WriteAction("- If no SBP, then prophylaxis with Ceftriaxone 1g IV daily x7days"); WriteComment("Encephalopathy: "); WriteAction("- Check NH3"); WriteAction("- If Encephalopathis - Rifaximin PLUS Lactulose"); WriteComment("NASH: "); WriteAction("- Statin - Atorvastatin 40mg"); WriteAction("- Vitamin E (800 IU/day) but do not give if patient is diabetic"); WriteComment("Nutrition: "); WriteAction("- Zinc sulfate 220mg BID"); WriteAction("- Thiamine, Folate, Multivitamin. Check B12 and folate levels"); } // WriteCirrhosisPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteGIBleedPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteGIBleedPlan() { StartNewPlanSection("GI Bleed", null); WriteComment("The possible sources include: upper (variceal, gastritis) and lower (diverticular, lower variceal, hemorrhoid), and more"); WriteComment("If this is an acute bleed, then estimate blood loss using vital signs, as the patient probably has not yet diluted remaining blood so hemoglobin will be normal"); WriteComment("There is no tachycardia and blood pressure is normal, so this is likely Class I hemorrhage with blood loss less than 750mL or 15% total blood volume"); WriteComment("Replete with Lactate Ringers (3mL per 1mL blood loss) so 1L to 2L"); WriteComment("There is tachycardia (HR over 100) or tachypnea (RR over 20) but blood pressure is normal, so this is likely Class II hemorrhage with blood loss 750mL to 1500mL or 15 to 30% total blood volume"); WriteComment("Replete with Lactate Ringers (3mL per 1mL blood loss) so 2L to 4.5L"); WriteComment("There is tachycardia (HR over 120) and blood pressure is low, and urine output is decreased, so this is likely Class III hemorrhage with blood loss 1500mL to 2000mL or 30% to 40% total blood volume"); WriteComment("Transfuse 1 unit PRBC"); WriteComment("There is tachycardia (HR over 120) and blood pressure is low, and urine output is low, so this is likely Class IV hemorrhage with blood loss over 2000mL or over 40% total blood volume"); WriteComment("Transfuse 1 unit PRBC"); WriteAction("- Check INR"); WriteAction("- Check Platelets"); WriteAction("- Check BUN (for possible digested blood)"); WriteAction("- Type and Screen"); WriteAction("- Check Hgb/Hct Q4hrs, and transfuse to keep Hgb over 7"); WriteAction("- Telemetry with call orders for HR over 100"); WriteAction("- IV Pantoprazole - 80mg IV bid or 80mg bolus followed by 8mh/hr continuous"); WriteAction("- If varices - Norfloxacin 400mg PO BID for 7 days or Ceftriaxone 1g IV daily for 7 days"); WriteAction("- Octreotide (a synthetic Somatostatin analog). 50 mcg bolus then 50 mcg/hr"); WriteAction("- Propranolol (20mg BID), and Nadolol (40mg daily)"); WriteAction("- Consult GI service for further assistance and evaluation of possible procedures such as Epper Endoscopy"); } // WriteGIBleedPlan //////////////////////////////////////////////////////////////////////////////// // // [WritePneumoniaPlan] // //////////////////////////////////////////////////////////////////////////////// function WritePneumoniaPlan() { StartNewPlanSection("Pneumonia", null); WriteComment("The patient has clinical features (cough, subjective fevers, dyspnea, change in sputum volume), and radiologic evicende (chest Xray)"); WriteComment("This is HAP, since it started after the patient had been in a hospital for 48 hours"); WriteComment("This is HCAP, since the patient had been hospitalized within 90 days, or lives in a long-term care facility, or has received chemotherapy or IV antibiotics, "); WriteComment("This is VAP, since it started after the patient had been intubated for 48 hours"); WriteComment("CURB65 score = (confusion, BUN over 20, RR over 30, BP below 90/60, age over 65yo)"); WriteAction("- Culture blood, sputum"); WriteAction("- Check urine antigens for legionella, strep pneumo"); WriteAction("- Check Influenza screen and Respiratory Viral Panel"); WriteAction("- Check ProCalcitonin to possibly rule out bacterial infection"); WriteAction("- Start empiric antibiotics, and narrow when cultures return"); WriteComment("For HCAP:"); WriteVancomycinPlan(true, true); WritePipTazoPlan(true); WriteAction("- Tobramycin (double coverage for Pseudomonas unless CKD)"); WriteComment("For CAP:"); WriteAction("Ceftriaxone or Levofloxacin (Strep pneumo and gram negative coverage)"); WriteAction("Azithromycin (cover atypicals, also possible anti-inflammatory) 500mg IV x3days"); WriteAction("- Guaifenesin"); WriteAction("- Inspirometer"); } // WritePneumoniaPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteHepatitisPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteHepatitisPlan() { StartNewPlanSection("Hepatitis", null); WriteComment("The possible causes include: infection (viral), toxicity, autoimmune, and more"); WriteComment("Maddrey Score = xxx"); WriteComment("ALT = xxx, AST = xxx and AST/ALT ratio is xxx"); WriteAction("- Check Hep A Ig, HBsAg, HBsAb, Hep C Ab"); WriteAction("- Check Ceruloplasm, Acetaminophen"); WriteAction("- If Maddrey over 32, then start steroids. Prednisolone 40mg/day x4 weeks, then tapered over 2-4 weeks. If steroids are contraindicated (asthma, severe Diabetes), then use Pentoxifylline 400mg PO TID x4 weeks"); WriteComment("Consider Baclofen to reduce EtOH craving (5mg PO TID x3 days, then 10mg PO TID daily)"); } // WriteHepatitisPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteRespFailurePlan] // //////////////////////////////////////////////////////////////////////////////// function WriteRespFailurePlan() { StartNewPlanSection("Acute Hypoxic and Hypercapnic Respiratory Failure", null); WriteComment("The possible causes include: cardiac (CHF, NSTEMI, arrhythmia), pulmonary (COPD, PE, pneumonia), and more"); WriteComment("* Wells score="); WriteAction("- Check chest XRay"); WriteAction("- Check BNP"); WriteAction("- Doppler U/S bilateral lower extrem"); } // WriteRespFailurePlan //////////////////////////////////////////////////////////////////////////////// // // [WriteAnemiaPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteAnemiaPlan() { var hgbStr = "xxx"; if (GetLabValue('CBCHgb') > 0) { hgbStr = GetLabValue('CBCHgb'); } StartNewPlanSection("Anemia", null); WriteComment("Latest Hgb is " + hgbStr); WriteComment("This is [Microcytic, Macrocytic] Hgb=xx, baseline=xx, MCV=xx"); WriteComment("The possible causes include blood loss, consumption (hemolysis), underproduction (chronic disease, malnutrition), sequestration"); WriteAction("- Check INR"); WriteAction("- Check Retic count"); WriteAction("- Check Ferritin (below 15 is usually Fe deficiency, but Ferritin is also an acute phase reactant so is elevated during inflammation"); WriteAction("- Check Iron levels: Fe, TIBC"); WriteAction("- Check B12 and Folate"); WriteAction("- Check Haptoglobin, LDH, Direct Coombs"); WriteAction("- Check Peripheral smear"); WriteAction("- Type and screen"); WriteAction("- Check Hgb Q6h"); WriteComment(""); WriteAction("- Replace Iron (Ferrous Sulfate PO) and Folate (Folate 1mg PO daily)"); WriteAction("- Transfuse when Hgb drops below 7"); } // WriteAnemiaPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteAcidBasePlan] // //////////////////////////////////////////////////////////////////////////////// function WriteAcidBasePlan() { var str; var deltaBicarb = -1; var deltaPaCO2; var deltapH; var bicarb; StartNewPlanSection("Acid-Base Disorder", null); //////////////////////////////// str = "The serum pH on an ABG is " + GetLabValueStringForPlan('pH'); WriteComment(str); WriteComment("This is a primary acidosis, since compensation will only partially restore the pH to 7.35-7.45"); WriteComment("This is a primary alkalosis, since compensation will only partially restore the pH to 7.35-7.45"); //////////////////////////////// bicarb = GetLabValue("HCO3"); str = "The serum Bicarbonate is " + GetLabValueStringForPlan('HCO3') + " and the Delta Bicarbonate is "; if (bicarb > 0) { deltaBicarb = 24 - bicarb; str = str + deltaBicarb; } else { str = str + "xxx"; } WriteComment(str); //////////////////////////////// str = "The anion gap is "; if (GetLabValue('AnionGap') > 0) { str = str + GetLabValue('AnionGap'); if ((GetLabValue("Albumin") > 0) && (GetLabValue('AdjustedAnionGap') != GetLabValue('AnionGap'))) { str = str + " and " + GetLabValue('AdjustedAnionGap') + " when adjusted for albumin=" + GetLabValue("Albumin"); } //if ((g_AdjustedNa > 0) && (g_AdjustedNa != GetLabValue("Sodium"))) { // str = str + " (this uses an effective Na=" + g_AdjustedNa + " which is adjusted for Glc=" + GetLabValue("Glucose") + ")"; //} } else { str = str + "xxx"; } str = str + " and Delta Gap is "; if (GetLabValue('AnionGap') > 0) { str = str + (12 - GetLabValue('AnionGap')); } else { str = str + "xxx"; } str = str + " (assuming max normal gap is 12)"; str = str + " the ratio is between 1 and 2, so there is likely no other non-gap acidosis"; WriteComment(str); //////////////////////////////// str = "pH is "; if (GetLabValue('pH') > 0) { str = str + GetLabValue('pH'); deltapH = GetLabValue('pH') - 7.4; } else { str = str + "xxx"; } str = str + " and Delta pH is "; if (deltapH > 0) { str = str + deltapH; } else { str = str + "xxx"; } str = str + ", PaCO2 is "; if (GetLabValue('PaCO2') > 0) { str = str + GetLabValue('PaCO2'); } else { str = str + "xxx"; } str = str + " and Delta PaCO2 is "; if (GetLabValue('AnionGap') > 0) { str = str + (GetLabValue('PaCO2') - 40); } else { str = str + "xxx"; } WriteComment(str); WriteComment("- Check whether this is compensated"); WriteComment("In Metabolic Acidosis, PaCO2 should be (1.5 * bicarb) + 8 +- 2 (Winters Formula)"); WriteComment("In Metabolic Alkalosis, delta-PaCO2 should be (0.7 * delta-bicarb), and max PaCO2 is approx 55mm Hg"); WriteComment("In Respiratory Acidosis, bicarb will eventually rise 3mEq for every increase of 10mm in PaCO2 (acutely it rises only 1mEq)."); WriteComment("In Respiratory Alkalosis, bicarb drops 4mEq for every decrease of 10mm in PaCO2 (acutely it drops only 2mEq)"); WriteComment(""); WriteComment("If this is a gap acidosis, then check the ratio of anion-gap / osmolar-gap. A pure gap acidosis will have a ratio between 1 and 2. "); WriteComment(""); WriteComment("- If there is a non-gap acidosis, check urine anion gap (Na + K - Cl). This estimates urine ammonia excretion. The kidneys will excrete NaCl, KCl, and when there is acidosis, NH4Cl."); WriteComment("The anion gap measures the amount of urine Chloride that is not part of NaCl and KCl, which is roughly the same as the amount of NH4Cl."); WriteComment("So, a negative urine anion gap means there is excess Cl- ions, which means the kidney is excreting NH4 in the form of NH4Cl."); WriteComment("The urine anion gap should be negative during acidosis, and this is appropriate renal compensation by excreting excess acid as ammonia."); WriteComment("If it is positive in a metabolic acidosis, then this is inappropriate, and the kidney itself may be the cause of the acidodis."); WriteComment("Possible causes of the non-gap metabolic acidosis include diarrhea, dilutional (IV NS), CKD, Renal tubular acidosis, ileostomy fluid loss or Carbonic anhydrase inhibitors like Acetazolamide or Topiramate or renal cell H+ backleak caused by drugs such as Amphotericin or Toluene."); WriteComment(""); WriteComment("- If this is an anion gap metabolic acidosis, then check Osmolar gap: serum Osm - ((2 * Na) + (Glc / 18) + (BUN / 2.8) + (EtOH / 3.7))"); WriteComment("If Osmolar gap is over 10, then consider MeOH or Ethylene Glycol. Give empiric Fomeprazole"); WriteComment(""); WriteComment("- If this is a metabolic alkalosis, the differential includes volume contraction (saline responsive) and inappropriate renal acid loss (saline resistant - either because of renal dysfunction or excess Aldosterone)"); WriteComment("- Check Urine Chloride"); WriteComment("If Urine Cl is under 15, then the kidney is trying to conserve fluid and you should suspect total body fluid loss, such as vomiting, diarrhea, burns, NG suction, and more"); WriteComment("If Urine Cl is over 15, then suspect renal loss, such as Diuretic, excess Aldosterone, intrinsic renal defect (Liddle, Gittleman, Bartter)"); WriteComment(""); WriteComment("- Check whether this is acute or chronic"); WriteComment("In an acute Respiratory change (either Alkalosis or Acidosis), delta-pH = 0.008 * delta-PaCO2. The pH changes more because there is initially less compensation."); WriteComment("In a Chronic Respiratory change (either Alkalosis or Acidosis), delta-pH = 0.003 * delta-PaCO2. The pH changes less because there is eventually more compensation."); } // WriteAcidBasePlan //////////////////////////////////////////////////////////////////////////////// // // [WriteCADPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteCADPlan() { StartNewPlanSection("Coronary Artery Disease", null); WriteComment("Home medications: "); WriteAction("- Medically manage: Aspirin 81mg, Metoprolol Tartrate 25mg BID, Lisinopril 10mg, Atorvastatin 40mg"); WriteAction("- Check Mg and PO4, and supplement to keep Mg over 2, and K over 4"); } // WriteCADPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteMigrainePlan] // //////////////////////////////////////////////////////////////////////////////// function WriteMigrainePlan() { StartNewPlanSection("Migraines", null); WriteComment("Averaging xxx headaches per month"); WriteComment("The headaches last xxx hours, are unilateral, associated with photophobia and phonophobia."); WriteComment("Headaches are often preceeded by an aura."); WriteComment("Counseled keeping a headache diary to identify frequency and possible triggers"); WriteComment("Counseled avoiding common triggers, including cafeine, nicotine, lack of sleep"); WriteAction("- Start headache abortive: sumatriptan"); WriteAction("- Start headache prophylactic: propranolol (current BP is xxx/xxx)"); WriteAction("- Start headache prophylactic: amitriptyline, divalproex, sodium valproate, topiramate"); WriteAction("- Consider headache prophylactics with limited evidence but few adverse effects: magnesium, vitaminB2 (riboflavin), coenzyme Q10"); } // WriteMigrainePlan //////////////////////////////////////////////////////////////////////////////// // // [WriteApapPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteApapPlan() { StartNewPlanSection("Acetaminophen Toxicity", null); WriteComment("The patient consumed xxx tablets of xxx mg on xxx"); WriteComment("On admission, at xxx, which was xxx hours after ingestion, the acetaminophen level was xxx"); WriteComment("- The time of ingestion is not known, so empirically treat with N-acetylcysteine per the 21-hour IV protocol"); WriteComment("- The time of ingestion is known, so check acetaminophen level 4 hours after admission, and according to Rumack-Matthew nomogram if level is over 150, then treat with N-acetylcysteine per the 21-hour IV protocol"); WriteAction("N-acetylcysteine IV, give 150mg/kg in D5W once bolused over 1 hour, then 12.5 mg/kg/hr for 4 hours, then 6.25 mg/kg/hr"); WriteAction("Continue N-acetylcysteine at 6.25 mg/kg/hr for at least a total of 19 hours from the time of the initial bolus"); WriteAction("- Check CMP and Acetaminophen level at 19 hours after starting N-acetylcysteine drip"); WriteAction("You may stop the N-acetylcysteine drip when Acetaminophen level is undetectable, ALT and AST are both below 1000 and trending down, and the patient is stable"); WriteAction("- Check CMP and INR daily"); } // WriteApapPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteBackPainPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteBackPainPlan() { StartNewPlanSection("Back Pain", null); WriteComment("- Rule out malignancy, abscess, cauda equina (incontinence, saddle paresthesis, fever/chills, weight loss, anticoagulant)"); WriteComment("- Straight leg raise (Herniated disc), more specific when contralateral"); WriteComment("- Is/Isnt relieved by bending (suggesting spinal stenosis)"); WriteComment("- FABER (Flexion,ABduction,External Rotate) - OA causes groin pain, sacroililiatis causes SI pain"); WriteComment("- NSAIDs (Cr=xxx)"); WriteComment("- Gabapentin if neurogenic signs"); WriteComment("- Physical therapy"); WriteComment("- Screen for depression"); WriteComment("- Continue opioids (under narcotic contract, last urine drug screen)"); } // WriteBackPainPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteKneePainPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteKneePainPlan() { StartNewPlanSection("Knee Pain", null); WriteComment("The differential includes trauma: Cruciate ligament tear (ACL,PCL), Meniscal tear (Medial/Lateral), Collateral ligament tear (Medial/Lateral)"); WriteComment(" Overuse and degeneration: Osteoarthritis, Anserine Bursitis (medial, pain at tibial tuberosity, helps to sleep with pilliw between knees), Iliotibial Band (lateral, worse with walking), Patellofemoral (anterior, worse with bending knee/sitting), Prepatellar bursitis (anterior)"); WriteComment(" Infection, and autoimmune inflammation"); StartJointPainPlan(); WriteComment("Signs of meniscal tear (locking)"); WriteComment("Signs of anserine bursitis (tender to palpation on proximal medial tibia, sleep with pillow between knees)"); WriteComment("Lachman and Drawer tests: "); WriteComment("McMurray test: "); WriteComment("Varus and Valgus stress test tests: "); WriteAction("- Analgesics: Apap, Capsaicin, Naproxen (Current Cr=), Tramadol"); WriteAction("- Limit aggravating exercises"); WriteAction("- Physical therapy"); WriteAction("- Intraarticular joint injection"); WriteAction("- MRI"); WriteAction("- Refer to ortho (possible"); WriteAction("- Check labs - ESR, CRP, ANA, ant-CCP"); } // WriteKneePainPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteJointPainPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteJointPainPlan() { StartNewPlanSection("Joint Pain", null); WriteComment("The differential includes overuse and degeneration (Osteoarthritis, Bursitis, Tendonitis), Infection, and autoimmune inflammation"); StartJointPainPlan(); } // WriteJointPainPlan //////////////////////////////////////////////////////////////////////////////// // // [WritePolyarthropathyPlan] // //////////////////////////////////////////////////////////////////////////////// function WritePolyarthropathyPlan() { StartNewPlanSection("Polyarthropathy", null); WriteComment("This involves joints in the hand, wrist, elbow, shoulder, neck, hip, knee, ankle"); WriteComment("The differential includes Fibromyalgia, autoimmune inflammation, infection"); WriteComment("The pain is unilateral/bilateral and affects large/small/both large and small joints"); StartJointPainPlan(); WriteComment(" "); WriteComment("The patient meets American College of Rheumatology criteria for Fibromyalgia with consistent pain for over 3 months and Widespread Pain Index (WPI) over 6 and Symptom Severity (SS) score over 4 or the WPI is 3 to 6 and the SS over 8"); WriteComment("The WPI and SS questionnaires are found at: http://www.sdhct.nhs.uk/patientcare/proformas/pain/questionnaire%20-%20widespread%20pain%20index%20and%20symptom%20severity%20score.pdf"); WriteComment(""); WriteComment("Rule out depression"); WriteComment("Rule out metabolic and endocrine causes by checking TSH, Vitamin D, Hgb, Magnesium"); WriteComment("Rule out inflammation by checking ESR, CRP"); WriteComment("Rule out inflammation by checking ESR, CRP"); } // WritePolyarthropathyPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteShoulderPainPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteShoulderPainPlan() { StartNewPlanSection("Shoulder Pain", null); WriteComment("The differential includes overuse and degeneration (Osteoarthritis, Bursitis, Tendonitis), Infection, and autoimmune inflammation"); StartJointPainPlan(); } // WriteShoulderPainPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteElbowPainPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteElbowPainPlan() { StartNewPlanSection("Elbow Pain", null); WriteComment("The differential includes overuse and degeneration (Osteoarthritis, Bursitis, Tendonitis), Infection, and autoimmune inflammation"); StartJointPainPlan(); } // WriteElbowPainPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteHipPainPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteHipPainPlan() { StartNewPlanSection("Hip Pain", null); WriteComment("The differential includes overuse and degeneration (Osteoarthritis, Bursitis, Tendonitis), Infection, and autoimmune inflammation"); StartJointPainPlan(); } // WriteHipPainPlan //////////////////////////////////////////////////////////////////////////////// // // [StartJointPainPlan] // //////////////////////////////////////////////////////////////////////////////// function StartJointPainPlan() { WriteComment("The pain has been present for xxx"); WriteComment(" "); WriteComment("This is less likely to be inflammatory. There are no signs of synovitis (erythema, edema, calor, tenderness to palpation)"); WriteComment("There are no symptoms of inflammation (morning stiffness over 1 hour), and no signs of systemic inflammation - no leukocytosis, normal ESR and normal CRP, no anemia of chronic disease"); WriteComment("The pain is not significantly reproduced by passive motion, suggesting an extra-articular source such as tendonitis or bursitis."); } // StartJointPainPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteChronicPainPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteChronicPainPlan() { StartNewPlanSection("Chronic Pain", null); WriteComment("The pain is in xxx and is better/worse/unchanged compared to previous clinic visit"); WriteComment("The patient reports the pain affects their functional status - specifically xxx"); WriteComment("The patient has adverse effects from analgesics - specifically constipation/fatigue/xxx"); WriteComment("The patient has related substance abuse issues - xxx"); WriteComment(""); WriteComment("Patient to complete an objective pain assessment tool - Brief Pain Inventory (http://www.partnersagainstpain.com/printouts/A7012AS8.pdf)"); WriteComment("Patient to complete Opioid Risk Tool questionaire (http://iusbirt.org/wp-content/uploads/2012/10/Opioid_Risk_Tool.pdf)"); WriteComment("The patient has been screened for depression (PHQ-9 score = xxx)"); WriteComment(""); WriteComment("I have discussed the goals of pain management (to manage rather than cure the pain) and recommended non-pharmacologic treatments including exercise, local heat, stretching and stress reduction techniques."); WriteComment("I have discussed the risks and benefits of analgesics, including dependence, oversedation, and reduced function. The patient has also been instructed to avoid driving and any manual labor while using sedating medications"); WriteComment("The patient has agreed that their function/activity goals are xxx."); WriteComment("The patient has signed a narcotics contract on (xxx) that specified prescribing parameters, drug monitoring, repercussions of aberrant behavior and more"); WriteComment(""); WriteAction("- Physical therapy"); WriteAction("- Ibuprofen/Napoxen (Cr=xxx)"); WriteAction("- Urine drugs of abuse screen"); WriteComment("Patient to be reevaluated every 3-4 months to monitor their functional status and medication side effects"); } // WriteChronicPainPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteOncologyPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteOncologyPlan() { StartNewPlanSection("Malignancy", null); WriteComment("Hypercalcemia of Malignancy:"); WriteAction("- Check Ca, Mg, Vit D, PO4"); WriteAction("- If hypercalcemic, then Calcitonin and Bisphosphonate"); WriteAction("- If elevated 1,25 Vit D, then steroids"); WriteComment("Tumor Lysis Syndrome"); WriteAction("- Check serum Urate, Phos, K"); WriteAction("- Allopurinol 100mg TID"); WriteAction("- Rasburicase 0.15 mg/kg once (contraindicated if G6PD deficiency)"); WriteAction("- Do not alkalinize the urine - it increases risks for CaPhos stones"); WriteAction("- IV Fluids"); WriteComment("Nutrition (Albumin=xxx)"); WriteAction("- Dietary supplements with all meals (Ensure or similar)"); WriteAction("- Daily Multivitamin"); WriteComment("Pain:"); WriteComment("The patient can use PO morphine, Creatinine=xxx"); WriteAction("- Scheduled long acting analgesic (PO Morphine SR Q12h/Fentanyl Patch 25mcg/hr) with PRN for breakthrough pain (PO Morphine IR Q4h PRN)"); WriteAction("- Esophogitis mixture for mucositis"); WriteComment("Constipation:"); WriteAction("- Docusate/Senna 2 tabs PO BID"); WriteComment("Nausea:"); WriteAction("- Ondansetron 8mg PO Q8h scheduled"); WriteAction("- Ondansetron 4mg IV Q4h PRN"); WriteAction("- Prochlorperazine PRN"); WriteComment("Surveillance:"); WriteAction("- Monitor for PE or Fanconi"); } // WriteOncologyPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteHemodialysisPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteHemodialysisPlan() { StartNewPlanSection("Renal Failure on Hemodialysis", null); WriteComment("Original cause of renal failure was "); WriteComment("Outpatient dialysis on Mon/Wed/Fri Tue/Thur/Sat at x"); WriteComment("Outpatient Nephrologist is Dr. x"); WriteComment("On dialysis since xxx, anuric-makes approx xxx mL urine daily"); WriteComment("Dry Weight = x kg, access is LUE AVF"); WriteComment("Outpatient Orders: xhrs, F-x, BFR=x00, DFR=x00, Ca=2.5, K=3, HCO3=x, Na=x"); WriteComment("Most recent dialysis was x, and ran for x hours"); WriteComment("Dialysis Pressures: Venous: x Arterial: x"); WriteAction("- Hemodialysis today, Duration=4hrs"); WriteComment("F-160, Blood Flow Rate 400, Dialysate flow rate 600"); WriteComment("Dialysis Bath:"); WriteComment("Temp=37 (patient temp is 36)"); WriteComment("Ca=2.5"); WriteComment("K=3 (patient K on BMP was x)"); WriteComment("HCO3=30 (patient HCO3 on BMP was x)"); WriteComment("Na=138 (patient Na on BMP was x, target total Na change less than 6mEq)"); WriteComment("Ultrafiltration: x L (patient weight x kg, EDW = x, max 10-13 mL/kg/hr)"); } // WriteHemodialysisPlan //////////////////////////////////////////////////////////////////////////////// // // [WritePeritonealDialysisPlan] // //////////////////////////////////////////////////////////////////////////////// function WritePeritonealDialysisPlan() { //LogEvent("WritePeritonealDialysisPlan"); StartNewPlanSection("Renal Failure on Peritoneal Dialysis", null); WriteComment("Original cause of renal failure was "); WriteComment("Outpatient nephrologist is "); WriteComment("On PD since x. No history of peritonitis"); WriteComment("Residual Renal Function - makes urine daily, eGFR = x when off dialysis"); WriteComment("Outpatient regimen: 1.5% Dextrose, 2L bags with manual exchanges Q6h, nocturnal cycler"); WriteComment("Over 24hrs, this is x liters of peritoneal dialysate"); WriteComment("Last stool was xxx"); WriteComment("If the patient is on Icodextran at home, then check all sliding scale glucose measurements with a test insensitive to Icodextran, such as serum Glucose, not fingetstick"); WriteComment("If slow draining, add 500 units Heparin to each bag"); WriteAction("- Continue Peritoneal Dialysis 1.5% Dextrose, 2L bags with manual exchanges Q6h"); WriteAction("- Gentamycin 1% topical cream (not ointment) at PD site"); WriteAction("- Bowel regimen: Miralax 17gm PO scheduled"); } // WritePeritonealDialysisPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteCVVHPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteCVVHPlan() { StartNewPlanSection("Renal Failure on CVVH", null); WriteComment("Access is right IJ Temp dialysis catheter"); WriteComment("Prescription Fluid: K=4, HCO3=35"); WriteComment("Prescription Fluid Rate = xxxx mL/hr (30mL/kg/hr, weight xxx kg)"); WriteComment("Blood flow rate 300 mL/min"); WriteComment("Ultrafiltration 0 mL/hr"); WriteComment("Use Normal Saline as needed to replace losses from drain outputs"); WriteComment("Do not count any IV fluids given for hypotension in the Intake and Output. You may bolus and not count that fluid volume in the intake/output balance."); WriteComment("Anticoag: Heparin x, Protamine x"); WriteComment("Dialysis Pressures: Venous: x Arterial: x"); } // WriteCVVHPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteVolumePlan] // //////////////////////////////////////////////////////////////////////////////// function WriteVolumePlan() { StartNewPlanSection("Volume Status", null); WriteComment("Over the past 24hrs: Intake x mL, Output x mL, Urine output x mL"); WriteComment("Clinically, appears euvolemic or even hypovolemic, with no rales, JVD or peripheral edema"); WriteAction("- Continue IV volume replacement: xxx"); WriteAction("- Check BNP"); WriteAction("- Check Cardiac Echo"); } // WriteVolumePlan //////////////////////////////////////////////////////////////////////////////// // // [WriteFreeWaterPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteFreeWaterPlan() { StartNewPlanSection("Free Water Status", null); WriteComment("Na = xxx"); WriteComment("Free water deficit is xxxx"); } // WriteFreeWaterPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteCKDAnemiaPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteCKDAnemiaPlan() { var hgbStr = "xxx"; if (GetLabValue('CBCHgb') > 0) { hgbStr = GetLabValue('CBCHgb'); } StartNewPlanSection("Anemia of Chronic Renal Disease", null); WriteComment("Latest Hgb=" + hgbStr); WriteAction("- Check Iron binding saturation"); WriteAction("- Check Ferritin (over 100 is never Fe deficiency, below 15 is usually Fe deficiency) but Ferritin is also an acute phase reactant so is elevated during inflammation"); WriteAction("- Replace Iron (Ferric Gluconate 128mg x8 doses for a total of 1g)"); WriteAction("- Replace Iron (Ferrous Sulfate PO)"); WriteComment("- Transfuse when Hgb drops below 7"); } // WriteCKDAnemiaPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteMBDPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteMBDPlan() { var fullLineStr; StartNewPlanSection("Metabolic Bone Disease", null); fullLineStr = "Ca=" + GetLabValueStringForPlan('Calcium'); if ((GetLabValue('AdjustedCa') > 0) && (GetLabValue("Albumin") > 0)) { fullLineStr = fullLineStr + " (" + GetLabValue('AdjustedCa') + " when corrected for albumin=" + GetLabValue("Albumin") + ")"; } fullLineStr = fullLineStr + ", Phos=" + GetLabValueStringForPlan('Phos'); fullLineStr = fullLineStr + ", VitD=" + GetLabValueStringForPlan('VitD'); WriteComment(fullLineStr); WriteComment("PTH=" + GetLabValueStringForPlan('PTH')); WriteAction("- Continue home medications: Calcitriol"); } // WriteMBDPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteNephroticPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteNephroticPlan() { StartNewPlanSection("Nephrotic Proteinuria", null); WriteComment("Urine Protein=xxx"); WriteComment("Albumin=xxx"); WriteComment("The differential includes:"); WriteComment("Secondary Nephrotic: Diabetes, SLE, Hepatitis B and C, HIV, Amyloidosis, Preeclampsia, Medications: NSAIDs, Tamoxifen, Lithium"); WriteComment("Primary Nephrotic: Minimal change nephropathy, Membranous nephropathy, Focal Segmental glomerulosclerosis"); WriteComment(" "); WriteComment("Start empiric treatment"); WriteAction("- Start Lisinopril (an ACEi increases chance of spontaneous remission, and will reduce proteinuria, which is inflammatory, and so it protects renal function)"); WriteAction("- Start Anticoagulation if Albumin below 2.0 (target INR 2-3) and any of following: proteinuria over 10g/day, BMI over 35, NYHA 3 or 4 or prolonged immobilization (see KDIGO 2012 Guidelines on GN). Thromboembolism is most common with membranous nephropathy, and there is less data for thrombosis with other forms of nephrotic proteinuria in DM but if albumin is persistently < 1.5 we have to consider anticoagulation"); WriteAction("- Check TSH and Vitamin D (binding proteins are lost in proteinuria)"); WriteComment(" "); WriteComment("Work up possible causes of secondary nephrotic syndrome"); WriteAction("- Check A1c"); WriteAction("- Check serum and urine free light chains (kappa and lambda) and also check SPEP and UPEP"); WriteAction("- Check Cryoglobulins"); WriteAction("- Check ANA and C3 and C4 complement levels"); WriteAction("- Check Hepatitis B and C antibodies"); WriteAction("- Check HIV Screen and Syphilis screen"); WriteAction("- Check anti-GBM antibody"); WriteAction("- Check LDL"); WriteAction("- Age-appropriate cancer screening (membranous is often secondary to malignancy)"); WriteAction("- Check PLA2R antibody (70% sensitive in Ideopathic Membranous GN but may also present in secondary)"); } // WriteNephroticPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteMalnutritionPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteMalnutritionPlan() { var fullLineStr; StartNewPlanSection("Nutrition", null); WriteComment("Albumin=xxx"); fullLineStr = "Ca=" + GetLabValueStringForPlan('Calcium'); if ((GetLabValue('AdjustedCa') > 0) && (GetLabValue("Albumin") > 0)) { fullLineStr = fullLineStr + " (" + GetLabValue('AdjustedCa') + " when corrected for albumin=" + GetLabValue("Albumin") + ")"; } fullLineStr = fullLineStr + ", Phos=" + GetLabValueStringForPlan('Phos'); fullLineStr = fullLineStr + ", VitD=" + GetLabValueStringForPlan('VitD'); WriteComment(fullLineStr); WriteComment("PTH=" + GetLabValueStringForPlan('PTH')); WriteComment("Mg=" + GetLabValueStringForPlan('Magnesium')); WriteAction("- Replace water soluble vitamins (vitamins B and C) while on dialysis (these are filtered out during hemodialysis)"); } // WriteMalnutritionPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteRenalTransplantPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteRenalTransplantPlan() { StartNewPlanSection("Renal Transplant", null); WriteComment("Transplant in "); WriteComment("Tacrolimus Level=xxx"); WriteComment("Home immunosuppression regimen: "); WriteAction("- If fever: culture blood and urine, check CMV and EBV viral load, check BK Virus, check Tac level"); WriteAction("- Check Tacrolimus level daily"); WriteAction("- Continue home medications:"); WriteComment("For CNI-induced diabetes use Metformin (assuming eGFR is ok) and DDP4 blockers like Sitagliptan"); WriteComment("For CNI-induced dislipidemia use Fluvastatin or Pravastatin. Simvastatin is contraindicated becasue of P450 interactions."); WriteComment("For CNI-induced Hypertension, use CCB or ACE/ARB."); WriteComment("For post-transplant AKI, check Tac level, BK Virus, Donor-Specific Antibodies, Ultrasound (mild hydro is usually normal)"); } // WriteRenalTransplantPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteParathyroidectomyPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteParathyroidectomyPlan() { StartNewPlanSection("Parathyroidectomy", null); WriteComment("Surgery on "); WriteComment("There is risk of hungry bone syndrome leading to hypocalcemia."); WriteAction("- Check ionized Calcium Q4h"); WriteAction("- Check PTH Q24h"); WriteAction("- Ca-Carbonate 750mg PO TID"); WriteAction("- Calcitriol 1mcg daily"); WriteAction("- PRN IV Calcium Gluconate"); WriteComment("Ok to discharge home tomorrow if no IV calcium needed in 24hrs"); } // WriteParathyroidectomyPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteIVContrastPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteIVContrastPlan() { StartNewPlanSection("IV Contrast", null); WriteAction("- Hold all nephrotoxis, specifically ACE-inhibitors or ARBS"); WriteAction("- IV NS up to 1L given continuously over 8hrs prior to procedure"); WriteAction("- IV NS up to 1L given continuously over 8hrs post procedure"); WriteAction("- IV Bicarb, 150mEq/L, give 3 mL/kg over 1 hour prior to procedure, then 1 mL/kg per hour for 6 hours after procedure"); WriteAction("- N-acetylcysteine 600mg PO Q12hrs for 4 doses, first dose before surgery."); } // WriteIVContrastPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteVancomycinPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteVancomycinPlan(allowPharmacy, seriousInfection) { var dose; var minDose; var maxDose; var targetDoseRoundDown; var targetDoseRoundUp; var pStr = "- Vancomycin (cover gram positives including MRSA"; var explanationStr = ""; //LogEvent("WriteVancomycinPlan. allowPharmacy=" + allowPharmacy); var weightInKg = GetLabValue("WeightInKg"); var patientAge = GetLabValue("Age"); if ((weightInKg < 0) || (GetLabValue('CreatinineClearance') < 0) || (patientAge < 0)) { if (allowPharmacy) { pStr = pStr + ") - Pharmacy to dose"; } WriteComment(pStr); return; } // Special case ESRD if (GetLabValue('CreatinineClearance') <= 30) { pStr = pStr + ", dose adjusted for CKD-V or ESRD since CrCl=" + GetLabValue('CreatinineClearance') + ") "; // The min dose is 15 mg/kg and the max dose is 20 mg/kg minDose = weightInKg * 15; maxDose = weightInKg * 20; // The target dose is in the middle, 17mg/kg dose = weightInKg * 17; var intDose = dose / 250; intDose = intDose.toFixed(); // Now, round to the nearest 250 targetDoseRoundDown = intDose * 250; targetDoseRoundUp = targetDoseRoundDown + 250; if ((targetDoseRoundUp - dose) < (dose - targetDoseRoundDown)) { dose = targetDoseRoundUp; } else { dose = targetDoseRoundDown; } pStr = pStr + dose + "mg (17mg/kg rounded to 250), repeat dose of " + dose + "mg when serum level below 20mg/dL"; WriteComment(pStr); return; } // ESRD pStr = pStr + ") "; // Select the dose based on weight if (weightInKg >= 111) { pStr = pStr + "1750mg "; } else if ((weightInKg >= 90) && (weightInKg < 111)) { pStr = pStr + "1500mg"; } else if ((weightInKg >= 75) && (weightInKg < 90)) { pStr = pStr + "1250mg"; } else if ((weightInKg >= 60) && (weightInKg < 75)) { pStr = pStr + "1000mg"; } else if ((weightInKg >= 50) && (weightInKg < 60)) { pStr = pStr + "750mg"; } else { // if ((weightInKg <= 50)) { pStr = pStr + "500mg"; } explanationStr = explanationStr + "TBW=" + weightInKg + "kg" // Select the frequency based on Cr Clearance // May do Q8h if < 50yo and CrCl>100 and severe infection if (GetLabValue('CreatinineClearance') >= 100) { if ((patientAge < 50) && (seriousInfection)) { pStr = pStr + " Q8h"; explanationStr = explanationStr + ", age=" + patientAge + "yo"; } else { pStr = pStr + " Q12h"; } } else if ((GetLabValue('CreatinineClearance') >= 50) && (GetLabValue('CreatinineClearance') < 100)) { pStr = pStr + " Q12h"; } else if ((GetLabValue('CreatinineClearance') >= 30) && (GetLabValue('CreatinineClearance') < 50)) { pStr = pStr + " Q24h"; } explanationStr = explanationStr + ", CrCl=" + GetLabValue('CreatinineClearance'); if (explanationStr != "") { pStr = pStr + " (" + explanationStr + ")"; } WriteComment(pStr); if ((seriousInfection) && (weightInKg >= 30)) { pStr = "Start with one-time initial Vanc loading dose of "; // Select the dose based on weight if (weightInKg >= 90) { pStr = pStr + "3000mg over 6hrs"; } else if ((weightInKg >= 75) && (weightInKg < 90)) { pStr = pStr + "2500mg over 5hrs"; } else if ((weightInKg >= 60) && (weightInKg < 75)) { pStr = pStr + "2000mg over 4hrs"; } else if ((weightInKg >= 50) && (weightInKg < 60)) { pStr = pStr + "1500mg over 3hrs"; } else if ((weightInKg >= 30) && (weightInKg < 50)) { pStr = pStr + "1500mg over 2hrs"; } WriteAction(pStr); } // if (seriousInfection) WriteAction("Check Vanc trough immediately before 4th dose"); WriteAction("Doses of 15–20 mg/kg (as actual body weight) given every 8–12 hr"); WriteComment("See Therapeutic monitoring of vancomycin in adult patients: A consensus review of the American Society of Health-System Pharmacists, the Infectious Diseases Society of America, and the Society of Infectious Diseases Pharmacists"); WriteComment("The recommendations are summarized on page 3 of the report, which is labelled page 84 of the journal it appeared in"); WriteComment("http://www.idsociety.org/uploadedFiles/IDSA/Guidelines-Patient_Care/PDF_Library/Vancomycin.pdf"); WriteComment("Management of MRSA Infections in Adult Patients 2011 Clinical Practice Guidelines by the Infectious Diseases Society of America"); WriteComment("http://www.idsociety.org/uploadedFiles/IDSA/Guidelines-Patient_Care/PDF_Library/MRSA%20slideset%2010%2012%2011%20Final.pdf"); WriteComment("Clinical Practice Guidelines by the Infectious Diseases Society of America for the Treatment of Methicillin-Resistant Staphylococcus Aureus Infections in Adults and Children"); WriteComment("http://www.idsociety.org/uploadedfiles/idsa/guidelines-patient_care/pdf_library/mrsa.pdf"); } // WriteVancomycinPlan //////////////////////////////////////////////////////////////////////////////// // // [WritePipTazoPlan] // //////////////////////////////////////////////////////////////////////////////// function WritePipTazoPlan(allowPharmacy) { var pStr = "- Pip/Tazo (cover gram negatives and anaerobes)"; if ((GetLabValue('CreatinineClearance') > 0) && (GetLabValue('CreatinineClearance') <= 15)) { pStr = pStr + " 2.25g IV Q8h (dose adjusted for CrCl=" + GetLabValue('CreatinineClearance') + ")"; } else if ((GetLabValue('CreatinineClearance') > 15) && (GetLabValue('CreatinineClearance') <= 50)) { pStr = pStr + " 3.375g IV Q8h (dose adjusted for CrCl=" + GetLabValue('CreatinineClearance') + ")"; } else { pStr = pStr + " 3.375g IV Q6h"; } WriteAction(pStr); } // WritePipTazoPlan //////////////////////////////////////////////////////////////////////////////// // // [WriteOpioidPlan] // //////////////////////////////////////////////////////////////////////////////// function WriteOpioidPlan() { StartNewPlanSection("Chronic Opioid Abuse - Present on admission", null); WriteComment("- Check Urine Drug Screen"); WriteComment("On admission, Urine Drug Screen was positive for: "); WriteComment("Per the medical record, past Urine drug screens have been positive for: "); WriteComment("Per pharmacy records, the patient has recently filled prescriptions for: "); WriteComment("The patient says they use the following medications without a prescription: none"); WriteComment("The patient says they last abused opioids: "); WriteComment("The patient denies any past IV drug abuse, cocaine abuse, THC abuse, methamphetamine abuse"); WriteComment("On exam, the patient has the following clinical symptoms of opioid withdrawal: Rhinorrhea, Abdominal and leg cramping, Nausea and vomiting, Diarrhea, Dilated pupils"); } // WriteOpioidPlan