Rotation of gut for mbbs 1st year

Reading File
Finding Sources
Searching Images

rotation of midgut embryology diagram

Anatomical diagram illustrating the embryological development of the foregut and midgut, specifically focusing on the dorsal mesoesophagus, mesogastrium, and stomach ligaments. The illustration series shows the evolution of the gastrointestinal tract across four stages. Key visible structures include the dorsal aorta, the stomach, and the primary intestinal loop consisting of the midgut loop and vitello-intestinal duct. Developmental landmarks such as the dorsal and ventral pancreas buds, gall bladder, and spleen are shown in their respective anatomical positions. The diagram highlights the transformation of the mesenteries: the ventral mesentery (lesser omentum) and the dorsal mesentery (greater omentum). The latter is depicted as it expands to encapsulate the superior mesenteric artery and eventually forms the omental bursa and complex peritoneal folds. In the later stages, the diagram demonstrates the rotation of the stomach, the elongation of the duodenum, and the final spatial organization of the spleen and pancreas within the posterior abdominal wall context.

Anatomical diagram illustrating the embryological development of the foregut and midgut, specifically focusing on the dorsal mesoesophagus, mesogastrium, and stomach ligaments. The illustration series shows the evolution of the gastrointestinal tract across four stages. Key visible structures include the dorsal aorta, the stomach, and the primary intestinal loop consisting of the midgut loop and vitello-intestinal duct. Developmental landmarks such as the dorsal and ventral pancreas buds, gall bladder, and spleen are shown in their respective anatomical positions. The diagram highlights the transformation of the mesenteries: the ventral mesentery (lesser omentum) and the dorsal mesentery (greater omentum). The latter is depicted as it expands to encapsulate the superior mesenteric artery and eventually forms the omental bursa and complex peritoneal folds. In the later stages, the diagram demonstrates the rotation of the stomach, the elongation of the duodenum, and the final spatial organization of the spleen and pancreas within the posterior abdominal wall context.

This intraoperative clinical photograph displays an open abdominal surgical field during an exploratory laparotomy. The image provides a visual demonstration of midgut nonrotation, a component of heterotaxy syndrome. Anatomical structures are labeled with white arrows and text: the appendix and terminal ileum are atypically located in the left lower quadrant, while the colon is positioned within the pelvis. A surgeon's gloved hands are visible using forceps and manual retraction to isolate the appendix for identification. Large metal retractors maintain the surgical incision. The bowel segments appear healthy with a glistening, moist serosal surface and reddish-pink vascularization, showing no signs of acute inflammation or ischemia. This educational image illustrates abnormal embryologic development where midgut structures failed to complete the standard 270-degree counterclockwise rotation, resulting in the reversed spatial arrangement of the cecal-appendiceal complex and small intestine. The photograph is highly relevant for surgical training and embryology education regarding congenital visceral anomalies.

This intraoperative clinical photograph displays an open abdominal surgical field during an exploratory laparotomy. The image provides a visual demonstration of midgut nonrotation, a component of heterotaxy syndrome. Anatomical structures are labeled with white arrows and text: the appendix and terminal ileum are atypically located in the left lower quadrant, while the colon is positioned within the pelvis. A surgeon's gloved hands are visible using forceps and manual retraction to isolate the appendix for identification. Large metal retractors maintain the surgical incision. The bowel segments appear healthy with a glistening, moist serosal surface and reddish-pink vascularization, showing no signs of acute inflammation or ischemia. This educational image illustrates abnormal embryologic development where midgut structures failed to complete the standard 270-degree counterclockwise rotation, resulting in the reversed spatial arrangement of the cecal-appendiceal complex and small intestine. The photograph is highly relevant for surgical training and embryology education regarding congenital visceral anomalies.

