Can you add Exsanguinating external hemorrhage before ABCDE taking reference from Sabiston 22nd edition Primary survey(xABCDE)

Reading File
Reading File
Running Command

cd /tmp/workspace && mkdir -p exsang_task && cp "/tmp/workspace/attachments/0e474fbc-5e6b-4e3c-a4ef-00762dc6d648/Initial_Assessment_and_Management_of_Trauma copy copy.pptx" exsang_task/deck.pptx && python3 -c " from pptx import Presentation prs = Presentation('exsang_task/deck.pptx') for i, slide in enumerate(prs.slides, 1): texts=[] for shape in slide.shapes: if shape.has_text_frame and shape.text_frame.text.strip(): texts.append(shape.text_frame.text) joined = ' | '.join(texts) if 'ABCDE' in joined or 'Primary survey' in joined or 'Primary Survey' in joined: print('SLIDE', i) print(joined) print('---') "

Reading File
Finding Sources
Reading File
Running Command

cd /tmp/workspace/exsang_task && python /tmp/skills/pptx/scripts/office/unpack.py deck.pptx unpacked/ && ls unpacked/ppt/slides/ | head -60

Reading File
Reading File
Reading File
Reading File
Writing File

~/exsang_task/edit_slide11.py

import re

path = "/tmp/workspace/exsang_task/unpacked/ppt/slides/slide11.xml"
xml = open(path).read()

orig_len = len(xml)

# 1. Shrink box width for A-E boxes to make room for the new X box
assert xml.count('cx="1993392"') == 5, xml.count('cx="1993392"')
xml = xml.replace('cx="1993392"', 'cx="1623060"')

# 2. Reposition existing A-E boxes to the right
box_moves = [
    ('640080', '2491740'),    # A
    ('2862072', '4343400'),   # B
    ('5084064', '6195060'),   # C
    ('7306056', '8046720'),   # D
    ('9528048', '9898380'),   # E
]
for old, new in box_moves:
    marker = f'x="{old}" y="2103120"'
    assert xml.count(marker) == 1, (marker, xml.count(marker))
    xml = xml.replace(marker, f'x="{new}" y="2103120"')

# 3. Reposition existing 4 arrows (A->B, B->C, C->D, D->E)
arrow_moves = [
    ('2651760', '4133088'),
    ('4873752', '5984748'),
    ('7095744', '7836408'),
    ('9317736', '9688068'),
]
for old, new in arrow_moves:
    marker = f'x="{old}" y="3154680"'
    assert xml.count(marker) == 1, (marker, xml.count(marker))
    xml = xml.replace(marker, f'x="{new}" y="3154680"')

