<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Cody Couperus]]></title><description><![CDATA[Medicine ∩ Data Science]]></description><link>https://www.codymd.com/</link><image><url>https://www.codymd.com/favicon.png</url><title>Cody Couperus</title><link>https://www.codymd.com/</link></image><generator>Ghost 5.7</generator><lastBuildDate>Sat, 02 May 2026 20:47:43 GMT</lastBuildDate><atom:link href="https://www.codymd.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Manjaro Linux Bluetooth and Audio Info]]></title><description><![CDATA[<p>I spent the morning troubleshooting this and I wasn&apos;t finding much useful info through searches, so this is just a little info dump post to be helpful for others with similar problems. I briefly explain the Manjaro Linux audio stack, the relevant packages, and how to enable/troubleshoot</p>]]></description><link>https://www.codymd.com/manjaro-linux-bluetooth-and-audio-info/</link><guid isPermaLink="false">66eb0bbfe70df1049b75d3b5</guid><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Wed, 18 Sep 2024 17:23:04 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1466428996289-fb355538da1b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDl8fGF1ZGlvfGVufDB8fHx8MTcyNjY3OTk5MHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1466428996289-fb355538da1b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDl8fGF1ZGlvfGVufDB8fHx8MTcyNjY3OTk5MHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="Manjaro Linux Bluetooth and Audio Info"><p>I spent the morning troubleshooting this and I wasn&apos;t finding much useful info through searches, so this is just a little info dump post to be helpful for others with similar problems. I briefly explain the Manjaro Linux audio stack, the relevant packages, and how to enable/troubleshoot your bluetooth and audio setup. Good luck!</p><h2 id="tldr">TL;DR</h2><ul><li>Manjaro uses <code>pipewire</code> to manage audio</li><li>Pipewire has to simulate <code>pulseaudio</code> for backwards compatability. This is done with <code>pipewire-pulse</code> and controlled with <code>pactl</code></li><li><code>wireplumber</code> is the session and policy manager for pipewire</li><li><code>bluez</code> is the official bluetooth stack for linux. You also need <code>bluez-plugins</code> installed. May need <code>bluez-utils</code> - provides utilities like bluetoothctl</li><li><code>blueman</code> and <code>blueman-manager</code> is a simple GUI for bluetooth stuff</li><li><code>pavucontrol</code> is a simple GTK based volume controller tool that uses pulseaudio sound server.</li><li><code>volumeicon</code> is the tray item and volume mixer mixer that comes default with manjaro. I do think that this is causing some problems with pavucontrol which I&apos;m still troubleshooting.</li></ul><h2 id="installupdate-commands">Install/update commands</h2><pre><code class="language-bash">sudo pacman -Syu bluez bluez-utils bluez-plugins pipewire pipewire-pulse wireplumber pavucontrol
</code></pre><h2 id="check-enable-or-restart-services-as-necessary">Check, enable, or restart services as necessary</h2><pre><code class="language-bash">sudo systemctl --user status bluetooth
systemctl --user status wireplumber pipewire pipewire-pulse
sudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.service
sudo systemctl restart bluetooth
systemctl --user restart wireplumber pipewire pipewire-pulse
bluethoothd --version
pipewire --version
pactl --info
ps aux | grep pulseaudio
</code></pre><h2 id="enable-services-if-needed">Enable services if needed</h2><pre><code class="language-bash">sudo systemctl enable wireplumber pipewire pipewire-pulse
</code></pre><h2 id="show-pactl-cards">Show pactl cards</h2><pre><code class="language-bash">pactl --info
pactl list cards
</code></pre><h2 id="how-to-use-bluetoothctl">How to use bluetoothctl</h2><pre><code class="language-bash">bluetoothctl
power on
agent on
discoverable on
default-agent
scan on
pair macaddr
trust macaddr
connect macaddr
</code></pre>]]></content:encoded></item><item><title><![CDATA[Management of Euglycemic Diabetic Ketoacidosis - Insulin is the Secret Sauce]]></title><description><![CDATA[<p>This post will review the presentation, workup, and treatment of euglycemic diabetic ketoacidosis (eDKA). Particular attention is spent discussing refractory acidosis, treatment failure, and insulin dosing.</p><h1 id="tldr">TL;DR</h1><ul><li>eDKA is a medical emergency and the management is NOT straightforward</li><li>SGLT-2 inhibitor use and pregnancy are major risk factors for eDKA</li></ul>]]></description><link>https://www.codymd.com/euglycemic-dka/</link><guid isPermaLink="false">66c3e5aae70df1049b75d026</guid><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Tue, 20 Aug 2024 05:47:00 GMT</pubDate><media:content url="https://www.codymd.com/content/images/2024/08/header-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.codymd.com/content/images/2024/08/header-1.png" alt="Management of Euglycemic Diabetic Ketoacidosis - Insulin is the Secret Sauce"><p>This post will review the presentation, workup, and treatment of euglycemic diabetic ketoacidosis (eDKA). Particular attention is spent discussing refractory acidosis, treatment failure, and insulin dosing.</p><h1 id="tldr">TL;DR</h1><ul><li>eDKA is a medical emergency and the management is NOT straightforward</li><li>SGLT-2 inhibitor use and pregnancy are major risk factors for eDKA</li><li>Patients may <strong>NOT</strong> present with ketonuria if they are on an SGLT-2 inhibitor</li><li>Treating eDKA demands balancing the risks of hypoglycemia and insulin deficiency</li><li><strong>Refractory anion gap metabolic acidosis should be a HUGE RED FLAG that the insulin dose is NOT HIGH ENOUGH - you MUST give more dextrose AND more insulin!</strong></li><li>The most common pitfall in the management of eDKA is NOT GIVING ENOUGH INSULIN. Start with at least 0.05 units/kg/hour along with IV dextrose.</li><li><strong>MAKE SURE TO GIVE AT LEAST 5 GRAMS/HOUR OF DEXTROSE - this will be 100 mL per hour of a 5% dextrose solution - most patients need 5-10 g/h.</strong></li><li>D5 = 50 g/L; D10 = 100 g/L; D20 = &#xA0;200g/L ... and so on</li></ul><h1 id="intro">Intro</h1><p>Euglycemic diabetic ketoacidosis (eDKA) is defined as the <strong>presence of an anion gap metabolic acidosis, ketosis, a blood sugar under 250 mg/dL</strong>, and no other identified etiology.</p><p><strong>eDKA is caused by an imbalance of insulin and glucagon </strong>that disrupts the steady state of ketones in the body. The risk factors and treatment are a direct result of this fact. </p><p>I love physiology, but feel free to skip this next part if it&apos;s not your thing.</p><h4 id="insulin-reduces-ketone-production">Insulin reduces ketone production</h4><p>Ketones are made in the liver and used in peripheral tissue. They are made in the mitochondria from Acetyl-CoA. Fat breakdown in tissues and oxidation in the liver leads to huge amounts of Acetyl-CoA in the liver cytosol. The acetyl-CoA is transported into the mitochondria where ketone formation happens.</p><p>Insulin decreases fat breakdown and inhibits acetyl-CoA transport into the mitochondria. <strong>Therefore insulin REDUCES ketone production.</strong></p><h4 id="glucagon-increases-ketone-production">Glucagon increases ketone production</h4><p>Glucagon causes increased fat breakdown and stimulates ketone production in the liver directly!</p><h4 id="sglt-2-inhibitors-reduce-insulin-and-increase-glucagon">SGLT-2 inhibitors reduce insulin AND increase glucagon</h4><p>Insulin is secreted by beta cells in the pancreas. The strongest signal for insulin production is HIGH BLOOD SUGAR. </p><p>SGLT-2 inhibitors work at the proximal tubule of the kidney. They inhibit the pump that reabsorbs glucose and excretes sodium. In this way they directly reduce the glucose in the blood. <strong>Because there is less glucose, there is less insulin.</strong></p><p><strong>Pre-hepatic insulin-glucagon ratio is reduced by up to 25% in patients on SGLT-2 inhibitors.</strong></p><p>More glucose reaches the distal renal tubule when a patient is on a SGLT-2 inhibitor. These <strong>distal </strong>transporters consequently absorb <strong>more </strong>glucose than usual. As glucose is absorbed, sodium is exchanged into the renal tubules. This effect causes a net positive charge in the tubules. This electrical gradient results &#xA0;in MORE ketone (+) absorption in the distal renal tubule. </p><p><strong>Distal renal tubular absorption of ketones can cause reduced or ABSENT ketonuria in patients with eDKA on SGLT-2 inhibitors!</strong></p><p>There are some data that suggest SGLT-2 inhibitors may directly increase glucagon production in the alpha cells of the pancreas. These are animal studies only, so presence of this effect is not absolute. </p><p>The final effect of SGLT-2 inhibitors on ketone promotion is from osmotic diuresis. Hypovolemia increases beta-1 agonist activity which reduces insulin and increases glucagon - thus propagating the problem. </p><p>In summary, SGLT-2 inhibitors cause a GLUCOSE deficit and shift the balance of insulin and glucagon towards ketosis. They cause renal reabsorption of ketones, osmotic diuresis, and may directly stimulate glucagon production. As a result of these effects, patients on these drugs have an increased likelihood of euglycemic DKA. </p><h4 id="pregnancy-reduces-glucose-and-promotes-ketosis">Pregnancy reduces glucose and promotes ketosis</h4><p>DKA in pregnancy is a medical and obstetric emergency with up to a 35% risk of serious complications including maternal or fetal demise. High clinical suspicion and early identification are the best ways to take care of these patients. </p><p>Plasma volume increases 40% by the end of pregnancy and GFR increases 60%. This causes glucose dilation and more renal glucose filtration. In addition, placental glucose uptake increases dramatically through pregnancy. Caloric needs by the third trimester can increase by up to 300 kilocalories per day!</p><p><strong>Less glucose = less insulin</strong><br><strong>Less insulin = more ketones</strong></p><p>The placenta also secretes human placental lactogen, placental insulinase, and progesterone. All of these hormones increase insulin resistance and promote fat breakdown and hepatic oxidation.</p><p><strong>As a result of these effects, 30% of pregnant patients with DKA are euglycemic on presentation!</strong></p><h1 id="presentation-and-workup">Presentation and Workup</h1><p>eDKA presents similar to hyperglycemic DKA. Patients present with GI symptoms of nausea, abdominal pain, vomiting and eventually develop respiratory symptoms and altered mental status.</p><p>The bulk of your efforts evaluating a patient with potential eDKA will be evaluating for alternative causes of anion gap metabolic acidosis. A full review of this differential diagnosis is out of the scope of this post. Briefly, you should consider all of the following:</p><ul><li>Lactic acidosis</li><li>Ethanol</li><li>Methanol</li><li>Ethylene glycol</li><li>Salicyate ingestion</li><li>TCA overdose</li><li>Paracetamol induced D-lactic acidosis</li><li>Starvation ketoacidosis</li><li>Alcoholic ketoacidosis</li></ul><p>A typical patient with euglycemic DKA will present with a high anion gap metabolic acidosis, ketonuria, and no other cause for their anion gap. In particular, ethanol levels, lactate, and salicylate levels should all be normal! Multiple studies have investigated lactate levels for allcomers with DKA and 95% of the time it will be measured less than 2 mmol/L.</p><p>Keep in mind that a urinalysis uses nitroprusside to measure acetone and acetaldehyde, but the main ketone in DKA is <strong>beta hydroxybutyrate</strong>. A BHB over 3 mmol/L is extremely concerning for a ketoacidosis contributing to the patient&apos;s presentation.</p><p>In addition to pregnancy and SGLT-2 inhibitor use, additional risk factors may include the following:</p><ul><li>Surgical procedure</li><li>Infection</li><li>Ischemia (stroke, myocardial infarction, ischemic bowel)</li><li>Low carbohydrate intake</li><li>Recent reduction in insulin regimen (?maybe on initiation of an SGLT-2i)</li><li>Underweight with LOW glycogen stores</li><li>Have T1DM or T2DM with severe insulin deficiency<br>(15% of patients will have NO history of diabetes at presentation)</li></ul><p>All of these risk factors compound on each other. This is the reason that eDKA occurs despite many physiologic protective mechanisms.</p><h1 id="treatment">Treatment</h1><p>The fundamentals of treatment for eDKA are similar to those of DKA. The main difference is that you MUST give insulin despite low blood sugars and supplement with dextrose. </p><h2 id="monitoring">Monitoring</h2><p><strong>Patients with eDKA or DKA die from electrolyte abnormalities. </strong>So, the first thing you need to order for a sick patient is <strong>hourly blood sugars</strong> and <strong>every 2 hour venous blood gas, basic metabolic panel, magnesium, phosphorus, and ionized calcium</strong>. The large majority of patients with euglycemic DKA should be admitted to an ICU and otherwise definitely deserve a telemetry bed. </p><h2 id="give-fluids">Give fluids</h2><p>Unless there is a strong contraindication, give the patient a robust fluid bolus. Hypovolemia propagates ketosis through beta-1 mediated insulin-glucagon imbalance.</p><p>Patients who are hyperglycemic often also have hypochloremia, so saline is appropriate for them. In contrast, euglycemic patients are more likely to have NORMAL chloride. So, a chloride rich bolus may contribute to a concurrent non-anion gap metabolic acidosis.</p><p><strong>Favor administration of a balanced crystalloid fluid bolus</strong></p><h2 id="electrolytes">Electrolytes</h2><p>Aggressively trend and replete potassium, magnesium, and phosphorus as you would with a typical case of DKA.</p><p>If potassium is ever less than 3.5 mmol/L, then stop any source of insulin and don&apos;t resume until the potassium is better.</p><h2 id="give-insulin-and-dextrose">Give Insulin and Dextrose</h2><p>Insulin is the cure for the ketoacidosis component of DKA. You must shift the insulin-glucagon balance to favor ketolysis. The change in anion gap is linearly correlated with the insulin dose (figure 1).</p><p>Low dose insulin administration is insufficient to stop ketone formation! Ketosis DOES NOT RESOLVE until ketone clearance exceeds production.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.codymd.com/content/images/2024/08/image-17.png" class="kg-image" alt="Management of Euglycemic Diabetic Ketoacidosis - Insulin is the Secret Sauce" loading="lazy" width="572" height="341"><figcaption>Figure 1: Low doses of insulin MAY NOT LOWER the anion gap (Albert et al, 2023)</figcaption></figure><p>There are no society guidelines that comment on insulin dosing for euglycemic DKA so management is largely extrapolated from management of hyperglycemic DKA.</p><p>Most standard DKA protocols reduce insulin dose as blood sugars go down. Consequently, using a standard DKA protocol is likely to UNDERDOSE the insulin.</p><h4 id="start-insulin-at-00501-unitskghour">Start insulin at 0.05 - 0.1 units/kg/hour</h4><p>I would recommend starting the insulin at a conservative dose of 0.05 units/kg/hour. This provides a good balance between the risks of hypoglycemia and insufficient insulin. </p><h4 id="start-a-5-dextrose-containing-solution-at-100-200-mlhour">Start a 5% dextrose containing solution at 100-200 mL/hour</h4><p>Dextrose needs are determined by the amount of insulin needed to sufficiently inhibit ketone production. Estimates are based on retrospective data and one study that measured radioactive glucose uptake in patients with DKA on insulin.</p><p>Patients with DKA should get about 5-10 g/h of dextrose. Since D5 = 50 g/L; D10 = 100 g/L; D20 = &#xA0;200g/L ... and so on, that means patients should be on the equivalent of 100-200 mL/hour of D5. </p><p>If the patient has contraindication to receiving large volumes of dextrose containing fluids, such as hyponatremia, then higher concentrations and lower volumes would be better.</p><h1 id="cases-from-literature">Cases from literature</h1><h2 id="alalgy-et-al-2023">Alalgy et al, 2023</h2><p>A 26 year old woman at 28 weeks of her pregnancy and a medical history of type 1 diabetes for 5 years on insulin and metformin presented with one day of abdominal discomfort, nausea, and multiple episodes of vomiting in the setting of insulin non-compliance.</p><p>Initial vitals were temp 97F, HR 105, RR 26, BP 128/78. On exam she appeared dehydrated. Her abdomen was soft and non-tender throughout.</p><p>She was empirically treated with 3L of LR and had labs collected which later showed pH 7.17, PCO2 20, Bicarbonate 7.4, lactate 1.7, glucose 190 mg/dL, and potassium of 4.4 mg/dL. Her urinalysis showed 4+ ketones. </p><p>She denied any carbohydrate restriction, alcohol/toxic alcohol use, or tylenol/salicylate use. No infectious causes were identified.</p><p>A diagnosis of eDKA was made and the patient was concurrently started on insulin at 0.05 units/kg/h and a D5 dextrose solution. The insulin infusion was later increased to 0.1 units/kg/h with an intent to hasten acidosis recovery in the setting of her pregnancy. </p><h2 id="azman-et-al-2022">Azman et al, 2022</h2><p>A 60 year old man with past medical history of non-insulin dependent type 2 diabetes, hypertension, and hyperlipidemia presented to the emergency department with chest pain. He was ultimately diagnosed with an NSTEMI and treated with DAPT. Empagliflozin was started given history of diabetes.</p><p>He presented again the hospital six days later with sudden onset headache and cranial nerve deficits. An MRI demonstrated a pituitary macroadenoma and evidence of pituitary apoplexy. The patient was started on treatment for hypopituitarism which included hydrocortisone.</p><p>The following day the patient became hypotensive and tachypneic. He was started on norepinephrine and non-invasive ventilation and moved to the ICU. </p><p>His next set of labs demonstrated an anion gap of 26, potassium 4.5, pH 7.059, and bicarbonate of 6.6. Lactate level was 1.0. Furthermore, blood cultures grew gram positive cocci. His urinalysis was positive for 4+ ketones. </p><p>A diagnosis of euglycemic DKA was suspected. Empagliflozin was held and the patient was started on an insulin infusion.</p><p>Over the next 10 hours the patient had refractory acidosis. He received extensive fluid resuscitation and the team planned to initiate CRRT. At this time he was started on a 10% dextrose infusion and insulin infusion was increased to 5 units/h.</p><p>Within 4 hours of initiating these treatments the patient made a drastic recovery with bicarb increasing to 14.1 and pH to 7.3.</p><h2 id="jaber-et-al-2019">Jaber et al, 2019</h2><p><strong><u>Trigger warning of fetal demise for this case</u></strong></p><p>A 30 year old G2P1 at 32 weeks and 3 days of gestation and a medical history notable for type 1 diabetes on an insulin pump and a prior episode of DKA. She presented with two days of nausea and vomiting. </p><p>On exam she appeared tachypneic and uncomfortable. Her abdomen was soft and non-tender. Fetal heart monitor showed absent variability and recurrent late decelerations.</p><p>Her initial lab workup revealed blood sugar of 183 mg/dL, anion gap of 23, pH 7.1, beta hydroxybutyric acid 9.6 mmol/L, and lactate of 0.65 mmol/L. </p><p>The patient was admitted and placed on an insulin infusion at 2 units/h and D5 1/2 NS at 250 mL/h based on the facilities DKA protocol.</p><p>Over the subsequent 4 hours the patient deteriorated clinically and became more acidotic with a pH of 6.97. Fetal heart tracings deteriorated and the patient was given multiple amps of bicarb. Her insulin drip was increased and her IV fluids were changed to 10% dextrose at 250 mL/h. </p><p>Unfortunately, the patient continued to decline and was intubated. At eight hours after admission the fetal heart rate was not able to be detected and fetal demise was declared. At that point the patient&apos;s insulin was at 7 units/h. The patient achieved stability for delivery, and after this her insulin requires and acidosis rapidly resolved.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/case-2-modified.png" class="kg-image" alt="Management of Euglycemic Diabetic Ketoacidosis - Insulin is the Secret Sauce" loading="lazy" width="1200" height="1032" srcset="https://www.codymd.com/content/images/size/w600/2024/08/case-2-modified.png 600w, https://www.codymd.com/content/images/size/w1000/2024/08/case-2-modified.png 1000w, https://www.codymd.com/content/images/2024/08/case-2-modified.png 1200w" sizes="(min-width: 720px) 720px"></figure><p></p><h1 id="summary">Summary</h1><p>Euglycemic DKA is caused by an imbalance of insulin and glucagon causing ketone accumulation. In addition to typical risk factors for DKA, those for eDKA include SGLT-2 inhibitor use and pregnancy. </p><p>Diagnosis requires ruling out other causes of anion gap metabolic acidosis.</p><p>In addition to carefully managing fluid and electrolytes, the treatment of eDKA is focused on giving enough insulin to reverse ketone accumulation and prevent iatrogenic hypoglycemia. <strong>If the patient&apos;s acidosis is not improving, then they need MORE INSULIN and MORE DEXTROSE.</strong></p><h1 id="references">References</h1>]]></content:encoded></item><item><title><![CDATA[Rapid Bronchoscopy for ETT Confirmation]]></title><description><![CDATA[<p>Have you ever intubated a patient, initiated sedation, and then the patient started desatting? The ETCO2 is 35. You listen to lung sounds and they seem quieter on the left. <strong>The ETT is only at 23 cm and you swear that you barely went past the cords.</strong> You already ordered</p>]]></description><link>https://www.codymd.com/quick-bronch/</link><guid isPermaLink="false">66b2bd17e70df1049b75ce7e</guid><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Thu, 08 Aug 2024 21:17:32 GMT</pubDate><media:content url="https://www.codymd.com/content/images/2024/08/rapid-bronch.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.codymd.com/content/images/2024/08/rapid-bronch.png" alt="Rapid Bronchoscopy for ETT Confirmation"><p>Have you ever intubated a patient, initiated sedation, and then the patient started desatting? The ETCO2 is 35. You listen to lung sounds and they seem quieter on the left. <strong>The ETT is only at 23 cm and you swear that you barely went past the cords.</strong> You already ordered a stat CXR, but it seems xray is not available from 6 am to 7 am (of course). You&apos;re pretty sure the patient&apos;s hypoxia is just from atelectasis, pneumonia, or pulmonary edema, but you can&apos;t help but have an extremely strong urge to get a CXR absolutely NOW!!! </p><p>Certainly you can expedite the CXR, but sometimes that can take 10 or 15 minutes, if the patient is teetering on the edge of stability - confirming your ETT is really important. </p><p>You basically have two options to help in these moments: bronchoscopy or ultrasound. You can plug in a disposable bronch and just send it down the airway for 10 seconds and have 100% certainty that the ETT is not only in the airway but also above carina and below cords. If the ETT is indeed below the carina, then you can directly visualize carina as it&apos;s withdrawn and also view the balloon and cords on the way out.</p><p>I&apos;ll go over the details and considerations for rapid bronchoscopy for ETT confirmation in this post. Please see this nice video which goes over the simple procedure.</p><figure class="kg-card kg-embed-card"><iframe width="200" height="113" src="https://www.youtube.com/embed/YYCA2Gu7vtM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen title="Endotracheal tube position check using a bronchoscope"></iframe></figure><h1 id="rapid-bronchoscopy-for-ett-confirmation">Rapid bronchoscopy for ETT Confirmation</h1><h2 id="procedure-equipment">Procedure equipment</h2><ul><li>Bronchoscope and monitor (such as GlideScope monitor + BFLEX scope)</li><li>Lubricating jelly or bronchoscope lube</li><li>Bronch adaptor (optional - not needed if short procedure &lt;30 seconds)</li></ul><h2 id="procedure-steps">Procedure steps</h2><ul><li>Place the bronchoscope adaptor in-line if you&apos;re using one</li><li>Lubricate the scope</li><li>Put scope into the top of the ETT or through bronch adaptor</li><li>Advance the scope slowly until you get to the very end of the ETT</li><li>Use your thumb to angle the camera up or down and look for signs that you are in the trachea and for the main carina</li><li>Advance the scope just until the main carina</li><li>Note the depth of the proximal part of the scope with fingers or tape</li><li>Pull the bronchoscope back until it is just at the tip of the ETT</li><li>Estimate the distance from the ETT tip to the carina</li><li>Reposition ETT if needed</li></ul><h2 id="disposable-bronchoscopes-are-cheap">Disposable bronchoscopes are cheap</h2><p>First things first: a disposable bronchoscope cost about 200$ and video glidescopes cost about 75$. Don&apos;t let the cost sway you from opening one up. If it&apos;s going to be useful for the patient, then just use it.</p><h2 id="bronchoscope-sizing">Bronchoscope sizing</h2><h3 id="any-scope-will-fit-in-a-7-0-7-5-or-8-0-tube">Any scope will fit in a 7-0, 7-5, or 8-0 tube</h3><h3 id="a-smaller-scope-is-better-for-7-0-or-less">A smaller scope is better for 7-0 or less</h3><p>Bronchoscopes sizes are in millimeters and range from 3 mm - 6 mm. The size is always reported as the outer diameter. <strong>Ideally, your bronchoscope will be 2 mm smaller than your ETT.</strong> As long as the bronchoscope it is 1 mm smaller than the ETT and well lubricated you will be perfectly fine for a simple ETT depth check procedure.</p><p>So, for example, any bronchoscope could be used for an 8-0 or 7-5 tube comfortably. The larger bronchoscopes, often called the &quot;therapeutic scope,&quot; are typically 5.8 mm and would work ok for a 7-0 tube, but it would be tight. A therapeutic scope CERTAINLY would NOT work for a 6-0 or 6-5 tube. </p><p>These are the current versions of the GlideScope BFLEX 2 disposable flexible bronchoscopes.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.codymd.com/content/images/2024/08/image-7.png" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="1695" height="454" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image-7.png 600w, https://www.codymd.com/content/images/size/w1000/2024/08/image-7.png 1000w, https://www.codymd.com/content/images/size/w1600/2024/08/image-7.png 1600w, https://www.codymd.com/content/images/2024/08/image-7.png 1695w" sizes="(min-width: 720px) 720px"><figcaption>GlideScope BFLEX Disposable Flexible Bronchoscopes (accessed 8/7/2024)</figcaption></figure><h2 id="bronch-adaptors">Bronch adaptors </h2><p>When you&apos;re first learning how to do this, you should use a bronchoscope adaptor. Sometimes this is called a bronch swivel. &#xA0;You put this on the end of the ETT like an in-line suction device. It has a small opening that you can place the bronch through. This lets you oxygenate and ventilate while doing the bronchoscopy. </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.codymd.com/content/images/2024/08/bronchoscope-adaptor-fotor-20240808161156.png" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="450" height="450"><figcaption>Bronchoscope adaptor</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.codymd.com/content/images/2024/08/bronchoscope-adptor-2.jpg" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="640" height="425" srcset="https://www.codymd.com/content/images/size/w600/2024/08/bronchoscope-adptor-2.jpg 600w, https://www.codymd.com/content/images/2024/08/bronchoscope-adptor-2.jpg 640w"><figcaption>Bronchoscope adaptor packaging</figcaption></figure><h2 id="ventilator-alarms-and-settings">Ventilator Alarms and Settings</h2><p>Placing the bronchoscope in the ETT through an adaptor increases the resistance of the system a lot, so on the ventilator you should expect the peak pressures to be super high (volume control) or tidal volumes to be super low (pressure control). Experienced respiratory therapists will automatically increase the alarm and put the patient on volume control. This increased peak pressure represents resistance in the system NOT in the patient - so do not worry about it.</p><p>If you&apos;re just doing a quick in/out bronch to confirm the ETT, you don&apos;t really need to change the vent mode at all. If you plan to take more than a minute, you should be on volume control and avoid pressure control, pressure support, or PRVC.</p><h2 id="lubricating-the-bronchoscope">Lubricating the Bronchoscope</h2><p>If the ETT is quite large and your scope is small you are definitely ok using an unlubricated scope. For example, an 8-0 tube should allow any scope down without lubrication. If you have a moment, lubrication makes the procedure quite a bit easier.</p><p>You only need to lube up the second half of the scope since most of it will be outside of the ETT.</p><p>You can use just standard normal lubricating jelly.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/bronch-lube-3-fotor-20240808162453.png" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="376" height="134"></figure><p>In most places, your respiratory therapist will know where to find the bronchoscope specific lubricating jelly. This stuff lasts a little bit longer and is a little more slippery. It&apos;s fine to just use normal lube if you can&apos;t find the special stuff.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.codymd.com/content/images/2024/08/bronch-lube-fotor-20240808162643-1.png" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="800" height="533" srcset="https://www.codymd.com/content/images/size/w600/2024/08/bronch-lube-fotor-20240808162643-1.png 600w, https://www.codymd.com/content/images/2024/08/bronch-lube-fotor-20240808162643-1.png 800w" sizes="(min-width: 720px) 720px"><figcaption>Endo Lube in packaging.</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.codymd.com/content/images/2024/08/bronch-lube-2-fotor-20240808162735.png" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="580" height="580"><figcaption>Endo lube out of packaging.</figcaption></figure><h2 id="identifying-the-trachea">Identifying the trachea</h2><p>The following structures can look surprisingly similar - especially in a high stress situation.</p><ul><li>Trachea + main carina </li><li>Right main bronchus + RUL carina </li><li>Left main bronchus + LUL carina</li><li>Bronchus intermedius + RML/RLL carinas</li></ul><p><strong>You certainly don&apos;t need to be able to name and identify these structures in order to confirm an ETT, but you should recognize that they DO NOT look like the main carina.</strong> You want to avoid the situation where you &quot;confirm&quot; an ETT, but because you misidentified one of these as the main carina, you are falsely reassured.</p><p>It helps if you advance your scope slowly once you are at the tip of the ETT, so you don&apos;t accidentally blast past the main carina.</p><h3 id="trachea-and-main-carina">Trachea and main carina</h3><p><strong>The trachea has a large bore, oval shape, anterior cartilaginous rings, and a membranous posterior wall. </strong></p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/image-8.png" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="1088" height="484" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image-8.png 600w, https://www.codymd.com/content/images/size/w1000/2024/08/image-8.png 1000w, https://www.codymd.com/content/images/2024/08/image-8.png 1088w" sizes="(min-width: 720px) 720px"></figure><h3 id="right-main-bronchus-rul-carina">Right main bronchus + RUL carina</h3><h3 id="bronchus-intermedius-rmlrll-carinas">Bronchus intermedius + RML/RLL carinas</h3><h3 id="left-main-bronchus-lul-carina">Left main bronchus + LUL carina</h3><p>In general, note the lack of oval shape, anterior rings, and posterior membranous wall. 	</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.codymd.com/content/images/2024/08/image-13.png" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="682" height="521" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image-13.png 600w, https://www.codymd.com/content/images/2024/08/image-13.png 682w"><figcaption>Right upper lobe carina</figcaption></figure><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/image-14.png" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="732" height="589" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image-14.png 600w, https://www.codymd.com/content/images/2024/08/image-14.png 732w" sizes="(min-width: 720px) 720px"></figure><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/image-15.png" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="613" height="499" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image-15.png 600w, https://www.codymd.com/content/images/2024/08/image-15.png 613w"></figure><h2 id="measuring-ett-depth">Measuring ETT depth</h2><p><strong>The idea here is to use the bronchoscope as a measuring stick.</strong> You put the bronchoscope at the main carina, and pull it back just to the tip of the ETT. However much you pulled the bronchoscope out is the distance from the carina to the tip of the ETT. This is quite easy: get the scope to the carina, have an assistant pinch the scope just as it enters the ETT or the bronchoscope adaptor, and then pull the scope back to the tip of the ETT. Estimate the distance from the assistant&apos;s fingers to where the ETT or adapter.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.codymd.com/content/images/2024/08/image-16.png" class="kg-image" alt="Rapid Bronchoscopy for ETT Confirmation" loading="lazy" width="896" height="348" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image-16.png 600w, https://www.codymd.com/content/images/2024/08/image-16.png 896w" sizes="(min-width: 720px) 720px"><figcaption>Rapid Bronchoscopy for ETT Depth Measurement</figcaption></figure><h1 id="summary">Summary</h1><p>Bronchoscopy can be an indispensable tool when you&apos;re worried about the location and depth of an ETT.</p><p>Sometimes CXR takes way longer than you ever imagined was possible and you need to lean on this complementary airway confirmation tool.</p><p>Rapid bronchoscopy for ETT confirmation is a safe and simple method to both confirm your ETT depth and also correct it if you are too deep. </p>]]></content:encoded></item><item><title><![CDATA[Advanced Vascular Access Techniques for the Intensivist]]></title><description><![CDATA[<p>The intensivist is a master of vascular access, but from time to time we still find ourselves with a challenging case. Sometimes the odds stack against our favor. Think of an elderly patient who is on dialysis, in shock, obese, and with just a small little femoral artery. When you&</p>]]></description><link>https://www.codymd.com/lines/</link><guid isPermaLink="false">66ab8717e70df1049b75cd7d</guid><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Thu, 01 Aug 2024 14:40:31 GMT</pubDate><media:content url="https://www.codymd.com/content/images/2024/08/vascular-access.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.codymd.com/content/images/2024/08/vascular-access.png" alt="Advanced Vascular Access Techniques for the Intensivist"><p>The intensivist is a master of vascular access, but from time to time we still find ourselves with a challenging case. Sometimes the odds stack against our favor. Think of an elderly patient who is on dialysis, in shock, obese, and with just a small little femoral artery. When you&apos;re going 6 cm down to a tiny little calcified femoral artery it can be difficult.</p><p>This article exists to discuss some tips, tricks, and advanced concepts for these difficult cases.</p><h1 id="know-your-units-and-equipment">Know your units and equipment</h1><ol><li>1 Fr = 1/3 mm</li><li>Gauge conversions are not strictly defined. Use the following table as a reference for inner/outer diameter of IV catheters</li></ol><!--kg-card-begin: html--><table>
<thead>
<tr>
<th><strong>Gauge</strong></th>
<th><strong>Colour</strong></th>
<th><strong>ID - OD (mm)</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>14</td>
<td>Orange</td>
<td>1.6-2.1</td>
</tr>
<tr>
<td>16</td>
<td>Grey</td>
<td>1.3-1.7</td>
</tr>
<tr>
<td>17</td>
<td>White</td>
<td>1.2-1.5</td>
</tr>
<tr>
<td>18</td>
<td>Green</td>
<td>0.9-1.3</td>
</tr>
<tr>
<td>18</td>
<td>Green</td>
<td>0.9-1.3</td>
</tr>
<tr>
<td>20</td>
<td>Pink</td>
<td>0.8-1.1</td>
</tr>
<tr>
<td>22</td>
<td>Blue</td>
<td>0.6-0.9</td>
</tr>
<tr>
<td>24</td>
<td>Yellow</td>
<td>0.5-0.7</td>
</tr>
<tr>
<td>26</td>
<td>Violet</td>
<td>0.4-0.6</td>
</tr>
</tbody>
</table><!--kg-card-end: html--><h1 id="use-a-micro-puncture-kit">Use a micro-puncture kit</h1><p>All hospitals have micro-puncture kits which include a needle, wire, and introducer. There are &#xA0;many things about the kit that make it special and advantageous for difficult access. &#xA0;The kit contains the following items:</p><ul><li>Needle - 21g with 1.0 mm OD and 0.7 mm ID</li><li>Wire - 26g with 0.018&quot; or 0.5 mm diameter</li><li>Introducer - 4 Fr (1.3 mm) or 5 Fr (1.7 mm)</li></ul><p>For comparison, a typical central line kit has a 18g, 1.3 mm OD, needle and a 0.035&quot; (0.9 mm) wire. The numbers are small, but really, the 18g needle is quite a bit bigger than the micro-puncture needle.</p><p>The advantage of a smaller needle is that it cuts through tissue easier, is less likely to damage the artery, and less likely to cause a hematoma. Furthermore, the needle is specially designed to be echogenic on the anterior (bevel up) surface.</p><p>The smaller needle enters a vessel with less force, so it is much easier to enter a very compressible or calcified vessel.</p><p>The wire is special as well. When a J tip wire comes out of the needle, it immediately curls prior to advancing. The idea is to prevent injury to the vessel. The problem is that if you&apos;re coming in from a steep angle or the vessel is small, then the J tip cannot make the turn out of the needle to go up the vessel. The micro-puncture wire is small and also has a soft, flexible, and straight tip, so when it comes out of the needle it is more likely to be able to navigate the area between the needle tip and the vessel instead of just pushing into the posterior wall. </p><h1 id="know-how-to-find-common-femoral">Know how to find COMMON femoral</h1><p>Before even evaluating the patient, you need to review any available cross sectional imaging - assuming you have the time. This will help you know going in about the anatomy of the inguinal ligament and femoral vessels. In particular, sometimes the common femoral artery branches into profunda and superficial femoral artery more superior on one side. So it&apos;s advantageous to take a look ahead of time if you anticipate a difficult line.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/image.png" class="kg-image" alt="Advanced Vascular Access Techniques for the Intensivist" loading="lazy" width="788" height="559" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image.png 600w, https://www.codymd.com/content/images/2024/08/image.png 788w" sizes="(min-width: 720px) 720px"></figure><h1 id="consider-using-the-axillary-artery">Consider using the axillary artery</h1><p>Femoral access can be unfavorable due to low caliber, depth, or severe PAD. The axillary vein and artery are only about 10% smaller than the femoral vein and artery. They are large enough to be used for ECMO, IABPs, or Impella devices so they are definitely big enough for your arterial line. Furthermore, as long as you stay lateral, you most certainly remain away from the lung and in a compressible site. </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.codymd.com/content/images/2024/08/image-2.png" class="kg-image" alt="Advanced Vascular Access Techniques for the Intensivist" loading="lazy" width="839" height="359" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image-2.png 600w, https://www.codymd.com/content/images/2024/08/image-2.png 839w" sizes="(min-width: 720px) 720px"><figcaption>Sch&#xE4;fer, U., Ho, Y., Frerker, C., Schewel, D., Sanchez-Quintana, D., Schofer, J., ... &amp; Kuck, K. H. (2012). Direct Percutaneous Access Technique for Transaxillary Transcatheter Aortic Valve Implantation: &#x201C;The Hamburg Sankt Georg Approach&#x201D;. <i>JACC: Cardiovascular Interventions</i>, <i>5</i>(5), 477-486.</figcaption></figure><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/image-1.png" class="kg-image" alt="Advanced Vascular Access Techniques for the Intensivist" loading="lazy" width="526" height="334"></figure><h2 id="avoid-the-brachial-plexus">Avoid the brachial plexus</h2><p>The main thing to be thoughtful about for axillary lines is to avoid the brachial plexus. You want to access the artery in the second portion defined between the thoraco-acromial artery and the subscapular/circumflex humeral artery. The pectoral minor muscle goes over this, so you&apos;ll certainly have to go through it. </p><p>Consider avoiding left axillary if the patient has a history of CABG with LIMA graft.</p><p>You want to be above the circumflex humeral in case there is an arterial injury and it needs to be stented.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/image-4.png" class="kg-image" alt="Advanced Vascular Access Techniques for the Intensivist" loading="lazy" width="1007" height="686" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image-4.png 600w, https://www.codymd.com/content/images/size/w1000/2024/08/image-4.png 1000w, https://www.codymd.com/content/images/2024/08/image-4.png 1007w" sizes="(min-width: 720px) 720px"></figure><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/image-3.png" class="kg-image" alt="Advanced Vascular Access Techniques for the Intensivist" loading="lazy" width="642" height="386" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image-3.png 600w, https://www.codymd.com/content/images/2024/08/image-3.png 642w"></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.codymd.com/content/images/2024/08/image-5.png" class="kg-image" alt="Advanced Vascular Access Techniques for the Intensivist" loading="lazy" width="740" height="417" srcset="https://www.codymd.com/content/images/size/w600/2024/08/image-5.png 600w, https://www.codymd.com/content/images/2024/08/image-5.png 740w" sizes="(min-width: 720px) 720px"><figcaption>Image sourced from presentation by Dr. Amir Kaki viewed at: https://www.youtube.com/watch?v=8-rcFnTOsJc&amp;t=2994s</figcaption></figure><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/image-6.png" class="kg-image" alt="Advanced Vascular Access Techniques for the Intensivist" loading="lazy" width="404" height="236"></figure><h1 id="summary">Summary</h1><ul><li>Practice with micro-puncture kits</li><li>Know your femoral anatomy</li><li>Know how to safety access the axillary artery</li></ul>]]></content:encoded></item><item><title><![CDATA[CRRT - lost in the sauce]]></title><description><![CDATA[<p>The hardest part about learning CRRT is deciphering the alphabet soup. It&apos;s easy to get lost in the sauce.</p><p>Once you learn concretely the vocabulary and what all the tubes and pumps do on the CRRT machine then the rest kind of just falls in to place. </p><p>This</p>]]></description><link>https://www.codymd.com/crrt/</link><guid isPermaLink="false">667f0576e70df1049b75c973</guid><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Thu, 04 Jul 2024 10:14:27 GMT</pubDate><media:content url="https://www.codymd.com/content/images/2024/06/crrt.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://www.codymd.com/content/images/2024/06/crrt.jpg" alt="CRRT - lost in the sauce"><p>The hardest part about learning CRRT is deciphering the alphabet soup. It&apos;s easy to get lost in the sauce.</p><p>Once you learn concretely the vocabulary and what all the tubes and pumps do on the CRRT machine then the rest kind of just falls in to place. </p><p>This article is targeting physicians at the senior resident or early fellow level looking to really understand the different kinds of CRRT, how to manage them, and how to troubleshoot issues.</p><p>I assume almost no prior knowledge.</p><h1 id="banned-vocabulary">Banned vocabulary</h1><p>To start off with, let&apos;s just go ahead and ban a bunch of words for a little while. They have meaning and are useful, but right now it&apos;s just semantics.</p><ul><li>Anything that starts with Q, C, FF, TMP, or K</li><li>Clearance</li><li>Convection</li><li>Diffusion</li><li>Filtration fraction</li><li>Sieving coefficient</li><li>Effluent</li><li>SOLVENT</li><li>SOLUTE</li><li>Ultrafiltrate</li><li>CVVHD</li><li>CVVHDF</li><li>CVVH</li><li>SLED</li><li>SCUF</li></ul><h1 id="concrete-and-fundamental">CONCRETE and FUNDAMENTAL</h1><h2 id="this-is-a-filter"><u>This is a filter</u></h2><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/06/filter2.png" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy" width="665" height="366" srcset="https://www.codymd.com/content/images/size/w600/2024/06/filter2.png 600w, https://www.codymd.com/content/images/2024/06/filter2.png 665w"></figure><p>A filter has <strong>FOUR </strong>places that tubing can be connected.</p><p>Blood goes in the red end and out the blue end.</p><p>Filtered fluid comes OUT the red side port. It is hooked up to a PUMP which can remove fluid at a set rate.</p><p>Fluid CAN be infused into the blue side port BUT sometimes we don&apos;t use this one. It depends on they type of CRRT. </p><p></p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/Screenshot-2024-06-28-152120.png" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy" width="240" height="258"></figure><h2 id="this-is-a-crrt-machine"><u>This is a CRRT machine</u></h2><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/upright-dialysis-machine-2.png" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy" width="535" height="818"></figure><p>Blood goes in the red end and out the blue end.</p><p>Filtered fluid comes out the white port (it&apos;s rotated and actually behind the filter). THIS IS CONNECTED TO A PUMP THAT CAN PULL FLUID OUT.</p><p>Dialysis fluid can sometimes go in the black port - depending on CRRT mode.</p><h2 id="this-is-a-crrt-machine-on-its-side">This is a CRRT machine on it&apos;s side</h2><p>Maybe this is getting redundant, but blood GOES IN THE RED PORT and OUT THE BLUE PORT. Filtered fluid comes OUT the white port to a PUMP and fluid CAN SOMETIMES go in the black port.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/06/sideways-dialysis-machine.png" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy" width="515" height="262"></figure><p></p><h2 id="nobody-talks-about-all-the-pumps">Nobody talks about all the pumps!</h2><p>You know an IV pump, it pumps stuff?<br>Well, CRRT pumps also pump stuff.<br>THERE ARE LITERALLY 6 PUMPS ON THIS THING</p><p>Each pump can create a negative pressure from whatever it&apos;s pulling on.<br>Each pump can create a positive pressure on whatever it&apos;s pushing on. <br>There are lots of measured pressures on the CRRT machine, some are negative and some are positive. </p><p>There is no guess work in CRRT, all of the flow rates are finely tuned and controlled.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/06/pumps.jpg" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy" width="952" height="896" srcset="https://www.codymd.com/content/images/size/w600/2024/06/pumps.jpg 600w, https://www.codymd.com/content/images/2024/06/pumps.jpg 952w" sizes="(min-width: 720px) 720px"></figure><p></p><h2 id="when-blood-goes-through-the-filter-it-gets-filtered"><u>When blood goes through the FILTER it gets FILTERED</u></h2><p>The membrane has holes in it and fluid leaks out. The fluid that leaks out has molecules from the plasma in it. THINGS LIKE UREA, FOR EXAMPLE. </p><p>In fact, for really small molecules (LIKE UREA), the concentration in the fluid that leaks out is MAGICALLY about the SAME as that in the plasma or blood!</p><h1 id="if-all-we-did-was-run-blood-through-a-filter-and-collected-the-leaky-fluid-we-call-it-scuf">If all we did was run blood through a FILTER and COLLECTED the leaky fluid we call it SCUF</h1><p></p><p>Slow Continuous Ultrafiltration is abbreviated SCUF, but I&apos;ll continue to spell it out because of the alphabet soup situation.</p><p>It&apos;s called SLOW because it doesn&apos;t remove bad molecules very fast. Only the fluid that leaks out has things like urea in it. You can only collect a little bit at a time because every drip/drop is removed from the patient&apos;s circulating volume. &#xA0;If it was FAST continuous ultrafiltration, then the patient would get hypotensive and die.</p><p>It&apos;s CONTINUOUS (duh).</p><p>ULTRAFILTRATION just means filtration. I don&apos;t know why it&apos;s ultra. &quot;ULTRAFILTRATE&quot; it&apos;s basically just the equivalent of the fluid that leaks out during slow continuous ultrafiltration. </p><p>Slow continuous ultrafiltration is VERY bad at removing bad things from the blood (like potassium or UREA FOR EXAMPLE). The ONLY thing SCUF is good for is to remove FLUID from the patient. It does NOT remove bad molecules very well.</p><h2 id="well-if-we-cant-collect-tons-of-the-fluid-that-leaked-out-of-the-filter-slowly-then-lets-go-fast-and-just-replace-it-with-clean-plasma">WELL... if we can&apos;t collect TONS of the fluid that leaked out of the filter SLOWLY, then LETS GO FAST and just replace it with clean plasma?!!</h2><p>This is called CONTINUOUS VENO-VENOUS HEMO<strong><em><u>FILTRATION</u></em></strong> (CVVH).</p><p>I swear it&apos;s all in the name: Continuous. Venous to venous. Filters heme (blood).</p><p>In slow continuous ultrafiltration (SCUF), we can only collect a little bit of the fluid that leaks out when blood goes through the filter. We can go ahead and collect a LOT more if we just give the patient back some clean plasma. </p><h2 id="the-clean-plasma-is-called-replacement-fluid">THE &quot;CLEAN PLASMA&quot; IS CALLED REPLACEMENT FLUID</h2><p>In real life, in the Americas at least, this is &#xA0;usually the fancy brand name fluid called Prismate. It just has some isotonic combination of water, sodium, chloride, bicarbonate, calcium, and magnesium. It&apos;s literally just a small variation compared to Lactated Ringers, Plasmalyte, or &quot;normal&quot; saline.</p><p>So we just take out the bad fluid and replace it with good fluid - easy!</p><h2 id="so-then-how-much-replacement-fluid-should-you-use">SO THEN: HOW MUCH REPLACEMENT &#xA0;FLUID SHOULD YOU USE?</h2><p>If you know, you know. This question is SUPER LOADED. </p><p><strong>We basically need to remove enough of the leaky fluid to get rid of all the patient&apos;s bad stuff.</strong> I mentioned that the concentration of bad stuff in the leaky fluid is roughly similar to it&apos;s concentration in plasma for small molecules like UREA and POTASSIUM - for example. So we basically just take off as much fluid as we need to get rid of all the bad stuff and give enough of the good fluid back to match the volume. </p><h3 id="its-way-more-than-you-thought">IT&apos;S WAY MORE THAN YOU THOUGHT</h3><p>The short answer to this loaded question is that you need to remove 25-35 ml/kg/h of the leaky fluid.</p><h3 id="yep-like-2-liters-per-hour-48-liters-per-day">YEP, LIKE 2 LITERS PER HOUR (48 LITERS PER DAY)</h3><p>Since the patient would DEFINITELY die if you pulled off 2 liters per hour, we just give them back clean plasma (replacement fluid) to REPLACE what we took.</p><p>YOU JUST TAKE OUT ALL THE BAD HUMORS AND REPLACE THEM WITH GOOD HUMORS</p><h2 id="ok-so-which-port-does-the-replacement-fluid-go-in">OK, SO WHICH PORT DOES THE REPLACEMENT FLUID GO IN!?</h2><p>Psyche. NONE OF THEM. It just get&apos;s Y&apos;d in somewhere in the tubing.</p><h3 id="in-fact-you-can-put-the-replacement-fluid-either-before-or-after-the-filter">In fact, you can put the replacement fluid either BEFORE or AFTER the filter. </h3><p>If you put it BEFORE the filter, then it helps prevent the filter from clotting, but it dilutes out the molecules in the leaky fluid - so you end up having to take a bit more volume AND replacing a bit more volume.</p><p>If you put it AFTER the filter, then your leaky fluid is more concentrated with bad stuff, so you don&apos;t have to take AND replace quite as much volume BUT your filter might just clot right off.</p><h3 id="should-i-put-the-fluid-before-or-after-the-filter">Should I put the fluid BEFORE or AFTER the filter?</h3><p>It depends on what you&apos;re trying to achieve with the CRRT. If you&apos;re trying to get as much bad stuff out as possible, then after is better so long as the filter isn&apos;t clotting off. </p><p>If your filter is clotting off, then you can put it before</p><h2 id="why-not-both">Why not both?</h2><p>This is ALSO a loaded question. </p><p>Yes, you can do some portion of fluid BEFORE and some portion AFTER. For example, you can do 70% of the fluid AFTER the filter and 30% of the BEFORE the filter.</p><p>So, for a 60kg person this may look something like:</p><ul><li>Remove 25 ml/kg/hr of leaky fluid with the bad stuff in it</li><li>25 ml/kg/hr * 60 kg = 1500 ml/hr</li><li>So, remove 1500 mL per hour of BAD fluid</li><li>Give 500 mL per hour of good fluid BEFORE the filter</li><li>Give 1000 mL/hour of good fluid AFTER the filter</li></ul><p>*good fluid = replacement fluid :)</p><h2 id="why-are-all-these-tubes-so-hard-to-see-in-pictures">Why are all these tubes so hard to see in pictures?!</h2><p>This patient is only hooked up to PRE FILTER replacement fluid. You can see that the fluid is literally just Y&apos;d into the tubing just before the BAD BLOOD goes INTO the RED PORT of the filter. </p><p>For the POST filter replacement fluid, it actually just connects at the red circle/yellow arrow on that little thingamajig there. Yes, this is a technical name for an air bubble remover. It doubles as the place where you Y in the replacement fluid. </p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/06/replacement-fluid.png" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy" width="1048" height="1792" srcset="https://www.codymd.com/content/images/size/w600/2024/06/replacement-fluid.png 600w, https://www.codymd.com/content/images/size/w1000/2024/06/replacement-fluid.png 1000w, https://www.codymd.com/content/images/2024/06/replacement-fluid.png 1048w" sizes="(min-width: 720px) 720px"></figure><h1 id="are-we-even-doing-dialysis-yet">Are we even doing dialysis yet?</h1><p>Well, not really...</p><p>Up until now we&apos;ve just been doing hemo<strong><em><u>FILTRATION</u></em></strong>.</p><p>NOW we&apos;re going to talk about hemo<strong><u><em>DIALYSIS</em></u></strong></p><h2 id="what-exactly-is-dialysis">What exactly is dialysis!?</h2><p>Remember in biology when you had a semi-permeable membrane and you put a fluid on one side and it just stayed there, but another fluid just went right through?</p><p>That&apos;s dialysis. </p><p>There is a concentration gradient and a molecule that can go through a semi-permeable membrane (LIKE UREA FOR EXAMPLE!!!).</p><p>So far we&apos;ve talked about slow continuous hemo<strong><u><em>FILTRATION</em></u></strong> and continuous veno-venous hemo<strong><u><em>FILTRATION</em></u></strong> but at NO POINT &#xA0;have we separated two fluids with different concentrations of stuff with a semi-permeable membrane. </p><h1 id="ok-lets-do-continuous-veno-venous-hemodialysis">OK, let&apos;s do continuous veno-venous hemo<strong><u><em>DIALYSIS</em></u></strong>!</h1><p>This is abbreviated CVVHD.</p><p>OK now we&apos;re really getting into the alphabet soup (sauce?) </p><h3 id="to-summarize">TO SUMMARIZE: </h3><ul><li>SCUF is slow continuous hemo<u><strong><em>FILTRATION</em></strong></u></li><li>CVVH is continuous veno-venous hemo<u><em><strong>FILTRATION</strong></em></u></li><li>CVVHD is continuous veno-venous hemo<strong><u><em>DIALYSIS</em></u></strong></li></ul><p>Remember the blue side port? This is how you do dialysis!</p><p><u><strong>Blood</strong></u> goes IN THE RED PORT and OUT THE BLUE PORT</p><p><u><strong>Dialysis fluid</strong></u> goes IN the BLUE SIDE PORT and OUT the RED SIDE PORT</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/06/filter2-2.png" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy"></figure><h2 id="dialysis-fluid-literally-the-same-kind-of-fluid-as-replacement-fluid">Dialysis fluid literally the same kind of fluid as replacement fluid</h2><p>So the fluid that goes in the blue side port is like &quot;clean plasma&quot;</p><p>Since blood has bad molecules in it and the &quot;clean plasma&quot; (dialysate) doesn&apos;t have bad molecules in it. NOW we have a concentration gradient between the two fluids and they&apos;re separated by a semi-permeable membrane (aka the filter). </p><p>Now that this is all set up, all bad molecules in the bad fluid diffuse over in to the good fluid. So if we just keep replacing the dialysate with new &quot;clean&quot; dialysate, then we&apos;ll keep removing bad molecules.</p><p>The RATE of fluid going into the blue side port <strong><u><em>roughly</em></u></strong> EQUALS the rate of the fluid coming out of the RED side port. When we&apos;re doing continuous veno-venous hemoDIALYSIS if we USE THE PUMPS to set the dialysate removal rate HIGHER than the dialysate infusion then we&apos;ll generate EXTRA BAD FLUID. </p><p>Concretely, if we have good dialysate going IN the BLUE SIDE PORT at 1000 ml/hr and bad dialysate coming OUT the RED SIDE PORT at 1200 ml/hr then it would be kind of similar to doing slow continuous hemofiltration (SCUF) with 200 ml/hr of fluid removal. By having these different flow rates, we are able to generate ultrafiltrate which removes a small amount of extra bad stuff and lets us remove volume.</p><h2 id="is-dialysis-even-good-at-anything">IS DIALYSIS EVEN GOOD AT ANYTHING?</h2><p>Compared to hemoFILTRATION, hemoDIALYSIS is much better at removing bad molecules from the blood. </p><h1 id="ive-noticed-that-all-my-patients-are-on-cvvhdf">I&apos;ve noticed that all my patients are on CVVHDF</h1><p>Ok, ok, let&apos;s put it all together to get to the mode that is most often used.</p><p>Continuous veno-venous hemo<strong><u><em>DIAFILTRATION</em></u><em> (CVVHDF)</em></strong></p><p>To summarize again:</p><ul><li>SCUF is slow continuous hemo<u><strong><em>FILTRATION</em></strong></u></li><li>CVVH is continuous veno-venous hemo<u><em><strong>FILTRATION</strong></em></u></li><li>CVVHD is continuous veno-venous hemo<strong><u><em>DIALYSIS</em></u></strong></li></ul><h2 id="what-if-we-ran-dialysisand-also-pulled-tons-of-bad-fluidand-also-gave-lots-of-good-fluid">WHAT IF WE RAN DIALYSIS<br>AND ALSO PULLED TONS OF BAD FLUID<br>AND ALSO GAVE LOTS OF GOOD FLUID?</h2><p>You can USE THE PUMPS to give/take wherever you want until the filter clots or your venous access gives out. </p><p>You can pull the bad fluid from the RED SIDE PORT at a much higher rate than you give dialysate though the BLUE SIDE PORT. But then you have the same situation as in slow continuous ultrafiltration (SCUF) where you&apos;re patient would get hypovolemic and die. So, go ahead and give them replacement fluid Y&apos;d in to the tubing somewhere (pre or post filter).</p><h2 id="why-use-cvvhdf">Why use CVVHDF?</h2><p>The jist of it is that you can get away with lower blood flow rates and still remove all the bad stuff and fluid.</p><h1 id="which-is-the-best-mode-of-crrt">Which is the best mode of CRRT?</h1><h2 id="lets-talk-about-klearance">Let&apos;s talk about Klearance</h2><p>The time has come. Clearance is a weird value because it&apos;s not the AMOUNT of bad stuff removed. It&apos;s the volume of bad blood that is converted into good blood in a given time.</p><p>Clearance is abbreviated as K.... how Konfusing.</p><p>I mentioned a few times that the concentration of a small bad molecule in the blood is almost the same as in the bad fluid coming out of the filter. &#xA0;So if you take out 1500 milliliters of bad fluid in 60 minutes for a 60 kg person, then the clearance of a small molecule is about 25 mL/kg/hr. </p><h2 id="is-the-clearance-different-if-the-bun-is-100-vs-30">Is the clearance different if the BUN is 100 vs 30?</h2><p>No, in these two scenarios the AMOUNT of urea removed in 1 hour would be different, but the VOLUME of &quot;bad blood&quot; converted into &quot;good blood&quot; is actually the same.</p><h2 id="why-should-i-even-care-about-clearance">Why should I even care about clearance?</h2><p><strong>Consider what would happen if you put a patient with ZERO renal function on non-stop CRRT with some stable settings for 2 weeks. What would happen to the blood concentration of the bad stuff like urea?</strong></p><p>Well, their body is always making urea, so their blood level would never reach zero, and the CRRT is always removing urea. AHAH THEY REACH A STEEADDDY STATE.</p><h2 id="hair-in-the-drain">Hair in the drain</h2><p>I&apos;ve always enjoyed thinking about steady states like bath tubs.</p><p>Input is the faucet. Output is the drain.</p><p>If there is some hair in the drain and you put the water on, then the tub will eventually just chill at a low level. </p><p>The body makes urea. CRRT removes urea.</p><p><strong>If somebody is on CRRT for A LONG TIME then the urea level will reach some steady level. And how high is that level?! Ahh, yes, it depends on the clearance.</strong></p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/06/bathrub-2.jpg" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy" width="355" height="678"></figure><h2 id="you-need-25-35-mlkghr-of-clearance-to-maintain-a-normal-level-of-the-bad-stuff">You need 25-35 ml/kg/hr of clearance to maintain a normal level of the bad stuff</h2><p>For a given molecule you want to essentially clear ONE volume of distribution per &quot;dialysis session,&quot; CONTINUOUS renal replacement therapy is (*hopefully*) a 24 hour session.</p><p>The volume of distribution of urea is total body water, or 60% of the weight. </p><p>So for a 60kg person, you want to clear 0.6 L/kg * 60 kg = 36 L PER DAY.<br>Restated, you need to &quot;clear&quot; 36 liters per day.</p><p>So basically K * 24h = 36 L = 1.5 liters</p><p>1.5 liters just so happens to be 25 ml/kg/hr for 24 hours :)<br></p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/06/ktv.jpg" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy" width="666" height="500" srcset="https://www.codymd.com/content/images/size/w600/2024/06/ktv.jpg 600w, https://www.codymd.com/content/images/2024/06/ktv.jpg 666w"></figure><h1 id="all-the-words-i-didnt-use-before">ALL THE WORDS I DIDN&apos;T USE BEFORE</h1><h2 id="what-is-ultrafiltrate">WHAT IS ULTRAFILTRATE</h2><p>Ultrafiltrate is the NET fluid that is filtered out of the blood in ANY mode of dialysis. It&apos;s often mixed in with replacement fluid and/or dialysate. </p><h2 id="what-is-effluent">WHAT IS EFFLUENT?</h2><p>Effluent is EVERYTHING that comes out of the red side port. What it consists of depends on the mode of CRRT.</p><p><strong>For this whole post, when I say &quot;leaky fluid&quot; or &quot;bad fluid&quot; I usually really am talking about effluent.</strong></p><ul><li>Slow continuous ultrafiltration (SCUF): effluent is all the filtrate from blood and it equals ultrafiltrate.</li><li>Continuous veno-venous hemofiltration (CVVH): effluent is ultrafiltrate + replacement fluid, irregardless of where your replacement fluid is infusing.</li><li>Continuous veno-venous hemodiafiltration (CVVHD): effluent is dilaysate + replacement fluid + ultrafiltrate. <br></li></ul><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/06/filter2-3.png" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy" width="665" height="366" srcset="https://www.codymd.com/content/images/size/w600/2024/06/filter2-3.png 600w, https://www.codymd.com/content/images/2024/06/filter2-3.png 665w"></figure><h2 id="sieving-coefficient">Sieving coefficient</h2><p>Small molecules equilibrate in the effluent. Large molecules can&apos;t even get through the filter. How well a particular compound can get through the filter pores is defined by the sieving coefficient.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2024/08/upright-dialysis-machine-1.png" class="kg-image" alt="CRRT - lost in the sauce" loading="lazy" width="535" height="818"></figure>]]></content:encoded></item><item><title><![CDATA[How to Use Phenobarbital for Treatment of Alcohol Withdrawal Syndrome]]></title><description><![CDATA[<h2 id="tldr">TL;DR</h2><p>Phenobarbital is a good alternative or adjunct for treatment of alcohol&#x200C;&#x200C; withdrawal syndrome. It has particular benefits for patients with severe&#x200C;&#x200C; alcohol withdrawal.</p><p>High risk patients are those with prior seizure,&#x200C;&#x200C; delirium tremens, ICU&#x200C;&#x200C; admission, benzodiazepine infusion, or failure to</p>]]></description><link>https://www.codymd.com/phenobarb/</link><guid isPermaLink="false">637a11f2e70df1049b75c8b9</guid><category><![CDATA[medicine]]></category><category><![CDATA[alcohol withdrawal syndrome]]></category><category><![CDATA[phenobarbital]]></category><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Sun, 20 Nov 2022 12:25:56 GMT</pubDate><media:content url="https://www.codymd.com/content/images/2022/11/cell-surface-image-7.png" medium="image"/><content:encoded><![CDATA[<h2 id="tldr">TL;DR</h2><img src="https://www.codymd.com/content/images/2022/11/cell-surface-image-7.png" alt="How to Use Phenobarbital for Treatment of Alcohol Withdrawal Syndrome"><p>Phenobarbital is a good alternative or adjunct for treatment of alcohol&#x200C;&#x200C; withdrawal syndrome. It has particular benefits for patients with severe&#x200C;&#x200C; alcohol withdrawal.</p><p>High risk patients are those with prior seizure,&#x200C;&#x200C; delirium tremens, ICU&#x200C;&#x200C; admission, benzodiazepine infusion, or failure to respond to typical&#x200C;&#x200C; treatments.</p><p>Tread careful when patients have other medical problems requiring&#x200C;&#x200C; hospitalization, cirrhosis, CYP interactions, or if excessive benzodiazepines&#x200C;&#x200C; have already been given.</p><h3 id="treatment-strategies">Treatment strategies:</h3><ol><li>(severe) 10 mg/kg IV phenobarbital followed by benzodiazepine symptom triggered</li><li>(severe) 10 mg/kg IV phenobarbital followed by phenobarbital symptom triggered</li><li>65 mg, 130 mg, or 260 mg IV or oral q30 minutes - symptom triggered</li></ol><ul><li><strong>Dosing is always based on ideal body weight (IBW)</strong></li><li><strong>Max dosage should NOT exceed 30 mg/kg</strong></li><li><strong>Doses should be reduced by 25-50% for patients with hepatic dysfunction, depressed mental status, or concomitant sedative use such as opioids or excessive benzos</strong></li></ul><h3 id="safety">Safety</h3><ul><li>Phenobarbital has a wide range of therapeutic levels for safety.</li><li>Typically patients will require 5-30 mg/kg IBW for full treatment effect when&#x200C;&#x200C; phenobarbital is used as monotherapy. Less may be required if concurrent benzodiazepines are being used.</li><li>The risk of respiratory depression is not unfounded, but multiple studies&#x200C;&#x200C; have demonstrated safety of the above dosing strategies for patients with&#x200C;&#x200C; alcohol withdrawal. Furthermore, although we don&apos;t use phenobarbital as frequently for seizures these days, a typical load would be 20 mg/kg.</li></ul><h2 id="introduction">Introduction</h2><p>This article focuses on how to use phenobarbital as an alternative or adjunctive therapy for patients with severe alcohol withdrawal. It covers patient selection, dosing regimens, adverse effects - including the concern for respiratory depression, medication interactions, and therapeutic benefits over benzodiazepine protocols.</p><p>Hospital admissions and emergency department visits for alcohol withdrawal are common. Most of the time patients are well treated with modest dosing of a benzodiazepine and consultation with a substance abuse team. Treatment is more complicated when the patient has severe withdrawal. <strong>Up to 15% of patients with severe alcohol withdrawal will have life threatening seizures or delirium tremens.</strong></p><p>Benzodiazepines are the cornerstone treatment for alcohol withdrawal. Phenobarbital fell out of favor in the 1990s due to medication interactions, societal issues with barbiturate addiction, and drug company sponsorship. Despite the shift in practice, there was no major evidence to suggest that benzos were superior to phenobarbital. In fact, there are now data showing that <strong>10% of patients with severe alcohol withdrawal are refractory to benzodiazepines but remain responsive to phenobarbital.</strong></p><p>Benzodiazepines remain a reasonable option for treatment of alcohol withdrawal, and phenobarbital is an excellent adjunct or replacement in select patients at high risk for seizure, delirium tremens (DTs), intubation, or ICU admission.</p><p>In patients with severe alcohol withdrawal, phenobarbital alone or in&#x200C;&#x200C; combinations with benzodiazepines has significant benefits including reduced ICU&#x200C;&#x200C; admission, intubation, need for benzodiazepine infusion, and benzodiazapine&#x200C;&#x200C; requirements.</p><h2 id="patient-selection">Patient selection</h2><p>The best use case for phenobarbital is in patients with a clear diagnosis of&#x200C;&#x200C; severe alcohol withdrawal, risk factors for severe alcohol withdrawal, no suspected alternative diagnoses, no major drug&#x200C;&#x200C; interactions, and no cirrhosis.</p><p>Risk factors for severe alcohol withdrawal include the following:</p><ul><li>Prior ICU admission for alcohol withdrawal</li><li>Requiring benzodiazapine infusion</li><li>Requiring intubation</li><li>Prior documented delirium tremens</li><li>Prior documented or confirmed seizure with alcohol cessation</li><li>Long standing heavy alcohol use without cessation (drinking for &gt; 1 year &gt;10 standard drinks per day)</li><li>High initial alcohol level</li></ul><p><b>Benzodiazepine</b><strong> resistance occurs in up to 20% of patients with severe alcohol withdrawal</strong> (<a href="https://linkinghub.elsevier.com/retrieve/pii/S0883944114004158">Wong 2015</a>). It is non-formally defined by receiving &gt;40 mg diazepam equivalents within one hour (<a href="https://www.cambridge.org/core/product/identifier/S1481803519004214/type/journal_article">Langlois 2020</a>). In this case, phenobarbital should be strongly considered AND you should think very carefully about potential missed alternative diagnoses.</p><h2 id="dosing">Dosing</h2><p>There is a lack of consensus regarding the best dosing strategy for&#x200C;&#x200C;phenobarbital in alcohol withdrawal. The medication comes in IV formulation and&#x200C;&#x200C;as tablets (65 mg, 130 mg, or 260 mg). There is a wide therapeutic range. Patients typically require 5-30 mg/dL IBW for adequate treatment effect. For patients with severe withdrawals, bolus dosing has been studied as a one time adjunct to benzodiazpeines and also in combination with phenobarbital symptom triggered dosing.</p><p>Be aware that in the current practice environment, both of these formulations will likely have to come all the way from the pharmacy. They are not typically stocked in the ED pyxis, for example.&#x200C;&#x200C;If you order a symptom triggered PRN dose, then pharmacy will typically send multiple doses.</p><p>For patients who are in florid withdrawals and have high risk features use one of the following</p><ol><li><strong>10 mg/kg IV phenobarbital followed by benzodiazepine symptom triggered</strong></li><li><strong>10 mg/kg IV phenobarbital followed by phenobarbital symptom triggered</strong></li><li><strong>65 mg, 130 mg, or 260 mg IV or oral q30 minutes - symptom triggered</strong></li></ol><p>Keep the following in mind</p><ul><li><strong>Dosing is always based on ideal body weight (IBW)</strong></li><li><strong>Max dosage should NOT exceed 30 mg/kg</strong></li><li><strong>Doses should be reduced by 25-50% for patients with hepatic dysfunction, depressed mental status, or concomitant sedative use such as opioids or excessive benzos</strong></li></ul><p>If a patient has severe withdrawals, but doesn&apos;t meet ICU admission criteria, then&#x200C;&#x200C;my practice is to give the 10 mg/kg bolus and then continue with a benzodiazepine symptom&#x200C;&#x200C;triggered strategy. This is to avoid confusion with admitting teams.</p><h2 id="safety-1">Safety</h2><p>There is well founded concern about respiratory depression from phenobarbital, but the doses of phenobarbital used for treating alcohol withdrawal is between 5 mg/kg and 30 mg/kg (<a href="http://journals.sagepub.com/doi/10.1177/0885066618783947">Oks 2020</a>). Even when&#x200C;&#x200C;combined with benzodiazepines, phenobarbital hasn&apos;t been shown to result in&#x200C;&#x200C;increased rates of intubation or respiratory failure (see studies below).&#x200C;&#x200C;Compared to other barbiturates, such as thiopental, phenobarbital does not have&#x200C;&#x200C;nearly as large of a respiratory depression effect.</p><p>If a patient has risk factors for respiratory depression or failure, then it is&#x200C;&#x200C;reasonable to use a smaller bolus dose (5-8 mg/kg IBW) or use a symptom&#x200C;&#x200C;triggered strategy without bolus up front. Some risk factors to consider would&#x200C;&#x200C;include concomittant benzodiazepine use, opioid use, respiratory pathology, and&#x200C;&#x200C;reduced mental status.</p><h2 id="my-practice">My practice</h2><p>For now, I typically only use phenobarbital in patients who are admitted to the hospital, but there has been evidence that it is a reasonable treatment option for patients discharged from the emergecy department who only had mild alcohol withdrawal.</p><p>I usually just stick with benzodiazepines if the patient has mild-moderate&#x200C;&#x200C; alcohol withdrawal. For patients with high risk features I give the 10 mg/kg up&#x200C;&#x200C; front. Our hospital dose not have a protocol for nurses to use phenobarbital for&#x200C;&#x200C; symptom triggered dosing - so I don&apos;t order this for patients going to the&#x200C;&#x200C; floor. In the ICU I generally switch any patient with more than the most mild&#x200C;&#x200C; withdrawals to phenobarbital. ICU delirium is just such a major issue, that I&#x200C;&#x200C; prefer to make all efforts to minimize that risk - and I think phenobarb is a&#x200C;&#x200C;good way to do that for these patients.</p><p>It&apos;s worth noting that there are a lot of alcohol withdrawal mimics. Phenobarbital is a seven day commitment, if you&apos;re concerned for alternative etiologies (such as sepsis...), then it may not be the best up front choice. Also, keep in mind that it has many drug interactions and is hepatically metabolized (reduce dose).</p><h2 id="further-reading">Further reading</h2><h3 id="prospectiverct-studies%E2%80%8C%E2%80%8C">Prospective/RCT studies&#x200C;&#x200C; </h3><p><br><a href="https://linkinghub.elsevier.com/retrieve/pii/S0736467912008785">Rosenson 2013</a>&#x200C;<br>&#x200C;<a href="https://linkinghub.elsevier.com/retrieve/pii/S0735675709005348">Hendey 2011</a>&#x200C;<br>&#x200C;<a href="https://linkinghub.elsevier.com/retrieve/pii/S0196064487805206">Young 1987</a></p><h3 id="retrospective-icu-based-studies">Retrospective ICU based studies</h3><p><br>&#x200C;&#x200C;<a href="http://journals.sagepub.com/doi/10.1177/0885066618783947">Oks 2020</a><br>&#x200C;&#x200C;<a href="https://linkinghub.elsevier.com/retrieve/pii/S0741832918302799">Nguyen 2020</a>&#x200C;&#x200C;<br><a href="http://ajcc.aacnjournals.org/lookup/doi/10.4037/ajcc2018745">Tidwell 2018</a><br>&#x200C;&#x200C;<a href="https://journals.lww.com/01586154-201412000-00021">Duby 2014</a>&#x200C;<br>&#x200C;<a href="http://journals.lww.com/00003246-200703000-00006">Gold 2007</a></p><h3 id="retrospective-ed-based-studies%E2%80%8C%E2%80%8C">Retrospective ED based studies&#x200C;&#x200C;</h3><p><br><a href="https://linkinghub.elsevier.com/retrieve/pii/S0735675719300750">Ibarra 2020</a><br>&#x200C;&#x200C;<a href="https://linkinghub.elsevier.com/retrieve/pii/S0735675719300026">Nelson 2019</a>&#x200C;&#x200C;<br><a href="https://linkinghub.elsevier.com/retrieve/pii/S0735675718308210">Sullivan 2018</a></p><h3 id="retrospective-non-icu-based-studies">Retrospective Non-ICU based studies</h3><p><br>&#x200C;&#x200C;<a href="https://linkinghub.elsevier.com/retrieve/pii/S0033318219300404">Nisavic 2019</a><br>&#x200C;&#x200C;<a href="https://pubmed.ncbi.nlm.nih.gov/1986421/">Ives 1991</a></p><h2></h2>]]></content:encoded></item><item><title><![CDATA[How Much Should Medical Students Present on Rounds?]]></title><description><![CDATA[<p>I would say this fully depends on the medical students and how busy my team is at the time.</p><p>If things are chilling, then I rarely interrupt. I let them talk talk talk and give feedback +/- some teaching at the end.</p><p>On the other hand, if my team is</p>]]></description><link>https://www.codymd.com/how-much-should-medical-students-present-on-rounds/</link><guid isPermaLink="false">63706ecde70df1049b75c84c</guid><category><![CDATA[medicine]]></category><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Sun, 13 Nov 2022 04:22:32 GMT</pubDate><media:content url="https://www.codymd.com/content/images/2022/11/shutterstock_1637183161.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://www.codymd.com/content/images/2022/11/shutterstock_1637183161.jpg" alt="How Much Should Medical Students Present on Rounds?"><p>I would say this fully depends on the medical students and how busy my team is at the time.</p><p>If things are chilling, then I rarely interrupt. I let them talk talk talk and give feedback +/- some teaching at the end.</p><p>On the other hand, if my team is busy, then I give them fair warning to focus on the pertinent and to summarize plans for problems with well established plans not requiring adjustments (chronic medical problems).</p><p>I typically scale their workloads and involvement to their efficiency, medical knowledge, and ability to do presentations concisely.</p><p>If their presentations are taking a long time (uninterrupted), then there is no way I can afford the time for them to carry 4-5 patients; nor do I think that is a good educational experience for them.</p><p>When I&apos;m working in the ED, they can see as many patients as they want, but I typically encourage them to tap out to participate in procedures and resuscitations - even if it&apos;s not on my team. </p><p>It can be a little frustrating at times when they present a patient, and then I get a TOTALLY different impression on my assessment; but that&apos;s certainly a good opportunity for teaching and feedback.</p><p>For example, an excellent med student and I recently saw an 8 y/o kiddo in the peds ED with influenza. They saw the patient and presented to me. It sounded run of the mill URI/flu like symptoms, but when I saw the patient they were very lethargic and barely waking up. This caught me off guard, because I would have expected that to be part of the presentation. I used the opportunity to provide feedback to the student in a NONJUDGEMENTAL + SAFE way. Furthermore, situations like this rarely affect my evaluation or assessment of the student; as I mentioned, this is the perfect opportunity for feedback and learning.</p><p><strong>The only things I expect from my students is to be engaged, participate, and do their best. Once they do that, then it&apos;s on me to titrate their workload and involvement to their efficiency level integrated with my teams level of chaos.</strong></p>]]></content:encoded></item><item><title><![CDATA[How to change alignment of  LaTeX equations in Jupyter notebooks]]></title><description><![CDATA[<p>Math can be inserted into Jupyter notebook markdown cells with LaTeX.</p><p>The following works for Jupyter Notebooks in VS Code</p><h3 id="center-align-with-math-blocks">Center align with $$ math blocks</h3><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/09/image-1.png" class="kg-image" alt loading="lazy" width="1500" height="133" srcset="https://www.codymd.com/content/images/size/w600/2022/09/image-1.png 600w, https://www.codymd.com/content/images/size/w1000/2022/09/image-1.png 1000w, https://www.codymd.com/content/images/2022/09/image-1.png 1500w" sizes="(min-width: 720px) 720px"></figure><!--kg-card-begin: markdown--><p>$$<br>
\Large\frac{N(t) - E(t)} {N(t)}<br>
$$</p>
<!--kg-card-end: markdown--><h3 id="left-align-with-math-blocks">Left align with $ math blocks</h3><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/09/image-2.png" class="kg-image" alt loading="lazy" width="1472" height="100" srcset="https://www.codymd.com/content/images/size/w600/2022/09/image-2.png 600w, https://www.codymd.com/content/images/size/w1000/2022/09/image-2.png 1000w, https://www.codymd.com/content/images/2022/09/image-2.png 1472w" sizes="(min-width: 720px) 720px"></figure><p>$<br>\Large\frac{N(t) - E(t)} {N(t)}<br>$</p><h3 id="align-on-an-equals-sign-with-and-an-align-block">Align on</h3>]]></description><link>https://www.codymd.com/left-align-latex-equation-in-jupyter-notebook/</link><guid isPermaLink="false">631e0a0ae70df1049b75c77e</guid><category><![CDATA[LaTeX]]></category><category><![CDATA[Jupyter Notebooks]]></category><category><![CDATA[Math]]></category><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Sun, 11 Sep 2022 16:21:51 GMT</pubDate><content:encoded><![CDATA[<p>Math can be inserted into Jupyter notebook markdown cells with LaTeX.</p><p>The following works for Jupyter Notebooks in VS Code</p><h3 id="center-align-with-math-blocks">Center align with $$ math blocks</h3><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/09/image-1.png" class="kg-image" alt loading="lazy" width="1500" height="133" srcset="https://www.codymd.com/content/images/size/w600/2022/09/image-1.png 600w, https://www.codymd.com/content/images/size/w1000/2022/09/image-1.png 1000w, https://www.codymd.com/content/images/2022/09/image-1.png 1500w" sizes="(min-width: 720px) 720px"></figure><!--kg-card-begin: markdown--><p>$$<br>
\Large\frac{N(t) - E(t)} {N(t)}<br>
$$</p>
<!--kg-card-end: markdown--><h3 id="left-align-with-math-blocks">Left align with $ math blocks</h3><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/09/image-2.png" class="kg-image" alt loading="lazy" width="1472" height="100" srcset="https://www.codymd.com/content/images/size/w600/2022/09/image-2.png 600w, https://www.codymd.com/content/images/size/w1000/2022/09/image-2.png 1000w, https://www.codymd.com/content/images/2022/09/image-2.png 1472w" sizes="(min-width: 720px) 720px"></figure><p>$<br>\Large\frac{N(t) - E(t)} {N(t)}<br>$</p><h3 id="align-on-an-equals-sign-with-and-an-align-block">Align on an equals sign with &quot;&amp;=&quot; and an align block</h3><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/11/image.png" class="kg-image" alt loading="lazy" width="672" height="167" srcset="https://www.codymd.com/content/images/size/w600/2022/11/image.png 600w, https://www.codymd.com/content/images/2022/11/image.png 672w"></figure><p>Use the &quot;&amp;&quot; at the equals sign that you want to align at.<br>The &quot;\ &quot; adds spaces in the LaTeX</p><p>$$ \begin{align}<br>let \ \theta &amp;= 1\ x\ n \<br>let \ X &amp;= m\ x\ n \ or \ 1\ x\ n\<br>z &amp;= X^T\theta \<br>sigmoid(z) &amp;= \frac{1}{1 + e^-z} &#xA0;\<br>preds &amp;= m\ x\ 1<br>\end{align}$$</p><p><strong>Hope this was helpful :)</strong></p><p></p><h3></h3><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Alternative to Massive Jupyter Notebooks]]></title><description><![CDATA[<p>I used to have the problem of massive Jupyter notebooks. They were slow and I couldn&apos;t find what I was looking for. I was adding markdown headers and jump links... In retrospect, I was doing too much in one notebook and was not pulling out big functions into</p>]]></description><link>https://www.codymd.com/alternative-to-massive-jupyter-notebooks/</link><guid isPermaLink="false">631deae5e70df1049b75c744</guid><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Sun, 11 Sep 2022 14:26:46 GMT</pubDate><media:content url="https://www.codymd.com/content/images/2022/09/jupyter-example.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.codymd.com/content/images/2022/09/jupyter-example.png" alt="Alternative to Massive Jupyter Notebooks"><p>I used to have the problem of massive Jupyter notebooks. They were slow and I couldn&apos;t find what I was looking for. I was adding markdown headers and jump links... In retrospect, I was doing too much in one notebook and was not pulling out big functions into scripts.</p><p>Now I use a file structure, imported scripts, and more (smaller) notebooks. Each notebook has one job. I removed processing code from notebooks and import it from script files. This also encouraged me to refactor those big functions into more appropriately sized functions and made my code more re-usable, expandable, and debuggable.</p><p>If you&apos;re looking to make a similar workflow improvement, then this is a good opportunity to use git (or just copy your whole project file). Make a branch and just refactor all your code. Make a scripts folder and move boilerplate code into .py files (make sure to add _<strong><strong>init</strong>_</strong>.py so the scripts can be imported).</p><p>In my current practice, notebooks are for analysis and making figures. I still use notebooks to prototype and build my load, clean, transformation workflow, but once the functions are good to go, I move them to a script.</p><p>For each dataset I have a process_dataset.py file containing functions for the following tasks:</p><ul><li>Load the data and return the unmodified dataset AND a dataset with selected columns.</li><li>Do specific column transformations that require complex conditional logic. These are essentially small functions that are applied to the dataset in the transform step.</li><li>Transform the data - apply specific column transformations and do basic adjustments, such as, fixing datatypes, renaming, and filtering out rows. </li><li>Export dataset.</li></ul><p>Make sure to look into the autoreload magic function in Jupyter notebooks. It allows you to modify and save a script that is in another folder and imported such that it is reloaded (aka updated) in the Jupyter notebook each time you save it.</p><p>Here are a couple links about this - there is a lot on google about how to use this if you search for the Jupyter autoreload extension.</p><ul><li><a href="https://www.wrighters.io/using-autoreload-to-speed-up-ipython-and-jupyter-work/">Blog post</a></li><li><a href="https://www.reddit.com/r/MachineLearning/comments/8v1g6c/d_best_way_to_organise_research_code/">Reddit Post</a></li></ul><p>Quick implementation - put this in your import cell.</p><pre><code>%reload_ext autoreload
%autoreload 2</code></pre>]]></content:encoded></item><item><title><![CDATA[The Decision to Intubate]]></title><description><![CDATA[Clinical pearls and discussion about the difficult decision to intubate. ]]></description><link>https://www.codymd.com/decision-to-intubate/</link><guid isPermaLink="false">6313ea16e70df1049b75c64b</guid><category><![CDATA[medicine]]></category><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Sun, 04 Sep 2022 01:14:30 GMT</pubDate><media:content url="https://www.codymd.com/content/images/2022/09/glidescope.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.codymd.com/content/images/2022/09/glidescope.png" alt="The Decision to Intubate"><p>In theory, the decision to intubate is straight forward. Intubate if the patient is not oxygenating, ventilating, or protecting their airway. In practice, it can be a LOT harder to decide to pull the trigger on intubation. This is compounded when incomplete knowledge of patient history and data are available, such as in the emergency department or for a crashing floor patient. Maybe the decision would be easy if you had all the information - but you often just don&apos;t. </p><p>This decision is important. Intubating a patient that doesn&apos;t need it puts them at risk of peri-intubation complications (such as hypotension or arrest), failed airway, and complications of ventilation/sedation. At the same time, delaying intubation in a patient that needs it puts them at an even higher risk of peri-intubation complications, aspiration, or worsening of underlying disease process.</p><h2 id="80-of-the-time-its-easy">80% of the time it&apos;s easy</h2><ul><li>The patient has intubation in their near future, so just do it now. A prime example is a major intracranial hemorrhage with borderline mental status or a patient with severe trauma.</li><li>The patient is markedly hypoxic and in respiratory distress</li><li>The patient is completely unconscious and not responding at all</li><li>The patient has obvious airway compromise</li><li>The patient has a DO NOT INTUBATE order/status/MOLST (don&apos;t intubate)</li></ul><h2 id="15-of-the-time-a-little-data-gathering-or-response-to-treatments-makes-it-easy">15% of the time a little data gathering or response to treatments makes it easy</h2><ul><li>COPD or CHF patients with borderline mental and clinical status</li><li>Narcan for opioid overdose</li><li>Dextrose for hypoglycemia</li><li>Benzodiazepines for seizure</li></ul><h2 id="5-of-the-time-its-hard">5% of the time it&apos;s hard</h2><ul><li>Questionable stridor/airway compromise</li><li>Semi-obtunded hypercarbic patients</li><li>Very borderline or waxing/waning mental status</li></ul><h2 id="real-world-considerations-when-its-not-easy-aka-the-5">Real world considerations when it&apos;s not easy (aka the 5%)</h2><p>The less I know about the patient, the more I will lean towards intubation in a borderline case. </p><p>If a semi-crashing and altered patient presents to the ED and I don&apos;t have any history, imaging, or lab data - then I&apos;d be more aggressive if it&apos;s borderline. </p><p>In contrast, when I know the details about the patient and have a trajectory and understanding of their disease process &#xA0;(such as in the ICU), then I may be more likely to give them some treatment, lasix?, antibiotics?, HFNC, or NIPPV and see if they can turn around.</p><p>There is a special case for patients with suspected acute right heart failure, severe metabolic acidosis, or severe obstructive lung disease, such as patients with likely pulmonary embolism, diabetic ketoacidosis, or asthma. I really try to do everything possible to not intubate in these cases since doing so can REALLY be dangerous. If intubation is clearly the only option - then special precautions MUST BE MADE to make sure the patient can handle the transition to positive pressure ventilation.</p><h2 id="clinical-pearls">Clinical pearls</h2><ul><li>EtCO2 and Pulse oximetry are INVALUABLE - make sure to get the patient hooked up to these as soon as possible.</li><li>Protecting the airway means keeping oral fluid and gastric fluid OUT OF THE TRACHEA. This results from airway TONE. Talking also requires airway tone.</li><li>If the patient can wake up enough to answer simple questions and make a sentence, then they are probably protecting their airway.</li><li>Inability to swallow secretions can be a good reason to pull the trigger on intubation. Pooled secretions in the posterior oropharynx is BAD.</li><li>Gag reflex is NOT a sensitive or specific indictor of airway protection. It&apos;s absent in a large portion of NORMAL PEOPLE.</li><li>If the patient is stable enough to get an ABG, then they can probably have a trial of NIPPV so long as the disease process is amenable to this.</li><li>The more frail a patient, the less likely a trial of NIPPV will work.</li><li>DON&apos;T BE A COWBOY if you don&apos;t have to be. High risk airways are EXTREMELY dangerous. If you have resources in your shop USE THEM. Don&apos;t hesitate to call for help from anesthesia, ENT, or a surgeon if you have the time.</li><li>Always be prepared for a surgical airway.</li><li>Be sure to examine the mouth, posterior pharynx, and neck</li></ul>]]></content:encoded></item><item><title><![CDATA[Fixing SSL Certificate and HTTP to HTTPS Forwarding for Ghost]]></title><description><![CDATA[Fix SSL Certificate and HTTPS forwarding for Bitnami Ghost on GCS. ]]></description><link>https://www.codymd.com/setting-up-ghost-blog-on-google-cloud-services/</link><guid isPermaLink="false">62fb2abdf0a199072078a5e8</guid><category><![CDATA[ghost]]></category><category><![CDATA[apache]]></category><category><![CDATA[bitnami]]></category><category><![CDATA[google cloud services]]></category><category><![CDATA[gcs]]></category><category><![CDATA[aws]]></category><category><![CDATA[amazon web services]]></category><category><![CDATA[server configuration]]></category><category><![CDATA[https]]></category><category><![CDATA[ssl certificates]]></category><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Tue, 16 Aug 2022 06:18:30 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1604763831872-e63aa85fcaab?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDF8fGklMjdtJTIwY3J5aW5nfGVufDB8fHx8MTY2MDYyOTczNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1604763831872-e63aa85fcaab?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDF8fGklMjdtJTIwY3J5aW5nfGVufDB8fHx8MTY2MDYyOTczNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" alt="Fixing SSL Certificate and HTTP to HTTPS Forwarding for Ghost"><p>I ran into some major issues setting up the SSL certificate and HTTP to HTTPS forwarding on my Ghost blog. I&apos;m outlining corrective steps here for other and for future reference.</p><p>Basically, after setting up the SSL certificate my site had two major problems. First, it was blocked by my hospital with an error indicating that it detected malware, and, second, the site preview features in the dashboard were not working - they were blank.</p><h3 id="ssl-certificates">SSL Certificates</h3><p>There are many ways to deploy a Ghost blog. Among them are Amazon Web Services (AWS) and Google Cloud Services (GCS) with the Bitnami package. These instances use an Apache web server as of the writing of this post.</p><p>Setting up the SSL certificate is quite easy with the bncert tool <a href="https://docs.bitnami.com/aws/how-to/understand-bncert/">as outlined in their documentation.</a> Basically, you deploy an instance on a the cloud service, link it to a static IP address, configure your domain name and allow it&apos;s changes to propagate, and then run the bncert tool with the following command. The command on the GCS Bitnami deployment is the following: </p><!--kg-card-begin: markdown--><pre><code>sudo /opt/bitnami/bncert-tool
</code></pre>
<!--kg-card-end: markdown--><h3 id="fixing-https-forwarding">Fixing HTTPS Forwarding</h3><p>Despite having a SSL certificate and connecting through HTTPS - there are still links being served as HTTP (not HTTPS). This content is not retrieved and therefore is not displayed. I think this is the reason the blog preview / view page insets do not work. </p><p>The fix for this has two steps:</p><ol><li>Change the URL of the website to HTTPS in the Ghost config</li><li>Add HTTPS forwarding to your site header in the Apache config files</li></ol><p>PS: Some people were citing that you had to add a header option to the server configuration:</p><!--kg-card-begin: markdown--><p><code>x-frame-options sameasorigin</code></p>
<!--kg-card-end: markdown--><p>I tried this and confirmed the header was present, but it didn&apos;t fix the problem. You can quickly check this by inspecting the site, inspecting with chrome dev tools, selecting an item, and looking at the header options. Here the google homepage has it set to deny - you&apos;d want yours set to &quot;SAMEASORIGIN&quot;.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/08/image-6.png" class="kg-image" alt="Fixing SSL Certificate and HTTP to HTTPS Forwarding for Ghost" loading="lazy" width="871" height="611" srcset="https://www.codymd.com/content/images/size/w600/2022/08/image-6.png 600w, https://www.codymd.com/content/images/2022/08/image-6.png 871w" sizes="(min-width: 720px) 720px"></figure><h3 id="change-website-url-in-ghost-config">Change Website URL in Ghost Config</h3><p>There are basically two ways to do this. Either with the ghost command line tool, or by directly editing the config.production.json.</p><h5 id="ghost-cli">Ghost CLI</h5><p>With the ghost command line tool you can do the following and it should change your URL. You need to be in the correct folder to run the CLI or add it to your path. On the GCS Bitnami Ghost instance this was /opt/bitnami/. It was in a different folder on the AWS instance. Neither had the CLI in the path.</p><!--kg-card-begin: markdown--><pre><code>cd /opt/bitnami
sudo ghost config url &quot;https://www.my-domain.com&quot;
</code></pre>
<!--kg-card-end: markdown--><h5 id="alternative-edit-configproductionjson">Alternative: Edit config.production.json</h5><p>The main ghost config file is at /opt/bitnami/ghost/config.production.json</p><p>You can edit this file to change the URL to &quot;http<strong>s</strong>://www.my-domain.com&quot;. </p><!--kg-card-begin: markdown--><pre><code>cd /opt/bitnami/ghost
sudo nano config.production.json
</code></pre>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/08/image-4.png" class="kg-image" alt="Fixing SSL Certificate and HTTP to HTTPS Forwarding for Ghost" loading="lazy" width="688" height="468" srcset="https://www.codymd.com/content/images/size/w600/2022/08/image-4.png 600w, https://www.codymd.com/content/images/2022/08/image-4.png 688w"></figure><p>After doing this, my site was no long responding through the domain name and I was getting a connection error. It still connected through the direct static IP address.</p><h5 id="forward-http-to-https">Forward HTTP to HTTPS</h5><p>I tried using the <a href="https://docs.bitnami.com/aws/apps/ghost/administration/force-https-apache/">Bitnami documentation about how to forward to HTTPS</a> but I found that it either wasn&apos;t working, I wasn&apos;t doing it correctly, or at least it wasn&apos;t correcting my issue. I would add that the folder structures in their solution did not match my instance and I had to go searching for the config files.</p><p>I found <a href="https://sharedphysics.com/ghost-fixing-https-issues/">this nice blog post</a>. Their solution to the same problem solved my issue.</p><p>Basically, you need to add an HTTPS forward header to the server configuration. The configuration files were not in the same place as in many posts. I found the Unix &quot;find&quot; command useful for finding these files.</p><!--kg-card-begin: markdown--><pre><code>sudo find -m &quot;filename.ext&quot;
</code></pre>
<!--kg-card-end: markdown--><p>In the /opt/bitnami/apps/letsencrypt/conf/httpd-app.conf file I added the following line to the top of the file. Notably, this file is only present after you run the bncert tool.</p><!--kg-card-begin: markdown--><pre><code>cd /opt/bitnami/apps/letsencrypt/conf/
sudo nano httpd-app.conf