This contrast-enhanced abdominal CT study in axial (a, b) and coronal reformatted (c) views demonstrates a rare variant of midgut malrotation known as reversed rotation. Key diagnostic features include a 'retro-arterial' course of the transverse colon (T) and proximal jejunum (J), which are seen passing posterior to the superior mesenteric artery (SMA) and vein (SMV), effectively sandwiched between these mesenteric vessels and the aorta. In image 'a', at the level of the pancreas (P), the duodenum (D) crosses anterior (ventral) to the mesenteric vessels, contrary to normal anatomy. There is a notable inversion of the mesenteric vessels, with the SMV (V) situated to the left of the SMA (white arrow), often associated with malrotation. Aplasia of the pancreatic uncinate process is also visible. Image 'b' shows the cecum and ileocecal valve (*) in an aberrant midline position. The coronal view (c) confirms the normal position of the hindgut components, including the left colic flexure (white arrow) and descending colon (DC), while highlighting the abnormal posterior positioning of the midgut structures relative to the mesenteric root.

This contrast-enhanced abdominal CT study in axial (a, b) and coronal reformatted (c) views demonstrates a rare variant of midgut malrotation known as reversed rotation. Key diagnostic features include a 'retro-arterial' course of the transverse colon (T) and proximal jejunum (J), which are seen passing posterior to the superior mesenteric artery (SMA) and vein (SMV), effectively sandwiched between these mesenteric vessels and the aorta. In image 'a', at the level of the pancreas (P), the duodenum (D) crosses anterior (ventral) to the mesenteric vessels, contrary to normal anatomy. There is a notable inversion of the mesenteric vessels, with the SMV (V) situated to the left of the SMA (white arrow), often associated with malrotation. Aplasia of the pancreatic uncinate process is also visible. Image 'b' shows the cecum and ileocecal valve (*) in an aberrant midline position. The coronal view (c) confirms the normal position of the hindgut components, including the left colic flexure (white arrow) and descending colon (DC), while highlighting the abnormal posterior positioning of the midgut structures relative to the mesenteric root.

An anatomical line drawing illustrating the intraoperative findings of intestinal malrotation (non-rotation type) within the abdominal cavity. The illustration depicts the small intestine predominantly sequestered on the right side of the abdomen. The ascending colon and cecum are notably displaced from their typical retroperitoneal position and are instead located along the midline. Key pathological structures are labeled: 'Ladd's band' is shown as a fibrous band of peritoneum crossing the small bowel loops; a 'tumor' is identified in the ileocecal/appendiceal region along the midline; and an 'adhesion' is marked connecting the tumor region to the adjacent transverse colon. The diagram effectively demonstrates the abnormal anatomical relationship between the midgut structures and the lack of standard colonic fixation, common in adult presentations of congenital malrotation complicated by malignancy.

An anatomical line drawing illustrating the intraoperative findings of intestinal malrotation (non-rotation type) within the abdominal cavity. The illustration depicts the small intestine predominantly sequestered on the right side of the abdomen. The ascending colon and cecum are notably displaced from their typical retroperitoneal position and are instead located along the midline. Key pathological structures are labeled: 'Ladd's band' is shown as a fibrous band of peritoneum crossing the small bowel loops; a 'tumor' is identified in the ileocecal/appendiceal region along the midline; and an 'adhesion' is marked connecting the tumor region to the adjacent transverse colon. The diagram effectively demonstrates the abnormal anatomical relationship between the midgut structures and the lack of standard colonic fixation, common in adult presentations of congenital malrotation complicated by malignancy.

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Loading Image
Loading Image
I now have all the content needed. Let me compile the comprehensive answer for MBBS 1st year.

Rotation of the Gut (Midgut Rotation) - MBBS 1st Year Embryology

Source: The Developing Human - Clinically Oriented Embryology (Moore & Persaud)

Overview

The midgut (the part of the primitive gut supplied by the superior mesenteric artery) undergoes a complex process of herniation, rotation, and retraction between weeks 6-11 of embryonic development. The total rotation is 270° counterclockwise around the axis of the superior mesenteric artery (SMA).

Derivatives of the Midgut

The midgut gives rise to:
  • Small intestine - duodenum (distal to the bile duct opening), jejunum, ileum
  • Cecum, appendix, ascending colon, and the right 1/2 to 2/3 of the transverse colon
All these structures are supplied by the superior mesenteric artery.

Step-by-Step Events

Stage 1 - Physiological Umbilical Herniation (Week 6)