# 4. Build new X box + new arrow (X -> A), inserted before box A (id=6)
new_shapes = '''      <p:sp>
        <p:nvSpPr>
          <p:cNvPr id="200" name="Rounded Rectangle X"/>
          <p:cNvSpPr/>
          <p:nvPr/>
        </p:nvSpPr>
        <p:spPr>
          <a:xfrm>
            <a:off x="640080" y="2103120"/>
            <a:ext cx="1623060" cy="2377440"/>
          </a:xfrm>
          <a:prstGeom prst="roundRect">
            <a:avLst/>
          </a:prstGeom>
          <a:solidFill>
            <a:srgbClr val="6B0F0F"/>
          </a:solidFill>
          <a:ln w="25400">
            <a:solidFill>
              <a:srgbClr val="FFFFFF"/>
            </a:solidFill>
          </a:ln>
          <a:effectLst/>
        </p:spPr>
        <p:style>
          <a:lnRef idx="1">
            <a:schemeClr val="accent1"/>
          </a:lnRef>
          <a:fillRef idx="3">
            <a:schemeClr val="accent1"/>
          </a:fillRef>
          <a:effectRef idx="2">
            <a:schemeClr val="accent1"/>
          </a:effectRef>
          <a:fontRef idx="minor">
            <a:schemeClr val="lt1"/>
          </a:fontRef>
        </p:style>
        <p:txBody>
          <a:bodyPr wrap="square" tIns="76200" rtlCol="0" anchor="ctr"/>
          <a:lstStyle/>
          <a:p>
            <a:pPr algn="ctr"/>
            <a:r>
              <a:rPr sz="4000" b="1" dirty="0">
                <a:solidFill>
                  <a:srgbClr val="FFFFFF"/>
                </a:solidFill>
                <a:latin typeface="Calibri"/>
              </a:rPr>
              <a:t>X</a:t>
            </a:r>
          </a:p>
          <a:p>
            <a:pPr algn="ctr"/>
            <a:r>
              <a:rPr sz="1300" b="1" dirty="0">
                <a:solidFill>
                  <a:srgbClr val="FFFFFF"/>
                </a:solidFill>
                <a:latin typeface="Calibri"/>
              </a:rPr>
              <a:t>Exsanguinating external</a:t>
            </a:r>
            <a:br>
              <a:rPr dirty="0"/>
            </a:br>
            <a:r>
              <a:rPr sz="1300" b="1" dirty="0">
                <a:solidFill>
                  <a:srgbClr val="FFFFFF"/>
                </a:solidFill>
                <a:latin typeface="Calibri"/>
              </a:rPr>
              <a:t>haemorrhage control</a:t>
            </a:r>
          </a:p>
        </p:txBody>
      </p:sp>
      <p:sp>
        <p:nvSpPr>
          <p:cNvPr id="201" name="Right Arrow X"/>
          <p:cNvSpPr/>
          <p:nvPr/>
        </p:nvSpPr>
        <p:spPr>
          <a:xfrm>
            <a:off x="2281428" y="3154680"/>
            <a:ext cx="210312" cy="274320"/>
          </a:xfrm>
          <a:prstGeom prst="rightArrow">
            <a:avLst/>
          </a:prstGeom>
          <a:solidFill>
            <a:srgbClr val="0B2569"/>
          </a:solidFill>
          <a:ln>
            <a:noFill/>
          </a:ln>
          <a:effectLst/>
        </p:spPr>
        <p:style>
          <a:lnRef idx="1">
            <a:schemeClr val="accent1"/>
          </a:lnRef>
          <a:fillRef idx="3">
            <a:schemeClr val="accent1"/>
          </a:fillRef>
          <a:effectRef idx="2">
            <a:schemeClr val="accent1"/>
          </a:effectRef>
          <a:fontRef idx="minor">
            <a:schemeClr val="lt1"/>
          </a:fontRef>
        </p:style>
        <p:txBody>
          <a:bodyPr rtlCol="0" anchor="ctr"/>
          <a:lstStyle/>
          <a:p>
            <a:pPr algn="ctr"/>
            <a:endParaRPr/>
          </a:p>
        </p:txBody>
      </p:sp>
'''

anchor = '      <p:sp>\n        <p:nvSpPr>\n          <p:cNvPr id="6" name="Rounded Rectangle 5"/>'
assert xml.count(anchor) == 1
xml = xml.replace(anchor, new_shapes + anchor)

open(path, 'w').write(xml)
print("OK, before:", orig_len, "after:", len(xml))
Running Command

cd /tmp/workspace/exsang_task && python3 edit_slide11.py

Running Command

cd /tmp/workspace/exsang_task && python /tmp/skills/pptx/scripts/clean.py unpacked/ && python /tmp/skills/pptx/scripts/office/pack.py unpacked/ output.pptx --original deck.pptx && python3 -c " from pptx import Presentation prs = Presentation('output.pptx') slide = prs.slides[10] for shape in slide.shapes: if shape.has_text_frame and shape.text_frame.text.strip(): print(repr(shape.text_frame.text)) print(shape.shape_id, shape.name, shape.left, shape.top, shape.width, shape.height) "