#ADD THIS LINE to the TOP OF THE FILE
RequestHeader set X-Forwarded-Proto &quot;https&quot;
</code></pre>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/08/image-5.png" class="kg-image" alt="Fixing SSL Certificate and HTTP to HTTPS Forwarding for Ghost" loading="lazy" width="572" height="216"></figure><h3 id="conclusion">Conclusion</h3><p>I restarted my sever and everything was working - it connected at my hospital and the preview / view page links were now working! </p>]]></content:encoded></item><item><title><![CDATA[Iron Deficiency: How to Master Diagnosis and Treatment for Your Complex Admitted Patients]]></title><description><![CDATA[Detailed discussion of lab cutoffs for iron deficiency in complex patients with a focus on oral and IV treatment options.]]></description><link>https://www.codymd.com/iron_deficiency/</link><guid isPermaLink="false">62faf8d2f0a199072078a579</guid><category><![CDATA[medicine]]></category><category><![CDATA[hematology]]></category><category><![CDATA[iron deficiency anemia]]></category><category><![CDATA[anemia]]></category><category><![CDATA[iron deficiency]]></category><category><![CDATA[iv iron]]></category><category><![CDATA[ferrous sulfate]]></category><category><![CDATA[oral iron]]></category><category><![CDATA[ferritin]]></category><category><![CDATA[transferrin saturation]]></category><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Tue, 16 Aug 2022 05:26:39 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1638272467190-4ff6f773315c?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDJ8fHJlZCUyMGJsb29kJTIwY2VsbHxlbnwwfHx8fDE2NTk0NTg5Nzg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1638272467190-4ff6f773315c?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDJ8fHJlZCUyMGJsb29kJTIwY2VsbHxlbnwwfHx8fDE2NTk0NTg5Nzg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" alt="Iron Deficiency: How to Master Diagnosis and Treatment for Your Complex Admitted Patients"><p>This post outlines lab cutoffs for iron deficiency in healthy patients and those with heart failure, ongoing inflammation, or chronic kidney disease. Oral and IV treatment options are reviewed.</p><h1 id="does-your-patient-have-iron-deficiency">Does your patient have iron deficiency?</h1><p>The most useful labs are ferritin and transferrin saturation percent (TSAT). The TSAT is usually reported, but if not, it can be calculated by dividing the iron level by the total iron binding capacity (TIBC).</p><p>Iron deficiency is indicated by the following:</p><ul><li>Almost ANY patient -&gt; <strong>Ferritin less than 30 mg/dL</strong></li><li>Active inflammation -&gt;<strong>TSAT &lt;20% and ferritin less than 100 mg/dL</strong>.</li><li>CKD -&gt; <strong>TSAT &lt;20% and ferritin less than 200 mg/dL</strong>.</li><li>CHF<sup>1&#x2013;3</sup> -&gt; <strong>ferritin &lt;100 mg/dL <u>OR </u></strong><br> &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; -&gt; <strong>ferritin 100-300 mg/dL + TSAT &lt;20%</strong></li><li>Clinical and lab improvement after trial of iron replacement</li></ul><p>If the patient has anemia associated with the iron deficiency, they will often also have RBC indicators of low MCV, high RDW, low MCHC, and low reticulocyte count. They may also have symptoms such as fatigue, restless leg syndrome, PICA, or dyspnea.</p><p>Soluble transferrin receptor is sometimes used to help decide if a patient has anemia of inflammation OR anemia of inflammation + iron deficiency.</p><p>Iron deficiency and treatment for patients on dialysis is somewhat different because patients lose iron with every run of hemodialysis.<sup>4</sup> There is variation among nephrologists regarding the ferritin and TSAT cutoffs that indicate iron deficiency or benefit from treatment. A recent trial used a ferritin of 400 mg/dL and TSAT of 30% for cutoffs.</p><h1 id="iron-deficiency-is-a-symptom-that-demands-evaluation">Iron Deficiency is a SYMPTOM that demands evaluation</h1><p>Healthy patients who eat a normal diet don&apos;t have iron deficiency. If this new finding is identified, it begs the question as to what is causing it. Does the patient have some source of ongoing bleeding or a malabsorption syndrome? Consider the following:</p><ul><li>Age-appropriate cancer screening</li><li>Colonoscopy and EGD if no other cause is identified</li><li>Inflammatory bowel disease</li><li>Celiac disease</li><li>Menorrhagia</li><li>Hematuria</li><li>Diffuse alveolar hemorrhage</li><li>Lice</li><li>H. Pylori</li><li>Autoimmune gastritis</li><li>Use of proton pump inhibitor (PPI)</li></ul><h1 id="indications-and-contraindications-for-treatment">Indications and contraindications for treatment</h1><p>Any patient with iron deficiency should be treated (eventually).</p><p>The main reason to postpone treatment is if the patient has a severe uncontrolled bacterial infection. Iron deficiency treatment has been associated with increased risk of infection.<sup>5,6</sup> The data on this are weak, but if the patient doesn&apos;t have a life-threatening anemia or hemodynamic instability, then why risk it? If a patient has source control, is on antibiotics, and is clinically improving, then it&apos;s not unreasonable to go ahead and initiate iron replacement.</p><h1 id="iv-vs-oral-iron">IV vs oral iron</h1><p>Oral iron is poorly tolerated even when dosed properly (one tablet every other day).<sup>7</sup> If the patient is admitted and has IV access, then just use IV iron. This would be doubly true if the patient is symptomatic from their anemia.</p><p>IV Iron is especially indicated for patients who are not going to absorb oral iron. For example, consider the following conditions:</p><ul><li>Inflammatory bowel disease</li><li>Celiac disease</li><li>Small bowel resection</li><li>Gastric bypass surgeries</li><li>Demonstrated failure of oral iron response</li></ul><p>Furthermore, patients with ongoing inflammation poorly absorb iron from the gut.<sup>8</sup> This happens because hepcidin down-regulates the ferroprotein on enterocytes.<sup>9,10</sup> The iron just isn&apos;t absorbed well regardless of their gut health and dietary intake.</p><h1 id="iv-iron-dosing-and-formulation">IV iron dosing and formulation</h1><p>There are two common ways to dose IV iron. Either calculate the iron deficit and replete to that amount <strong><u>OR</u> </strong>empirically treat with 1 gram of IV iron.<sup>11</sup></p><p><strong>Option 1 (preferred): </strong>Use the Ganzoni equation to calculate the patient&apos;s total iron deficit and then replete that amount. Typically, the deficit will be 500-1500 mg.</p><p><a href="Ganzoni%20Equation">Ganzoni Equation (MDCalc</a>):</p><p>Total iron dose = 2.4 * weight * (target Hb - actual Hb) + IronStoresIron stores = 10-15 mg/kg IBW</p><p><strong>Option 2: </strong>empirically treat with 1 gram of IV Iron</p><p><u>Pick an iron formulation and give one dose per day until the deficit is repleted.</u></p><p>High molecular weight Iron dextran is bad: <strong>1 in 100 patients exposed suffer severe life-threatening anaphylaxis.</strong> To allow usage, patients were typically pre-treated with steroids and antihistamines. Low molecular weight iron dextran has a lower anaphylaxis risk, and if a test dose is given, then it&#x2019;s not unreasonable to use.<sup>12</sup></p><p>Otherwise, use whichever formulation your hospital has available. Severe adverse effects are extremely rare with more recent formulations.<sup>12,13</sup> The benefit of curing iron deficiency certainly outweighs the risk. Some examples of formulations that may be available include:</p><ul><li>Iron sucrose (Venofer) - 100-300 mg per dose</li><li>Iron gluconate (Ferrlecit) - 125 mg or 250 mg per dose</li></ul><p>There are other formulations typically used in dialysis centers that allow higher mg per dose, but they are more expensive and are not commonly used were I practice.</p><h2 id="oral-iron-dosing-and-formulation">Oral iron dosing and formulation</h2><p>Decide on an iron deficit and treat with ferric gluconate one tablet every other day. Recent data suggest that this strategy is non-inferior to more aggressive dosing and allows for improved tolerance/compliance.<sup>7</sup> The underlying physiology is thought to reflect hepcidin increases after an iron dose reducing the absorption of subsequent dosing.</p><p>Absorption of oral iron is variable. The duration of treatment should be based on the iron deficit and improvement in the ferritin, TSAT, and the RBC indices. It wouldn&apos;t be unreasonable to recheck labs after a few months of treatment.</p><h2 id="clinical-pearls">Clinical pearls</h2><p>One time blood transfusion does not significantly affect iron studies within 48 to 72 hours.<sup>14</sup> Though this is not much data on this topic. Some older small studies (10-30 patients) found the opposite conclusion.<sup>15,16</sup></p><p>Iron dextran is the original IV iron formulation. It has a higher risk of anaphylaxis (1-2%) and requires a test dose before administering the full dose. Newer IV iron formulations are extremely safe and adverse effects are not common. Furthermore, they don&#x2019;t require a test dose.</p><p>The evidence is not robust for ferritin and TSAT cutoffs in patients with inflammation, CKD, and heart failure; they will likely slightly be evolving over time as better data are reported.</p><p>Treating iron deficiency in patients admitted with acute decompensated heart failure reduces readmission for heart failure.<sup>1</sup></p><h2 id="examples">Examples</h2><p>This patient presented with fatigue and anemia in the setting of ongoing blood loss. Their initial iron studies showed a ferritin of 6.9 and a TSAT of 4. This is the quintessential presentation of iron deficiency. The image below showed iron studies at followup (left column) and initial iron studies.</p><!--kg-card-begin: html--><center>
<img src="https://www.codymd.com/content/images/2022/08/image-2.png" , width="250," height="125" alt="Iron Deficiency: How to Master Diagnosis and Treatment for Your Complex Admitted Patients">
</center><!--kg-card-end: html--><p>This patient had multiple wounds and osteomyelitis. The iron studies and CBC together indicate likely anemia of chronic deficiency AND iron deficiency.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/08/image-8.png" class="kg-image" alt="Iron Deficiency: How to Master Diagnosis and Treatment for Your Complex Admitted Patients" loading="lazy" width="452" height="207"></figure><p>This patient had acute inflammation and end stage renal disease and had a macrocytic anemia that didn&apos;t have a clear etiology; but they did not have iron deficiency.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/08/image-9.png" class="kg-image" alt="Iron Deficiency: How to Master Diagnosis and Treatment for Your Complex Admitted Patients" loading="lazy" width="639" height="232" srcset="https://www.codymd.com/content/images/size/w600/2022/08/image-9.png 600w, https://www.codymd.com/content/images/2022/08/image-9.png 639w"></figure><p>This patient presented with dizziness and chest pain. They had large uterine fibroids and poor access to care. She had severe iron deficiency anemia.</p><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/09/anemia.png" class="kg-image" alt="Iron Deficiency: How to Master Diagnosis and Treatment for Your Complex Admitted Patients" loading="lazy" width="298" height="376"></figure><h3 id="references">References</h3><p>1. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Graham FJ, Pellicori P, Ford I, Petrie MC, Kalra PR, Cleland JGF. Intravenous iron for heart failure with evidence of iron deficiency: a meta-analysis of randomised trials. <em>Clin Res Cardiol</em>. 2021;110(8):1299-1307. doi:10.1007/s00392-021-01837-8</p><p>2. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Ponikowski P, Kirwan BA, Anker SD, et al. Ferric carboxymaltose for iron deficiency at discharge after acute heart failure: a multicentre, double-blind, randomised, controlled trial. <em>The Lancet</em>. 2020;396(10266):1895-1904. doi:10.1016/S0140-6736(20)32339-4</p><p>3. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Grote Beverborg N, Klip IjT, Meijers WC, et al. Definition of Iron Deficiency Based on the Gold Standard of Bone Marrow Iron Staining in Heart Failure Patients. <em>Circ Heart Fail</em>. 2018;11(2):e004519. doi:10.1161/CIRCHEARTFAILURE.117.004519</p><p>4. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Macdougall IC, White C, Anker SD, et al. Intravenous Iron in Patients Undergoing Maintenance Hemodialysis. <em>N Engl J Med</em>. 2019;380(5):447-458. doi:10.1056/NEJMoa1810742</p><p>5. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Shah AA, Donovan K, Seeley C, et al. Risk of Infection Associated With Administration of Intravenous Iron: A Systematic Review and Meta-analysis. <em>JAMA Netw Open</em>. 2021;4(11):e2133935. doi:10.1001/jamanetworkopen.2021.33935</p><p>6. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Cross JH, Bradbury RS, Fulford AJ, et al. Oral iron acutely elevates bacterial growth in human serum. <em>Sci Rep</em>. 2015;5(1):16670. doi:10.1038/srep16670</p><p>7. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Stoffel NU, Cercamondi CI, Brittenham G, et al. Iron absorption from oral iron supplements given on consecutive versus alternate days and as single morning doses versus twice-daily split dosing in iron-depleted women: two open-label, randomised controlled trials. <em>Lancet Haematol</em>. 2017;4(11):e524-e533. doi:10.1016/S2352-3026(17)30182-5</p><p>8. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;McSorley ST, Jones I, McMillan DC, Talwar D. Quantitative data on the magnitude of the systemic inflammatory response and its relationship with serum measures of iron status. <em>Transl Res</em>. 2016;176:119-126. doi:10.1016/j.trsl.2016.05.004</p><p>9. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Ganz T, Nemeth E. Iron Balance and the Role of Hepcidin in Chronic Kidney Disease. <em>Semin Nephrol</em>. 2016;36(2):87-93. doi:10.1016/j.semnephrol.2016.02.001</p><p>10. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Ludwiczek S, Aigner E, Theurl I, Weiss G. Cytokine-mediated regulation of iron transport in human monocytic cells. <em>Blood</em>. 2003;101(10):4148-4154. doi:10.1182/blood-2002-08-2459</p><p>11. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Koch TA, Myers J, Goodnough LT. Intravenous Iron Therapy in Patients with Iron Deficiency Anemia: Dosing Considerations. <em>Anemia</em>. 2015;2015:1-10. doi:10.1155/2015/763576</p><p>12. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Wong L, Smith S, Gilstrop M, et al. Safety and efficacy of rapid (1,000 mg in 1 hr) intravenous iron dextran for treatment of maternal iron deficient anemia of pregnancy: Intravenous Iron for Maternal Iron Deficient Anemia. <em>Am J Hematol</em>. 2016;91(6):590-593. doi:10.1002/ajh.24361</p><p>13. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Faich G, Strobos J. Sodium ferric gluconate complex in sucrose: Safer intravenous iron therapy than iron dextrans. <em>Am J Kidney Dis</em>. 1999;33(3):464-470. doi:10.1016/S0272-6386(99)70183-6</p><p>14. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Froissart A, Rossi B, Ranque B, et al. Effect of a Red Blood Cell Transfusion on Biological Markers Used to Determine the Cause of Anemia: A Prospective Study. <em>Am J Med</em>. 2018;131(3):319-322. doi:10.1016/j.amjmed.2017.10.005</p><p>15. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Saxena S, Shulman I. The effect of blood transfusion on serum ferritin level. <em>Transfusion (Paris)</em>. 1993;33(10):883-884. doi:10.1046/j.1537-2995.1993.331094054628.x</p><p>16. &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Saxena S, Shulman IA, Johnson C. Effect of blood transfusion on serum iron and transferrin saturation. <em>Arch Pathol Lab Med</em>. 1993;117(6):622-624.</p><h1 id="disclaimer">Disclaimer</h1><p>All information in this post is for educational use only and is not a replacement for formal medical education.</p>]]></content:encoded></item><item><title><![CDATA[Smooth Trendline with Pandas DateTime Axis Using Matplotlib]]></title><description><![CDATA[an implementation for creating a smooth line over a datetime dataset with pandas and matplotlib.]]></description><link>https://www.codymd.com/how-to-make-a-smooth-trendline-with-datetime-timestamp-variables-in-matplotlib/</link><guid isPermaLink="false">62faf8d2f0a199072078a578</guid><category><![CDATA[matplotlib]]></category><category><![CDATA[pandas]]></category><category><![CDATA[plotting]]></category><category><![CDATA[trendline]]></category><category><![CDATA[smooth trendline]]></category><category><![CDATA[datetime]]></category><category><![CDATA[timestamp]]></category><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Sun, 26 Jun 2022 08:54:23 GMT</pubDate><media:content url="https://www.codymd.com/content/images/2022/08/smooth_cover_iamge.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.codymd.com/content/images/2022/08/smooth_cover_iamge.png" alt="Smooth Trendline with Pandas DateTime Axis Using Matplotlib"><p></p><!--kg-card-begin: markdown--><h3 id="tldr">TLDR</h3>
<p>This post shows an implementation for creating a smooth line over a datetime dataset with pandas and matplotlib.</p>
<h3 id="introduction">Introduction</h3>
<p>I recently ran into an issue where I wanted to make a smooth line over a 2 dimensional dataset. I&apos;d been messing around with R and thought the geom_smooth looked quite nice - so I sought to essentialy mimic that functionality.</p>
<p>I&apos;m not an expert on the different methods to make a smooth line. Some googling will show you that there are many, and I&apos;m sure there are reasons to use one or the other.</p>
<p>In my search I ended up at <a href="https://www.adamsmith.haus/python/answers/how-to-plot-a-smooth-line-with-matplotlib-in-python">this post</a> which shows an implementation of make_interp_spline from the Scipy library. Basically, this interpolates a smooth line that goes through each point in the dataset.</p>
<p>Their implementation wasn&apos;t too difficult to code, but when I went to apply it to my data and realized I had an issue. I was using a datetime for the X axis.</p>
<p>After some robust googling I figured out how to adapt this implementation. There wasn&apos;t much on StackOverflow or even google for that matter, so I figured I&apos;d make this simple blog post outlining my solution.</p>
<p>Briefly, the solution uses matplotlib.dates.date2num and matplotlib.dates.num2date to make the conversions all work nicely together.</p>
<h3 id="imports">Imports</h3>
<pre><code class="language-python">import pandas as pd
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from scipy.interpolate import make_interp_spline
</code></pre>
<h3 id="make-a-sample-dataset">make a sample dataset</h3>
<pre><code class="language-python">data = pd.DataFrame({
    &apos;time&apos; : pd.date_range(start=&apos;1/1/2019&apos;, periods=10, freq=&apos;Q&apos;),
    &apos;values&apos; : np.random.randint(low=50, high=100, size=10)
}).set_index(&apos;time&apos;)
data
</code></pre>
<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }
<pre><code>.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}
</code></pre>
</style>
<table border="1" class="dataframe" style="width:50%">
  <tbody>
  <tr style="text-align: left;">
      <th>time</th>
      <th>values</th>
    </tr>
    <tr>
      <td>2019-03-31
      </td><td>52</td>
    </tr>
    <tr>
      <td>2019-06-30
      </td><td>89</td>
    </tr>
    <tr>
      <td>2019-09-30
      </td><td>78</td>
    </tr>
    <tr>
      <td>2019-12-31
      </td><td>80</td>
    </tr>
    <tr>
      <td>2020-03-31
      </td><td>79</td>
    </tr>
    <tr>
      <td>2020-06-30
      </td><td>96</td>
    </tr>
    <tr>
      <td>2020-09-30
      </td><td>67</td>
    </tr>
    <tr>
      <td>2020-12-31
      </td><td>99</td>
    </tr>
    <tr>
      <td>2021-03-31
      </td><td>81</td>
    </tr>
    <tr>
      <td>2021-06-30
      </td><td>53</td>
    </tr>
  </tbody>