As the midgut elongates rapidly, the abdominal cavity is too small to contain it. A ventral U-shaped midgut loop herniates into the proximal umbilical cord - this is called physiological umbilical herniation.
The loop has two limbs:
  • Cranial limb - becomes the distal duodenum, jejunum, and proximal ileum
  • Caudal limb - becomes the distal ileum, cecum, appendix, ascending colon, and right 2/3 of transverse colon
The apex of the loop communicates with the yolk sac via the omphaloenteric (vitelline) duct (which normally obliterates before birth - if it persists, it forms a Meckel diverticulum, seen in ~2% of the population).

Stage 2 - First 90° Rotation (While in the Umbilical Cord)

While still herniated outside, the midgut loop rotates 90° counterclockwise around the SMA axis.
  • The cranial limb moves to the right
  • The caudal limb moves to the left
  • During this rotation, the cranial limb elongates extensively, forming the coils of jejunum and ileum
  • This rotation is considered a passive process resulting from differential growth

Stage 3 - Retraction / Return to Abdomen (Week 10)

Around the 10th week, the intestines return to the abdominal cavity (reduction of the midgut hernia). The triggers for return include:
  • Relative decrease in size of liver and kidneys
  • Enlargement of the abdominal cavity
The small intestine (cranial limb) returns first, passing posterior to the SMA, and occupies the central abdomen.

Stage 4 - Further 180° Rotation During Retraction

As the large intestine (caudal limb) returns, it undergoes a further 180° counterclockwise rotation - bringing the total rotation to 270° counterclockwise.
  • The cecal swelling (primordium of cecum and appendix) initially lies in the upper right abdomen (subhepatic position)
  • As the ascending colon elongates, the cecum descends to the right iliac fossa - its final adult position

Summary Table of Rotation

StageLocationDegrees RotatedTotal
Initial positionIn umbilical cord
While in cordUmbilical cord+90° CCW90°
During retractionReturning to abdomen+180° CCW270°
Total = 270° counterclockwise rotation around the SMA

The Classic Diagram (The Developing Human, Fig. 11.13)

Herniation and rotation of the midgut loop - stages A through E showing the full 270° counterclockwise rotation around the SMA axis
A = Week 6 herniation begins | B = 90° rotation in cord | C = ~10 weeks, intestines returning | D = ~11 weeks, 270° complete | E = final position with cecum in right iliac fossa

Fixation of the Intestines

After retraction, the mesenteries fuse with the posterior abdominal wall:
  • Duodenum - mesentery is absorbed → becomes retroperitoneal (except the 1st part, which is foregut-derived)
  • Pancreas (head) - also becomes retroperitoneal
  • Ascending colon - mesentery fuses with parietal peritoneum → retroperitoneal
  • Descending colon - also retroperitoneal
  • Jejunum and ileum - retain their mesentery → remain intraperitoneal
Fixation of intestines showing the mesenteric attachments and retroperitoneal structures

Cecum and Appendix Development

  • The cecal swelling appears in the 6th week on the antimesenteric border of the caudal limb
  • The apex grows slowly → becomes the appendix
  • At birth, the appendix is relatively long and arises from the apex of the cecum
  • Postnatal: unequal wall growth shifts the appendix to the medial side of the cecum
  • In ~64% of people, the appendix is retrocecal in position

Congenital Anomalies of Gut Rotation

AnomalyMechanismKey Feature
Non-rotation (Intestinal nonrotation)Only the first 90° rotation occurs; intestine returns without further rotationSmall intestine on right side, colon on left; Ladd's bands
MalrotationIncomplete rotation and fixationCecum near pylorus (subhepatic); risk of midgut volvulus
Reversed rotationLoop rotates 90° clockwise instead of CCWTransverse colon passes posterior to SMA
OmphaloceleFailure of intestines to return to abdomenGut remains in umbilical cord covered by peritoneum + amnion
Midgut volvulusComplication of malrotation - gut twists around SMASurgical emergency; presents with bilious vomiting in neonate
Meckel diverticulumPersistent vitelline ductFound in ~2% population; 2 feet from ileocecal valve; "rule of 2s"