The layout worked - the box now runs X → A → B → C → D → E, all correctly positioned, and the bottom note text box (640080, 5303520) sits well below the boxes (which end at y=4480560), so nothing overlaps.
The updated slide 11 now reads correctly, matching Sabiston's text: "xABCDE stands for: Exsanguinating external hemorrhage control, Airway maintenance with cervical spine protection, Breathing, Circulation, Disability/neurologic assessment, Exposure and Environmental control" (Sabiston Textbook of Surgery, 22nd ed., Initial Assessment and Management at Healthcare Facility, p. 660).
The file is packed and validated. Here it is:

output

Presentation · PPTX

What I changed on Slide 11 ("The xABCDE Approach – Overview"):
  • Added a new dark-maroon box labeled X - Exsanguinating external hemorrhage control, placed first in the sequence (before A).
  • Shrank the five existing boxes (A-E) proportionally and shifted them right so all six boxes plus arrows fit cleanly across the slide in the same overall row, preserving the original style (rounded rectangle, white border, arrow connectors, Calibri font).
  • Kept colors distinct: A=red, B=orange (existing), X=dark maroon (new) so hemorrhage control visually stands out as the first, most urgent step.
Per Sabiston 22nd edition: the 11th edition of ATLS (2025) modified the primary survey from ABCDE to xABCDE based on evidence supporting immediate control of massive external hemorrhage before airway management. Other slides in the deck (2, 5, 12, 56) already reference "xABCDE" in text - only this diagram slide was missing the visual X box, which is now fixed.

Make 2-3 slides on x- Exsanguinating external hemorrhage before Airway slides

Running Command

cd /tmp/workspace/exsang_task && python3 -c " from pptx import Presentation prs = Presentation('output.pptx') for i, slide in enumerate(prs.slides, 1): if 10 <= i <= 18: texts=[] for shape in slide.shapes: if shape.has_text_frame and shape.text_frame.text.strip(): texts.append(shape.text_frame.text) print('SLIDE', i, '(layout:', slide.slide_layout.name, ')') print(' | '.join(texts)) print('---') "

Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

cd /tmp/workspace/exsang_task && python /tmp/skills/pptx/scripts/add_slide.py unpacked/ slide13.xml && python /tmp/skills/pptx/scripts/add_slide.py unpacked/ slide14.xml && python /tmp/skills/pptx/scripts/add_slide.py unpacked/ slide14.xml

Running Command

cd /tmp/workspace/exsang_task/unpacked && grep -n 'slide13.xml\|slide59.xml\|slide60.xml\|slide61.xml' ppt/_rels/presentation.xml.rels echo --- grep -n 'sldId ' ppt/presentation.xml | head -20 echo ---MAXID--- grep -o 'id="[0-9]*"' ppt/presentation.xml | grep -o '[0-9]*' | sort -n | tail -5

Running Command

cd /tmp/workspace/exsang_task/unpacked && python3 - <<'EOF' import re p = "ppt/presentation.xml" xml = open(p).read() old = '<p:sldId id="269" r:id="rId14"/>' assert old in xml new = ('<p:sldId id="321" r:id="rId65"/>\n' ' <p:sldId id="322" r:id="rId66"/>\n' ' <p:sldId id="323" r:id="rId67"/>\n' ' ' + old) xml = xml.replace(old, new) open(p, 'w').write(xml) print("presentation.xml updated") EOF grep -n 'sldId id="32\|sldId id="269"' ppt/presentation.xml

Running Command

cd /tmp/workspace/exsang_task/unpacked/ppt/slides && grep -n '<a:t>' slide59.xml && echo ---60--- && grep -n '<a:t>' slide60.xml && echo ---61--- && grep -n '<a:t>' slide61.xml

Running Command

