/* Hemodynamics & Labs */
<<set $MAP to 82>>
<<set $HR to 88>>
<<set $HCT to 30>>
<<set $K to 4.2>>
<<set $Calcium to 1.1>>
<<set $kTeachingShown to false>>
<<set $mapTeachingShown to false>>
<<set $hrTeachingShown to false>>
/* OR Start Variables */
<<set $CBC to false>>
<<set $Baseline to false>>
<<set $MadFlorman to false>>
/* Fluid & Blood Volume Tracking (in mL) */
<<set $EBL to 0>>
<<set $PRBC_units to 0>>
<<set $FFP_units to 0>>
<<set $CS_units to 0>>
<<set $NetBalance to 0>>
/* Flags */
<<set $ReperfusionTimer to 20>>
/* Pre-op Eval*/
<<set $Bedside to false>>
<<set $Labs to false>>
<<set $Cardiac_History to false>>
<<set $GI_History to false>>
<<set $Renal_History to false>>
/* Set all access checklist items to false by default */
<<set $line_art_radial to false>>
<<set $line_art_femoral to false>>
<<set $line_cvc_triple to false>>
<<set $line_sheath_9f to false>>
<<set $line_piv_large to false>>
<<set $line_picc to false>>
/*GI History passage checklist */
<<set $expectedCategories = [
{ id: "meld", name: "MELD Score", keywords: ["meld", "meld score", "meld-na", "meldna"] },
{ id: "ascites", name: "Ascites / Fluid", keywords: ["ascites", "fluid", "peritoneal"] },
{ id: "varices", name: "Varices / Bleeding", keywords: ["portal hypertension", "varices", "esophageal varices", "bleeding", "egd", "variceal"] },
{ id: "he", name: "Portosystemic Encephalopathy", keywords: ["encephalopathy", "he", "hepatic encephalopathy", "lactulose", "asterixis", "pse"] },
{ id: "hcc", name: "HCC Screening", keywords: ["hcc", "hepatocellular carcinoma", "lesion", "liver mass", "ultrasound", "ct", "mri"] },
{ id: "labs", name: "Lab Values", keywords: ["bilirubin", "inr", "creatinine", "sodium", "labs"] },
{ id: "etiology", name: "Etiology", keywords: ["etiology", "nash", "mash", "ald", "alcohol", "hep c", "hcv", "hep b", "hbv", "autoimmune"] },
{ id: "sbp", name: "Spontaneous Bacterial Peritonitis", keywords: ["spontaneous bacterial peritonitis", "sbp"] }
]>>
<<set $userItems = []>>
<<set $loggedCategoryIds = []>>
<<set $currentInput = "">>
<<set $warningMsg = "">><h2>Pre-Operative Holding — 06:15 AM</h2>You are pulled off sick call to cover a liver transplant case. You know nothing besides what is listed below.
<strong>Patient:</strong> 54M presenting for orthotopic liver transplantation.
The donor graft has arrived. Cold ischemia time is ticking. The patient is in PACU.
[[Do a Chart Review|Chart Review]]
[[See Patient at Bedside|Bedside]]
<<if $Renal_History and $Cardiac_History and $GI_History and $Labs>>[[Proceed to Vascular Access Strategy|Vasc Access]]<</if>>
by Jeffrey Lee
<<if tags().includes("show-caption")>>
<<nobr>>
<div style="border-top: 1px solid #555; padding-top: 10px; font-size: 0.9em;">
<strong>PATIENT VITALS</strong><br><br>
MAP: <<if $MAP lt 65>><span style="color: red;"><span id="sidebar-map"><<print $MAP>></span> mmHg</span><<else>><span id="sidebar-map"><<print $MAP>></span> mmHg<</if>><br>
Heart Rate: <span id="sidebar-hr"><<print $HR>></span> bpm<br>
</div>
<div style="border-top: 1px solid #555; margin-top: 10px; padding-top: 10px; font-size: 0.9em;">
<strong>FLUID & BLOOD TRACKER</strong><br><br>
Est. Blood Loss: $EBL mL<br>
Transfused pRBC: $PRBC_units Units<br>
Transfused FFP: $FFP_units Units<br>
Transfused Cell Saver: $CS_units Bowls<br>
</div>
<<if $abgDrawn>>
<div style="border-top: 1px solid #555; margin-top: 10px; padding-top: 10px; font-size: 0.9em;">
<strong>LAST DRAWN ABG</strong><br><br>
HCT: <<if $abg_HCT lt 20>><span style="color: red;">$abg_HCT %</span><<else>>$abg_HCT %<</if>><br>
Potassium: <<if $abg_K gte 6.0>><span style="color: red;"><span id="sidebar-k"><<print $abg_K>></span> mEq/L</span><<else>><span id="sidebar-k"><<print $abg_K>></span> mEq/L<</if>><br>
iCa²⁺: <<if $abg_Calcium lt 1.0>><span style="color: red;">$abg_Calcium mmol/L</span><<else>>$abg_Calcium mmol/L<</if>>
</div>
<</if>>
<</nobr>>
<</if>><h3>Bedside Exam</h3><strong>Baseline Vitals</strong>: BP 112/64 (MAP 80) | HR 88 | SpO2 95% RA
<li><strong>Airway</strong>: Mallampati III, full beard, intact dentition.
<li><strong>General</strong>: AAOx3. Prominently jaundiced/icteric skin appearance.
<li><strong>Cardiac</strong>: RRR. No murmurs, rubs, or gallops.
<li><strong>Pulm</strong>: CTAB. No wheezes, rales, or rhonchi. Respiration unlabored.
<li><strong>Abdomen</strong>: Soft, non-distended.</li>
Patient has a 22g PIV in his right forearm.
He doesn't really know his medical history and tells you to check his chart. He accepts all risk and benefits of anesthesia and consents to all procedures and blood products.
What do you want to do next?
<<set $Bedside to true>>
[[Do a Chart Review|Chart Review]]
<<if $Renal_History and $Cardiac_History and $GI_History and $Labs and $Bedside>>[[Proceed to Vascular Access Strategy|Vasc Access]]<</if>>
<h2 style="margin-bottom: 0.25em;">Cardiac Evaluation</h2><ul style="margin-top: 0;"> <li><strong>Transthoracic Echo:</strong> EF 67%. Moderate RV hypertrophy. RVSP 48 mmHg.</li>
<li><strong>Right Heart Cath:</strong> Mean PAP 34 mmHg, PVR 280 dynes·s/cm⁵ (Moderate Portopulmonary Hypertension).</li>
<li><strong>Pharmacologic Stress Test:</strong> EF 69%. No evidence of ischemia.</li>
</ul>Are there any contraindications to proceeding with the liver transplant based on the cardiac evaluation?
[[Yes|Pulmonary HTN]]
[[No|Pulmonary HTN]]<<nobr>>
<h2>Patient's Chart</h2>
<h3>**This chart will auto-populate as you discover more about your patient's history.</h3>
<strong>One-liner</strong>: Mr. Liver Liverson is a 54 year old male with a PMHx of HTN, HLD, <<if $GI_History>><strong>MASH</strong><</if>> cirrhosis
<<if $GI_History>><span style="color: red;"><strong>(+ascites, +EV, +PSE, -SBP, -PVT, -HCC)</strong></span><</if>>
here for OLT.
<br><br>
<<if $Renal_History>>
Of note, patient is in the TICU receiving CVVH for fluid and electrolyte optimization. The plan is to continue CVVH intra-operatively.<br><br>
<</if>>
<<if $GI_History>>
<strong>EGD (6 months prior):</strong> Grade 2 esophageal varices, banded at that time.<br><br>
<</if>>
<<if $Cardiac_History>>
<strong>Cardiac Evaluation</strong><br>
• <strong>Transthoracic Echo:</strong> EF 67%. Moderate RV hypertrophy. RVSP 48 mmHg.<br>
• <strong>Right Heart Cath:</strong> Mean PAP 34 mmHg, PVR 280 dynes·s/cm⁵ (Moderate Portopulmonary Hypertension).<br>
• <strong>Pharmacologic Stress Test:</strong> EF 69%. No evidence of ischemia.<br><br>
<</if>>
<<if $Labs>>
Based on his latest lab values, patient has MELD 3.0 score of 34. <br>
T&S: A+, negative antibodies
<br><br>
<</if>>
<<if $Bedside>>
<strong>LDAs</strong>: Right forearm 22g
<br><br>
<</if>>
How would you like to proceed?
<</nobr>>
<<nobr>>
<<if not $Bedside>>[[See Patient at Bedside|Bedside]]<br><</if>>
<<if not $Labs>>[[Check Labs|Labs]]<br><</if>>
<<if not $Cardiac_History>>[[Check Cardiac Clearance Note|Cardiac History]]<br><</if>>
<<if not $GI_History>>[[Check Liver Medicine Note|GI History]]<br><</if>>
<<if not $Renal_History>>[[Check Nephrology Note|Renal History]]<br><</if>>
<</nobr>>
<<if $Renal_History and $Cardiac_History and $GI_History and $Labs and $Bedside>>[[Proceed to Vascular Access Strategy|Vasc Access]]<</if>><h1>Pulmonary Hypertension</h1>Portopulmonary hypertension is a form of pulmonary arterial hypertension that develops in the setting of portal hypertension. It affects 2–6% of patients with portal hypertension <div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;"><strong>Clinical Pearl:</strong> Severe pulmonary hypertension (mPAP ≥45 mmHg) is generally considered an absolute contraindication to liver transplantation, with associated perioperative mortality exceeding 70% in historical series.
</div>
</div>For this patient with moderate PoPH, they will require direct RV inotropic support (e.g., Epinephrine) during graft unclamping. Pure alpha-1 agonists (Phenylephrine) will increase RV wall stress.
What would you like to do next?
<<set $Cardiac_History to true>>
[[Continue with Chart Review|Chart Review]]
<<if $Renal_History and $Cardiac_History and $GI_History and $Labs and $Bedside>>[[Proceed to Vascular Access Strategy|Vasc Access]]<</if>><<nobr>>
<h2 class="lab-title">Complete Blood Count (CBC)</h2>
<table class="lab-table">
<thead>
<tr>
<th>Component</th>
<th>Result</th>
<th>Reference Range</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>White Blood Cell (WBC)</td>
<td><strong>5.1 ×10³/µL</strong></td>
<td>4.5 – 11.0 ×10³/µL</td>
<td><span class="flag normal">Normal</span></td>
</tr>
<tr>
<td>Hemoglobin (Hgb)</td>
<td><strong>10.5 g/dL</strong></td>
<td>12.0 – 16.0 g/dL</td>
<td><span class="flag low">LOW</span></td>
</tr>
<tr>
<td>Hematocrit (Hct)</td>
<td><strong>30.0 %</strong></td>
<td>36.0 – 48.0 %</td>
<td><span class="flag low">LOW</span></td>
</tr>
<tr>
<td>Platelets (Plt)</td>
<td><strong>112 ×10³/µL</strong></td>
<td>150 – 450 ×10³/µL</td>
<td><span class="flag low">LOW</span></td>
</tr>
</tbody>
</table>
<h2 class="lab-title">Comprehensive Metabolic Panel (CMP)</h2>
<table class="lab-table">
<thead>
<tr>
<th>Component</th>
<th>Result</th>
<th>Reference Range</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<!-- Electrolytes & Kidney Function (from BMP) -->
<tr>
<td>Sodium (Na+)</td>
<td><strong>125 mEq/L</strong></td>
<td>135 – 145 mEq/L</td>
<td><span class="flag low">LOW</span></td>
</tr>
<tr>
<td>Potassium (K+)</td>
<td><strong>2.9 mEq/L</strong></td>
<td>3.5 – 5.0 mEq/L</td>
<td><span class="flag low">LOW</span></td>
</tr>
<tr>
<td>Chloride (Cl-)</td>
<td><strong>106 mEq/L</strong></td>
<td>96 – 106 mEq/L</td>
<td><span class="flag normal">Normal</span></td>
</tr>
<tr>
<td>Carbon Dioxide (CO2)</td>
<td><strong>26.2 mEq/L</strong></td>
<td>22.0 – 29.0 mEq/L</td>
<td><span class="flag normal">Normal</span></td>
</tr>
<tr>
<td>Blood Urea Nitrogen (BUN)</td>
<td><strong>9 mg/dL</strong></td>
<td>7 – 20 mg/dL</td>
<td><span class="flag normal">Normal</span></td>
</tr>
<tr>
<td>Creatinine (Cr)</td>
<td><strong>0.44 mg/dL</strong></td>
<td>0.60 – 1.20 mg/dL</td>
<td><span class="flag low">LOW</span></td>
</tr>
<tr>
<td>Glucose (Glu)</td>
<td><strong>122 mg/dL</strong></td>
<td>70 – 99 mg/dL</td>
<td><span class="flag high">HIGH</span></td>
</tr>
<tr>
<td>Calcium (Ca)</td>
<td><strong>9.4 mg/dL</strong></td>
<td>8.5 – 10.2 mg/dL</td>
<td><span class="flag normal">Normal</span></td>
</tr>
<!-- Liver Function Panel (CMP addition) -->
<tr>
<td>Total Protein</td>
<td><strong>7.1 g/dL</strong></td>
<td>6.0 – 8.3 g/dL</td>
<td><span class="flag normal">Normal</span></td>
</tr>
<tr>
<td>Albumin</td>
<td><strong>4 g/dL</strong></td>
<td>3.5 – 5.0 g/dL</td>
<td><span class="flag normal">Normal</span></td>
</tr>
<tr>
<td>Bilirubin, Total</td>
<td><strong>1 mg/dL</strong></td>
<td>0.1 – 1.2 mg/dL</td>
<td><span class="flag normal">Normal</span></td>
</tr>
<tr>
<td>Alkaline Phosphatase (ALP)</td>
<td><strong>68 U/L</strong></td>
<td>44 – 147 U/L</td>
<td><span class="flag normal">Normal</span></td>
</tr>
<tr>
<td>AST (SGOT)</td>
<td><strong>72 U/L</strong></td>
<td>10 – 40 U/L</td>
<td><span class="flag high">HIGH</span></td>
</tr>
<tr>
<td>ALT (SGPT)</td>
<td><strong>30 U/L</strong></td>
<td>7 – 56 U/L</td>
<td><span class="flag normal">Normal</span></td>
</tr>
</tbody>
</table>
<h2 class="lab-title">Coagulation Panel</h2>
<table class="lab-table">
<thead>
<tr>
<th>Component</th>
<th>Result</th>
<th>Reference Range</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>Prothrombin Time (PT)</td>
<td><strong>24.5 sec</strong></td>
<td>11.0 – 13.5 sec</td>
<td><span class="flag high">HIGH</span></td>
</tr>
<tr>
<td>International Normalized Ratio (INR)</td>
<td><strong>2.0</strong></td>
<td>0.8 – 1.1 (Therapeutic: 2.0 – 3.0)</td>
<td><span class="flag normal">Normal</span></td>
</tr>
<tr>
<td>Activated Partial Thromboplastin Time (aPTT)</td>
<td><strong>55.0 sec</strong></td>
<td>25.0 – 35.0 sec</td>
<td><span class="flag high">HIGH</span></td>
</tr>
<tr>
<td>Fibrinogen</td>
<td><strong>280 mg/dL</strong></td>
<td>200 – 400 mg/dL</td>
<td><span class="flag normal">Normal</span></td>
</tr>
</tbody>
</table>
<</nobr>>
[[You notice that you are missing something...|TypeScreen]]<<nobr>>
<h2>Preoperative Setup — OLT</h2>
<</nobr>>
Choose the correct vascular access (3) and the correct adjunct equipment (4) for this patient. Remember Mr. Liverson already has a 22g PIV (so no need to check it off).
<<link "Click here if you need a hint!">>
<<run
Dialog.setup("Standard Liver Transplant Setup");
Dialog.wiki(`<<nobr>>
Standard vascular access and adjunct equipment will differ depending on the institution you are working at. Most importantly, it is also dependent on patient factors (such as their bleeding risk, if they require VV bypass, etc.), which is why a thorough chart review and pre-op plan is vital.
<br>
<br>
As you progress through your Liver Transplant block, you will learn more about these factors and will also see how they come into play as we plan for each case.
<br>
<br>
At Mount Sinai, a "straight-forward" liver transplant case will require a PIV (for induction), an arterial line (most commonly radial for lab draws and blood pressure monitoring), central access in the form of a 14 Fr MAC line with a pulmonary artery catheter, and a 7Fr rapid infusion catheter (RIC).
<br>
<br>
Every liver transplant case will have a Belmont in the room (attached to the RIC) and a TEE machine and probe. The TEE machine has an ultrasound function that we can use for lines so a dedicated ultrasound machine is not needed. You will also need cell salvage (Cell Saver) which the perfusionist will bring in and set up.
<br>
<br>
If you recall from the nephrology note, this patient will require intra-op CVVH so for this patient we will also need the CVVH machine.
<</nobr>>`);
Dialog.open();
>>
<</link>>
<<nobr>>
<div style="display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start;">
<!-- VASCULAR ACCESS FIELDSET -->
<fieldset style="border: 1px solid #444; padding: 12px 16px; border-radius: 6px; min-width: 280px; flex: 1;">
<legend style="padding: 0 4px;"><strong>Vascular Access</strong></legend>
<!-- Arterial -->
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer;">
<input type="checkbox" id="aline-main" onchange="toggleSuboptions('aline-sites', this); updateSelections();">
<span><strong>Arterial Line</strong></span>
</label>
<div id="aline-sites" style="display: none; padding-left: 24px; margin-bottom: 8px;">
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 4px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="aline-sub" value="Radial A-line" onchange="updateSelections()"> <span>Radial</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 4px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="aline-sub" value="Femoral A-line" onchange="updateSelections()"> <span>Femoral</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="aline-sub" value="Axillary A-line" onchange="updateSelections()"> <span>Axillary</span>
</label>
</div>
<!-- Central -->
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer;">
<input type="checkbox" id="central-main" onchange="toggleSuboptions('central-types', this); updateSelections();">
<span><strong>Central Venous Access</strong></span>
</label>
<div id="central-types" style="display: none; padding-left: 24px; margin-bottom: 8px;">
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 4px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="central-sub" value="9Fr Sheath Introducer" onchange="updateSelections()"> <span>9Fr Introducer (Cordis)</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="central-sub" value="14Fr MAC Line" onchange="updateSelections()"> <span>14Fr MAC Line</span>
</label>
</div>
<!-- Peripheral -->
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 0px; cursor: pointer;">
<input type="checkbox" id="piv-main" onchange="toggleSuboptions('piv-types', this); updateSelections();">
<span><strong>Peripheral Access</strong></span>
</label>
<div id="piv-types" style="display: none; padding-left: 24px; margin-top: 8px;">
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 4px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="piv-sub" value="22G PIV" onchange="updateSelections()"> <span>22G PIV</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 4px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="piv-sub" value="20G PIV" onchange="updateSelections()"> <span>20G PIV</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 4px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="piv-sub" value="18G PIV" onchange="updateSelections()"> <span>18G PIV</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 4px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="piv-sub" value="16G PIV" onchange="updateSelections()"> <span>16G PIV</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 4px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="piv-sub" value="14G PIV" onchange="updateSelections()"> <span>14G PIV</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 4px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="piv-sub" value="7Fr RIC Line" onchange="updateSelections()"> <span>7Fr RIC Line</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9em;">
<input type="checkbox" class="piv-sub" value="8.5Fr RIC Line" onchange="updateSelections()"> <span>8.5Fr RIC Line</span>
</label>
</div>
</fieldset>
<!-- ADJUNCT EQUIPMENT FIELDSET -->
<fieldset style="border: 1px solid #444; padding: 12px 16px; border-radius: 6px; min-width: 280px; flex: 1;">
<legend style="padding: 0 4px;"><strong>Adjunct Equipment</strong></legend>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer;">
<input type="checkbox" class="equip-opt" value="Belmont Rapid Transfuser" onchange="updateSelections()">
<span>Belmont Rapid Transfuser</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer;">
<input type="checkbox" class="equip-opt" value="Cell Saver Machine" onchange="updateSelections()">
<span>Cell Saver Machine</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer;">
<input type="checkbox" class="equip-opt" value="Venoarterial ECMO (VA ECMO)" onchange="updateSelections()">
<span>VA ECMO</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer;">
<input type="checkbox" class="equip-opt" value="Cardiopulmonary Bypass (CPB)" onchange="updateSelections()">
<span>Cardiopulmonary Bypass (CPB) Machine</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer;">
<input type="checkbox" class="equip-opt" value="Continuous Veno-Venous Hemofiltration (CVVH)" onchange="updateSelections()">
<span>CVVH Machine</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer;">
<input type="checkbox" class="equip-opt" value="Transesophageal Echocardiogram (TEE)" onchange="updateSelections()">
<span>TEE Machine & Probe</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer;">
<input type="checkbox" class="equip-opt" value="Vascular Ultrasound" onchange="updateSelections()">
<span>Vascular Ultrasound</span>
</label>
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 0px; cursor: pointer;">
<input type="checkbox" class="equip-opt" value="Double-Lumen Endotracheal Tube (DLT)" onchange="updateSelections()">
<span>Double-Lumen Tube (DLT)</span>
</label>
</fieldset>
</div>
<br>
<!-- Dynamic Summary Box -->
<div style="display: flex; gap: 20px; flex-wrap: wrap;">
<div id="access-summary" style="background: #1e1e1e; color: #fff; padding: 12px; border-radius: 4px; flex: 1; min-width: 280px;">
<strong>Selected Access:</strong> <em>None selected</em>
</div>
<div id="equip-summary" style="background: #1e1e1e; color: #fff; padding: 12px; border-radius: 4px; flex: 1; min-width: 280px;">
<strong>Selected Equipment:</strong> <em>None selected</em>
</div>
</div>
<br>
<!-- Validation Button Container -->
<div id="proceed-container" style="text-align: right;">
<button id="proceed-btn" disabled onclick="SugarCube.Engine.play('OR Start')" style="padding: 10px 20px; font-size: 1em; cursor: not-allowed; opacity: 0.5;">
Proceed to OR →
</button>
</div>
<</nobr>>
<script>
if (!SugarCube.State.variables.selectedAccess) SugarCube.State.variables.selectedAccess = [];
if (!SugarCube.State.variables.selectedEquipment) SugarCube.State.variables.selectedEquipment = [];
window.toggleSuboptions = function(targetId, mainCheckbox) {
var subDiv = document.getElementById(targetId);
if (subDiv) {
subDiv.style.display = mainCheckbox.checked ? "block" : "none";
if (!mainCheckbox.checked) {
subDiv.querySelectorAll("input[type='checkbox']").forEach(function(el) { el.checked = false; });
}
}
};
window.updateSelections = function() {
// 1. Process Access Lines
var accessSelected = [];
var aLineMain = document.getElementById("aline-main");
if (aLineMain && aLineMain.checked) {
var aSub = false;
document.querySelectorAll(".aline-sub:checked").forEach(function(el) { accessSelected.push(el.value); aSub = true; });
if (!aSub) accessSelected.push("Arterial Line (Unspecified Site)");
}
var centralMain = document.getElementById("central-main");
if (centralMain && centralMain.checked) {
var cSub = false;
document.querySelectorAll(".central-sub:checked").forEach(function(el) { accessSelected.push(el.value); cSub = true; });
if (!cSub) accessSelected.push("Central Line (Unspecified Type)");
}
var pivMain = document.getElementById("piv-main");
if (pivMain && pivMain.checked) {
var pSub = false;
document.querySelectorAll(".piv-sub:checked").forEach(function(el) { accessSelected.push(el.value); pSub = true; });
if (!pSub) accessSelected.push("Peripheral Access (Unspecified Size)");
}
SugarCube.State.variables.selectedAccess = accessSelected;
// 2. Process Adjunct Equipment
var equipSelected = [];
document.querySelectorAll(".equip-opt:checked").forEach(function(el) {
equipSelected.push(el.value);
});
SugarCube.State.variables.selectedEquipment = equipSelected;
// 3. Update UI Summaries
var accessSummary = document.getElementById("access-summary");
if (accessSummary) {
accessSummary.innerHTML = accessSelected.length === 0
? "<strong>Selected Access:</strong> <em>None selected</em>"
: "<strong>Selected Access:</strong><br>• " + accessSelected.join("<br>• ");
}
var equipSummary = document.getElementById("equip-summary");
if (equipSummary) {
equipSummary.innerHTML = equipSelected.length === 0
? "<strong>Selected Equipment:</strong> <em>None selected</em>"
: "<strong>Selected Equipment:</strong><br>• " + equipSelected.join("<br>• ");
}
// 4. Validate Requirements
var hasRadial = accessSelected.includes("Radial A-line");
var hasMAC = accessSelected.includes("14Fr MAC Line");
var hasRIC = accessSelected.includes("7Fr RIC Line");
var hasBelmont = equipSelected.includes("Belmont Rapid Transfuser");
var hasCellSaver = equipSelected.includes("Cell Saver Machine");
var hasCVVH = equipSelected.includes("Continuous Veno-Venous Hemofiltration (CVVH)");
var hasTEE = equipSelected.includes("Transesophageal Echocardiogram (TEE)");
var isValid = hasRadial && hasMAC && hasRIC && hasBelmont && hasCellSaver && hasCVVH && hasTEE;
var btn = document.getElementById("proceed-btn");
if (btn) {
btn.disabled = !isValid;
btn.style.cursor = isValid ? "pointer" : "not-allowed";
btn.style.opacity = isValid ? "1.0" : "0.5";
}
};
</script><h2> Pre-Transplant GI Note Checklist </h2>
Reviewing a pre-liver transplant GI progress note requires looking for key indicators of hepatic decompensation, disease etiology, and transplant urgency.
List key clinical findings that you wish to find in the Liver Medicine note. Try to think of at least <strong>four</strong> and click 'Submit' when you're done.
<div style="display: flex; gap: 8px; align-items: center; margin: 10px 0 5px 0;">\
<span id="input-area"><<textbox "$currentInput" "" autofocus>></span>\
<span id="add-btn">\
<<button "Add Finding">>\
<<script>>
var rawInput = State.variables.currentInput.trim();
var cleanInput = rawInput.toLowerCase();
if (cleanInput === "") {
State.variables.warningMsg = "Please enter a clinical finding.";
} else {
var categories = State.variables.expectedCategories;
var loggedIds = State.variables.loggedCategoryIds;
var foundCategory = null;
for (var i = 0; i < categories.length; i++) {
var cat = categories[i];
var matches = cat.keywords.some(function(kw) {
return cleanInput.includes(kw.toLowerCase().trim());
});
if (matches) {
foundCategory = cat;
break;
}
}
if (foundCategory) {
if (loggedIds.includes(foundCategory.id)) {
State.variables.warningMsg = 'Duplicate domain! You already submitted an entry for "' + foundCategory.name + '".';
} else {
State.variables.loggedCategoryIds.push(foundCategory.id);
State.variables.userItems.push(rawInput + " (" + foundCategory.name + ")");
State.variables.currentInput = "";
State.variables.warningMsg = "";
}
} else {
State.variables.userItems.push(rawInput);
State.variables.currentInput = "";
State.variables.warningMsg = "";
}
}
<</script>>\
<<replace "#warning-area">>\
<<if $warningMsg !== "">><div style="color: red; margin: 3px 0 5px 0; font-weight: bold;">$warningMsg</div><</if>>\
<</replace>>\
<<replace "#input-area">>\
<<textbox "$currentInput" "" autofocus>>\
<</replace>>\
<<replace "#user-list">>\
<<if $userItems.length > 0>>\
<div style="margin: 5px 0 2px 0;"><strong>Your Documented Findings:</strong></div>\
<ul style="margin: 0; padding-left: 20px;">\
<<for _i = 0; _i < $userItems.length; _i++>>\
<li style="margin: 0; line-height: 1.3;"><<print $userItems[_i]>></li>\
<</for>>\
</ul>\
<</if>>\
<</replace>>\
<<run setup.attachEnterKey()>>\
<</button>>\
</span>\
</div>\
<div id="warning-area"></div>\
<div id="user-list"></div>\
<!-- SUBMIT BUTTON DIRECTLY ABOVE LINE WITH ZERO BOTTOM MARGIN -->
<div style="margin-top: 10px; margin-bottom: 0px; line-height: 1;">\
<<button "Submit">>\
<<replace "#results-area">>\
<<if $userItems.length === 0>>\
<p style="margin: 3px 0;"><em>Please enter at least one clinical finding before submitting.</em></p>\
<<else>>\
<h3 style="margin: 5px 0;">Review Results</h3>\
<p style="margin: 3px 0;">You successfully discovered <strong><<print $loggedCategoryIds.length>></strong> distinct clinical domain(s).</p>\
<div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 10px 0 0 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 6px 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;">
<h4 style="margin: 4px 0 2px 0;">Key Domains to Look For in a Pre-Transplant GI Note:</h4>
<ul style="margin: 0; padding-left: 20px;">
<li style="margin: 1px 0;"><strong>MELD-Na Score & Key Labs:</strong> Bilirubin, INR, Serum Creatinine, Sodium.</li>
<li style="margin: 1px 0;"><strong>Decompensation Markers:</strong> Ascites, Portosystemic Encephalopathy (PSE), Spontaneous Bacterial Peritonitis (SBP).</li>
<li style="margin: 1px 0;"><strong>Portal Hypertension:</strong> History of EGD / Esophageal Varices or variceal bleeding.</li>
<li style="margin: 1px 0;"><strong>HCC Screening:</strong> Recent imaging (CT/MRI/US) ruling out or monitoring Hepatocellular Carcinoma.</li>
<li style="margin: 1px 0;"><strong>Etiology:</strong> Underlying cause of cirrhosis (ALD, MASH/NASH, HCV, HBV, Autoimmune).</li>
</ul>
</div>
</div>
<div style="margin: 6px 0 0 0;">[[Let's go over this patient's history|Liver History]]</div>
<</if>>\
<</replace>>\
<</button>>\
</div>\
<!-- WHITE LINE (COLLAPSED TOP MARGIN) -->
<hr style="margin: 4px 0 10px 0; border: none; border-top: 1px solid #555;">\
<div id="results-area"></div>
<!-- AUTOMATIC ENTER KEY & PLACEHOLDER SCRIPT -->
<<done>>
<<script>>
setup.attachEnterKey = function() {
$("#input-area input").attr("placeholder", "Type here...");
$("#input-area input").off("keyup").on("keyup", function(e) {
if (e.key === "Enter" || e.keyCode === 13) {
$("#add-btn button").click();
}
});
$("#input-area input").focus();
};
setup.attachEnterKey();
<</script>>
<</done>><h2>Liver Medicine Note (<em>click the blue links for clinical pearls</em>)</h2><<set $GI_History to true>>Mr. Liverson is a 54M with a PMHx of HTN, DM, MASH cirrhosis (+ascites, +EV, +PSE, -SBP, -PVT, -HCC) who presents as a direct admit for OLT organ offer
<<link "Esophageal Varices (EV)">>
<<run
Dialog.setup("Esophageal Varices");
Dialog.wiki(`Esophageal varices (EV) develop as a consequence of portal hypertension in cirrhosis, present in approximately 85% of patients with decompensated disease. These dilated submucosal veins at the gastroesophageal junction are prone to rupture due to increased wall tension from elevated portal pressures, carrying significant bleeding risk. <div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;"><strong>Clinical Pearl:</strong> Recently banded esophageal varices represent a higher-risk scenario for TEE compared to unbanded varices, due to the theoretical risk of dislodging bands with the TEE probe, which could precipitate hemorrhage.
No formal guideline specifies a mandatory waiting period between variceal banding and TEE. However, based on banding ulcer healing data, a minimum of 2–3 weeks is a reasonable timeframe, with 4 weeks preferred when clinically feasible. <a href="https://www.ovid.com/10.1097/HEP.0000000000000647" target="_blank"><small><sup>[1]</sup></small></a>
</div>
</div>
`);
Dialog.open();
>>
<</link>>:
<li>Hemodynamically stable. No evidence of active GI bleeding. Last EGD was 6 months ago with Grade 2 varices that were banded at that time. </li>
<<link "Ascites">>
<<run
Dialog.setup("Ascites");
Dialog.wiki(`Ascites in cirrhosis forms through a cascade driven by portal hypertension, splanchnic vasodilation, and neurohormonal activation leading to renal sodium and water retention, with the excess fluid preferentially accumulating in the peritoneal cavity due to elevated sinusoidal and splanchnic capillary pressures. <a href="https://www.nejm.org/doi/full/10.1056/NEJMra035021" target="_blank"><small><sup>[2]</sup></small></a> <div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;"><strong>Clinical Pearl:</strong> Rapid evacuation of tense ascites upon laparotomy causes abrupt splanchnic decompression, leading to mesenteric vasodilation, decreased SVR, and effective hypovolemia despite transiently increased venous return. The resulting hypotension is often refractory to volume loading, as infused fluids redistribute preferentially to the dilated splanchnic bed rather than augmenting central blood volume. <a href="https://onlinelibrary.wiley.com/share/CJXRWEF2KWYWVET9PCDB?target=10.1111/ctr.14651" target="_blank"><small><sup>[3]</sup></small></a><a href="https://www.facs.org/media/o1gazfwy/2021_ms_gisemanual_final_01_22.pdf" target="_blank"><small><sup>[4]</sup></small></a>
</div>
</div>
`);
Dialog.open();
>>
<</link>>:
<li>Has history of LVPs, last one was 4 months ago (2L). Bedside POCUS without tappable pocket, diuretic regimen at home included torsemide every other day.</li>
<<link "Spontaneous Bacterial Peritonitis (SBP)">>
<<run
Dialog.setup("Spontaneous Bacterial Peritonitis ");
Dialog.wiki(`Spontaneous bacterial peritonitis (SBP) is an infection of the ascitic fluid occurring without an identifiable intra-abdominal surgical source (e.g., bowel perforation or abscess). SBP occurs almost exclusively in patients with decompensated cirrhosis and portal hypertension, resulting from bacterial translocation across a compromised intestinal mucosal barrier into the ascitic fluid. <a href="https://onlinelibrary.wiley.com/share/TPISWW3Y5VDUXW6QINGY?target=10.1111/apt.13172" target="_blank"><small><sup>[5]</sup></small></a><div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;"><strong>Clinical Pearl:</strong> There are concerns that repeated episodes of SBP cause peritoneal inflammation that can lead to adhesion formation, making the native hepatectomy more technically demanding. <a href="https://pubmed.ncbi.nlm.nih.gov/20417723/" target="_blank"><small><sup>[6]</sup></small></a>
SBP patients typically have higher MELD and Child-Pugh scores, which correlates with more extensive portosystemic collaterals and engorged venous structures in the surgical field, increasing bleeding risk during dissection. <a href="https://pubmed.ncbi.nlm.nih.gov/20417723/" target="_blank"><small><sup>[7]</sup></small></a>
</div>
</div>
`);
Dialog.open();
>>
<</link>>:
<li> No history of SBP, diagnostic paracentesis deferred this admission given no tappable pocket. </li>
<<link "Portal Vein Thrombosis (PVT)">>
<<run
Dialog.setup("Portal Vein Thrombosis");
Dialog.wiki(`Portal vein thrombosis (PVT) significantly impacts liver transplantation, with a prevalence of up to 26% in patients awaiting transplant. The severity is graded by the Yerdel classification (Grades 1–4), which is based on the extent of the thrombosis. <a href="https://www.ovid.com/00007890-200005150-00023" target="_blank"><small><sup>[8]</sup></small></a> Outcomes are severity-dependent: Grades 1–2 have similar post-transplant survival to non-PVT patients, while Grades 3–4 carry significantly higher mortality and graft loss. <a href="https://onlinelibrary.wiley.com/share/YM8X2ZNUDCZW56XPYTPQ?target=10.1111/ctr.14520" target="_blank"><small><sup>[9]</sup></small></a><div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;"><strong>Clinical Pearl:</strong> Key surgical consequences include significantly longer operative times and increased graft ischemic times with complex reconstructions. <a href="https://pubmed.ncbi.nlm.nih.gov/33503185/" target="_blank"><small><sup>[10]</sup></small></a>
Many PVT patients arrive on anticoagulation (LMWH or warfarin), which should ideally be continued until transplant. Coordination with the surgical team regarding timing of last dose and intraoperative anticoagulation/reversal strategy is critical.
</div>
</div>
`);
Dialog.open();
>>
<</link>>:
<li> RUQ US with patent portal vein.</li>
<<link "Hepatocellular Carcinoma (HCC)">>
<<run
Dialog.setup("Hepatocellular Carcinoma");
Dialog.wiki(`Hepatocellular carcinoma (HCC) is the most common primary liver malignancy, accounting for approximately 75–85% of primary liver cancers worldwide. It arises predominantly in the setting of chronic liver disease and cirrhosis, with major risk factors including hepatitis B and C infection, alcohol-related liver disease, and metabolic dysfunction-associated steatotic liver disease (MASLD/NAFLD).<div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;"><strong>Clinical Pearl:</strong> Many HCC transplant candidates have undergone bridging or downstaging procedures (TACE, ablation, radioembolization), which can create adhesions, altered vascular anatomy, and inflammatory changes in the hepatic hilum and perihepatic tissues, increasing operative complexity. <a href="https://onlinelibrary.wiley.com/share/TDEGWY7GXJXWRNSUXGVS?target=10.1111/ctr.13255" target="_blank"><small><sup>[11]</sup></small></a> <a href="https://pubmed.ncbi.nlm.nih.gov/41131386/" target="_blank"><small><sup>[12]</sup></small></a>
There is a theoretical risk of tumor dissemination with cell salvage in patients with HCC. However, based on multiple meta-analyses and large observational studies, cell salvage is safe during liver transplantation for HCC and does not increase the risk of tumor recurrence. <a href="https://pubmed.ncbi.nlm.nih.gov/40649161/" target="_blank"><small><sup>[13]</sup></small></a>
</div>
</div>
`);
Dialog.open();
>>
<</link>>:
<li>OSH RUQ US with no lesions. Cyst in R lobe. </li>
Portosystemic Encephalopathy (PSE):
<li> Currently AAOx3, though with mild asterixis and some confusion.</li>
[[Continue Chart Review|Chart Review]]
<<if $Renal_History and $Cardiac_History and $GI_History and $Labs and $Bedside>>[[Proceed to Vascular Access Strategy|Vasc Access]]<</if>><h2>Nephrology Consult</h2>Mr. Liverson is a 54 year old male presenting for OLT organ offer. He was found to be volume overloaded in the setting of an AKI with a presenting sodium of 125. He was admitted to the TICU for initiation of CVVH and optimization prior to OLT.
Are there any contraindications to proceeding with the liver transplant based on the nephrology consult note?
<<set $Renal_History to true>>
[[Yes|CVVH]]
[[No|CVVH]]The three findings documented (volume overload, AKI requiring CVVH, and Na of 125) are all indications for pre-transplant <strong>optimization</strong> rather than exclusions.
Severe pretransplant hyponatremia (Na <125 mEq/L) increases the risk of post-liver transplant complications — particularly osmotic demyelination syndrome (ODS), renal failure, infections, and neurologic events. <a href="https://pubmed.ncbi.nlm.nih.gov/19402063/" target="_blank"><small><sup>[1]</sup></small></a>
<div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;"><strong>Clinical Pearl:</strong> Intraoperative sodium loading from sodium-containing fluids and blood products is a major driver of rapid, uncontrolled sodium correction during liver transplantation, which increases ODS risk. <a href="https://pubmed.ncbi.nlm.nih.gov/34144870/" target="_blank"><small><sup>[2]</sup></small></a>
Key sources of sodium loading during a liver transplant include: <a href="https://pubmed.ncbi.nlm.nih.gov/34144870/" target="_blank"><small><sup>[2]</sup></small></a>
* Crystalloids (normal saline: 154 mEq/L Na; Isolyte: 140 mEq/L Na)
* Sodium bicarbonate (1 mEq/mL Na per ampule)
* FFP (~170 mEq/L Na) and pRBCs (~160 mEq/L Na)
* Albumin (130–160 mEq/L Na)
</div>
</div>
If necessary, patients can also receive intra-op CVVH. This can be discussed with the surgical team in order to help manage electrolytes and optimize volume status.
For this patient, CVVH will be continued intra-op.
[[Continue Chart Review|Chart Review]]
<<if $Renal_History and $Cardiac_History and $GI_History and $Labs and $Bedside>>[[Proceed to Vascular Access Strategy|Vasc Access]]<</if>><<set $Labs to true>><<nobr>>
You calculate that this patient has a MELD 3.0 score of 34 and a CTP score of 7, which puts him in Class B.
<div class="quiz-container">
<p class="quiz-question">Multiple scores have been developed to model survival outcomes in advanced chronic liver disease. Which score is used for liver transplants?</p>
<div class="quiz-options">
<<button "MELD Score">>
<<replace "#quiz-feedback">>
<div class="feedback correct">
<strong>Correct!</strong> The MELD score is used to prioritize candidates on the liver transplant waiting list.
<br><br>
The Model for End-Stage Liver Disease (MELD) is a purely laboratory-based score that predicts 90-day mortality in cirrhosis. It was originally derived to predict survival after TIPS, then repurposed in February 2002 as the basis for deceased-donor liver allocation in the US.<a href="https://www.ovid.com/10.1097/HEP.0000000000001644" target="_blank"><small><sup>[1]</sup></small></a> The original formula used bilirubin, INR, and creatinine; sodium was added in 2016 (MELD-Na), and sex plus albumin in 2023 (MELD 3.0), the version OPTN currently uses.<a href="https://pubmed.ncbi.nlm.nih.gov/34481845/" target="_blank"><small><sup>[2]</sup></small></a> The scale runs 6 to 40, with 3-month survival falling from roughly 90% to under 10% across that range.
<br><br>
<div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;"><strong>Clinical Pearl</strong>: Remember, a low MELD does not mean a low-risk anesthetic. MELD contains no measure of portal hypertension, sarcopenia, frailty, or cardiopulmonary reserve, and it systematically underestimates risk in acute-on-chronic liver failure, hepatocellular carcinoma, hepatopulmonary syndrome, and portopulmonary hypertension. <a href="https://pubmed.ncbi.nlm.nih.gov/34543610/" target="_blank"><small><sup>[3]</sup></small></a>
<br><br>
The MELD-14 patient with refractory ascites, a huge varix burden, and an unrecognized mean PA pressure of 45 mmHg is far more dangerous on induction and reperfusion than the MELD-32 patient with clean hemodynamics. Assess the whole patient, not just the score.
</div>
</div>
Click "Child-Turcotte-Pugh Score" to learn about the Child-Turcotte-Pugh Score system!
</div>
<</replace>>
<</button>>
<<button "Child-Turcotte-Pugh Score">>
<<replace "#quiz-feedback">>
<div class="feedback incorrect">
<strong>Incorrect.</strong> The MELD score is the official standard used to allocate organs for liver transplants.
<br><br>
Child and Turcotte built the score in 1964 to predict outcomes in cirrhotic patients undergoing portosystemic shunt surgery. It was a surgical risk tool from its conception. Pugh modified it in the early 1970s, substituting prothrombin time for nutritional status. Five variables, each scored 1–3: total bilirubin, albumin, INR/PT, ascites, and encephalopathy grade. Total 5–15, grouped as class A (5–6), B (7–9), C (10–15).
<br><br>
Class A patients have compensated disease and tolerate surgery with low mortality; across non-hepatic abdominal surgeries, mortality runs roughly <5%–10% for class A, 10%–40% for class B, and 20%–100% for class C. <a href="https://pubmed.ncbi.nlm.nih.gov/31376494/" target="_blank"><small><sup>[4]</sup></small></a>
<div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;"><strong>Clinical Pearl</strong>: CTP's five variables and their cutpoints were selected by clinical judgment and never formally validated. Ascites and encephalopathy are graded subjectively, producing interobserver variation and data elements that cannot be verified or audited. This was a principal reason, along with its coarse three-class stratification and inferior short-term mortality prediction, that MELD replaced CTP for organ allocation in 2002. <a href="https://pubmed.ncbi.nlm.nih.gov/34560316/" target="_blank"><small><sup>[5]</sup></small></a>
</div>
</div>
Click "MELD Score" to learn about the MELD Score system!
</div>
<</replace>>
<</button>>
</div>
<!-- The text will appear inside this div after clicking either button -->
<div id="quiz-feedback"></div>
</div>
<</nobr>>
[[Continue with Chart Review|Chart Review]]
<<if $Renal_History and $Cardiac_History and $GI_History and $Labs and $Bedside>>[[Proceed to Vascular Access Strategy|Vasc Access]]<</if>><<nobr>>
<<set $tsInput = "">>
<<set $tsRevealed = false>>
You are missing one extremely important lab result. What would you like to order?
<br>
<<link "I need a hint!">>
<<run
Dialog.setup("");
Dialog.wiki(`This lab test is extremely important in liver transplants due to the expectation that almost every patient receives blood transfusions.`);
Dialog.open();
>>
<</link>>
<br><br>
<div id="ts-container">
<<textbox "$tsInput" "">>
<br>
<span id="submit-btn-wrap">
<<button "Submit Order">>
<<set _cleanInput = $tsInput.trim().toLowerCase()>>
<<if ["type and screen", "t&s", "t & s", "type & screen"].includes(_cleanInput)>>
<<set $tsRevealed = true>>
<<replace "#ts-results">>
<div class="results-box">
<br>
<strong>LAB RESULTS — Type & Screen:</strong><br>
• Blood Type: A Positive<br>
• Antibody Screen: Negative
<br><br>
[[Good job! Now let's pull up MD Calc|Scores]]
</div>
<</replace>>
<<else>>
<<replace "#ts-results">>
<br>
<div class="error-text">Nice try, but this isn't the lab test that we need!</div>
<</replace>>
<</if>>
<</button>>
</span>
</div>
<div id="ts-results">
<<if $tsRevealed>>
<div class="results-box">
<strong>LAB RESULTS — Type & Screen:</strong><br>
• Blood Type: A Positive<br>
• Antibody Screen: Negative
</div>
<</if>>
</div>
<</nobr>>
<<script>>
$(document).one(':passageend', function () {
var $input = $('#ts-container input[type="text"]');
// Set the placeholder text
$input.attr('placeholder', 'type here...');
// Live update the variable on typing/editing
$input.on('input propertychange', function () {
State.variables.tsInput = $(this).val();
});
// Handle Enter keypress
$input.on('keydown', function (e) {
if (e.key === 'Enter') {
e.preventDefault();
State.variables.tsInput = $(this).val();
$('#submit-btn-wrap button').click();
}
});
});
<</script>><<nobr>>
<h2>Intraoperative Phase: Dissection & Mobilization</h2>
<<set $Baseline to true>>
<<if not $dissectionInitialized>>
/* Initializing Dissection Baseline State */
<<set $dissectionInitialized to true>>
<<set $MAP to 75>>
<<set $HR to 78>>
<<set $K to 4.2>>
<<set $Calcium to 1.15>>
<<set $EBL to 400>>
<<set $HCT to 30>>
<<set $bleedingOccurred to false>>
<<set $CS_units to 0>>
<<set $PRBC_units to 0>>
<<set $FFP_units to 0>>
<<set $ABG_count to 0>>
<</if>>
The surgical team has completed the incision and extended the field. They are currently isolating the retrohepatic vena cava, portal vein, and hepatic artery while dissecting adhesions.
<div id="dissection-status">
<<if not $bleedingOccurred>>
<p style="color: #2ecc71;"><strong>Surgical Status:</strong> Dissection progressing routinely. Native liver mobilization underway.</p>
<<else>>
<<if $MAP > 65 and $Calcium > 1.15 and $HCT > 25 and $FFP_units is ($PRBC_units + $CS_units)>>
<div style="background-color: #1e8449; color: #ffffff; padding: 12px; border-radius: 6px; margin: 10px 0; border: 1px solid #2ecc71;">
✅ <strong>HEMODYNAMICS & COAGULATION STABILIZED:</strong> Bleeding controlled! MAP > 65 mmHg, Calcium > 1.15 mmol/L, HCT > 25%, and 1:1 blood product ratio achieved.
</div>
<<else>>
<div style="background-color: #7b241c; color: #ffffff; padding: 12px; border-radius: 6px; margin: 10px 0; border: 1px solid #ff4d4d;">
🚨 <strong>MASSIVE HEMORRHAGE ALERT:</strong> The dissection of the native liver was complicated and the surgical team ran into some profound bleeding! Start targeted resuscitation.
</div>
<</if>>
<</if>>
</div>
<div id="resus-options">
<<if $bleedingOccurred>>
<<renderResusOptions>>
<</if>>
</div>
<<if not $bleedingOccurred>>
<<timed 5s>>
/* Drop vitals after 5 seconds */
<<set $MAP to 48>>
<<set $HR to 118>>
<<set $K to 4.4>>
<<set $Calcium to 0.92>>
<<set $EBL to 1800>>
<<set $HCT to 20>>
<<set $bleedingOccurred to true>>
/* Update UI and inject resuscitation controls */
<<script>>UIBar.update();<</script>>
<<replace "#dissection-status">>
<div style="background-color: #7b241c; color: #ffffff; padding: 12px; border-radius: 6px; margin: 10px 0; border: 1px solid #ff4d4d;">
🚨 <strong>MASSIVE HEMORRHAGE ALERT:</strong> The dissection of the native liver was complicated and the surgical team ran into some profound bleeding! Start targeted resuscitation.
</div>
<</replace>>
<<replace "#resus-options">>
<<renderResusOptions>>
<</replace>>
<<replace "#phase-navigation">>
<span style="color: #f39c12;"><em>Target resuscitation parameters: MAP > 65 mmHg, Calcium > 1.15 mmol/L, HCT > 25%, and FFP units equal to total red cell units (pRBC + Cell Saver).</em></span>
<</replace>>
<</timed>>
<</if>>
<</nobr>>
---
<div id="phase-navigation">
<<if $bleedingOccurred>>
<<if $MAP > 65 and $Calcium > 1.15 and $HCT > 25 and $FFP_units is ($PRBC_units + $CS_units)>>
<span style="color: #2ecc71;"><strong>Resuscitation goals achieved!</strong></span><br><br>
[[Proceed to Vascular Clamping|IntraOp_TestClamping]]
<<else>>
<span style="color: #f39c12;"><em>Target resuscitation parameters before cross-clamping: MAP > 65 mmHg, Calcium > 1.15 mmol/L, HCT > 25%, and FFP units equal to total red cell units (pRBC + Cell Saver).</em></span>
<</if>>
<<else>>
<span style="color: #bdc3c7;"><em>Monitoring dissection phase...</em></span>
<</if>>
</div><<nobr>>
<h3>You roll back to the OR</h3>
Patient is brought into the OR and ABO verification is completed. Patient is quickly induced and intubated. Since you are the star resident on the block, the lines go very smoothly and the patient has a 7Fr RIC, a 14Fr MAC line with a Swan, and a radial arterial line within a matter of minutes.
<br><br>
Timeout is performed and the surgical team goes to scrub in.
<br><br>
You give the antibiotics, attach the BairHuggers, and make sure all the proper equipment is ready. However, you get a nagging feeling that you are forgetting something...
<<if not $Baseline>><<if $CBC>>
<br><br>
<strong>You realize you don't need a CBC/BMP as that would take too long to result.</strong>
<</if>><</if>>
<<if not $Baseline>><<if $MadFlorman>>
<br><br>
<strong>Dr. Florman laughs in your face and asks you to get an adult in the room. Your attending then shakes his head when you suggest more lines.</strong>
<</if>><</if>>
<<if $Baseline>>
<br><br>
<span style="color: #f39c12;"><strong>Excellent! We always get a starting ABG and ROTEM to establish a baseline.</strong></span>
<br><br>
<</if>>
<br><br>
<<if not $CBC and not $Baseline>>
<<link "Get baseline CBC/BMP" "OR Start">><<set $CBC to true>><</link>><br>
<</if>>
<<if not $Baseline>>
<<link "Get baseline ABG & ROTEM" "OR Start">>
<<set $Baseline to true>>
<<drawABG>>
<</link>><br>
<</if>>
<<if not $MadFlorman and not $Baseline>>
<<link "Tell Dr. Florman we need more lines" "OR Start">><<set $MadFlorman to true>><</link>><br>
<</if>>
<<if $Baseline>>
[[Let's go over what to expect in a liver transplant|Liver Transplant Phases]]
<</if>>
<</nobr>>/*** DISSECTION WIDGET ***/
<<widget "updateDissectionUI">>
<<script>>UIBar.update();<</script>>
<<if $MAP > 65 and $Calcium > 1.15 and $HCT > 25 and $FFP_units is ($PRBC_units + $CS_units)>>
<<replace "#dissection-status">>
<div style="background-color: #1e8449; color: #ffffff; padding: 12px; border-radius: 6px; margin: 10px 0; border: 1px solid #2ecc71;">
✅ <strong>HEMODYNAMICS & COAGULATION STABILIZED:</strong> Bleeding controlled! MAP > 65 mmHg, Calcium > 1.15 mmol/L, HCT > 25%, and 1:1 blood product ratio achieved.
</div>
<</replace>>
<<replace "#resus-options">><</replace>>
<<replace "#phase-navigation">>
<span style="color: #2ecc71;"><strong>Resuscitation goals achieved!</strong></span><br><br>
[[Proceed to Vascular Clamping|IntraOp_TestClamping]]
<</replace>>
<<else>>
<<replace "#dissection-status">>
<div style="background-color: #7b241c; color: #ffffff; padding: 12px; border-radius: 6px; margin: 10px 0; border: 1px solid #ff4d4d;">
🚨 <strong>MASSIVE HEMORRHAGE ALERT:</strong> The dissection of the native liver was complicated and the surgical team ran into some profound bleeding! Start targeted resuscitation.
</div>
<</replace>>
<<replace "#phase-navigation">>
<span style="color: #f39c12;"><em>Target resuscitation parameters: MAP > 65 mmHg, Calcium > 1.15 mmol/L, HCT > 25%, and FFP units equal to total red cell units (pRBC + Cell Saver).</em></span>
<</replace>>
<</if>>
<</widget>>
<<widget "drawABG">>
<<set $abg_HCT to $HCT>>
<<set $abg_K to $K>>
<<set $abg_Calcium to $Calcium>>
<<set $abgDrawn to true>>
<<script>>UIBar.update();<</script>>
<</widget>>
<<widget "renderResusOptions">>
/* Render links ONLY if resuscitation is NOT complete */
<<if not ($MAP > 65 and $Calcium > 1.15 and $HCT > 25 and $FFP_units is ($PRBC_units + $CS_units))>>
<u>Anesthetic Management & Resuscitation</u> (click the blue links to perform the action):<br><br>
<<link "🩸 Draw and Run ABG">>
<<drawABG>>
<<set $ABG_count += 1>>
<</link>><br>
<<link "Administer Norepinephrine/Vasopressin">>
<<if ($PRBC_units + $CS_units) lt 4 and $MAP gt 65>>
<<run UI.alert("⚠️ UNCORRECTED HYPOVOLEMIA: Pushing vasopressors without correcting volume status is only a temporary fix given the EBL. Consider volume/blood resuscitation alongside pressors.")>>
<<elseif ($MAP + 12) > 110>>
<<run UI.alert("⚠️ HYPERTENSIVE SPIKE: Pushing Norepinephrine here would raise MAP to " + ($MAP + 12) + " mmHg! Surgical team reports increased arterial oozing in the field. Reconsider vasopressor administration.")>>
<<else>>
<<set $MAP += 12>>
<<set $HR -= 6>>
<</if>>
<<updateDissectionUI>>
<</link>><br>
<<link "Transfuse 2 units of pRBCs">>
<<if $FFP_units lt ($PRBC_units + $CS_units) and ($PRBC_units + $CS_units) gt 4>>
<<run UI.alert("⚠️ DILUTIONAL COAGULOPATHY RISK: You must match blood products (pRBCs + Cell Saver) with FFP in a 1:1 ratio. Administer FFP before giving more red blood cells.")>>
<<elseif ($PRBC_units + 2 + $CS_units) gt 4 and $Calcium lt 1 and $MAP gt 65>>
<<run UI.alert("⚠️ You haven't checked an ABG in a bit. Let's see where things stand to help guide our resuscitation. (Remember, the ABG panel only updates if you run an ABG)")>>
<<else>>
<<set $PRBC_units += 2>>
<<set $HCT += 4>>
<<set $Calcium -= 0.08>>
<</if>>
<<updateDissectionUI>>
<</link>><br>
<<link "Administer 2 units of FFP">>
<<if $FFP_units gt 4 and $Calcium lt 1 and $MAP gt 65>>
<<run UI.alert("⚠️ You haven't checked an ABG in a bit. Let's see where things stand to help guide our resuscitation. (Remember, the ABG panel only updates if you run an ABG)")>>
<<else>>
<<set $FFP_units += 2>>
<<set $MAP += 5>>
<<set $Calcium -= 0.05>>
<</if>>
<<updateDissectionUI>>
<</link>><br>
<<link "Give 1g of Calcium Chloride">>
<<if $ABG_count lt 2 and $Calcium gt 1.3>>
<<run UI.alert("⚠️ You haven't checked an ABG in a bit. Let's see where things stand to help guide our resuscitation. (Remember, the ABG panel only updates if you run an ABG)")>>
<<else>>
<<set $Calcium += 0.30>>
<<set $MAP += 4>>
<<updateDissectionUI>>
<</if>>
<</link>><br>
<<link "Give 2 bowls of Cell Saver (Equivalent to 2u of pRBCs)">>
<<if $CS_units gte 2>>
<<run UI.alert("The perfusionist is telling you that there is not enough to spin another bowl of Cell Saver.")>>
<<else>>
<<set $CS_units += 2>>
<<set $MAP += 6>>
<<set $HCT += 1>>
<</if>>
<<updateDissectionUI>>
<</link>>
<</if>>
<</widget>>
/*** TEST CLAMPING WIDGET ***/
<<widget "renderClampingInterface">>
<div id="clamping-status">
<<if not $testClampStarted>>
<p style="color: #DC143C;"><strong>Surgical Status:</strong> Vascular structures exposed. Awaiting anesthesia sign-off for IVC/Portal test clamping.</p>
<<elseif $testClampStarted and not $fullClampAchieved>>
<div style="background-color: #d35400; color: #ffffff; padding: 12px; border-radius: 6px; margin: 10px 0; border: 1px solid #e67e22;">
⚠️ <strong>TEST CLAMP IN PROGRESS:</strong> Vascular cross-clamps applied to the IVC and portal vein. Venous return to the heart is severely restricted! Monitor MAP closely for hemodynamic collapse.
</div>
<<else>>
<div style="background-color: #1e8449; color: #ffffff; padding: 12px; border-radius: 6px; margin: 10px 0; border: 1px solid #2ecc71;">
✅ <strong>CROSS-CLAMPS SECURED:</strong> Main portal vein, hepatic arteries, and IVC cross-clamped. Native liver dissection complete! Entering the Anhepatic Phase.
</div>
<</if>>
</div>
<div id="clamping-actions">
<<if not $fullClampAchieved>>
<<if not $testClampStarted>>
<u>Anesthetic Actions & Preparation</u>:<br><br>
<<link "🩸 Draw and Run ABG">>
<<drawABG>>
<</link>><br>
<<link "Give a Norepinephrine push and increase infusion rate">>
<<set $MAP += 12>>
<<script>>UIBar.update();<</script>>
<</link>><br>
<<link "Bolus 250mL Albumin / Volume">>
<<set $MAP += 8>>
<<script>>UIBar.update();<</script>>
<</link>><br><br>
<<link "Agree to test clamp">>
<<set $testClampStarted to true>>
<<set $MAP -= 30>>
<<script>>UIBar.update();<</script>>
<<replace "#clamping-panel">>
<<renderClampingInterface>>
<</replace>>
<</link>>
<<else>>
<u>Clamping Decisions</u>:<br><br>
<<link "Unclamp test clamp (Release IVC/Portal clamp)">>
<<set $testClampStarted to false>>
<<set $MAP += 30>>
<<script>>UIBar.update();<</script>>
<<replace "#clamping-panel">>
<<renderClampingInterface>>
<</replace>>
<</link>><br>
<<link "Agree to full cross-clamp">>
<<if $MAP lt 65>>
<<run UI.alert("⚠️ CRITICAL HEMODYNAMIC INSTABILITY: MAP is " + $MAP + " mmHg (< 65 mmHg)! Re-consider full cross-clamping. Tell Dr. Florman to unclamp so that you may better optimize the patient for full clamping.")>>
<<else>>
<<set $fullClampAchieved to true>>
<<replace "#clamping-panel">>
<<renderClampingInterface>>
<</replace>>
<<replace "#phase-navigation">>
<span style="color: #2ecc71;"><strong>Hemodynamics stable. Ready for anhepatic phase!</strong></span><br><br>
[[Proceed to Anhepatic Phase & Hepato-Vascular Anastomosis|IntraOp_Anhepatic]]
<</replace>>
<</if>>
<</link>>
<</if>>
<</if>>
</div>
<</widget>>
/*** ANHEPATIC WIDGET ***/
<<widget "renderAnhepaticInterface">>
<<nobr>>
/* Parameter 1: Potassium Teaching Popup (Only fires after running an ABG IN THIS PHASE showing K <= 4.5) */
<<if $anhepaticABGRun and $abg_K <= 4.5 and not $kTeachingShown>>
<<set $kTeachingShown to true>>
<<run UI.alert("🧪 POTASSIUM GOAL MET (K ≤ 4.5 mEq/L)!\n\nWHY IT MATTERS:\nThe cold preservation solution (UW / HTK) and ischemic donor graft release a sudden, highly concentrated potassium load directly into the recipient's right atrium upon unclamping.\n\nStarting with a low-normal systemic K+ prevents acute hyperkalemic cardiac arrest, severe conduction blocks, or VFib during reperfusion.")>>
<</if>>
/* Parameter 2: MAP Teaching Popup */
<<if $MAP > 90 and not $mapTeachingShown>>
<<set $mapTeachingShown to true>>
<<run UI.alert("📈 MAP GOAL MET (MAP > 90 mmHg)!\n\nWHY IT MATTERS:\nGraft unclamping causes sudden vasodilation and cardiac depression due to cold, acidotic, and vasoactive perfusate (Post-Reperfusion Syndrome).\n\nProactively elevating the MAP creates a hemodynamic 'cushion' to absorb the expected vasoplegic drop without dropping into severe refractory hypotension or compromising graft perfusion.")>>
<</if>>
/* Parameter 3: Heart Rate Teaching Popup */
<<if $HR > 100 and not $hrTeachingShown>>
<<set $hrTeachingShown to true>>
<<run UI.alert("💓 HEART RATE GOAL MET (HR > 100 bpm)!\n\nWHY IT MATTERS:\nReperfusion is frequently accompanied by a sudden surge in vagal tone and hyperkalemic conduction slowing, leading to profound sinus bradycardia or junctional escape rhythms.\n\nMaintaining a brisk heart rate ensures adequate chronotropic drive and protects cardiac output when stroke volume acutely drops.")>>
<</if>>
<div id="anhepatic-status">
<<if not $reperfusionReady>>
<div style="background-color: #7b241c; color: #ffffff; padding: 12px; border-radius: 6px; margin: 10px 0; border: 1px solid #34495e;">
⚠️ <strong>ANHEPATIC PHASE ACTIVE:</strong> IVC and Portal Vein anastomoses near completion. Dr. Florman is flushing the donor liver graft, this is your time to make sure you run through your pre-reperfusion checklist (see below) to prepare for reperfusion!
</div>
<div style="margin-bottom: 12px;">
<span style="color: #bdc3c7;"><em>Run an ABG during flush, then target K+ ≤ 4.5 mEq/L, MAP > 90 mmHg, and HR > 100 bpm before unclamping.</em></span>
</div>
<<else>>
<div style="background-color: #1e8449; color: #ffffff; padding: 12px; border-radius: 6px; margin: 10px 0; border: 1px solid #d35400;">
🩸 <strong>PRE-REPERFUSION CHECKLIST COMPLETE:</strong> ABG analyzed, potassium stabilized (K ≤ 4.5), MAP > 90, HR > 100, and all pre-unclamp items checked. Ready for graft flush!
</div>
<</if>>
</div>
<div id="anhepatic-actions">
<<if not $reperfusionReady>>
<u>Anesthetic Management & Resuscitation</u>:<br>
<<link "🩸 Draw and Run ABG">>
<<drawABG>>
/* Updates documented lab K+ to match true current physiological K+ */
<<set $abg_K to $K>>
<<set $anhepaticABGRun to true>>
<<script>>UIBar.update();<</script>>
<<replace "#anhepatic-panel">>
<<renderAnhepaticInterface>>
<</replace>>
<</link>><br>
<<link "Increase Norepinephrine infusion">>
<<if not $anhepaticABGRun>>
<<run UI.alert("⚠️ An ABG should be run when the surgical team flushes the donor graft so that you have enough time to correct anything on the ABG before unclamping.")>>
<<elseif $MAP > 90>>
<<run UI.alert("⚠️ MAP GOAL ALREADY ACHIEVED: MAP is currently " + $MAP + " mmHg (Target > 90 mmHg). Further vasopressors are not indicated and risk severe hypertension or systemic vasoconstriction prior to unclamping.")>>
<<else>>
<<set $MAP += 12>>
<<script>>UIBar.update();<</script>>
<<replace "#anhepatic-panel">>
<<renderAnhepaticInterface>>
<</replace>>
<</if>>
<</link>><br>
<<link "Lower potassium with 10u of Insulin">>
<<if not $anhepaticABGRun>>
<<run UI.alert("⚠️ An ABG should be run when the surgical team flushes the donor graft so that you have enough time to correct anything on the ABG before unclamping.")>>
<<elseif $abg_K <= 4.5>>
<<run UI.alert("⚠️ POTASSIUM GOAL ALREADY VERIFIED ON LABS: Your documented ABG potassium is " + $abg_K.toFixed(1) + " mEq/L (Target ≤ 4.5 mEq/L). Additional insulin is not needed.")>>
<<elseif $K <= 3.5>>
<<run UI.alert("⚠️ HYPOKALEMIA RISK: Systemic potassium is already critically low (" + $K.toFixed(1) + " mEq/L)! Pushing more insulin risks severe hypokalemia and arrhythmias prior to unclamping.")>>
<<else>>
/* Lower physiological potassium; floor at 3.5 */
<<set $K to Math.max(3.5, Math.round(($K - 0.4) * 10) / 10)>>
<<set $MAP += 4>>
<<script>>UIBar.update();<</script>>
<<run UI.alert("💉 Hyperkalemia treatment administered. Draw a new ABG to verify and update your lab values!")>>
<<replace "#anhepatic-panel">>
<<renderAnhepaticInterface>>
<</replace>>
<</if>>
<</link>><br>
<<link "Administer 0.2mg of Glycopyrrolate">>
<<if not $anhepaticABGRun>>
<<run UI.alert("⚠️ An ABG should be run when the surgical team flushes the donor graft so that you have enough time to correct anything on the ABG before unclamping.")>>
<<elseif $HR > 100>>
<<run UI.alert("⚠️ HEART RATE GOAL ALREADY ACHIEVED: Heart rate is currently " + $HR + " bpm (Target > 100 bpm). Further anticholinergic administration is unnecessary and risks excessive tachyarrhythmias.")>>
<<else>>
<<set $HR += 20>>
<<script>>UIBar.update();<</script>>
<<replace "#anhepatic-panel">>
<<renderAnhepaticInterface>>
<</replace>>
<</if>>
<</link>><br>
<<link "Bolus 250mL of 5% Albumin">>
<<if not $anhepaticABGRun>>
<<run UI.alert("⚠️ An ABG should be run when the surgical team flushes the donor graft so that you have enough time to correct anything on the ABG before unclamping.")>>
<<else>>
<<set $anhepaticBolusCount to ($anhepaticBolusCount || 0) + 1>>
<<if $anhepaticBolusCount > 1>>
<<run UI.alert("⚠️ VOLUME OVERLOAD WARNING: Excessive fluid resuscitation during the anhepatic phase can cause acute right ventricular strain, hepatic venous congestion upon unclamping, and pulmonary edema. Rely on vasopressors rather than volume to maintain MAP prior to reperfusion!")>>
<<else>>
<<set $MAP += 8>>
<</if>>
<<script>>UIBar.update();<</script>>
<<replace "#anhepatic-panel">>
<<renderAnhepaticInterface>>
<</replace>>
<</if>>
<</link>><br><br>
<u>Pre-Reperfusion Checklist</u>:<br>
/* Potassium Dynamic Indicator */
<<if $anhepaticABGRun and $abg_K <= 4.5>>
<span style="color: #2ecc71;">✓ Potassium Optimized on ABG (K: $abg_K mEq/L ≤ 4.5)</span><br>
<<elseif $anhepaticABGRun and $abg_K > 4.5 and $K <= 4.5>>
<span style="color: #e74c3c;">✗ Re-run ABG to confirm K+ reduction (Last ABG K: $abg_K mEq/L)</span><br>
<<elseif $anhepaticABGRun>>
<span style="color: #e74c3c;">✗ Lower Potassium & Re-run ABG (Last ABG K: $abg_K mEq/L | Target ≤ 4.5)</span><br>
<<else>>
<span style="color: #e74c3c;">✗ Draw ABG during flush to check Potassium (Target ≤ 4.5)</span><br>
<</if>>
/* MAP Dynamic Indicator */
<<if $MAP > 90>>
<span style="color: #2ecc71;">✓ Target MAP Achieved (MAP > 90 mmHg)</span><br>
<<else>>
<span style="color: #e74c3c;">✗ Optimize MAP (Current MAP: $MAP mmHg | Target > 90)</span><br>
<</if>>
/* HR Dynamic Indicator */
<<if $HR > 100>>
<span style="color: #2ecc71;">✓ Target Heart Rate Achieved (HR > 100 bpm)</span><br>
<<else>>
<span style="color: #e74c3c;">✗ Optimize Heart Rate (Current HR: $HR bpm | Target > 100)</span><br>
<</if>>
/* FiO2 Toggle */
<<if not $fio2Increased>>
<<link "🫁 Increase FiO2 to 100%">>
<<if not $anhepaticABGRun>>
<<run UI.alert("⚠️ An ABG should be run when the surgical team flushes the donor graft so that you have enough time to correct anything on the ABG before unclamping.")>>
<<else>>
<<set $fio2Increased to true>>
<<run UI.alert("🫁 FiO2 increased to 100% to maximize tissue oxygen delivery prior to graft unclamping.")>>
<<replace "#anhepatic-panel">>
<<renderAnhepaticInterface>>
<</replace>>
<</if>>
<</link>><br>
<<else>>
<span style="color: #2ecc71;">✓ FiO2 increased to 100%</span><br>
<</if>>
/* Defib Pads Toggle */
<<if not $defibPadsPlaced>>
<<link "⚡ Ensure Defibrillator Pads are Placed & Connected">>
<<if not $anhepaticABGRun>>
<<run UI.alert("⚠️ An ABG should be run when the surgical team flushes the donor graft so that you have enough time to correct anything on the ABG before unclamping.")>>
<<else>>
<<set $defibPadsPlaced to true>>
<<run UI.alert("⚡ Defibrillator pads connected and verified on the monitor in preparation for potential post-reperfusion arrhythmias / VFib.")>>
<<replace "#anhepatic-panel">>
<<renderAnhepaticInterface>>
<</replace>>
<</if>>
<</link>><br>
<<else>>
<span style="color: #2ecc71;">✓ Defibrillator pads connected</span><br>
<</if>>
/* Lidocaine Toggle */
<<if not $lidocaineAdministered>>
<<link "💉 Administer IV Lidocaine 1–2 mg/kg (~1 min before reperfusion)">>
<<if not $anhepaticABGRun>>
<<run UI.alert("⚠️ An ABG should be run when the surgical team flushes the donor graft so that you have enough time to correct anything on the ABG before unclamping.")>>
<<else>>
<<set $lidocaineAdministered to true>>
<<run UI.alert("💉 IV Lidocaine administered as prophylactic antiarrhythmic against reperfusion-induced ventricular fibrillation.")>>
<<replace "#anhepatic-panel">>
<<renderAnhepaticInterface>>
<</replace>>
<</if>>
<</link>><br><br>
<<else>>
<span style="color: #2ecc71;">✓ IV Lidocaine antiarrhythmic prophylaxis given</span><br><br>
<</if>>
<u>Surgical Milestones</u>:<br>
<<link "Confirm Vascular Anastomoses Complete & Request Flush">>
<<if not $anhepaticABGRun>>
<<run UI.alert("⚠️ An ABG should be run when the surgical team flushes the donor graft so that you have enough time to correct anything on the ABG before unclamping.")>>
<<elseif not ($fio2Increased and $defibPadsPlaced and $lidocaineAdministered)>>
<<run UI.alert("⚠️ PRE-REPERFUSION CHECKLIST INCOMPLETE: Ensure you have increased FiO2 to 100%, verified defib pads, and administered Lidocaine prophylaxis before proceeding!")>>
<<elseif $abg_K > 4.5>>
<<run UI.alert("⚠️ POTASSIUM NOT CONFIRMED ON ABG: Last drawn ABG potassium is " + $abg_K.toFixed(1) + " mEq/L! Treat hyperkalemia and re-run an ABG to confirm K+ ≤ 4.5 mEq/L before unclamping.")>>
<<elseif $MAP <= 90>>
<<run UI.alert("⚠️ MAP TOO LOW: Current MAP is " + $MAP + " mmHg! You must achieve a MAP > 90 mmHg prior to unclamping to absorb the expected reperfusion vasoplegic drop.")>>
<<elseif $HR <= 100>>
<<run UI.alert("⚠️ HEART RATE TOO LOW: Current HR is " + $HR + " bpm! You must achieve an HR > 100 bpm before unclamping to protect against reperfusion bradycardia/asystole.")>>
<<else>>
<<set $reperfusionReady to true>>
<<replace "#anhepatic-panel">>
<<renderAnhepaticInterface>>
<</replace>>
<<replace "#phase-navigation">>
<span style="color: #f39c12;"><strong>Pre-reperfusion checklist complete! All hemodynamic and metabolic targets met (K ≤ 4.5 mEq/L, MAP > 90, HR > 100). Graft flush initiated!</strong></span><br><br>
[[Proceed to Reperfusion Phase & Post-Reperfusion Syndrome|IntraOp_Reperfusion]]
<</replace>>
<</if>>
<</link>>
<</if>>
</div>
<</nobr>>
<</widget>><<nobr>>
<h2>Intraoperative Phase: Native Dissection & Test Clamping</h2>
<<if not $testClampInitialized>>
/* Set baseline MAP for test clamping phase */
<<set $testClampInitialized to true>>
<<set $MAP to 78>>
<<set $testClampStarted to false>>
<<set $fullClampAchieved to false>>
<<script>>UIBar.update();<</script>>
<</if>>
The surgical team has completed the mobilization of the native liver. With hemodynamics and coagulation temporarily optimized, Dr. Florman signals that they are ready to transition to the anhepatic phase.
<br><br>
<em>"We are going to test-clamp the inferior vena cava (IVC) and portal vein for 60 seconds to evaluate preload tolerance before committing."</em>
<br><br>
<div id="clamping-panel">
<<renderClampingInterface>>
</div>
<br>
<div id="phase-navigation">
<<if not $fullClampAchieved>>
<span style="color: #bdc3c7;"><em>Evaluate hemodynamics during test clamp...</em></span>
<</if>>
</div>
<</nobr>><<nobr>>
<h2>Intraoperative Phase: Anhepatic Phase & Reperfusion Preparation</h2>
<<if not $anhepaticInitialized>>
/* Set initial variables for Anhepatic Phase without clearing prior lab history */
<<set $anhepaticInitialized to true>>
<<set $reperfusionReady to false>>
<<set $anhepaticABGRun to false>>
<<set $fio2Increased to false>>
<<set $defibPadsPlaced to false>>
<<set $lidocaineAdministered to false>>
<<set $anhepaticBolusCount to 0>>
/* Setup phase teaching popup flags */
<<set $kTeachingShown to false>>
<<set $mapTeachingShown to false>>
<<set $hrTeachingShown to false>>
/* Hemodynamic shift entering Anhepatic Phase */
<<set $MAP to 68>>
<<set $HR to 85>>
<<set $K to 4.9>> /* Starting potassium set to 4.9 mEq/L */
/* Instantly refresh StoryCaption sidebar to retain and display the previous ABG */
<<script>>UIBar.update();<</script>>
<</if>>
The native liver is out and the surgical team has been working on the liver on the backtable. Nearly an hour passes and the intrahepatic IVC and portal vein anastomoses are nearly complete. As the surgical team finishes the final sutures, the clock is ticking down to graft unclamping.
<br><br>
<em>"Vascular anastomoses are five minutes out. Anesthesia, let's get ready for flushing and unclamping!"</em> Dr. Florman calls over the drape.
<br><br>
Remember: reperfusion will release a sudden cold, acidotic, hyperkalemic, and vasoactive burden directly into the recipient's right atrium.
<br><br>
**Systematic preparation before the clamps come off is your best defense against severe Post-Reperfusion Syndrome (PRS) or cardiac arrest.**
<br><br>
<div id="anhepatic-panel">
<<renderAnhepaticInterface>>
</div>
<br>
<div id="phase-navigation">
<<if not $reperfusionReady>>
<</if>>
</div>
<</nobr>><<nobr>>
<h2>Phases of Orthotopic Liver Transplantation (OLT)</h2>
<p class="tight-desc">Select each phase to view the surgical focus, anesthetic considerations, and clinical pearl of each step of a liver transplant.</p>
<div class="phase-nav">
<<button "1. Dissection Phase">>
<<replace "#phase-blurb">>
<h3>Phase 1: Dissection Phase</h3>
<p><strong>Surgical Focus:</strong> Surgical focus: Mobilization of the diseased liver, lysis of adhesions, hilar/portal dissection, and IVC preparation (full caval cross-clamp vs. piggyback with partial caval occlusion). Ends with vascular clamping.</p>
<p><strong>Anesthetic Management:</strong> Bleeding is the defining problem. Portal hypertension, venous collaterals, prior abdominal surgery, and dense adhesions make this frequently the highest-blood-loss phase.</p>
<p>Focus on volume maintenance, coagulopathy monitoring, and managing blood loss during lysis of adhesions. Monitor acid-base status, lactate, and electrolytes with routine ABGs.</p>
<div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;">
<strong>Clinical Pearl:</strong> Check ionized calcium every 15–30 minutes during rapid transfusion and treat hypotension during massive transfusion as hypocalcemia until proven otherwise. Citrate anticoagulant in blood products is cleared by the liver; with a failing (and soon absent) graft, citrate accumulates and chelates calcium, producing myocardial depression and vasoplegia at a time when the reflexive response (more volume) will only worsen portal pressure and surgical bleeding.
<a href="https://onlinelibrary.wiley.com/share/S6Z4IRMMTNE5TJG3RD44?target=10.1111/ctr.14651" target="_blank"><small><sup>[1]</sup></small></a>
</div>
</div>
<</replace>>
<</button>>
<<button "2. Anhepatic Phase">>
<<replace "#phase-blurb">>
<h3>Phase 2: Anhepatic Phase</h3>
<p><strong>Surgical Focus:</strong> Begins with clamping of the portal vein and hepatic artery and cross-clamping (or side-clamping) of the IVC, and ends with graft reperfusion. Encompasses hepatectomy, back-table graft preparation, and the caval, portal, and hepatic arterial anastomoses. Two technical variants define the physiology: caval replacement (classic, full IVC cross-clampu) versus piggyback (caval preservation with partial side-clamp, preserving some venous return).</p>
<p><strong>Anesthetic Management:</strong> Simultaneous occlusion of the IVC and portal vein can drop cardiac output and arterial pressure by up to 50% due to loss of preload. A trial clamp before the full clamp will allow you to assess if the patient will tolerate the clamping. If the patient does not tolerate the test clamp, the surgeon can unclamp and you will have time to better optimize the patient.</p>
<p>After the surgery team clamps and the patient is anhepatic, it is time to optimize the patient for reperfusion. Some general goals are an acid-base pH goal > 7.25, potassium at < 4.5 mEq/L, MAP goal of > 80 mmHg, Hct > 21. <a href="https://onlinelibrary.wiley.com/share/EGNFNRKEZSQXWZ8RJDAZ?target=10.1111/ctr.14587" target="_blank"><small><sup>[2]</sup></small></a></p>
<div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;">
<strong>Clinical Pearl:</strong> The anhepatic phase is where reperfusion is won or lost; treat it as a pre-flight checklist, not a lull. <em>Post-Reperfusion Syndrome</em> (MAP fall ≥30% within 5 minutes of reperfusion lasting ≥1 minute) occurs in 10–75% of cases and is driven by the sudden systemic delivery of cold, acidotic, hyperkalemic, vasoactive effluent from the graft and the previously congested splanchnic/lower-body venous bed.
</div>
</div>
<</replace>>
<</button>>
<<button "3. Neohepatic Phase">>
<<replace "#phase-blurb">>
<h3>Phase 3: Neohepatic (Reperfusion) Phase</h3>
<p><strong>Surgical Focus:</strong> Begins at graft reperfusion and continues through hepatic artery and biliary anastomoses, hemostasis,, and abdominal closure.</p>
<p><strong>Anesthetic Management:</strong> Vasoplegia/hemodynamic collapse from the graft effluent is the defining event of early reperfusion. <em>Post-Reperfusion Syndrome</em> reflects the systemic arrival of highly acidic, hypothermic, hyperkalemic blood plus released mediators (free radicals, nitric oxide) Norepinephrine, epinephrine, and phenylephrine are the agents most commonly used in this phase, alone or combined; vasopressin is added for persistent vasoplegia, with methylene blue reported for refractory cases. <a href="https://onlinelibrary.wiley.com/share/X6G2QXJBGZ4IZHXHTI7B?target=10.1111/ctr.15014" target="_blank"><small><sup>[3]</sup></small></a> <a href="https://onlinelibrary.wiley.com/share/RDG9JNZHWXBCQSSSXBNT?target=10.1111/ctr.15271" target="_blank"><small><sup>[4]</sup></small></a>
</p>
<div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;">
<strong>Clinical Pearl:</strong> 1–2 minutes prior to unclamping, the surgical team will 'flush' the donor liver to clear out the chemical preservation fluids. This is a sign that reperfusion is close and is your cue to prepare for reperfusion by having pressors, calcium, and insulin on the line and ready to go to combat PRS and hyperkalemia.
</div>
</div>
<</replace>>
<</button>>
</div>
<div id="phase-blurb">
<p class="placeholder-text"><em>Select a phase above to display details.</em></p>
</div>
[[One last thing before we start...|Instructions]]
<</nobr>><h2>Instructions for the Sim</h2>
In this sim, the most important thing will be the panel on your left.
Everything in the panel will update in real time. For example, if the patient is hemorrhaging, the MAP will drop, the heart rate will increase, and the EBL will increase. The total pRBCs/FFP/Cell Saver will increase depending on what you choose to transfuse.
Most importantly, the basic ABG (HCT, Potassium, and Calcium) will function much like a real life ABG. These values will NOT update unless you draw and run a new ABG.
All blue links are clickable and perform the action listed.
Remember: It is important to run routine ABGs during massive transfusions to help guide your resuscitation.
[[I think I'm ready for the case!|IntraOp_Dissection]]<<nobr>>
/* Initialize State Variables */
<<if not $reperfusionInitialized>>
<<set $reperfusionInitialized to true>>
<<set $reperfusionStarted to false>>
<<set $insultTriggered to false>>
<<set $HR to 105>>
<<set $MAP to 93>>
<<set $K to 4.2>>
<<set $calciumGivenOnce to false>>
<<set $insulinGivenOnce to false>>
<<set $prsResolved to false>>
<</if>>
/* 5-SECOND DELAYED REPERFUSION RAMP WIDGET */
<<widget "triggerDelayedReperfusion">>
<<script>>
setTimeout(function() {
State.variables.insultTriggered = true;
var startHR = 105;
var startMAP = 93;
var startK = 4.2;
var targetHR = 75;
var targetK = 6.8;
var targetMAP = 51;
var steps = 25;
var currentStep = 0;
var prsInterval = setInterval(function() {
currentStep++;
var progress = currentStep / steps;
State.variables.HR = Math.round(startHR + (targetHR - startHR) * progress);
State.variables.K = Math.round((startK + (targetK - startK) * progress) * 10) / 10;
State.variables.MAP = Math.round(startMAP + (targetMAP - startMAP) * progress);
$('#current-hr, #sidebar-hr').text(State.variables.HR);
$('#current-map, #sidebar-map').text(State.variables.MAP);
if (currentStep >= steps) {
clearInterval(prsInterval);
}
}, 200);
}, 5000);
<</script>>
<<timed 5s>>
<<replace "#prs-status-container">><<renderPRSStatus>><</replace>>
<<replace "#prs-controls-container">><<renderPRSControls>><</replace>>
<</timed>>
<</widget>>
<h2 style="margin-block-end: 0.5em;">Intraoperative Phase: Graft Unclamping & Reperfusion</h2>
<</nobr>><!-- SPLIT FLEX CONTAINER WITH MAXIMIZED RIGHT ALIGNMENT -->
<div style="display: flex; justify-content: space-between; align-items: flex-start; width: 100%; gap: 30px;">
<!-- LEFT SIDE: CLINICAL OPTIONS & INTERACTION -->
<div style="flex: 1; max-width: calc(100% - 350px);">
<<nobr>>
<p style="margin: 0 0 4px 0;">Dr. Florman pauses with his hands on the vascular clamps over the portal vein and IVC. He looks up at you across the drapes.</p>
<br>
<div id="dr-florman-prompt" style="margin: 4px 0;">
<p style="font-size: 15px; margin: 0;"><strong>Dr. Florman:</strong> <em>"Anesthesia, portal vein and IVC are prepped for unclamping. Are you ready for reperfusion?"</em></p>
</div>
<br>
<div id="reperfusion-flow" style="margin: 4px 0 0 0;">
<<if not $reperfusionStarted>>
<div style="background-color: #2c3e50; padding: 8px 10px; border-radius: 6px; border: 1px solid #34495e; margin: 0;">
<<link "💬 'Yes, unclamp and reperfuse. We are ready.' (Watch the EKG and arterial line carefully!)">>
<<set $reperfusionStarted to true>>
<<triggerDelayedReperfusion>>
<<replace "#dr-florman-prompt">>
<p style="font-size: 15px; color: #f39c12; margin: 0;"><strong>Dr. Florman releases the vascular clamps. Cold, acidotic, hyperkalemic graft wash-out enters systemic circulation!</strong></p>
<</replace>>
<<replace "#reperfusion-flow">><<renderReperfusionInitial>><</replace>>
<</link>>
</div>
<<else>>
<<renderReperfusionInitial>>
<</if>>
</div>
<</nobr>>
</div>
<!-- RIGHT SIDE: TELEMETRY MONITORS (Pinned Far Right) -->
<div style="width: 320px; flex-shrink: 0; margin-left: auto; background: #111111; padding: 12px; border-radius: 8px; border: 1px solid #333333;">
<div style="display: flex; flex-direction: column; gap: 8px;">
<!-- High-Res EKG Canvas -->
<div style="background: #000000; border: 1px solid #222222; border-radius: 4px; padding: 4px;">
<div style="color: #00ff66; font-family: monospace; font-size: 10px; font-weight: bold;">
LEAD II | HR: <span id="current-hr"><<print $HR>></span> bpm
</div>
<canvas id="ekgCanvas" width="310" height="85" style="width: 100%; height: 85px; display: block; image-rendering: auto;"></canvas>
</div>
<!-- Arterial Line Canvas -->
<div style="background: #000000; border: 1px solid #222222; border-radius: 4px; padding: 4px;">
<div style="color: #e74c3c; font-family: monospace; font-size: 10px; font-weight: bold;">
ART LINE | MAP: <span id="current-map"><<print $MAP>></span> mmHg
</div>
<canvas id="alineCanvas" width="310" height="60" style="width: 100%; height: 60px; display: block; image-rendering: auto;"></canvas>
</div>
</div>
</div>
</div>
<!-- REPERFUSION FLOW WIDGETS -->
<<widget "renderReperfusionInitial">>
<<nobr>>
<div id="prs-status-container" style="margin: 0;">
<<renderPRSStatus>>
</div>
<div id="prs-controls-container" style="margin: 4px 0 0 0;">
<<if $insultTriggered>>
<<renderPRSControls>>
<</if>>
</div>
<</nobr>>
<</widget>>
<<widget "renderPRSStatus">>
<<nobr>>
<<if not $prsResolved>>
<<if $insultTriggered>>
<div style="background-color: #7b241c; color: #ffffff; padding: 8px 10px; border-radius: 6px; margin: 0; border: 1px solid #c0392b;">
🚨 <strong>POST-REPERFUSION SYNDROME (PRS) DETECTED!</strong><br>
Severe vasoplegia and graft-induced hyperkalemia evident on monitors. MAP dropping rapidly with steep T-wave tenting on the EKG.
</div>
<<else>>
<div style="background-color: #d35400; color: #ffffff; padding: 6px 10px; border-radius: 6px; margin: 0;">
⏳ <em>Graft unclamp in progress... Waiting for reperfusion wash-out to hit systemic circulation (5s).</em>
</div>
<</if>>
<<else>>
<div style="background-color: #1e8449; color: #ffffff; padding: 8px 10px; border-radius: 6px; margin: 0; border: 1px solid #27ae60;">
✅ <strong>HEMODYNAMIC STABILITY RESTORED:</strong> MAP and EKG morphology have recovered from the reperfusion insult.
</div>
<</if>>
<</nobr>>
<</widget>>
<<widget "renderPRSControls">>
<<nobr>>
<<if not $prsResolved>>
<u>Immediate Management & Resuscitation</u>:<br>
<!-- OPTION 1: DRAW AND RUN ABG -->
<<link "🩸 Draw and Run ABG">>
<<run UI.alert("⏳ An ABG takes time to process. Serum potassium is currently estimated at " + $K + " mmol/L based on telemetry and clinical picture.")>>
<<replace "#prs-controls-container">><<renderPRSControls>><</replace>>
<</link>><br>
<!-- OPTION 2: NOREPINEPHRINE PUSH & RATE INCREASE -->
<<link "Give a Norepinephrine push and increase infusion">>
<<set $MAP += 15>>
<<script>>$('#current-map, #sidebar-map').text(State.variables.MAP);<</script>>
<<replace "#prs-controls-container">><<renderPRSControls>><</replace>>
<</link>><br>
<!-- OPTION 3: GIVE 10U INSULIN -->
<<link "Give 10u of Insulin + D50">>
<<if not $calciumGivenOnce>>
<<run UI.alert("⚠️ Hold on! You must give Calcium first to stabilize the cardiac membrane before pushing insulin in severe hyperkalemia.")>>
<<else>>
<<set $insulinGivenOnce to true>>
<<run
var steps = 50;
var currentStep = 0;
var startK = State.variables.K || 6.8;
var targetK = 4.5;
var insulinInterval = setInterval(function() {
currentStep++;
var progress = currentStep / steps;
State.variables.K = Math.round((startK + (targetK - startK) * progress) * 10) / 10;
$('#current-k').text(State.variables.K);
if (currentStep >= steps) {
clearInterval(insulinInterval);
}
}, 300);
>>
<</if>>
<<replace "#prs-controls-container">><<renderPRSControls>><</replace>>
<</link>><br>
<!-- OPTION 4: GIVE 1G CALCIUM -->
<<link "Give 1g of Calcium Chloride">>
<<set $MAP += 8>>
<<set $calciumGivenOnce to true>>
<<script>>$('#current-map, #sidebar-map').text(State.variables.MAP);<</script>>
<<replace "#prs-controls-container">><<renderPRSControls>><</replace>>
<</link>><br><br>
<u>Reperfusion Stability Check</u>:<br>
<<link "Evaluate Hemodynamic Recovery">>
<<if $MAP < 65>>
<<run UI.alert("⚠️ REFRACTORY HYPOTENSION: MAP is currently " + $MAP + " mmHg (Target ≥ 65 mmHg). Continue pushing vasopressors!")>>
<<elseif not $calciumGivenOnce>>
<<run UI.alert("⚠️ UNSTABLE MYOCARDIUM: Patient with evidence of hyperkalemia (peaked T-waves), give calcium to stabilize the myocardium and treat the hyperkalemia!")>>
<<elseif not $insulinGivenOnce or $K > 5.0>>
<<run UI.alert("⚠️ UNTREATED HYPERKALEMIA: EKG with persistent peaked T-waves. Even without an ABG, we can tell that the patient is hyperkalemic, we must treat clinically before proceeding!")>>
<<else>>
<<set $prsResolved to true>>
<<run UI.alert("🎉 REPERFUSION SUCCESSFUL: Hemodynamics stabilized and hyperkalemia resolved!")>>
<<replace "#prs-controls-container">><<renderPRSControls>><</replace>>
<<replace "#prs-status-container">><<renderPRSStatus>><</replace>>
<</if>>
<</link>>
<<else>>
<u>Phase Progress</u>:<br>
<span style="color: #f39c12;"><strong>Post-reperfusion hemodynamics stabilized (MAP: $MAP mmHg | HR: $HR bpm | K+: $K).</strong></span><br><br>
[[Teaching Points|IntraOp_Neohepatic]]
<</if>>
<</nobr>>
<</widget>><h2>Monitoring and Management During Liver Transplant Reperfusion</h2>
During reperfusion in a liver transplant, the team maintains vigilant real-time surveillance of the monitors. Dedicated team members are assigned to specific tasks: one watches the EKG for signs of hyperkalemia, and another watches the arterial line for evidence of vasoplegia.
<div style="display: flex; align-items: center; gap: 0px; width: 100%; margin: 20px 0;">
<img src="https://openmoji.org/data/color/svg/E312.svg" alt="Liver Icon" style="width: 150px; height: 150px; flex-shrink: 0;" />
<div style="background: #222; padding: 10px; border-left: 10px solid #A30310; border-radius: 8px; margin: 0; flex: 0.9; text-align: left;">
<strong>Hyperkalemia management</strong>: If peaked T waves appear on the EKG — the earliest sign of hyperkalemia — the first intervention is IV calcium to stabilize the myocardium. Calcium acts within 1–3 minutes and must be given before insulin, which takes 15–30 minutes to shift potassium intracellularly. <a href="https://doi.org/10.1111/j.1751-7176.2012.00696.x" target="_blank"><small><sup>[1]</sup></small></a>
<strong>Vasoplegia management</strong>: If the arterial waveform shows evidence of vasoplegia (declining systolic trend, loss of dicrotic notch, narrowing pulse pressure), vasopressor boluses should be administered based on waveform trends, not just the displayed MAP number. The waveform morphology changes faster than the digital readout updates, and in the seconds surrounding reperfusion, acting on trends rather than waiting for a threshold number is critical. <a href="https://pubmed.ncbi.nlm.nih.gov/21890890/" target="_blank"><small><sup>[2]</sup></small></a>
</div></div>
[[Finish the Sim|End]]
<h2>Neohepatic Phase</h2>
The graft has been successfully reperfused. Initial reperfusion syndrome has been managed, and systemic hemodynamics are gradually stabilizing with ongoing volume administration and intermittent vasopressor support.
Attention is turned to completing the arterial anastomosis. The hepatic artery microvascular clamp is removed, confirming a strong, palpable pulse and good perfusion to the donor liver. Biliary reconstruction is then finalized via duct-to-duct choledochocholedochostomy.
Coagulation parameters and arterial blood gases are continually assessed. Blood products and albumin are administered as needed to correct microvascular bleeding as surgical closure begins. The patient remains stable as the final sutures are placed and is transported to TICU.
[[Proceed to Debrief & Summary|Case Debrief]]Congratulations on finishing my virtual Liver Transplant Sim!
This should serve as a brief overview of the important things to keep in mind during your pre-operative chart review and the key parts of the case itself.
Of course, we couldn't cover everything so be sure to ask any questions you have whenever we do a liver transplant together! The team and I are always happy to teach.
If you wish to start over, click the restart button on the left-side panel
If you wish to go over the phases of a liver transplant again, [[click here|Liver Transplant Phases]]