High-Yield Points for Exams

  1. Rotation is 270° counterclockwise around the SMA
  2. Herniation occurs at week 6, retraction at week 10
  3. Cranial limb → small intestine (elongates to form jejunum/ileum loops)
  4. Caudal limb → cecum, appendix, ascending colon, proximal transverse colon
  5. First 90° occurs while in the umbilical cord
  6. Final 180° occurs as intestines return to the abdomen
  7. Structures that become retroperitoneal: duodenum (2nd-4th parts), pancreas, ascending colon, descending colon
  8. Meckel diverticulum = rule of 2s: 2% population, 2 feet from ileocecal valve, 2 inches long, may have 2 types of ectopic tissue (gastric, pancreatic)
  9. Malrotation → risk of midgut volvulus = surgical emergency
  10. Non-rotation = only 90° rotation → small bowel on right, colon on left
  • The Developing Human: Clinically Oriented Embryology, Moore & Persaud - Chapter 11 (Midgut, p. 632-639)
  • Sabiston Textbook of Surgery - Embryology section (Chapter 91)

Create a summary document on midgut rotation stages

Reading File
Running Command

ls -la /tmp/workspace/ 2>/dev/null || echo "workspace does not exist yet"

Running Command

mkdir -p /tmp/workspace/midgut-rotation

Writing File

~/midgut-rotation/create_doc.py

from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
from docx.oxml import OxmlElement

doc = Document()

# ── Page margins ──────────────────────────────────────────────────
from docx.shared import Cm
section = doc.sections[0]
section.top_margin    = Cm(2.2)
section.bottom_margin = Cm(2.2)
section.left_margin   = Cm(2.5)
section.right_margin  = Cm(2.5)

# ── Default Normal style ──────────────────────────────────────────
normal = doc.styles["Normal"]
normal.font.name = "Arial"
normal.font.size = Pt(11)

# Helper: set paragraph shading
def shade_para(para, fill_hex):
    pPr = para._p.get_or_add_pPr()
    shd = OxmlElement("w:shd")
    shd.set(qn("w:val"), "clear")
    shd.set(qn("w:color"), "auto")
    shd.set(qn("w:fill"), fill_hex)
    pPr.append(shd)

# Helper: add a coloured heading paragraph
def add_colour_heading(doc, text, level, rgb):
    h = doc.add_heading(text, level=level)
    for run in h.runs:
        run.font.color.rgb = RGBColor(*rgb)
        run.font.name = "Arial"
    h.runs[0].font.bold = True
    return h

# ── TITLE ─────────────────────────────────────────────────────────
title = doc.add_heading("Rotation of the Gut (Midgut Rotation)", level=0)
title.alignment = WD_ALIGN_PARAGRAPH.CENTER
for run in title.runs:
    run.font.color.rgb = RGBColor(0x1A, 0x53, 0x76)   # dark blue
    run.font.name = "Arial"
    run.font.size = Pt(18)

sub = doc.add_paragraph("MBBS 1st Year Embryology  |  Source: The Developing Human (Moore & Persaud)")
sub.alignment = WD_ALIGN_PARAGRAPH.CENTER
sub.runs[0].font.color.rgb = RGBColor(0x55, 0x55, 0x55)
sub.runs[0].font.size = Pt(10)
sub.runs[0].font.italic = True

doc.add_paragraph()   # spacer

# ── SECTION 1: Overview ───────────────────────────────────────────
add_colour_heading(doc, "1. Overview", 1, (0x1A, 0x53, 0x76))

p = doc.add_paragraph(
    "The midgut is the segment of the primitive gut supplied by the superior mesenteric artery (SMA). "
    "Between weeks 6–11, it undergoes a series of herniation, rotation, and retraction events. "
    "The total rotation is 270° counterclockwise around the axis of the SMA."
)
p.paragraph_format.space_after = Pt(6)

# ── SECTION 2: Midgut Derivatives ────────────────────────────────
add_colour_heading(doc, "2. Derivatives of the Midgut", 1, (0x1A, 0x53, 0x76))