cd /tmp/workspace/exsang_task/unpacked/ppt/slides && python3 - <<'EOF' import re # Slide 59: divider p = "slide59.xml" xml = open(p).read() xml = xml.replace("<a:t>A – Airway</a:t>", "<a:t>X – Exsanguinating External Hemorrhage</a:t>") open(p, "w").write(xml) # Slide 60: Why control hemorrhage first p = "slide60.xml" xml = open(p).read() xml = xml.replace("<a:t>Assessing the Airway</a:t>", "<a:t>Why Control Hemorrhage First?</a:t>") repl60 = [ ("<a:t>▸ Look, listen and feel: ask the patient a question – a clear verbal reply confirms a patent airway</a:t>", "<a:t>▸ First priority in the primary survey – control catastrophic external bleeding before Airway (“life before airway”)</a:t>"), ("<a:t>▸ Look for agitation (may indicate hypoxia) or a depressed conscious level (may indicate hypercarbia)</a:t>", "<a:t>▸ TCCC MARCH algorithm (Massive haemorrhage, Airway, Respiration, Circulation, Hypothermia) – adapted from the battlefield to civilian trauma in PHTLS 10th ed. and ATLS 11th ed.</a:t>"), ("<a:t>▸ Look for foreign bodies, facial/mandibular/laryngeal/tracheal fractures that can cause obstruction</a:t>", "<a:t>▸ The xABC protocol has shown improved prehospital survival compared with the standard ABC protocol</a:t>"), ("<a:t>▸ Listen for abnormal sounds – snoring, gurgling, stridor (partial obstruction) or hoarseness</a:t>", "<a:t>▸ Common sources: extremity wounds, scalp lacerations, and junctional zones (groin, axilla, neck)</a:t>"), ("<a:t>▸ Assume a cervical spine injury in any patient with multi-system trauma, especially with head/neck injury and altered consciousness</a:t>", "<a:t>▸ STOP THE BLEED campaign (Hartford Consensus, post-2012) has trained over 2.6 million lay public in 138 countries</a:t>"), ] for old, new in repl60: assert old in xml, old xml = xml.replace(old, new) open(p, "w").write(xml) # Slide 61: Controlling exsanguinating hemorrhage p = "slide61.xml" xml = open(p).read() xml = xml.replace("<a:t>Assessing the Airway</a:t>", "<a:t>Controlling Exsanguinating Hemorrhage</a:t>") repl61 = [ ("<a:t>▸ Look, listen and feel: ask the patient a question – a clear verbal reply confirms a patent airway</a:t>", "<a:t>▸ Direct pressure and wound packing are the first-line manoeuvres for external bleeding</a:t>"), ("<a:t>▸ Look for agitation (may indicate hypoxia) or a depressed conscious level (may indicate hypercarbia)</a:t>", "<a:t>▸ Haemostatic dressings (e.g. kaolin-impregnated gauze) are used when direct pressure alone fails to control bleeding</a:t>"), ("<a:t>▸ Look for foreign bodies, facial/mandibular/laryngeal/tracheal fractures that can cause obstruction</a:t>", "<a:t>▸ Tourniquet: apply 2–3 inches (5–8 cm) proximal to the bleeding site, on skin not clothing, and not over a joint; tighten with the windlass until bleeding stops and record the application time</a:t>"), ("<a:t>▸ Listen for abnormal sounds – snoring, gurgling, stridor (partial obstruction) or hoarseness</a:t>", "<a:t>▸ Civilian tourniquet use has increased, with improved outcomes and no rise in complications</a:t>"), ("<a:t>▸ Assume a cervical spine injury in any patient with multi-system trauma, especially with head/neck injury and altered consciousness</a:t>", "<a:t>▸ Junctional bleeding (groin/axilla/neck) needs a junctional tourniquet or packing; suspected pelvic fracture haemorrhage needs an early pelvic binder</a:t>"), ] for old, new in repl61: assert old in xml, old xml = xml.replace(old, new) open(p, "w").write(xml) print("All three slides edited OK") EOF

Running Command

cd /tmp/workspace/exsang_task && python /tmp/skills/pptx/scripts/clean.py unpacked/ && python /tmp/skills/pptx/scripts/office/pack.py unpacked/ output2.pptx --original output.pptx 2>&1 | tail -5

Running Command

cd /tmp/workspace/exsang_task && python3 -c " from pptx import Presentation prs = Presentation('output2.pptx') for i, slide in enumerate(prs.slides, 1): if 10 <= i <= 16: texts=[] for shape in slide.shapes: if shape.has_text_frame and shape.text_frame.text.strip(): texts.append(shape.text_frame.text) print('SLIDE', i) print(' | '.join(texts)) print('---') "