</table>
</div>
<h3 id="baseline-figure">Baseline figure</h3>
<pre><code class="language-python">fig,ax = plt.subplots(figsize=(8,5))
ax.plot(data.index, data.values)

</code></pre>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/08/image.png" class="kg-image" alt="Smooth Trendline with Pandas DateTime Axis Using Matplotlib" loading="lazy" width="484" height="301"></figure><!--kg-card-begin: markdown--><h3 id="use-date2num-to-convert-the-minmax-dates-to-numeric-concordant-with-how-matplotlib-does-for-its-plots">Use date2num to convert the min/max dates to numeric concordant with how matplotlib does for it&apos;s plots.</h3>
<pre><code class="language-python">min_date = mpl.dates.date2num(data.index.min())
max_date = mpl.dates.date2num(data.index.max())
x_new = np.linspace(min_date, max_date, 1000)
print(f&apos;min_date: {data.index.min()} -&gt; {min_date}&apos;)
print(f&apos;max_date: {data.index.max()} -&gt; {max_date}&apos;)
</code></pre>
<pre><code>min_date: 2019-03-31 00:00:00 -&gt; 17986.0
max_date: 2021-06-30 00:00:00 -&gt; 18808.0
</code></pre>
<pre><code class="language-python">x_new[:10]
</code></pre>
<pre><code>array([17986.        , 17986.82282282, 17987.64564565, 17988.46846847,
       17989.29129129, 17990.11411411, 17990.93693694, 17991.75975976,
       17992.58258258, 17993.40540541])