bullets = [
    "Small intestine — duodenum (distal to bile duct opening), jejunum, ileum",
    "Cecum, appendix, ascending colon, and right 1/2 to 2/3 of the transverse colon",
    "All supplied by the superior mesenteric artery",
]
for b in bullets:
    bp = doc.add_paragraph(b, style="List Bullet")
    bp.paragraph_format.space_after = Pt(2)

doc.add_paragraph()

# ── SECTION 3: Stages ─────────────────────────────────────────────
add_colour_heading(doc, "3. Stages of Midgut Rotation", 1, (0x1A, 0x53, 0x76))

stages = [
    {
        "title": "Stage 1 — Physiological Umbilical Herniation (Week 6)",
        "color": (0xC0, 0x39, 0x2B),
        "points": [
            "Rapid midgut elongation; abdominal cavity too small to contain it.",
            "A U-shaped midgut loop herniates into the proximal umbilical cord.",
            "The loop has a cranial limb (→ jejunum/ileum) and a caudal limb (→ cecum/colon).",
            "The apex communicates with the yolk sac via the omphaloenteric (vitelline) duct.",
            "If the duct persists: Meckel diverticulum (~2% population).",
        ],
    },
    {
        "title": "Stage 2 — First 90° Counterclockwise Rotation (While in cord, Week 6–10)",
        "color": (0x17, 0x7E, 0x4F),
        "points": [
            "Rotation occurs around the SMA axis while still outside the abdomen.",
            "Cranial limb moves to the RIGHT.",
            "Caudal limb moves to the LEFT.",
            "Cranial limb elongates markedly, forming loops of jejunum and ileum.",
            "Rotation is a passive process driven by differential growth.",
        ],
    },
    {
        "title": "Stage 3 — Retraction / Return to Abdomen (Week 10)",
        "color": (0x7D, 0x3C, 0x98),
        "points": [
            "Intestines return to the abdominal cavity (~10th week).",
            "Triggers: enlargement of abdominal cavity; relative decrease in liver/kidney size.",
            "Small intestine (cranial limb) returns first, passing posterior to the SMA.",
            "Small intestine occupies the central abdomen.",
        ],
    },
    {
        "title": "Stage 4 — Further 180° Counterclockwise Rotation (During Retraction)",
        "color": (0xE6, 0x7E, 0x22),
        "points": [
            "Large intestine (caudal limb) undergoes an additional 180° CCW rotation.",
            "Total rotation now = 270° counterclockwise.",
            "Cecum initially is subhepatic (below the liver) in the upper right abdomen.",
            "As ascending colon elongates, cecum descends to the right iliac fossa.",
            "Final adult position: cecum and appendix in right iliac fossa.",
        ],
    },
]

for stage in stages:
    h2 = doc.add_heading(stage["title"], level=2)
    for run in h2.runs:
        r, g, b = stage["color"]
        run.font.color.rgb = RGBColor(r, g, b)
        run.font.name = "Arial"
    for pt in stage["points"]:
        bp = doc.add_paragraph(pt, style="List Bullet")
        bp.paragraph_format.left_indent = Inches(0.25)
        bp.paragraph_format.space_after = Pt(2)
    doc.add_paragraph()

# ── SECTION 4: Summary Table ──────────────────────────────────────
add_colour_heading(doc, "4. Summary Table — Rotation at a Glance", 1, (0x1A, 0x53, 0x76))

table = doc.add_table(rows=1, cols=4)
table.style = "Table Grid"

# Header row
hdr_cells = table.rows[0].cells
headers = ["Stage", "Location", "Degrees (CCW)", "Running Total"]
for i, hdr in enumerate(headers):
    hdr_cells[i].text = hdr
    for para in hdr_cells[i].paragraphs:
        for run in para.runs:
            run.bold = True
            run.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF)
            run.font.name = "Arial"
            run.font.size = Pt(10)
    # blue fill header
    tc = hdr_cells[i]._tc
    tcPr = tc.get_or_add_tcPr()
    shd = OxmlElement("w:shd")
    shd.set(qn("w:val"), "clear")
    shd.set(qn("w:color"), "auto")
    shd.set(qn("w:fill"), "1A5376")
    tcPr.append(shd)