The 3 new slides are inserted correctly, right before the "A – Airway" slide, and the sequence now flows: Primary Survey → xABCDE overview (with X box) → General Principles → X divider → X rationale → X techniques → A – Airway → ...
Here's the updated deck:

output2

Presentation · PPTX

New Slide 13 - Section divider: "X – Exsanguinating External Hemorrhage"
New Slide 14 - "Why Control Hemorrhage First?"
  • First priority in the primary survey - control catastrophic external bleeding before Airway ("life before airway")
  • TCCC MARCH algorithm (Massive haemorrhage, Airway, Respiration, Circulation, Hypothermia) - adapted from the battlefield to civilian trauma in PHTLS 10th ed. and ATLS 11th ed.
  • The xABC protocol has shown improved prehospital survival compared with the standard ABC protocol
  • Common sources: extremity wounds, scalp lacerations, and junctional zones (groin, axilla, neck)
  • STOP THE BLEED campaign (Hartford Consensus, post-2012) has trained over 2.6 million lay public in 138 countries
New Slide 15 - "Controlling Exsanguinating Hemorrhage"
  • Direct pressure and wound packing are the first-line manoeuvres for external bleeding
  • Haemostatic dressings (e.g. kaolin-impregnated gauze) used when direct pressure alone fails
  • Tourniquet: apply 2-3 inches (5-8 cm) proximal to the bleeding site, on skin not clothing, not over a joint; tighten with the windlass until bleeding stops and record the application time
  • Civilian tourniquet use has increased, with improved outcomes and no rise in complications
  • Junctional bleeding (groin/axilla/neck) needs a junctional tourniquet or packing; suspected pelvic fracture haemorrhage needs an early pelvic binder
All content is sourced from Sabiston Textbook of Surgery, 22nd ed. - "Initial Assessment and Management at Healthcare Facility" and "Field Assessment: x Control of Hemorrhage" sections (p. 654-660), matching the same visual style (title + bullet layout, Calibri font, same divider format) as the existing "A - Airway" slides.
One note: the page-number footer on the new divider slide still reads "14" (copied from the original "A – Airway" divider), so slide 16 (the actual Airway divider) also shows "14" — a cosmetic footer duplication. Let me know if you'd like me to renumber the footers through the rest of the deck to keep them sequential.

Super

Glad it worked out. The updated deck with the X-hemorrhage slides is ready here:

output2

Presentation · PPTX

Just flag if you'd like the footer page numbers cleaned up sequentially, or if you want a tourniquet/STOP THE BLEED image added to slide 15 — happy to do either next.

Can you change slide 11 like in slide 5 format without colours

Reading File
Reading File
Reading File
Running Command

cd /tmp/workspace/exsang_task/unpacked/ppt/slides && grep -n '<a:t>\|<a:off\|<a:ext\|prstGeom prst\|solidFill\|noFill\|sz="' slide5.xml | sed -n '1,200p'

Reading File
Reading File
Running Command

cd /tmp/workspace/exsang_task/unpacked/ppt/slides && grep -n 'srgbClr val=' slide11.xml

Running Command

cd /tmp/workspace/exsang_task/unpacked/ppt/slides && sed -n '825,845p' slide11.xml

Running Command

cd /tmp/workspace/exsang_task/unpacked/ppt/slides && python3 - <<'EOF' import re p = "slide11.xml" xml = open(p).read() # Box fill colors -> no fill (monochrome, like slide 5) box_fills = ["6B0F0F", "C1291D", "D97B0B", "B8860B", "1E7A3C", "1367A3"] for c in box_fills: old = f'<a:solidFill>\n <a:srgbClr val="{c}"/>\n </a:solidFill>' new = '<a:noFill/>' cnt = xml.count(old) assert cnt == 1, (c, cnt) xml = xml.replace(old, new) # Box borders: white -> dark thin outline (222A33), matching slide5 text colour xml = xml.replace( '<a:ln w="25400">\n <a:solidFill>\n <a:srgbClr val="FFFFFF"/>\n </a:solidFill>\n </a:ln>', '<a:ln w="12700">\n <a:solidFill>\n <a:srgbClr val="222A33"/>\n </a:solidFill>\n </a:ln>' ) # Text inside boxes: white -> dark (222A33) since boxes no longer filled xml = xml.replace('<a:srgbClr val="FFFFFF"/>', '<a:srgbClr val="222A33"/>') # Arrows: navy 0B2569 -> dark gray 222A33 (match slide 5 arrow colour) xml = xml.replace('<a:srgbClr val="0B2569"/>', '<a:srgbClr val="222A33"/>') open(p, "w").write(xml) print("slide11 recoloured") EOF grep -n 'srgbClr val=' slide11.xml