</code></pre>
<h3 id="convert-the-index-dates-to-numeric-and-use-that-to-fit-the-spline">Convert the index dates to numeric and use that to fit the Spline</h3>
<pre><code class="language-python">a_BSpline = make_interp_spline(data.index.map(mpl.dates.date2num), data.values)
y_new = a_BSpline(x_new)
</code></pre>
<pre><code class="language-python">y_new[:10]
</code></pre>
<pre><code>array([[52.        ],
       [52.80388298],
       [53.59690985],
       [54.37914392],
       [55.15064847],
       [55.91148681],
       [56.66172224],
       [57.40141806],
       [58.13063756],
       [58.84944405]])
</code></pre>
<h3 id="final-result">Final result</h3>
<pre><code class="language-python">fig,ax = plt.subplots(figsize=(8,5))
ax.plot(data.index, data.values)
ax.plot(x_new, y_new)
</code></pre>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://www.codymd.com/content/images/2022/08/image-1.png" class="kg-image" alt="Smooth Trendline with Pandas DateTime Axis Using Matplotlib" loading="lazy" width="481" height="297"></figure><!--kg-card-begin: markdown--><h3 id="conclusion">Conclusion</h3>
<!--kg-card-end: markdown--><p>In conclusion, use matplotlib.dates.date2num and num2date in order to generate the necessary conversions to allow the use of the scipy methods.</p>]]></content:encoded></item><item><title><![CDATA[A First Post]]></title><description><![CDATA[<p>I&apos;ve been thinking about starting this blog for a long time now. Usually when I Google something and don&apos;t find a good answer. </p><p>I&apos;m a resident physician training in a combined emergency medicine and internal medicine program. I&apos;ll be doing a critical</p>]]></description><link>https://www.codymd.com/first-post/</link><guid isPermaLink="false">62faf8d2f0a199072078a574</guid><dc:creator><![CDATA[Cody Couperus]]></dc:creator><pubDate>Fri, 14 Jan 2022 04:48:02 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1475666675596-cca2035b3d79?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDZ8fHJvYWQlMjBiaWtlfGVufDB8fHx8MTY2MDYyNjg4Mg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1475666675596-cca2035b3d79?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDZ8fHJvYWQlMjBiaWtlfGVufDB8fHx8MTY2MDYyNjg4Mg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" alt="A First Post"><p>I&apos;ve been thinking about starting this blog for a long time now. Usually when I Google something and don&apos;t find a good answer. </p><p>I&apos;m a resident physician training in a combined emergency medicine and internal medicine program. I&apos;ll be doing a critical care fellowship. I&apos;m going to work in medical intensive care. </p><p>In medicine I have so many questions that are hard to answer. Usually it&apos;s practical stuff, like, how exactly do I use warm fluids to do thoracic lavage during hypothermic arrest? Surprise, not a lot of blog posts on this. </p><p><strong>I want medicine to be better.</strong> As a collective, healthcare generates petabytes of data that is not used to it&apos;s fullest potential to help patients. Everyday we make mission critical decisions. Do I admit this patient with chest pain? Can I extubate this patient today? Am I missing something? <strong>Machine learning has an untapped role to play in answering questions and supporting clinicians.</strong></p><p>I&apos;m so curious. I love to teach. I&apos;m enthusiastic and passionate about helping people.<strong> I care deeply for my family, friends, patients, and colleagues. </strong></p><p>I&apos;m blogging so that my friends find answers when they search Google. </p><p></p>]]></content:encoded></item></channel></rss>