data_rows = [
    ["Initial", "In umbilical cord", "0°", "0°"],
    ["Stage 2", "Umbilical cord", "+90°", "90°"],
    ["Stage 4", "Returning to abdomen", "+180°", "270°"],
    ["Final", "In abdomen (fixed)", "—", "270° total"],
]

fills = ["FDFEFE", "EAF0F6", "FDFEFE", "D5F5E3"]

for i, row_data in enumerate(data_rows):
    row = table.add_row()
    for j, val in enumerate(row_data):
        row.cells[j].text = val
        for para in row.cells[j].paragraphs:
            for run in para.runs:
                run.font.name = "Arial"
                run.font.size = Pt(10)
        tc = row.cells[j]._tc
        tcPr = tc.get_or_add_tcPr()
        shd = OxmlElement("w:shd")
        shd.set(qn("w:val"), "clear")
        shd.set(qn("w:color"), "auto")
        shd.set(qn("w:fill"), fills[i])
        tcPr.append(shd)

doc.add_paragraph()

# ── SECTION 5: Fixation ────────────────────────────────────────────
add_colour_heading(doc, "5. Fixation of Intestines", 1, (0x1A, 0x53, 0x76))

fixation = doc.add_paragraph(
    "After retraction, mesenteries fuse with the posterior abdominal wall, making several structures retroperitoneal:"
)
fixation.paragraph_format.space_after = Pt(4)

fixation_points = [
    "Duodenum (2nd–4th parts) — retroperitoneal (1st part remains intraperitoneal)",
    "Pancreas (head and body) — retroperitoneal",
    "Ascending colon — retroperitoneal",
    "Descending colon — retroperitoneal",
    "Jejunum and ileum — retain mesentery; remain intraperitoneal",
    "Transverse colon — intraperitoneal (has transverse mesocolon)",
    "Sigmoid colon — intraperitoneal (has sigmoid mesocolon)",
]
for pt in fixation_points:
    bp = doc.add_paragraph(pt, style="List Bullet")
    bp.paragraph_format.space_after = Pt(2)

doc.add_paragraph()

# ── SECTION 6: Congenital Anomalies ───────────────────────────────
add_colour_heading(doc, "6. Congenital Anomalies of Gut Rotation", 1, (0x1A, 0x53, 0x76))

anom_table = doc.add_table(rows=1, cols=3)
anom_table.style = "Table Grid"

anom_hdrs = ["Anomaly", "Mechanism", "Key Features"]
anom_row = anom_table.rows[0].cells
for i, h in enumerate(anom_hdrs):
    anom_row[i].text = h
    for para in anom_row[i].paragraphs:
        for run in para.runs:
            run.bold = True
            run.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF)
            run.font.name = "Arial"
            run.font.size = Pt(10)
    tc = anom_row[i]._tc
    tcPr = tc.get_or_add_tcPr()
    shd = OxmlElement("w:shd")
    shd.set(qn("w:val"), "clear")
    shd.set(qn("w:color"), "auto")
    shd.set(qn("w:fill"), "1A5376")
    tcPr.append(shd)

anomalies = [
    ("Non-rotation", "Only 90° rotation completed", "Small bowel on right, colon on left; Ladd's bands present"),
    ("Malrotation", "Incomplete 270° rotation/fixation", "Cecum subhepatic; risk of midgut volvulus"),
    ("Reversed rotation", "Loop rotates clockwise", "Transverse colon passes posterior to SMA"),
    ("Omphalocele", "Failure of intestines to return to abdomen", "Gut in umbilical cord; covered by peritoneum + amnion"),
    ("Midgut volvulus", "Complication of malrotation", "Bilious vomiting in neonate; surgical emergency"),
    ("Meckel diverticulum", "Persistent vitelline duct", "Rule of 2s: 2%, 2 feet from ICV, 2 inches long"),
]

anom_fills = ["FDFEFE", "EAF0F6", "FDFEFE", "EAF0F6", "FDFEFE", "EAF0F6"]