Running Command

cd /tmp/workspace/exsang_task/unpacked/ppt/slides && python3 - <<'EOF' import re p = "slide11.xml" xml = open(p).read() # 1. Box fills (roundRect shapes only) -> noFill, monochrome like slide 5 pattern = re.compile( r'(<a:prstGeom prst="roundRect">\s*<a:avLst/>\s*</a:prstGeom>\s*)<a:solidFill>\s*<a:srgbClr val="[0-9A-F]{6}"/>\s*</a:solidFill>' ) xml, n = pattern.subn(r'\1<a:noFill/>', xml) print("box fills replaced:", n) assert n == 6 # 2. Box borders: white -> dark thin outline (222A33) xml, n2 = re.subn( r'<a:ln w="25400">\s*<a:solidFill>\s*<a:srgbClr val="FFFFFF"/>\s*</a:solidFill>\s*</a:ln>', '<a:ln w="12700">\n <a:solidFill>\n <a:srgbClr val="222A33"/>\n </a:solidFill>\n </a:ln>', xml ) print("borders replaced:", n2) assert n2 == 6 # 3. Text inside boxes: white -> dark (222A33) xml, n3 = re.subn(r'<a:srgbClr val="FFFFFF"/>', '<a:srgbClr val="222A33"/>', xml) print("text colours replaced:", n3) # 4. Arrows: navy 0B2569 -> dark gray 222A33 (match slide 5 arrow colour) xml, n4 = re.subn(r'<a:srgbClr val="0B2569"/>', '<a:srgbClr val="222A33"/>', xml) print("arrow colours replaced:", n4) assert n4 == 5 open(p, "w").write(xml) print("DONE") EOF grep -n 'srgbClr val=' slide11.xml

Running Command

cd /tmp/workspace/exsang_task && python /tmp/skills/pptx/scripts/clean.py unpacked/ && python /tmp/skills/pptx/scripts/office/pack.py unpacked/ output3.pptx --original output2.pptx 2>&1 | tail -5

Running Command

cd /tmp/workspace/exsang_task && python3 -c " from pptx import Presentation prs = Presentation('output3.pptx') slide = prs.slides[10] for shape in slide.shapes: if shape.has_text_frame and shape.text_frame.text.strip(): print(repr(shape.text_frame.text)) "

Slide 11 has been converted to match slide 5's plain, monochrome style: the six colored boxes (X, A, B, C, D, E) now have no fill, just thin dark outlines with dark text, and the connecting arrows are dark gray instead of navy - consistent with the flat, colorless look of "The ATLS Sequence – Overview" slide.
Here's the updated deck:

output3

Presentation · PPTX

Changes made on Slide 11:
  • Box fills (maroon, red, orange, gold, green, blue) removed → transparent/no fill
  • Box borders changed from white to a thin dark outline (#222A33)
  • Letter/description text changed from white to dark (#222A33) so it stays readable on the now-transparent background
  • Arrow connectors changed from navy to dark gray (#222A33), matching slide 5's arrow color
  • Left the red header divider bar untouched, since that's a deck-wide design element, not part of the ABCDE box diagram
Let me know if you'd also like the same colorless treatment applied elsewhere, or want the box borders removed entirely for an even flatter look like slide 5's plain text items.
This is a shared conversation. Sign in to Orris to start your own chat.