Can you make a pdf of sop trauma
What kind of trauma SOP do you need? · How detailed should the SOP be?
"trauma resuscitation" AND "primary survey"
Quick answer
Generate this trauma SOP as a downloadable PDF
ls -la /tmp/workspace/ 2>/dev/null || echo "no workspace yet"
~/trauma-sop/generate_pdf.py
from reportlab.lib.pagesizes import LETTER
from reportlab.lib.units import inch
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, ListFlowable,
ListItem, PageBreak, HRFlowable
)
OUT = "/tmp/workspace/trauma-sop/Trauma_SOP.pdf"
styles = getSampleStyleSheet()
title_style = ParagraphStyle(
"TitleStyle", parent=styles["Title"], fontSize=20, spaceAfter=4,
textColor=colors.HexColor("#7a1f1f")
)
subtitle_style = ParagraphStyle(
"SubtitleStyle", parent=styles["Normal"], fontSize=11, alignment=TA_CENTER,
textColor=colors.HexColor("#444444"), spaceAfter=14
)
h1 = ParagraphStyle(
"H1", parent=styles["Heading1"], fontSize=14, spaceBefore=14, spaceAfter=6,
textColor=colors.HexColor("#7a1f1f"), borderPadding=0
)
h2 = ParagraphStyle(
"H2", parent=styles["Heading2"], fontSize=11.5, spaceBefore=8, spaceAfter=4,
textColor=colors.HexColor("#333333")
)
body = ParagraphStyle(
"Body", parent=styles["Normal"], fontSize=10, leading=14, spaceAfter=4
)
bullet = ParagraphStyle(
"Bullet", parent=body, leftIndent=14, bulletIndent=4, spaceAfter=3
)
meta_style = ParagraphStyle(
"Meta", parent=styles["Normal"], fontSize=8.5, textColor=colors.HexColor("#666666")
)
footer_note = ParagraphStyle(
"FooterNote", parent=styles["Normal"], fontSize=8, textColor=colors.HexColor("#777777"),
alignment=TA_CENTER
)
doc = SimpleDocTemplate(
OUT, pagesize=LETTER,
topMargin=0.7*inch, bottomMargin=0.7*inch,
leftMargin=0.75*inch, rightMargin=0.75*inch,
title="SOP - Trauma Resuscitation"
)
story = []
story.append(Paragraph("STANDARD OPERATING PROCEDURE", title_style))
story.append(Paragraph("Trauma Resuscitation (ATLS-Based)", subtitle_style))
meta_table = Table(
[["Document:", "SOP - Trauma Resuscitation", "Version:", "1.0"],
["Department:", "Emergency Department / Trauma Bay", "Effective Date:", "___________"],
["Review Cycle:", "Annual", "Approved By:", "___________"]],
colWidths=[1.0*inch, 2.6*inch, 1.1*inch, 1.5*inch]
)
meta_table.setStyle(TableStyle([
("FONTSIZE", (0,0), (-1,-1), 8.5),
("TEXTCOLOR", (0,0), (0,-1), colors.HexColor("#7a1f1f")),
("TEXTCOLOR", (2,0), (2,-1), colors.HexColor("#7a1f1f")),
("FONTNAME", (0,0), (0,-1), "Helvetica-Bold"),
("FONTNAME", (2,0), (2,-1), "Helvetica-Bold"),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("TOPPADDING", (0,0), (-1,-1), 4),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#dddddd")),
("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#f7f2f2")),
]))
story.append(meta_table)
story.append(Spacer(1, 10))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor("#7a1f1f")))
story.append(Spacer(1, 6))
def add_section(num, title):
story.append(Paragraph(f"{num}. {title}", h1))
def add_sub(title):
story.append(Paragraph(title, h2))
def add_bullets(items):
flow_items = [ListItem(Paragraph(it, bullet), leftIndent=14) for it in items]
story.append(ListFlowable(flow_items, bulletType="bullet", start="circle",
leftIndent=10, bulletFontSize=6))
story.append(Spacer(1, 4))
def add_para(text):
story.append(Paragraph(text, body))
# 1. Purpose
add_section(1, "Purpose")
add_para(
"To provide a standardized, systematic approach to the initial assessment and "
"management of the trauma patient, minimizing preventable morbidity and mortality "
"through rapid identification and treatment of life-threatening injuries."
)
# 2. Scope
add_section(2, "Scope")
add_para(
"Applies to all trauma patients presenting to the Emergency Department / trauma bay, "
"from pre-arrival notification through disposition (operating room, ICU, ward, transfer, "
"or discharge)."
)
# 3. Pre-Arrival Preparation
add_section(3, "Pre-Arrival Preparation")
add_bullets([
"Activate trauma team based on EMS notification / mechanism of injury criteria",
"Don personal protective equipment (gloves, gown, eye protection)",
"Prepare airway cart, IV access supplies, warmed fluids, and O-negative / type-specific "
"blood if massive transfusion is anticipated",
"Assign roles: team leader, airway, procedures, scribe, nursing",
])
# 4. Primary Survey
add_section(4, "Primary Survey (ABCDE) — the first 5–10 minutes")
add_sub("A – Airway (with C-spine protection)")
add_bullets([
"Assess patency; look for obstruction or foreign body",
"Maintain manual in-line immobilization / cervical collar",
"Secure a definitive airway (intubation) if GCS ≤ 8, airway compromise, or impending obstruction",
])
add_sub("B – Breathing and Ventilation")
add_bullets([
"Expose the chest; inspect, auscultate, and percuss",
"Identify and immediately treat tension pneumothorax, open pneumothorax, massive "
"hemothorax, and flail chest",
"Give supplemental oxygen and continuously monitor SpO2",
])
add_sub("C – Circulation with Hemorrhage Control")
add_bullets([
"Assess pulse, skin color/temperature, and capillary refill",
"Control external hemorrhage with direct pressure or tourniquet",
"Obtain two large-bore IV lines",
"Identify shock class and initiate balanced blood product / massive transfusion protocol "
"if indicated",
"FAST scan or DPL as needed to identify occult hemorrhage",
])
add_sub("D – Disability (Neurologic Status)")
add_bullets([
"Glasgow Coma Scale (GCS), pupillary response",
"Gross motor and sensory exam",
"Rule out spinal cord injury",
])
add_sub("E – Exposure / Environment")
add_bullets([
"Fully undress the patient; log-roll to inspect the back and perineum",
"Prevent hypothermia with warm blankets and warmed IV fluids",
])
# 5. Resuscitation Adjuncts
add_section(5, "Resuscitation Adjuncts (concurrent with primary survey)")
add_bullets([
"Continuous monitoring: ECG, pulse oximetry, blood pressure, ETCO2 if intubated",
"Labs: type and crossmatch, CBC, coagulation profile, lactate, VBG/ABG, pregnancy test "
"if applicable",
"Imaging: portable chest X-ray, pelvis X-ray, FAST ultrasound",
"Urinary and gastric catheters, unless contraindicated (e.g., suspected urethral injury)",
])
# 6. Secondary Survey
add_section(6, "Secondary Survey (Head-to-Toe)")
add_bullets([
"Performed only after the primary survey is completed and the patient is hemodynamically "
"stabilizing",
"Full history using AMPLE: Allergies, Medications, Past history, Last meal, "
"Events/Environment",
"Complete head-to-toe physical examination",
"Further imaging as indicated: CT head / C-spine / chest / abdomen-pelvis",
"Tetanus prophylaxis, analgesia, and splinting of fractures",
])
# 7. Reassessment and Tertiary Survey
add_section(7, "Reassessment and Tertiary Survey")
add_bullets([
"Continuously reassess the ABCDEs, especially if the patient deteriorates",
"Perform a tertiary survey within 24 hours to catch missed injuries",
"Document all findings and interventions with timestamps",
])
# 8. Disposition
add_section(8, "Disposition")
add_bullets([
"Operating room (for uncontrolled hemorrhage or laparotomy indications)",
"ICU / HDU admission",
"Ward admission",
"Transfer to a higher level trauma center",
"Discharge with follow-up instructions (minor trauma only)",
])
# 9. Documentation
add_section(9, "Documentation")
add_bullets([
"Trauma flow sheet with timestamped vitals and interventions",
"Record of team roles and personnel present",
"Imaging and laboratory results",
"Handover using SBAR format (Situation, Background, Assessment, Recommendation)",
])
# 10. Quality / Review
add_section(10, "Quality / Review")
add_bullets([
"All major trauma cases reviewed at trauma morbidity & mortality / quality meeting",
"Track time-to-CT, time-to-OR, and mortality/morbidity metrics",
])
story.append(Spacer(1, 12))
story.append(HRFlowable(width="100%", thickness=0.75, color=colors.HexColor("#cccccc")))
story.append(Spacer(1, 6))
story.append(Paragraph("References", h2))
add_para(
"Tintinalli's Emergency Medicine: A Comprehensive Study Guide – Table 25A-3, "
"\"Primary and Secondary Survey in Trauma Resuscitation.\"<br/>"
"Rosen's Emergency Medicine: Concepts and Clinical Practice – \"ATLS Assessment.\"<br/>"
"Bailey and Love's Short Practice of Surgery, 28th Edition – Table 29.1, "
"\"Advanced Trauma Life Support Principles of Resuscitation.\""
)
story.append(Spacer(1, 16))
story.append(Paragraph(
"This SOP is a general clinical reference template based on ATLS principles. It should be "
"adapted, reviewed, and formally approved by the institution's trauma/clinical governance "
"committee before operational use.",
footer_note
))
doc.build(story)
print("PDF generated at:", OUT)
mkdir -p /tmp/workspace/trauma-sop && cd /tmp/workspace/trauma-sop && python3 generate_pdf.py
Trauma SOP
PDF Document · PDF
Can you remove the reference part from the pdf and also the line below the reference part
~/trauma-sop/generate_pdf.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/trauma-sop/generate_pdf.py'
cd /tmp/workspace/trauma-sop && python3 generate_pdf.py
Trauma SOP
PDF Document · PDF
Can you make the pdf more comprehensive including the triage part and also including all the points that should be done in a casualty
~/trauma-sop/generate_pdf.py
from reportlab.lib.pagesizes import LETTER
from reportlab.lib.units import inch
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, ListFlowable,
ListItem, PageBreak, HRFlowable
)
OUT = "/tmp/workspace/trauma-sop/Trauma_SOP.pdf"
styles = getSampleStyleSheet()
title_style = ParagraphStyle(
"TitleStyle", parent=styles["Title"], fontSize=20, spaceAfter=4,
textColor=colors.HexColor("#7a1f1f")
)
subtitle_style = ParagraphStyle(
"SubtitleStyle", parent=styles["Normal"], fontSize=11, alignment=TA_CENTER,
textColor=colors.HexColor("#444444"), spaceAfter=14
)
h1 = ParagraphStyle(
"H1", parent=styles["Heading1"], fontSize=14, spaceBefore=14, spaceAfter=6,
textColor=colors.HexColor("#7a1f1f")
)
h2 = ParagraphStyle(
"H2", parent=styles["Heading2"], fontSize=11.5, spaceBefore=8, spaceAfter=4,
textColor=colors.HexColor("#333333")
)
h3 = ParagraphStyle(
"H3", parent=styles["Heading3"], fontSize=10.5, spaceBefore=6, spaceAfter=3,
textColor=colors.HexColor("#7a1f1f"), fontName="Helvetica-BoldOblique"
)
body = ParagraphStyle(
"Body", parent=styles["Normal"], fontSize=10, leading=14, spaceAfter=4
)
bullet = ParagraphStyle(
"Bullet", parent=body, leftIndent=14, bulletIndent=4, spaceAfter=3
)
doc = SimpleDocTemplate(
OUT, pagesize=LETTER,
topMargin=0.7*inch, bottomMargin=0.7*inch,
leftMargin=0.75*inch, rightMargin=0.75*inch,
title="SOP - Trauma Resuscitation"
)
story = []
story.append(Paragraph("STANDARD OPERATING PROCEDURE", title_style))
story.append(Paragraph("Trauma Management in the Casualty / Emergency Department (ATLS-Based)", subtitle_style))
meta_table = Table(
[["Document:", "SOP - Trauma Resuscitation", "Version:", "2.0"],
["Department:", "Emergency Department / Casualty", "Effective Date:", "___________"],
["Review Cycle:", "Annual", "Approved By:", "___________"]],
colWidths=[1.0*inch, 2.6*inch, 1.1*inch, 1.5*inch]
)
meta_table.setStyle(TableStyle([
("FONTSIZE", (0,0), (-1,-1), 8.5),
("TEXTCOLOR", (0,0), (0,-1), colors.HexColor("#7a1f1f")),
("TEXTCOLOR", (2,0), (2,-1), colors.HexColor("#7a1f1f")),
("FONTNAME", (0,0), (0,-1), "Helvetica-Bold"),
("FONTNAME", (2,0), (2,-1), "Helvetica-Bold"),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("TOPPADDING", (0,0), (-1,-1), 4),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#dddddd")),
("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#f7f2f2")),
]))
story.append(meta_table)
story.append(Spacer(1, 10))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor("#7a1f1f")))
story.append(Spacer(1, 6))
def add_section(num, title):
story.append(Paragraph(f"{num}. {title}", h1))
def add_sub(title):
story.append(Paragraph(title, h2))
def add_subsub(title):
story.append(Paragraph(title, h3))
def add_bullets(items):
flow_items = [ListItem(Paragraph(it, bullet), leftIndent=14) for it in items]
story.append(ListFlowable(flow_items, bulletType="bullet", start="circle",
leftIndent=10, bulletFontSize=6))
story.append(Spacer(1, 4))
def add_para(text):
story.append(Paragraph(text, body))
def add_table(header, rows, col_widths):
data = [header] + rows
t = Table(data, colWidths=col_widths, repeatRows=1)
t.setStyle(TableStyle([
("FONTSIZE", (0,0), (-1,-1), 8.5),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("TEXTCOLOR", (0,0), (-1,0), colors.white),
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#7a1f1f")),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("TOPPADDING", (0,0), (-1,-1), 5),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#cccccc")),
("VALIGN", (0,0), (-1,-1), "TOP"),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#f7f2f2")]),
]))
story.append(t)
story.append(Spacer(1, 8))
# 1. Purpose
add_section(1, "Purpose")
add_para(
"To provide a standardized, systematic approach to the triage, initial assessment, and "
"management of the trauma patient in the casualty (Emergency) department, minimizing "
"preventable morbidity and mortality through rapid identification and treatment of "
"life-threatening injuries."
)
# 2. Scope
add_section(2, "Scope")
add_para(
"Applies to all trauma patients presenting to the casualty / Emergency Department, from "
"pre-arrival notification and triage through disposition (operating room, ICU, ward, "
"transfer, or discharge). Covers single-patient trauma as well as mass casualty / disaster "
"situations."
)
# 3. Triage
add_section(3, "Triage")
add_sub("3.1 Trauma Team Activation Criteria (Single Patient)")
add_para(
"On arrival, the triage officer / duty doctor determines the level of trauma team response "
"required using physiologic, anatomic, mechanism-of-injury, and comorbid criteria."
)
add_table(
["Category", "Criteria"],
[
["Physiologic", "GCS < 14; systolic BP < 90 mmHg; respiratory rate < 10 or > 29 "
"breaths/min; need for ventilatory support"],
["Anatomic", "Penetrating injury to head, neck, torso, or proximal extremities; flail "
"chest; two or more proximal long-bone fractures; crushed, degloved, or mangled "
"extremity; amputation proximal to wrist/ankle; pelvic fracture; open or depressed "
"skull fracture; paralysis"],
["Mechanism of Injury", "Falls > 6 m (adults); high-risk motor vehicle crash "
"(intrusion, rollover, ejection, death of occupant); motorcycle crash > 30 km/h or "
"with separation of rider from bike; pedestrian/cyclist struck by vehicle"],
["Comorbid / Special Factors", "Age < 5 or > 65 years; anticoagulant/bleeding "
"disorder; burns with trauma; pregnancy > 20 weeks; EMS provider judgment"],
],
[1.4*inch, 4.8*inch]
)
add_para(
"Any single criterion present should trigger activation of the appropriate level trauma "
"team response and direct transfer to the resuscitation bay, bypassing routine registration."
)
add_sub("3.2 Casualty Department Triage Categories")
add_para(
"All patients entering the casualty department, trauma or non-trauma, are triaged into a "
"priority category by the triage nurse/officer within minutes of arrival."
)
add_table(
["Category", "Color", "Description", "Target Time to Physician"],
[
["I - Immediate", "Red", "Life-threatening; requires immediate resuscitation "
"(airway compromise, uncontrolled hemorrhage, shock, unresponsive)", "Immediate"],
["II - Urgent", "Yellow", "Serious but stable; potential for deterioration "
"(major fractures, moderate blood loss, chest pain)", "< 10-15 min"],
["III - Delayed / Minor", "Green", "Stable, minor injuries (simple lacerations, "
"sprains, minor abrasions)", "< 1-2 hours"],
["IV - Expectant / Deceased", "Black", "Unsalvageable injuries incompatible with "
"life, or already deceased", "Comfort care only"],
],
[1.3*inch, 0.6*inch, 3.1*inch, 1.2*inch]
)
add_sub("3.3 Mass Casualty / Disaster Triage - SALT Method")
add_para(
"When the number of casualties exceeds available resources (MASCAL/disaster), triage "
"switches from an individual to a population-based approach. The SALT method "
"(Sort, Assess, Lifesaving interventions, Treatment/transport) is used:"
)
add_bullets([
"<b>Sort (global):</b> Direct casualties who can walk to a designated area (assessed last); "
"observe remaining casualties for purposeful movement/waving (assessed second); those who "
"are still or have obvious life-threatening injury are assessed first",
"<b>Assess individually:</b> Apply immediate lifesaving interventions where possible - "
"control massive hemorrhage, open the airway, needle decompression, auto-injector "
"antidotes, seal open chest wounds",
"<b>Lifesaving interventions:</b> Must be quick, improve survival chances, not require "
"the provider to stay with the casualty, and be within available resources",
"<b>Treatment/transport category:</b> Assign Immediate (red), Delayed (yellow), Minimal "
"(green), or Expectant (gray/black - injuries incompatible with survival given available "
"resources), and evacuate in that priority order",
])
add_para(
"A single designated triage point, a trained triage officer, and command-and-control "
"structure should be established as the first step of any mass casualty response."
)
# 4. Immediate Actions on Arrival at Casualty
add_section(4, "Immediate Actions on Arrival at Casualty")
add_bullets([
"Receive handover from EMS/referring facility: mechanism of injury, vitals en route, "
"treatment given, estimated time of injury",
"Triage officer assigns priority category (Section 3.2) and directs patient to "
"resuscitation bay, minor treatment area, or observation as appropriate",
"Register patient (or use unidentified/trauma code registration if identity unknown) "
"without delaying resuscitation",
"Activate trauma team if activation criteria are met (Section 3.1)",
"Shift patient onto trauma trolley with spinal precautions; remove/cut clothing as needed",
])
# 5. Pre-Arrival Preparation / Trauma Team Activation
add_section(5, "Pre-Arrival Preparation and Team Roles")
add_bullets([
"Activate trauma team based on EMS notification / mechanism of injury criteria",
"Don personal protective equipment (gloves, gown, eye protection)",
"Prepare airway cart, IV access supplies, warmed fluids, and O-negative / type-specific "
"blood if massive transfusion is anticipated",
"Assign roles: team leader, airway doctor, circulation/procedures doctor, scribe, "
"primary nurse, runner, and security/crowd control if needed",
"Confirm availability of radiology, blood bank, and operating theatre on standby",
])
# 6. Primary Survey
add_section(6, "Primary Survey (ABCDE) - the first 5-10 minutes")
add_sub("A - Airway (with C-spine protection)")
add_bullets([
"Assess patency; look for obstruction or foreign body",
"Maintain manual in-line immobilization / cervical collar",
"Secure a definitive airway (intubation) if GCS ≤ 8, airway compromise, or impending obstruction",
])
add_sub("B - Breathing and Ventilation")
add_bullets([
"Expose the chest; inspect, auscultate, and percuss",
"Identify and immediately treat tension pneumothorax, open pneumothorax, massive "
"hemothorax, and flail chest",
"Give supplemental oxygen and continuously monitor SpO2",
])
add_sub("C - Circulation with Hemorrhage Control")
add_bullets([
"Assess pulse, skin color/temperature, and capillary refill",
"Control external hemorrhage with direct pressure, wound packing, or tourniquet",
"Obtain two large-bore IV lines (antecubital or intraosseous if access difficult)",
"Identify shock class and initiate balanced blood product / massive transfusion protocol "
"if indicated",
"FAST scan or DPL as needed to identify occult hemorrhage",
])
add_sub("D - Disability (Neurologic Status)")
add_bullets([
"Glasgow Coma Scale (GCS), pupillary size and response",
"Gross motor and sensory exam of all four limbs",
"Rule out spinal cord injury; check blood glucose in altered sensorium",
])
add_sub("E - Exposure / Environment")
add_bullets([
"Fully undress the patient; log-roll to inspect the back, flanks, and perineum",
"Prevent hypothermia with warm blankets, warmed IV fluids, and a warmed environment",
])
# 7. Resuscitation Adjuncts
add_section(7, "Resuscitation Adjuncts (concurrent with primary survey)")
add_bullets([
"Continuous monitoring: ECG, pulse oximetry, blood pressure, ETCO2 if intubated",
"Labs: type and crossmatch, CBC, coagulation profile, lactate, VBG/ABG, blood glucose, "
"pregnancy test if applicable",
"Imaging: portable chest X-ray, pelvis X-ray, FAST ultrasound; CT as condition permits",
"Urinary and gastric catheters, unless contraindicated (e.g., suspected urethral injury, "
"base-of-skull fracture)",
"Analgesia titrated to pain once hemodynamically stable enough to tolerate it",
])
# 8. Secondary Survey
add_section(8, "Secondary Survey (Head-to-Toe)")
add_bullets([
"Performed only after the primary survey is completed and the patient is hemodynamically "
"stabilizing",
"Full history using AMPLE: Allergies, Medications, Past history, Last meal, "
"Events/Environment surrounding the injury",
"Complete head-to-toe physical examination including scalp, ENT, chest, abdomen, "
"pelvis, back, and all four limbs",
"Further imaging as indicated: CT head / C-spine / chest / abdomen-pelvis, "
"extremity X-rays",
"Tetanus prophylaxis, antibiotic administration for open wounds, and splinting of "
"fractures",
"Re-examine for injuries that may have been missed during the primary survey",
])
# 9. Reassessment and Tertiary Survey
add_section(9, "Reassessment and Tertiary Survey")
add_bullets([
"Continuously reassess the ABCDEs, especially if the patient deteriorates or after any "
"intervention",
"Perform a tertiary survey within 24 hours to catch missed injuries",
"Document all findings and interventions with timestamps",
])
# 10. Medico-Legal and Notification Requirements
add_section(10, "Medico-Legal and Notification Requirements")
add_bullets([
"Register as a Medico-Legal Case (MLC) for all trauma suspected to involve assault, "
"road traffic accident, self-harm, burns, poisoning, or any unnatural cause, per local "
"regulations",
"Inform police/relevant authorities as mandated for medico-legal cases",
"Preserve clothing, bullets, or other forensic evidence in trauma cases as required",
"Obtain informed consent for procedures; use next-of-kin or two-doctor emergency "
"consent where the patient cannot consent and delay would be harmful",
"Notify hospital administration for mass casualty, VIP, or media-sensitive cases",
"Communicate promptly and compassionately with family/next of kin on arrival, "
"during resuscitation, and regarding outcome",
])
# 11. Disposition
add_section(11, "Disposition")
add_bullets([
"Operating room (for uncontrolled hemorrhage or laparotomy/other surgical indications)",
"ICU / HDU admission for ongoing critical care",
"Ward admission for stable patients requiring observation or further management",
"Transfer to a higher level trauma center if local resources are insufficient, with a "
"documented referral note and stabilization prior to transfer",
"Discharge with clear follow-up and red-flag instructions (minor trauma only)",
"Mortuary/medico-legal procedures if the patient is declared dead",
])
# 12. Documentation
add_section(12, "Documentation")
add_bullets([
"Trauma flow sheet with timestamped vitals, interventions, and drugs administered",
"Record of team roles and personnel present during resuscitation",
"Imaging and laboratory results filed in the case record",
"MLC register entry and police intimation records where applicable",
"Handover documentation using SBAR format (Situation, Background, Assessment, "
"Recommendation) at every transfer of care",
"Consent forms and communication with family documented with time and signature",
])
# 13. Roles and Responsibilities in Casualty
add_section(13, "Roles and Responsibilities of the Casualty Team")
add_table(
["Role", "Key Responsibilities"],
[
["Triage Officer/Nurse", "First point of contact; assigns triage category; "
"directs flow; activates trauma team"],
["Team Leader", "Directs the resuscitation, delegates tasks, maintains overview, "
"makes disposition decisions, communicates with family and specialists"],
["Airway Doctor", "Manages airway and C-spine, performs intubation if required"],
["Circulation/Procedures Doctor", "Establishes IV/IO access, controls hemorrhage, "
"performs FAST, chest tube, or other procedures"],
["Primary Nurse", "Administers medications/fluids, monitors vitals, prepares "
"equipment"],
["Scribe", "Documents times, interventions, vitals, and medications in real time"],
["Runner/Support Staff", "Transports samples, retrieves blood products/equipment, "
"coordinates with radiology and blood bank"],
["Security", "Crowd control, scene safety, evidence preservation in medico-legal "
"cases"],
],
[1.7*inch, 4.5*inch]
)
# 14. Equipment and Resource Checklist
add_section(14, "Equipment and Resource Checklist for the Trauma Bay")
add_bullets([
"Airway: laryngoscopes, endotracheal tubes (assorted sizes), bag-valve-mask, "
"suction, surgical airway kit, capnography",
"Breathing: oxygen source, chest tube/thoracostomy set, needle decompression kit, "
"occlusive dressings",
"Circulation: IV cannulas (assorted sizes), intraosseous access kit, warmed crystalloids, "
"blood/blood products, tourniquets, hemostatic dressings, rapid infuser/warmer",
"Monitoring: ECG monitor, pulse oximeter, non-invasive BP, defibrillator",
"Immobilization: cervical collars, spinal board, pelvic binder, splints",
"Diagnostics: portable ultrasound (FAST), portable X-ray access, point-of-care blood "
"gas/lactate analyzer",
"Documentation: trauma flow sheets, MLC register, consent forms",
"Personal protective equipment for all staff",
])
# 15. Quality / Review
add_section(15, "Quality / Review")
add_bullets([
"All major trauma cases reviewed at trauma morbidity & mortality / quality meeting",
"Track time-to-triage, time-to-CT, time-to-OR, and mortality/morbidity metrics",
"Periodic mock drills for mass casualty and trauma team activation to maintain readiness",
"Annual review and update of this SOP by the trauma/clinical governance committee",
])
doc.build(story)
print("PDF generated at:", OUT)
rm -f /tmp/workspace/trauma-sop/generate_pdf.py
~/trauma-sop/generate_pdf.py
from reportlab.lib.pagesizes import LETTER
from reportlab.lib.units import inch
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, ListFlowable,
ListItem, PageBreak, HRFlowable
)
OUT = "/tmp/workspace/trauma-sop/Trauma_SOP.pdf"
styles = getSampleStyleSheet()
title_style = ParagraphStyle(
"TitleStyle", parent=styles["Title"], fontSize=20, spaceAfter=4,
textColor=colors.HexColor("#7a1f1f")
)
subtitle_style = ParagraphStyle(
"SubtitleStyle", parent=styles["Normal"], fontSize=11, alignment=TA_CENTER,
textColor=colors.HexColor("#444444"), spaceAfter=14
)
h1 = ParagraphStyle(
"H1", parent=styles["Heading1"], fontSize=14, spaceBefore=14, spaceAfter=6,
textColor=colors.HexColor("#7a1f1f")
)
h2 = ParagraphStyle(
"H2", parent=styles["Heading2"], fontSize=11.5, spaceBefore=8, spaceAfter=4,
textColor=colors.HexColor("#333333")
)
body = ParagraphStyle(
"Body", parent=styles["Normal"], fontSize=10, leading=14, spaceAfter=4
)
bullet = ParagraphStyle(
"Bullet", parent=body, leftIndent=14, bulletIndent=4, spaceAfter=3
)
doc = SimpleDocTemplate(
OUT, pagesize=LETTER,
topMargin=0.7*inch, bottomMargin=0.7*inch,
leftMargin=0.75*inch, rightMargin=0.75*inch,
title="SOP - Trauma Resuscitation"
)
story = []
story.append(Paragraph("STANDARD OPERATING PROCEDURE", title_style))
story.append(Paragraph("Trauma Management in the Casualty / Emergency Department (ATLS-Based)", subtitle_style))
meta_table = Table(
[["Document:", "SOP - Trauma Resuscitation", "Version:", "2.0"],
["Department:", "Emergency Department / Casualty", "Effective Date:", "___________"],
["Review Cycle:", "Annual", "Approved By:", "___________"]],
colWidths=[1.0*inch, 2.6*inch, 1.1*inch, 1.5*inch]
)
meta_table.setStyle(TableStyle([
("FONTSIZE", (0,0), (-1,-1), 8.5),
("TEXTCOLOR", (0,0), (0,-1), colors.HexColor("#7a1f1f")),
("TEXTCOLOR", (2,0), (2,-1), colors.HexColor("#7a1f1f")),
("FONTNAME", (0,0), (0,-1), "Helvetica-Bold"),
("FONTNAME", (2,0), (2,-1), "Helvetica-Bold"),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("TOPPADDING", (0,0), (-1,-1), 4),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#dddddd")),
("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#f7f2f2")),
]))
story.append(meta_table)
story.append(Spacer(1, 10))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor("#7a1f1f")))
story.append(Spacer(1, 6))
def add_section(num, title):
story.append(Paragraph(f"{num}. {title}", h1))
def add_sub(title):
story.append(Paragraph(title, h2))
def add_bullets(items):
flow_items = [ListItem(Paragraph(it, bullet), leftIndent=14) for it in items]
story.append(ListFlowable(flow_items, bulletType="bullet", start="circle",
leftIndent=10, bulletFontSize=6))
story.append(Spacer(1, 4))
def add_para(text):
story.append(Paragraph(text, body))
def add_table(header, rows, col_widths):
data = [header] + rows
t = Table(data, colWidths=col_widths, repeatRows=1)
t.setStyle(TableStyle([
("FONTSIZE", (0,0), (-1,-1), 8.5),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("TEXTCOLOR", (0,0), (-1,0), colors.white),
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#7a1f1f")),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("TOPPADDING", (0,0), (-1,-1), 5),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#cccccc")),
("VALIGN", (0,0), (-1,-1), "TOP"),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#f7f2f2")]),
]))
story.append(t)
story.append(Spacer(1, 8))
# 1. Purpose
add_section(1, "Purpose")
add_para(
"To provide a standardized, systematic approach to the triage, initial assessment, and "
"management of the trauma patient in the casualty (Emergency) department, minimizing "
"preventable morbidity and mortality through rapid identification and treatment of "
"life-threatening injuries."
)
# 2. Scope
add_section(2, "Scope")
add_para(
"Applies to all trauma patients presenting to the casualty / Emergency Department, from "
"pre-arrival notification and triage through disposition (operating room, ICU, ward, "
"transfer, or discharge). Covers single-patient trauma as well as mass casualty / disaster "
"situations."
)
# 3. Triage
add_section(3, "Triage")
add_sub("3.1 Trauma Team Activation Criteria (Single Patient)")
add_para(
"On arrival, the triage officer / duty doctor determines the level of trauma team response "
"required using physiologic, anatomic, mechanism-of-injury, and comorbid criteria."
)
add_table(
["Category", "Criteria"],
[
["Physiologic", "GCS < 14; systolic BP < 90 mmHg; respiratory rate < 10 or > 29 "
"breaths/min; need for ventilatory support"],
["Anatomic", "Penetrating injury to head, neck, torso, or proximal extremities; flail "
"chest; two or more proximal long-bone fractures; crushed, degloved, or mangled "
"extremity; amputation proximal to wrist/ankle; pelvic fracture; open or depressed "
"skull fracture; paralysis"],
["Mechanism of Injury", "Falls > 6 m (adults); high-risk motor vehicle crash "
"(intrusion, rollover, ejection, death of occupant); motorcycle crash > 30 km/h or "
"with separation of rider from bike; pedestrian/cyclist struck by vehicle"],
["Comorbid / Special Factors", "Age < 5 or > 65 years; anticoagulant/bleeding "
"disorder; burns with trauma; pregnancy > 20 weeks; EMS provider judgment"],
],
[1.4*inch, 4.8*inch]
)
add_para(
"Any single criterion present should trigger activation of the appropriate level trauma "
"team response and direct transfer to the resuscitation bay, bypassing routine registration."
)
add_sub("3.2 Casualty Department Triage Categories")
add_para(
"All patients entering the casualty department, trauma or non-trauma, are triaged into a "
"priority category by the triage nurse/officer within minutes of arrival."
)
add_table(
["Category", "Color", "Description", "Target Time to Physician"],
[
["I - Immediate", "Red", "Life-threatening; requires immediate resuscitation "
"(airway compromise, uncontrolled hemorrhage, shock, unresponsive)", "Immediate"],
["II - Urgent", "Yellow", "Serious but stable; potential for deterioration "
"(major fractures, moderate blood loss, chest pain)", "< 10-15 min"],
["III - Delayed / Minor", "Green", "Stable, minor injuries (simple lacerations, "
"sprains, minor abrasions)", "< 1-2 hours"],
["IV - Expectant / Deceased", "Black", "Unsalvageable injuries incompatible with "
"life, or already deceased", "Comfort care only"],
],
[1.3*inch, 0.6*inch, 3.1*inch, 1.2*inch]
)
add_sub("3.3 Mass Casualty / Disaster Triage - SALT Method")
add_para(
"When the number of casualties exceeds available resources (MASCAL/disaster), triage "
"switches from an individual to a population-based approach. The SALT method "
"(Sort, Assess, Lifesaving interventions, Treatment/transport) is used:"
)
add_bullets([
"<b>Sort (global):</b> Direct casualties who can walk to a designated area (assessed last); "
"observe remaining casualties for purposeful movement/waving (assessed second); those who "
"are still or have obvious life-threatening injury are assessed first",
"<b>Assess individually:</b> Apply immediate lifesaving interventions where possible - "
"control massive hemorrhage, open the airway, needle decompression, auto-injector "
"antidotes, seal open chest wounds",
"<b>Lifesaving interventions:</b> Must be quick, improve survival chances, not require "
"the provider to stay with the casualty, and be within available resources",
"<b>Treatment/transport category:</b> Assign Immediate (red), Delayed (yellow), Minimal "
"(green), or Expectant (gray/black - injuries incompatible with survival given available "
"resources), and evacuate in that priority order",
])
add_para(
"A single designated triage point, a trained triage officer, and command-and-control "
"structure should be established as the first step of any mass casualty response."
)
# 4. Immediate Actions on Arrival at Casualty
add_section(4, "Immediate Actions on Arrival at Casualty")
add_bullets([
"Receive handover from EMS/referring facility: mechanism of injury, vitals en route, "
"treatment given, estimated time of injury",
"Triage officer assigns priority category (Section 3.2) and directs patient to "
"resuscitation bay, minor treatment area, or observation as appropriate",
"Register patient (or use unidentified/trauma code registration if identity unknown) "
"without delaying resuscitation",
"Activate trauma team if activation criteria are met (Section 3.1)",
"Shift patient onto trauma trolley with spinal precautions; remove/cut clothing as needed",
])
# 5. Pre-Arrival Preparation / Trauma Team Activation
add_section(5, "Pre-Arrival Preparation and Team Roles")
add_bullets([
"Activate trauma team based on EMS notification / mechanism of injury criteria",
"Don personal protective equipment (gloves, gown, eye protection)",
"Prepare airway cart, IV access supplies, warmed fluids, and O-negative / type-specific "
"blood if massive transfusion is anticipated",
"Assign roles: team leader, airway doctor, circulation/procedures doctor, scribe, "
"primary nurse, runner, and security/crowd control if needed",
"Confirm availability of radiology, blood bank, and operating theatre on standby",
])
# 6. Primary Survey
add_section(6, "Primary Survey (ABCDE) - the first 5-10 minutes")
add_sub("A - Airway (with C-spine protection)")
add_bullets([
"Assess patency; look for obstruction or foreign body",
"Maintain manual in-line immobilization / cervical collar",
"Secure a definitive airway (intubation) if GCS ≤ 8, airway compromise, or impending obstruction",
])
add_sub("B - Breathing and Ventilation")
add_bullets([
"Expose the chest; inspect, auscultate, and percuss",
"Identify and immediately treat tension pneumothorax, open pneumothorax, massive "
"hemothorax, and flail chest",
"Give supplemental oxygen and continuously monitor SpO2",
])
add_sub("C - Circulation with Hemorrhage Control")
add_bullets([
"Assess pulse, skin color/temperature, and capillary refill",
"Control external hemorrhage with direct pressure, wound packing, or tourniquet",
"Obtain two large-bore IV lines (antecubital or intraosseous if access difficult)",
"Identify shock class and initiate balanced blood product / massive transfusion protocol "
"if indicated",
"FAST scan or DPL as needed to identify occult hemorrhage",
])
add_sub("D - Disability (Neurologic Status)")
add_bullets([
"Glasgow Coma Scale (GCS), pupillary size and response",
"Gross motor and sensory exam of all four limbs",
"Rule out spinal cord injury; check blood glucose in altered sensorium",
])
add_sub("E - Exposure / Environment")
add_bullets([
"Fully undress the patient; log-roll to inspect the back, flanks, and perineum",
"Prevent hypothermia with warm blankets, warmed IV fluids, and a warmed environment",
])
# 7. Resuscitation Adjuncts
add_section(7, "Resuscitation Adjuncts (concurrent with primary survey)")
add_bullets([
"Continuous monitoring: ECG, pulse oximetry, blood pressure, ETCO2 if intubated",
"Labs: type and crossmatch, CBC, coagulation profile, lactate, VBG/ABG, blood glucose, "
"pregnancy test if applicable",
"Imaging: portable chest X-ray, pelvis X-ray, FAST ultrasound; CT as condition permits",
"Urinary and gastric catheters, unless contraindicated (e.g., suspected urethral injury, "
"base-of-skull fracture)",
"Analgesia titrated to pain once hemodynamically stable enough to tolerate it",
])
# 8. Secondary Survey
add_section(8, "Secondary Survey (Head-to-Toe)")
add_bullets([
"Performed only after the primary survey is completed and the patient is hemodynamically "
"stabilizing",
"Full history using AMPLE: Allergies, Medications, Past history, Last meal, "
"Events/Environment surrounding the injury",
"Complete head-to-toe physical examination including scalp, ENT, chest, abdomen, "
"pelvis, back, and all four limbs",
"Further imaging as indicated: CT head / C-spine / chest / abdomen-pelvis, "
"extremity X-rays",
"Tetanus prophylaxis, antibiotic administration for open wounds, and splinting of "
"fractures",
"Re-examine for injuries that may have been missed during the primary survey",
])
# 9. Reassessment and Tertiary Survey
add_section(9, "Reassessment and Tertiary Survey")
add_bullets([
"Continuously reassess the ABCDEs, especially if the patient deteriorates or after any "
"intervention",
"Perform a tertiary survey within 24 hours to catch missed injuries",
"Document all findings and interventions with timestamps",
])
# 10. Medico-Legal and Notification Requirements
add_section(10, "Medico-Legal and Notification Requirements")
add_bullets([
"Register as a Medico-Legal Case (MLC) for all trauma suspected to involve assault, "
"road traffic accident, self-harm, burns, poisoning, or any unnatural cause, per local "
"regulations",
"Inform police/relevant authorities as mandated for medico-legal cases",
"Preserve clothing, bullets, or other forensic evidence in trauma cases as required",
"Obtain informed consent for procedures; use next-of-kin or two-doctor emergency "
"consent where the patient cannot consent and delay would be harmful",
"Notify hospital administration for mass casualty, VIP, or media-sensitive cases",
"Communicate promptly and compassionately with family/next of kin on arrival, "
"during resuscitation, and regarding outcome",
])
# 11. Disposition
add_section(11, "Disposition")
add_bullets([
"Operating room (for uncontrolled hemorrhage or laparotomy/other surgical indications)",
"ICU / HDU admission for ongoing critical care",
"Ward admission for stable patients requiring observation or further management",
"Transfer to a higher level trauma center if local resources are insufficient, with a "
"documented referral note and stabilization prior to transfer",
"Discharge with clear follow-up and red-flag instructions (minor trauma only)",
"Mortuary/medico-legal procedures if the patient is declared dead",
])
# 12. Documentation
add_section(12, "Documentation")
add_bullets([
"Trauma flow sheet with timestamped vitals, interventions, and drugs administered",
"Record of team roles and personnel present during resuscitation",
"Imaging and laboratory results filed in the case record",
"MLC register entry and police intimation records where applicable",
"Handover documentation using SBAR format (Situation, Background, Assessment, "
"Recommendation) at every transfer of care",
"Consent forms and communication with family documented with time and signature",
])
# 13. Roles and Responsibilities in Casualty
add_section(13, "Roles and Responsibilities of the Casualty Team")
add_table(
["Role", "Key Responsibilities"],
[
["Triage Officer/Nurse", "First point of contact; assigns triage category; "
"directs flow; activates trauma team"],
["Team Leader", "Directs the resuscitation, delegates tasks, maintains overview, "
"makes disposition decisions, communicates with family and specialists"],
["Airway Doctor", "Manages airway and C-spine, performs intubation if required"],
["Circulation/Procedures Doctor", "Establishes IV/IO access, controls hemorrhage, "
"performs FAST, chest tube, or other procedures"],
["Primary Nurse", "Administers medications/fluids, monitors vitals, prepares "
"equipment"],
["Scribe", "Documents times, interventions, vitals, and medications in real time"],
["Runner/Support Staff", "Transports samples, retrieves blood products/equipment, "
"coordinates with radiology and blood bank"],
["Security", "Crowd control, scene safety, evidence preservation in medico-legal "
"cases"],
],
[1.7*inch, 4.5*inch]
)
# 14. Equipment and Resource Checklist
add_section(14, "Equipment and Resource Checklist for the Trauma Bay")
add_bullets([
"Airway: laryngoscopes, endotracheal tubes (assorted sizes), bag-valve-mask, "
"suction, surgical airway kit, capnography",
"Breathing: oxygen source, chest tube/thoracostomy set, needle decompression kit, "
"occlusive dressings",
"Circulation: IV cannulas (assorted sizes), intraosseous access kit, warmed crystalloids, "
"blood/blood products, tourniquets, hemostatic dressings, rapid infuser/warmer",
"Monitoring: ECG monitor, pulse oximeter, non-invasive BP, defibrillator",
"Immobilization: cervical collars, spinal board, pelvic binder, splints",
"Diagnostics: portable ultrasound (FAST), portable X-ray access, point-of-care blood "
"gas/lactate analyzer",
"Documentation: trauma flow sheets, MLC register, consent forms",
"Personal protective equipment for all staff",
])
# 15. Quality / Review
add_section(15, "Quality / Review")
add_bullets([
"All major trauma cases reviewed at trauma morbidity & mortality / quality meeting",
"Track time-to-triage, time-to-CT, time-to-OR, and mortality/morbidity metrics",
"Periodic mock drills for mass casualty and trauma team activation to maintain readiness",
"Annual review and update of this SOP by the trauma/clinical governance committee",
])
doc.build(story)
print("PDF generated at:", OUT)