Rotation of gut for mbbs 1st year
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.

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.

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.
| Stage | Location | Degrees Rotated | Total |
|---|---|---|---|
| Initial position | In umbilical cord | 0° | 0° |
| While in cord | Umbilical cord | +90° CCW | 90° |
| During retraction | Returning to abdomen | +180° CCW | 270° |


| Anomaly | Mechanism | Key Feature |
|---|---|---|
| Non-rotation (Intestinal nonrotation) | Only the first 90° rotation occurs; intestine returns without further rotation | Small intestine on right side, colon on left; Ladd's bands |
| Malrotation | Incomplete rotation and fixation | Cecum near pylorus (subhepatic); risk of midgut volvulus |
| Reversed rotation | Loop rotates 90° clockwise instead of CCW | Transverse colon passes posterior to SMA |
| Omphalocele | Failure of intestines to return to abdomen | Gut remains in umbilical cord covered by peritoneum + amnion |
| Midgut volvulus | Complication of malrotation - gut twists around SMA | Surgical emergency; presents with bilious vomiting in neonate |
| Meckel diverticulum | Persistent vitelline duct | Found in ~2% population; 2 feet from ileocecal valve; "rule of 2s" |
Create a summary document on midgut rotation stages
ls -la /tmp/workspace/ 2>/dev/null || echo "workspace does not exist yet"
mkdir -p /tmp/workspace/midgut-rotation
~/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}")
python3 /tmp/workspace/midgut-rotation/create_doc.py
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]}') "
Midgut Rotation Summary
Word Document · DOCX
| Section | Content |
|---|---|
| 1. Overview | What the midgut is, total 270° CCW rotation around SMA |
| 2. Derivatives of the Midgut | All structures derived from the midgut |
| 3. Stages of Midgut Rotation | All 4 stages in detail with bullet points, colour-coded headings |
| 4. Summary Table | Stage / Location / Degrees / Running total at a glance |
| 5. Fixation of Intestines | Which structures become retroperitoneal and why |
| 6. Congenital Anomalies | Colour-coded table: non-rotation, malrotation, omphalocele, Meckel diverticulum, volvulus |
| 7. High-Yield Exam Points | 10 most exam-important facts in a highlighted box |