for k, (name, mech, feat) in enumerate(anomalies):
    row = anom_table.add_row()
    vals = [name, mech, feat]
    for j, val in enumerate(vals):
        row.cells[j].text = val
        for para in row.cells[j].paragraphs:
            for run in para.runs:
                run.font.name = "Arial"
                run.font.size = Pt(10)
                if j == 0:
                    run.bold = True
        tc = row.cells[j]._tc
        tcPr = tc.get_or_add_tcPr()
        shd = OxmlElement("w:shd")
        shd.set(qn("w:val"), "clear")
        shd.set(qn("w:color"), "auto")
        shd.set(qn("w:fill"), anom_fills[k])
        tcPr.append(shd)

doc.add_paragraph()

# ── SECTION 7: High-Yield Exam Points ────────────────────────────
add_colour_heading(doc, "7. High-Yield Exam Points", 1, (0x1A, 0x53, 0x76))

exam_box = doc.add_paragraph()
shade_para(exam_box, "EBF5FB")
exam_box.paragraph_format.space_after = Pt(2)
exam_box.paragraph_format.space_before = Pt(2)

high_yield = [
    "Total rotation = 270° counterclockwise around the SMA axis.",
    "Herniation begins at week 6; retraction at week 10.",
    "Cranial limb → small intestine; caudal limb → cecum, appendix, ascending colon, proximal transverse colon.",
    "First 90° occurs while in the umbilical cord.",
    "Remaining 180° occurs as the intestines return to the abdomen.",
    "Retroperitoneal structures: D2–D4 duodenum, pancreas, ascending colon, descending colon.",
    "Meckel diverticulum = Rule of 2s: 2% population, 2 feet from ICV, 2 inches long, 2 types of ectopic tissue.",
    "Malrotation → midgut volvulus = surgical emergency (bilious vomiting in neonate).",
    "Non-rotation = only 90° completed → small bowel on right, colon on left.",
    "64% of people have a retrocecal appendix.",
]

for pt in high_yield:
    bp = doc.add_paragraph(f"✓  {pt}", style="List Bullet")
    bp.paragraph_format.space_after = Pt(3)
    for run in bp.runs:
        run.font.name = "Arial"
        run.font.size = Pt(11)

doc.add_paragraph()

# ── Footer reference ──────────────────────────────────────────────
ref_para = doc.add_paragraph(
    "Reference: The Developing Human — Clinically Oriented Embryology, Moore & Persaud | "
    "Sabiston Textbook of Surgery, 21e"
)
ref_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
ref_para.runs[0].font.size = Pt(9)
ref_para.runs[0].font.italic = True
ref_para.runs[0].font.color.rgb = RGBColor(0x77, 0x77, 0x77)

# ── Save ──────────────────────────────────────────────────────────
out = "/tmp/workspace/midgut-rotation/Midgut_Rotation_Summary.docx"
doc.save(out)
print(f"Saved: {out}")
Running Command

python3 /tmp/workspace/midgut-rotation/create_doc.py

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/midgut-rotation/Midgut_Rotation_Summary.docx') for p in doc.paragraphs[:30]: if p.text.strip(): print(f'[{p.style.name}] {p.text[:80]}') "

The document is generated and verified. Here it is:

Midgut Rotation Summary

Word Document · DOCX


What's inside the document:
SectionContent
1. OverviewWhat the midgut is, total 270° CCW rotation around SMA
2. Derivatives of the MidgutAll structures derived from the midgut
3. Stages of Midgut RotationAll 4 stages in detail with bullet points, colour-coded headings
4. Summary TableStage / Location / Degrees / Running total at a glance
5. Fixation of IntestinesWhich structures become retroperitoneal and why
6. Congenital AnomaliesColour-coded table: non-rotation, malrotation, omphalocele, Meckel diverticulum, volvulus
7. High-Yield Exam Points10 most exam-important facts in a highlighted box
The document is formatted with blue section headings, alternating row colours in tables, and a footer citing Moore & Persaud and Sabiston - ready to print or study from directly.
This is a shared conversation. Sign in to Orris to start your own chat.