Make me flow charts of this in easy way and pfd
cd /home/daytona/workspace && python3 -c " import pdfplumber path = '/home/daytona/workspace/attachments/63910177-8e6d-4885-a3ce-39fea7d23ef3/Here is a thorough definition and breakdown of Ana.pdf' with pdfplumber.open(path) as pdf: print(f'Pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): print(f'\\n=== PAGE {i+1} ===') print(page.extract_text()) "
mkdir -p /home/daytona/workspace/anatomical-flowcharts && python3 << 'PYEOF' import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.patches import FancyBboxPatch, FancyArrowPatch import matplotlib.patheffects as pe import numpy as np from matplotlib.backends.backend_pdf import PdfPages # Color palette C_TITLE = "#1a237e" # deep navy C_HEAD = "#283593" # section header C_BOX1 = "#3949AB" # main box C_BOX2 = "#7986CB" # secondary box C_BOX3 = "#C5CAE9" # light box (text dark) C_ARROW = "#5C6BC0" C_BG = "#F5F5FF" C_GREEN = "#2E7D32" C_GREEN2 = "#A5D6A7" C_ORANGE = "#E65100" C_ORANGE2 = "#FFCC80" C_PURPLE = "#6A1B9A" C_PURPLE2 = "#CE93D8" WHITE = "white" def draw_rounded_box(ax, x, y, w, h, text, facecolor, textcolor="white", fontsize=10, bold=False, radius=0.04, zorder=3, alpha=1.0): box = FancyBboxPatch((x - w/2, y - h/2), w, h, boxstyle=f"round,pad={radius}", facecolor=facecolor, edgecolor="white", linewidth=1.5, zorder=zorder, alpha=alpha) ax.add_patch(box) weight = "bold" if bold else "normal" ax.text(x, y, text, ha="center", va="center", fontsize=fontsize, color=textcolor, fontweight=weight, zorder=zorder+1, wrap=True, multialignment="center") def arrow(ax, x1, y1, x2, y2, color=C_ARROW, lw=2): ax.annotate("", xy=(x2, y2), xytext=(x1, y1), arrowprops=dict(arrowstyle="-|>", color=color, lw=lw, mutation_scale=18), zorder=2) # ───────────────────────────────────────────── # PAGE 1 – Overview + Anatomical Position # ───────────────────────────────────────────── def page1(): fig, ax = plt.subplots(figsize=(11, 8.5)) fig.patch.set_facecolor(C_BG) ax.set_facecolor(C_BG) ax.set_xlim(0, 10); ax.set_ylim(0, 9) ax.axis("off") # Title banner banner = FancyBboxPatch((0, 8.3), 10, 0.65, boxstyle="round,pad=0.05", facecolor=C_TITLE, edgecolor="none", zorder=4) ax.add_patch(banner) ax.text(5, 8.63, "ANATOMICAL NOMENCLATURE – Overview Flowchart", ha="center", va="center", fontsize=14, color=WHITE, fontweight="bold", zorder=5) # Central definition box draw_rounded_box(ax, 5, 7.55, 8.5, 0.65, "Anatomical Nomenclature: standardized terms for location, orientation & relationships of body structures", C_BOX1, WHITE, fontsize=9.5, bold=False) # Four main branches branches = [ (1.3, 6.2, "1. Anatomical\nPosition", C_GREEN), (3.7, 6.2, "2. Anatomical\nPlanes", C_BOX1), (6.3, 6.2, "3. Terms of\nDirection", C_ORANGE), (8.7, 6.2, "4. Inclusive\nTerminology", C_PURPLE), ] for bx, by, bt, bc in branches: arrow(ax, 5, 7.22, bx, 6.55, color=bc) draw_rounded_box(ax, bx, by, 2.2, 0.65, bt, bc, WHITE, fontsize=9.5, bold=True) # ---- Section 1: Anatomical Position ---- ax.text(1.3, 5.65, "Anatomical Position", ha="center", va="center", fontsize=9, color=C_GREEN, fontweight="bold") pos_items = [ "Body standing upright", "Feet together, toes forward", "Hands by sides, palms forward", "Face looking forward", "Eyes open, focused ahead", "Inferior orbit = top of ear opening (horizontal plane)", ] for i, item in enumerate(pos_items): yy = 5.22 - i*0.55 draw_rounded_box(ax, 1.3, yy, 2.3, 0.42, item, C_GREEN2, C_GREEN, fontsize=7.8, bold=False) if i > 0: arrow(ax, 1.3, yy + 0.55 - 0.21, 1.3, yy + 0.21, color=C_GREEN, lw=1.5) ax.text(5, 0.35, "Source: Gray's Anatomy for Students, Chapter 1, pp. 18-20", ha="center", fontsize=7.5, color="#555555", style="italic") return fig # ───────────────────────────────────────────── # PAGE 2 – Anatomical Planes # ───────────────────────────────────────────── def page2(): fig, ax = plt.subplots(figsize=(11, 8.5)) fig.patch.set_facecolor(C_BG) ax.set_facecolor(C_BG) ax.set_xlim(0, 10); ax.set_ylim(0, 9) ax.axis("off") # Banner banner = FancyBboxPatch((0, 8.3), 10, 0.65, boxstyle="round,pad=0.05", facecolor=C_BOX1, edgecolor="none", zorder=4) ax.add_patch(banner) ax.text(5, 8.63, "ANATOMICAL PLANES – Flowchart", ha="center", va="center", fontsize=14, color=WHITE, fontweight="bold", zorder=5) # Top node draw_rounded_box(ax, 5, 7.55, 5, 0.6, "3 Major Groups of Anatomical Planes", C_BOX1, WHITE, fontsize=11, bold=True) planes = [ (1.8, 6.1, "Coronal\n(Frontal) Plane", "Vertical", "Anterior (front) vs\nPosterior (back)", "#1565C0", "#BBDEFB"), (5.0, 6.1, "Sagittal Plane", "Vertical, ⊥ to Coronal", "Right vs Left parts", "#1B5E20", "#C8E6C9"), (8.2, 6.1, "Transverse\n(Axial) Plane", "Horizontal", "Superior (upper) vs\nInferior (lower)", "#E65100", "#FFE0B2"), ] for px, py, pname, orient, divides, dark, light in planes: arrow(ax, 5, 7.25, px, 6.42, color=dark) draw_rounded_box(ax, px, py, 2.8, 0.65, pname, dark, WHITE, fontsize=10, bold=True) # Orientation draw_rounded_box(ax, px, py-1.0, 2.6, 0.55, f"Orientation:\n{orient}", light, dark, fontsize=8.5) arrow(ax, px, py-0.33, px, py-0.73, color=dark, lw=1.5) # Divides draw_rounded_box(ax, px, py-2.05, 2.6, 0.55, f"Divides body into:\n{divides}", dark, WHITE, fontsize=8.5) arrow(ax, px, py-1.28, px, py-1.78, color=dark, lw=1.5) # Special note: Median Sagittal draw_rounded_box(ax, 5, 3.25, 3.5, 0.6, "Median Sagittal Plane:\nExact centre → Equal Right & Left halves", "#1B5E20", WHITE, fontsize=8.5, bold=False) arrow(ax, 5, 3.83, 5, 3.56, color="#1B5E20", lw=1.5) ax.text(5, 0.35, "Source: Gray's Anatomy for Students, Chapter 1, pp. 18-20", ha="center", fontsize=7.5, color="#555555", style="italic") return fig # ───────────────────────────────────────────── # PAGE 3 – Terms of Direction (Part A) # ───────────────────────────────────────────── def page3(): fig, ax = plt.subplots(figsize=(11, 8.5)) fig.patch.set_facecolor(C_BG) ax.set_facecolor(C_BG) ax.set_xlim(0, 10); ax.set_ylim(0, 9) ax.axis("off") banner = FancyBboxPatch((0, 8.3), 10, 0.65, boxstyle="round,pad=0.05", facecolor="#E65100", edgecolor="none", zorder=4) ax.add_patch(banner) ax.text(5, 8.63, "TERMS OF DIRECTION – Flowchart (Part 1 of 2)", ha="center", va="center", fontsize=14, color=WHITE, fontweight="bold", zorder=5) # Central box draw_rounded_box(ax, 5, 7.55, 5, 0.55, "Terms of Location & Direction", "#E65100", WHITE, fontsize=11, bold=True) pairs = [ # (left_x, right_x, y, term_a, meaning_a, example_a, term_b, meaning_b, example_b, color_dark, color_light) (2.0, 7.5, 6.3, "Anterior\n(Ventral)", "Toward the FRONT", "Nose is anterior", "Posterior\n(Dorsal)", "Toward the BACK", "Spine is posterior to sternum", "#BF360C", "#FFCCBC"), (2.0, 7.5, 4.55, "Medial", "Closer to midline", "Nose is medial to eyes", "Lateral", "Away from midline", "Thumb is lateral to little finger", "#0D47A1", "#BBDEFB"), (2.0, 7.5, 2.8, "Superior", "Toward the head", "Head is superior to shoulders", "Inferior", "Toward the feet", "Knee is inferior to hip", "#1B5E20", "#C8E6C9"), ] for lx, rx, row_y, ta, ma, ea, tb, mb, eb, dark, light in pairs: # arrows from central box arrow(ax, 5, 7.28, lx, row_y+0.35, color=dark) arrow(ax, 5, 7.28, rx, row_y+0.35, color=dark) # left term draw_rounded_box(ax, lx, row_y, 3.2, 0.55, ta, dark, WHITE, fontsize=10, bold=True) draw_rounded_box(ax, lx, row_y-0.62, 3.2, 0.48, ma, light, dark, fontsize=8) draw_rounded_box(ax, lx, row_y-1.18, 3.2, 0.48, f"e.g. {ea}", "white", "#333", fontsize=7.8) arrow(ax, lx, row_y-0.28, lx, row_y-0.39, color=dark, lw=1.2) arrow(ax, lx, row_y-0.86, lx, row_y-0.95, color=dark, lw=1.2) # right term draw_rounded_box(ax, rx, row_y, 3.2, 0.55, tb, dark, WHITE, fontsize=10, bold=True) draw_rounded_box(ax, rx, row_y-0.62, 3.2, 0.48, mb, light, dark, fontsize=8) draw_rounded_box(ax, rx, row_y-1.18, 3.2, 0.48, f"e.g. {eb}", "white", "#333", fontsize=7.8) arrow(ax, rx, row_y-0.28, rx, row_y-0.39, color=dark, lw=1.2) arrow(ax, rx, row_y-0.86, rx, row_y-0.95, color=dark, lw=1.2) # OPPOSITE label between them ax.text(5, row_y+0.05, "⟵ OPPOSITES ⟶", ha="center", va="center", fontsize=7.5, color=dark, style="italic", fontweight="bold") ax.text(5, 0.2, "Source: Gray's Anatomy for Students, Chapter 1, pp. 18-20", ha="center", fontsize=7.5, color="#555555", style="italic") return fig # ───────────────────────────────────────────── # PAGE 4 – Terms of Direction (Part B) + Inclusive # ───────────────────────────────────────────── def page4(): fig, ax = plt.subplots(figsize=(11, 8.5)) fig.patch.set_facecolor(C_BG) ax.set_facecolor(C_BG) ax.set_xlim(0, 10); ax.set_ylim(0, 9) ax.axis("off") banner = FancyBboxPatch((0, 8.3), 10, 0.65, boxstyle="round,pad=0.05", facecolor="#E65100", edgecolor="none", zorder=4) ax.add_patch(banner) ax.text(5, 8.63, "TERMS OF DIRECTION (Part 2) & INCLUSIVE TERMINOLOGY", ha="center", va="center", fontsize=14, color=WHITE, fontweight="bold", zorder=5) # ---- Proximal / Distal ---- draw_rounded_box(ax, 5, 7.58, 5.5, 0.55, "Proximal / Distal (used for limbs & linear structures)", "#4A148C", WHITE, fontsize=9.5, bold=True) draw_rounded_box(ax, 2.2, 6.75, 3.8, 0.55, "Proximal: closer to origin/attachment\ne.g. Glenohumeral joint is proximal to elbow", "#CE93D8", "#4A148C", fontsize=8) draw_rounded_box(ax, 7.3, 6.75, 3.8, 0.55, "Distal: farther from origin\ne.g. Hand is distal to the elbow", "#CE93D8", "#4A148C", fontsize=8) arrow(ax, 5, 7.3, 2.2, 7.03, color="#4A148C") arrow(ax, 5, 7.3, 7.3, 7.03, color="#4A148C") # ---- Cranial / Caudal ---- draw_rounded_box(ax, 5, 5.95, 5.5, 0.55, "Cranial / Caudal (alternatives to Superior/Inferior)", "#006064", WHITE, fontsize=9.5, bold=True) draw_rounded_box(ax, 2.2, 5.12, 3.8, 0.55, "Cranial: toward the head\n(used in embryology & comparative anatomy)", "#B2EBF2", "#006064", fontsize=8) draw_rounded_box(ax, 7.3, 5.12, 3.8, 0.55, "Caudal: toward the tail\n(inferior end of the spine)", "#B2EBF2", "#006064", fontsize=8) arrow(ax, 5, 5.68, 2.2, 5.40, color="#006064") arrow(ax, 5, 5.68, 7.3, 5.40, color="#006064") # ---- Rostral ---- draw_rounded_box(ax, 5, 4.32, 5.5, 0.55, "Rostral (used within the head/brain only)", "#BF360C", WHITE, fontsize=9.5, bold=True) draw_rounded_box(ax, 5, 3.62, 6.5, 0.55, "Toward the NOSE – e.g. Forebrain is rostral to the hindbrain", "#FFCCBC", "#BF360C", fontsize=8.5) arrow(ax, 5, 4.04, 5, 3.90, color="#BF360C") # ---- Superficial / Deep ---- draw_rounded_box(ax, 5, 2.95, 5.5, 0.55, "Superficial / Deep", "#33691E", WHITE, fontsize=10, bold=True) draw_rounded_box(ax, 2.2, 2.15, 3.8, 0.65, "Superficial: closer to surface\n(skin, superficial fascia, mammary glands)", "#CCFF90", "#33691E", fontsize=8) draw_rounded_box(ax, 7.3, 2.15, 3.8, 0.65, "Deep: enclosed within outer\ndeep fascia (skeletal muscles, viscera)", "#CCFF90", "#33691E", fontsize=8) arrow(ax, 5, 2.68, 2.2, 2.48, color="#33691E") arrow(ax, 5, 2.68, 7.3, 2.48, color="#33691E") # ---- Inclusive terminology ---- inc_bg = FancyBboxPatch((0.3, 0.4), 9.4, 1.1, boxstyle="round,pad=0.06", facecolor="#E1BEE7", edgecolor="#6A1B9A", linewidth=2, zorder=3) ax.add_patch(inc_bg) ax.text(5, 1.32, "4. INCLUSIVE ANATOMICAL TERMINOLOGY", ha="center", va="center", fontsize=9.5, color="#4A148C", fontweight="bold", zorder=4) ax.text(5, 0.95, "Use patient's preferred terms | Base care on present anatomy, not gender assumptions", ha="center", va="center", fontsize=8.2, color="#4A148C", zorder=4) ax.text(5, 0.63, '"Upper body" instead of Chest/Breast | "Erectile tissue" instead of Penis/Clitoris | "Gonads" instead of Testes/Ovaries', ha="center", va="center", fontsize=7.8, color="#4A148C", zorder=4, style="italic") return fig # ───────────────────────────────────────────── # PAGE 5 – Summary Table Flowchart # ───────────────────────────────────────────── def page5(): fig, ax = plt.subplots(figsize=(11, 8.5)) fig.patch.set_facecolor(C_BG) ax.set_facecolor(C_BG) ax.set_xlim(0, 10); ax.set_ylim(0, 9) ax.axis("off") banner = FancyBboxPatch((0, 8.3), 10, 0.65, boxstyle="round,pad=0.05", facecolor=C_TITLE, edgecolor="none", zorder=4) ax.add_patch(banner) ax.text(5, 8.63, "QUICK REFERENCE SUMMARY – All Terms", ha="center", va="center", fontsize=14, color=WHITE, fontweight="bold", zorder=5) rows = [ ("Anterior / Ventral", "Front of the body", "#E3F2FD", "#0D47A1"), ("Posterior / Dorsal", "Back of the body", "#EDE7F6", "#4A148C"), ("Superior", "Above / toward the head", "#E8F5E9", "#1B5E20"), ("Inferior", "Below / toward the feet", "#FFF8E1", "#E65100"), ("Medial", "Toward the midline", "#E3F2FD", "#0D47A1"), ("Lateral", "Away from the midline", "#EDE7F6", "#4A148C"), ("Proximal", "Closer to origin/attachment", "#E8F5E9", "#1B5E20"), ("Distal", "Farther from origin/attachment","#FFF8E1", "#E65100"), ("Cranial", "Toward the head", "#E3F2FD", "#0D47A1"), ("Caudal", "Toward the tail (inferior)", "#EDE7F6", "#4A148C"), ("Rostral", "Toward the nose (head/brain)", "#E8F5E9", "#1B5E20"), ("Superficial", "Toward the body surface", "#FFF8E1", "#E65100"), ("Deep", "Away from the body surface", "#E3F2FD", "#0D47A1"), ("Coronal plane", "Divides front and back", "#EDE7F6", "#4A148C"), ("Sagittal plane", "Divides left and right", "#E8F5E9", "#1B5E20"), ("Transverse plane", "Divides top and bottom", "#FFF8E1", "#E65100"), ] col_w = [3.8, 5.0] col_x = [2.3, 6.8] start_y = 7.95 row_h = 0.46 # Header row for cx, cw, label in zip(col_x, col_w, ["TERM", "MEANING"]): hbox = FancyBboxPatch((cx - cw/2, start_y - row_h/2), cw, row_h, boxstyle="round,pad=0.02", facecolor=C_TITLE, edgecolor="white", linewidth=1, zorder=3) ax.add_patch(hbox) ax.text(cx, start_y, label, ha="center", va="center", fontsize=10, color=WHITE, fontweight="bold", zorder=4) for i, (term, meaning, bgcol, textcol) in enumerate(rows): yy = start_y - (i+1)*row_h - 0.05 # term box tb = FancyBboxPatch((col_x[0] - col_w[0]/2, yy - row_h/2 + 0.02), col_w[0], row_h - 0.04, boxstyle="round,pad=0.015", facecolor=bgcol, edgecolor="white", linewidth=0.8, zorder=3) ax.add_patch(tb) ax.text(col_x[0], yy, term, ha="center", va="center", fontsize=8.8, color=textcol, fontweight="bold", zorder=4) # meaning box mb = FancyBboxPatch((col_x[1] - col_w[1]/2, yy - row_h/2 + 0.02), col_w[1], row_h - 0.04, boxstyle="round,pad=0.015", facecolor="white", edgecolor="#ccc", linewidth=0.5, zorder=3) ax.add_patch(mb) ax.text(col_x[1], yy, meaning, ha="center", va="center", fontsize=8.5, color="#333", zorder=4) ax.text(5, 0.22, "Source: Gray's Anatomy for Students, Chapter 1, pp. 18-20", ha="center", fontsize=7.5, color="#555555", style="italic") return fig # ───────────────────────────────────────────── # SAVE TO PDF # ───────────────────────────────────────────── out_path = "/home/daytona/workspace/anatomical-flowcharts/Anatomical_Nomenclature_Flowcharts.pdf" with PdfPages(out_path) as pdf: for fn in [page1, page2, page3, page4, page5]: fig = fn() pdf.savefig(fig, bbox_inches="tight", facecolor=fig.get_facecolor()) plt.close(fig) print(f" Saved page from {fn.__name__}") print(f"\nDone! PDF saved to: {out_path}") PYEOF
Anatomical Nomenclature Flowcharts
PDF Document · PDF
| Page | Content |
|---|---|
| 1 | Overview flowchart + Anatomical Position (step-by-step boxes) |
| 2 | Anatomical Planes - Coronal, Sagittal, Transverse with orientation & what they divide |
| 3 | Terms of Direction Part 1 - Anterior/Posterior, Medial/Lateral, Superior/Inferior (paired opposites) |
| 4 | Terms of Direction Part 2 - Proximal/Distal, Cranial/Caudal, Rostral, Superficial/Deep + Inclusive Terminology |
| 5 | Quick Reference Summary Table - all 16 terms with meanings at a glance |
Make me flow charts of this in easy way and pfd
python3 -c " import pdfplumber path = '/home/daytona/workspace/attachments/63910177-8e6d-4885-a3ce-39fea7d23ef3/Here is a thorough definition and breakdown of Ana (1).pdf' with pdfplumber.open(path) as pdf: print(f'Pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): print(f'\n=== PAGE {i+1} ===') print(page.extract_text()) "
mkdir -p /home/daytona/workspace/anatomical-flowcharts-v2 && python3 << 'PYEOF' import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.patches import FancyBboxPatch from matplotlib.backends.backend_pdf import PdfPages import numpy as np # ── Palette ──────────────────────────────────────────────────────────────── NAVY = "#1A237E" BLUE_D = "#1565C0" BLUE_M = "#1976D2" BLUE_L = "#BBDEFB" GREEN_D = "#1B5E20" GREEN_M = "#388E3C" GREEN_L = "#C8E6C9" ORG_D = "#BF360C" ORG_M = "#E64A19" ORG_L = "#FFE0B2" PUR_D = "#4A148C" PUR_M = "#7B1FA2" PUR_L = "#E1BEE7" TEAL_D = "#006064" TEAL_L = "#B2EBF2" RED_D = "#B71C1C" RED_L = "#FFCDD2" BG = "#F8F9FF" WHITE = "white" DARK = "#212121" GREY = "#616161" def rbox(ax, x, y, w, h, txt, fc, tc=WHITE, fs=9, bold=False, pad=0.03, ec=WHITE, lw=1.2, alpha=1.0, zorder=3, ha="center", va="center"): box = FancyBboxPatch((x-w/2, y-h/2), w, h, boxstyle=f"round,pad={pad}", facecolor=fc, edgecolor=ec, linewidth=lw, zorder=zorder, alpha=alpha) ax.add_patch(box) ax.text(x, y, txt, ha=ha, va=va, fontsize=fs, color=tc, fontweight="bold" if bold else "normal", multialignment="center", zorder=zorder+1) def arr(ax, x1, y1, x2, y2, col, lw=1.8, headw=0.012, headl=0.018): ax.annotate("", xy=(x2,y2), xytext=(x1,y1), arrowprops=dict(arrowstyle="-|>", color=col, lw=lw, mutation_scale=16), zorder=2) def banner(ax, title, fc, fs=13): b = FancyBboxPatch((0,8.3),10,0.65, boxstyle="round,pad=0.04", facecolor=fc, edgecolor="none", zorder=5) ax.add_patch(b) ax.text(5, 8.63, title, ha="center", va="center", fontsize=fs, color=WHITE, fontweight="bold", zorder=6) def footer(ax): ax.text(5, 0.18, "Source: Gray's Anatomy for Students, Ch.1 – Important Anatomical Terms, pp. 18-20", ha="center", fontsize=7, color=GREY, style="italic") def setup(title, fc): fig, ax = plt.subplots(figsize=(11,8.5)) fig.patch.set_facecolor(BG); ax.set_facecolor(BG) ax.set_xlim(0,10); ax.set_ylim(0,9); ax.axis("off") banner(ax, title, fc); footer(ax) return fig, ax # ══════════════════════════════════════════════════ # PAGE 1 – Master Overview Map # ══════════════════════════════════════════════════ def page1(): fig, ax = setup("ANATOMICAL NOMENCLATURE – Master Overview", NAVY) # Central definition rbox(ax, 5, 7.55, 9, 0.6, "Anatomical Nomenclature = Standardised language to describe\nlocation, orientation & relationships of body structures", NAVY, WHITE, fs=9.5, bold=True, pad=0.05, ec=BLUE_L, lw=2) # 4 pillars pillars = [ (1.25, 6.1, "① Anatomical\nPosition", BLUE_D, BLUE_L), (3.75, 6.1, "② Anatomical\nPlanes", GREEN_D, GREEN_L), (6.25, 6.1, "③ Terms of\nDirection", ORG_D, ORG_L), (8.75, 6.1, "④ Inclusive\nTerminology", PUR_D, PUR_L), ] for px,py,pt,dc,lc in pillars: arr(ax, 5, 7.25, px, 6.45, dc) rbox(ax, px, py, 2.2, 0.65, pt, dc, WHITE, fs=10, bold=True) # Sub-bullets under each pillar sub = { 0: ["Standing upright","Palms forward","Toes forward","Face & eyes forward"], 1: ["Coronal – front/back","Sagittal – left/right","Transverse – top/bottom","Median – equal halves"], 2: ["Ant./Post.","Med./Lat.","Sup./Inf.","Prox./Dist.","Cranial/Caudal","Rostral","Sup./Deep"], 3: ["Use patient's own terms","Base care on present anatomy","Upper body / Gonads / Erectile tissue"], } colors = [BLUE_D, GREEN_D, ORG_D, PUR_D] lights = [BLUE_L, GREEN_L, ORG_L, PUR_L] for col_i, (px,py,_,dc,lc) in enumerate(pillars): for row_i, txt in enumerate(sub[col_i]): yy = py - 0.72 - row_i*0.52 rbox(ax, px, yy, 2.1, 0.42, txt, lc, dc, fs=7.8, bold=False, pad=0.02) if row_i == 0: arr(ax, px, py-0.33, px, yy+0.22, dc, lw=1.2) else: arr(ax, px, yy+0.52, px, yy+0.22, dc, lw=1.2) return fig # ══════════════════════════════════════════════════ # PAGE 2 – Anatomical Position (step flow) # ══════════════════════════════════════════════════ def page2(): fig, ax = setup("① THE ANATOMICAL POSITION – Step-by-Step Flowchart", BLUE_D) # Intro box rbox(ax, 5, 7.58, 8, 0.55, "All anatomical terms are defined relative to the Anatomical Position", BLUE_D, WHITE, fs=10, bold=True) steps = [ ("STEP 1", "Body standing UPRIGHT", BLUE_D, BLUE_L), ("STEP 2", "FEET together, toes pointing FORWARD", "#0D47A1", "#BBDEFB"), ("STEP 3", "HANDS by the sides, palms facing FORWARD", "#1565C0", "#90CAF9"), ("STEP 4", "FACE looking forward; mouth CLOSED, expression NEUTRAL", "#1976D2", "#64B5F6"), ("STEP 5", "Inferior margin of ORBIT in same horizontal plane\nas top of EXTERNAL AUDITORY MEATUS", "#1E88E5","#42A5F5"), ("STEP 6", "EYES open, focused in the DISTANCE", "#2196F3", "#BBDEFB"), ] xs = [2.2, 7.3, 2.2, 7.3, 2.2, 7.3] ys = [6.55, 5.75, 4.95, 4.15, 3.30, 2.48] prev_x, prev_y = 5, 7.30 for i,(step, desc, dc, lc) in enumerate(steps): cx, cy = xs[i], ys[i] arr(ax, prev_x, prev_y, cx, cy+0.28, dc) # Step badge badge = FancyBboxPatch((cx-1.1, cy+0.04), 0.85, 0.38, boxstyle="round,pad=0.02", facecolor=dc, edgecolor=WHITE, lw=1.2, zorder=4) ax.add_patch(badge) ax.text(cx-0.68, cy+0.23, step, ha="center", va="center", fontsize=8, color=WHITE, fontweight="bold", zorder=5) # Desc box rbox(ax, cx+0.5, cy+0.23, 3.8, 0.38, desc, lc, dc, fs=8.5, bold=False, pad=0.02, zorder=3) prev_x, prev_y = cx, cy-0.01 # Key note at bottom rbox(ax, 5, 1.5, 8, 0.6, "WHY? – The anatomical position is the universal reference so every directional term\n" "means the same thing to every anatomist, clinician, and scientist worldwide.", NAVY, WHITE, fs=8.5, bold=False, pad=0.04, ec=BLUE_L, lw=2) return fig # ══════════════════════════════════════════════════ # PAGE 3 – Anatomical Planes # ══════════════════════════════════════════════════ def page3(): fig, ax = setup("② ANATOMICAL PLANES – Flowchart", GREEN_D) rbox(ax, 5, 7.58, 6, 0.55, "3 Major Planes that Divide the Body", GREEN_D, WHITE, fs=11, bold=True) planes = [ (1.7, "Coronal\n(Frontal)\nPlane", "Vertical", "Anterior (front)\nvs\nPosterior (back)", BLUE_D, BLUE_L), (5.0, "Sagittal\nPlane", "Vertical\n⊥ to Coronal", "Right parts\nvs\nLeft parts", GREEN_D, GREEN_L), (8.3, "Transverse\n(Axial)\nPlane", "Horizontal", "Superior (upper)\nvs\nInferior (lower)", ORG_D, ORG_L), ] row_ys = [6.6, 5.55, 4.45, 3.38] labels = ["NAME", "ORIENTATION", "DIVIDES INTO", "SPECIAL NOTE"] # Row label strip for ry, rl in zip(row_ys, labels): rbox(ax, 0.42, ry, 0.7, 0.55, rl, "#37474F", WHITE, fs=6.5, bold=True, pad=0.01) # Column content special = [ "Used in cross-section\nimaging (CT, MRI)", "Median Sagittal:\ncuts body into\nEXACT equal halves", "Also called axial;\nused in CT/MRI\nscanning planes", ] for px, pname, orient, divides, dc, lc in planes: arr(ax, 5, 7.30, px, 6.88, dc) rbox(ax, px, row_ys[0], 2.6, 0.55, pname, dc, WHITE, fs=9.5, bold=True) arr(ax, px, row_ys[0]-0.28, px, row_ys[1]+0.28, dc, lw=1.3) rbox(ax, px, row_ys[1], 2.6, 0.55, orient, lc, dc, fs=8.5) arr(ax, px, row_ys[1]-0.28, px, row_ys[2]+0.28, dc, lw=1.3) rbox(ax, px, row_ys[2], 2.6, 0.65, divides, dc, WHITE, fs=8.5) arr(ax, px, row_ys[2]-0.33, px, row_ys[3]+0.28, dc, lw=1.3) # special notes specials = [ (1.7, "Coronal used in\nanterior/posterior\nclinical description", BLUE_L, BLUE_D), (5.0, "Median Sagittal:\nExact midline →\nEqual R & L halves", GREEN_L, GREEN_D), (8.3, "Transverse / Axial:\nUsed in CT & MRI\nscanning", ORG_L, ORG_D), ] for sx, stxt, lc, dc in specials: rbox(ax, sx, row_ys[3], 2.6, 0.62, stxt, lc, dc, fs=8, pad=0.02) return fig # ══════════════════════════════════════════════════ # PAGE 4 – Terms of Direction (paired opposites) # ══════════════════════════════════════════════════ def page4(): fig, ax = setup("③ TERMS OF LOCATION & DIRECTION – Flowchart", ORG_D) rbox(ax, 5, 7.6, 7, 0.55, "Terms of Location & Direction (always relative to Anatomical Position)", ORG_D, WHITE, fs=9.5, bold=True) # Each pair: left_x, right_x, y_centre, nameL, descL, exL, nameR, descR, exR, dc, lc pairs = [ (1.8, 7.2, 6.55, "ANTERIOR\n(Ventral)", "Toward the FRONT", "Nose", "POSTERIOR\n(Dorsal)", "Toward the BACK", "Vertebral column", BLUE_D, BLUE_L), (1.8, 7.2, 5.05, "MEDIAL", "Closer to MIDLINE", "Nose vs eyes", "LATERAL", "Away from MIDLINE", "Thumb vs little finger", GREEN_D, GREEN_L), (1.8, 7.2, 3.55, "SUPERIOR", "Toward the HEAD", "Head vs shoulders", "INFERIOR", "Toward the FEET", "Knee vs hip", ORG_D, ORG_L), (1.8, 7.2, 2.05, "PROXIMAL", "Closer to ORIGIN\n(limbs & vessels)", "Shoulder > elbow", "DISTAL", "Farther from ORIGIN\n(limbs & vessels)","Hand > elbow", PUR_D, PUR_L), ] for lx, rx, cy, nL, dL, eL, nR, dR, eR, dc, lc in pairs: # opposite label ax.text(5, cy+0.05, "◄ OPPOSITE ►", ha="center", va="center", fontsize=7.5, color=dc, fontweight="bold", style="italic", zorder=5) # arrows from top box arr(ax, 5, 7.33, lx, cy+0.28, dc) arr(ax, 5, 7.33, rx, cy+0.28, dc) # left col rbox(ax, lx, cy, 3.0, 0.48, nL, dc, WHITE, fs=9, bold=True) rbox(ax, lx, cy-0.6, 3.0, 0.4, dL, lc, dc, fs=8) rbox(ax, lx, cy-1.1, 3.0, 0.38, f"e.g. {eL}", WHITE, GREY, fs=7.8, ec="#DDD", lw=0.8) arr(ax, lx, cy-0.24, lx, cy-0.41, dc, lw=1.2) arr(ax, lx, cy-0.80, lx, cy-0.92, dc, lw=1.2) # right col rbox(ax, rx, cy, 3.0, 0.48, nR, dc, WHITE, fs=9, bold=True) rbox(ax, rx, cy-0.6, 3.0, 0.4, dR, lc, dc, fs=8) rbox(ax, rx, cy-1.1, 3.0, 0.38, f"e.g. {eR}", WHITE, GREY, fs=7.8, ec="#DDD", lw=0.8) arr(ax, rx, cy-0.24, rx, cy-0.41, dc, lw=1.2) arr(ax, rx, cy-0.80, rx, cy-0.92, dc, lw=1.2) return fig # ══════════════════════════════════════════════════ # PAGE 5 – More Terms + Inclusive Terminology # ══════════════════════════════════════════════════ def page5(): fig, ax = setup("③ MORE TERMS + ④ INCLUSIVE TERMINOLOGY", PUR_D) # ── Cranial / Caudal ── rbox(ax, 5, 8.0, 6, 0.48, "Cranial / Caudal (alternative to Superior/Inferior)", TEAL_D, WHITE, fs=9.5, bold=True) rbox(ax, 2.2, 7.25, 3.8, 0.55, "CRANIAL\nToward the HEAD\nUsed in embryology & comparative anatomy", TEAL_L, TEAL_D, fs=8) rbox(ax, 7.3, 7.25, 3.8, 0.55, "CAUDAL\nToward the TAIL\n(inferior end of spine)", TEAL_L, TEAL_D, fs=8) arr(ax, 5, 7.76, 2.2, 7.53, TEAL_D) arr(ax, 5, 7.76, 7.3, 7.53, TEAL_D) # ── Rostral ── rbox(ax, 5, 6.55, 6, 0.48, "Rostral (used within the HEAD / BRAIN only)", RED_D, WHITE, fs=9.5, bold=True) rbox(ax, 5, 5.88, 7, 0.5, "Toward the NOSE | e.g. Forebrain is ROSTRAL to the hindbrain", RED_L, RED_D, fs=8.5) arr(ax, 5, 6.31, 5, 6.13, RED_D) # ── Superficial / Deep ── rbox(ax, 5, 5.1, 6, 0.48, "Superficial / Deep", GREEN_D, WHITE, fs=10, bold=True) rbox(ax, 2.2, 4.35, 3.8, 0.65, "SUPERFICIAL\nCloser to body surface\n(skin, fascia, mammary glands)", GREEN_L, GREEN_D, fs=8) rbox(ax, 7.3, 4.35, 3.8, 0.65, "DEEP\nFarther from surface\n(skeletal muscles, viscera)", GREEN_L, GREEN_D, fs=8) arr(ax, 5, 4.86, 2.2, 4.68, GREEN_D) arr(ax, 5, 4.86, 7.3, 4.68, GREEN_D) # ── Inclusive Terminology ── bg = FancyBboxPatch((0.25, 1.05), 9.5, 2.55, boxstyle="round,pad=0.06", facecolor=PUR_L, edgecolor=PUR_D, lw=2, zorder=3) ax.add_patch(bg) ax.text(5, 3.38, "④ INCLUSIVE ANATOMICAL TERMINOLOGY", ha="center", va="center", fontsize=11, color=PUR_D, fontweight="bold", zorder=4) ax.text(5, 2.98, "Modern anatomy recognises not all individuals fit a sex-binary model", ha="center", va="center", fontsize=8.5, color=PUR_D, zorder=4) ax.text(5, 2.68, "Clinical approach: use the patient's own preferred terms &\nbase care on present anatomy — NOT gender assumptions", ha="center", va="center", fontsize=8.5, color=PUR_D, fontweight="bold", zorder=4, multialignment="center") # Inclusive table inside the box inc = [ ("INCLUSIVE TERM", "INSTEAD OF", PUR_D, PUR_L, True), ("Upper body", "Chest / Breast", PUR_L, PUR_D, False), ("Erectile tissue", "Penis / Clitoris", "#F3E5F5", PUR_D, False), ("Gonads", "Testes / Ovaries", PUR_L, PUR_D, False), ] col_xs = [3.0, 7.0]; col_ws = [4.5, 4.5] row_h = 0.36; start_y = 2.3 for ri,(inc_t, instead, fc, tc, bold) in enumerate(inc): yy = start_y - ri*row_h for ci,(cval, cx) in enumerate(zip([inc_t,instead], col_xs)): rbox(ax, cx, yy, 4.0, row_h-0.04, cval, fc, tc, fs=8.5, bold=bold, pad=0.01, ec=PUR_D, lw=0.6, zorder=4) return fig # ══════════════════════════════════════════════════ # PAGE 6 – Quick Reference Summary Table # ══════════════════════════════════════════════════ def page6(): fig, ax = setup("QUICK REFERENCE SUMMARY – All Terms at a Glance", NAVY) rows = [ ("Anterior / Ventral", "Front of the body", BLUE_L, BLUE_D), ("Posterior / Dorsal", "Back of the body", "#EDE7F6", PUR_D), ("Superior", "Above / toward the head", GREEN_L, GREEN_D), ("Inferior", "Below / toward the feet", ORG_L, ORG_D), ("Medial", "Toward the midline", BLUE_L, BLUE_D), ("Lateral", "Away from the midline", "#EDE7F6", PUR_D), ("Proximal", "Closer to origin / attachment", GREEN_L, GREEN_D), ("Distal", "Farther from origin", ORG_L, ORG_D), ("Cranial", "Toward the head", TEAL_L, TEAL_D), ("Caudal", "Toward the tail (inferior end)", TEAL_L, TEAL_D), ("Rostral", "Toward the nose (head/brain)", RED_L, RED_D), ("Superficial", "Closer to the body surface", GREEN_L, GREEN_D), ("Deep", "Away from the body surface", ORG_L, ORG_D), ("Coronal plane", "Divides front and back", BLUE_L, BLUE_D), ("Sagittal plane", "Divides left and right", GREEN_L, GREEN_D), ("Transverse plane", "Divides top and bottom", ORG_L, ORG_D), ] col_x = [2.55, 7.2] col_w = [4.2, 5.0] start = 7.95 rh = 0.445 # Header for cx, cw, lbl in zip(col_x, col_w, ["ANATOMICAL TERM", "MEANING"]): rbox(ax, cx, start, cw, rh, lbl, NAVY, WHITE, fs=10, bold=True, pad=0.03, ec=WHITE, lw=1.5) for i,(term, meaning, lc, dc) in enumerate(rows): yy = start - (i+1)*rh - 0.02 rbox(ax, col_x[0], yy, col_w[0], rh-0.04, term, lc, dc, fs=9, bold=True, pad=0.02, ec=WHITE, lw=0.8) rbox(ax, col_x[1], yy, col_w[1], rh-0.04, meaning, WHITE, DARK, fs=8.8, pad=0.02, ec="#DDD", lw=0.5) return fig # ── EXPORT ────────────────────────────────────────────────────────────────── out = "/home/daytona/workspace/anatomical-flowcharts-v2/Anatomical_Nomenclature_Flowcharts.pdf" with PdfPages(out) as pdf: for fn in [page1, page2, page3, page4, page5, page6]: fig = fn() pdf.savefig(fig, bbox_inches="tight", facecolor=fig.get_facecolor()) plt.close(fig) print(f" ✓ {fn.__name__}") print(f"\nSaved → {out}") PYEOF
Anatomical Nomenclature Flowcharts
PDF Document · PDF
| Page | Content | Color |
|---|---|---|
| 1 | Master Overview Map - all 4 topics branching from one central node | Navy |
| 2 | Anatomical Position - 6 numbered steps with badge labels | Blue |
| 3 | Anatomical Planes - 3 columns (Coronal, Sagittal, Transverse) with rows for name, orientation, division, notes | Green |
| 4 | Terms of Direction Part 1 - Anterior/Posterior, Medial/Lateral, Superior/Inferior, Proximal/Distal as paired opposite boxes | Orange |
| 5 | More Terms (Cranial/Caudal, Rostral, Superficial/Deep) + Inclusive Terminology table | Purple |
| 6 | Quick Reference Summary Table - all 16 terms with color-coded rows | Navy |
Create a study guide document with practice questions on anatomical terms
/home/daytona/skills/docx
mkdir -p /home/daytona/workspace/study-guide && node -e "require('docx'); console.log('docx OK')"
~/study-guide/build.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
Header, Footer, AlignmentType, HeadingLevel, BorderStyle, WidthType,
ShadingType, VerticalAlign, PageNumber, PageBreak,
TableOfContents, UnderlineType
} = require('docx');
const fs = require('fs');
// ─── Colour palette ────────────────────────────────────────────────────────
const NAVY = "1A237E";
const BLUE = "1565C0";
const GREEN = "1B5E20";
const ORANGE = "BF360C";
const PURPLE = "4A148C";
const TEAL = "006064";
const RED = "B71C1C";
const GREY_BG = "F5F5FF";
const BLUE_BG = "E3F2FD";
const GRN_BG = "E8F5E9";
const ORG_BG = "FFF3E0";
const PUR_BG = "F3E5F5";
const TEL_BG = "E0F7FA";
const RED_BG = "FFEBEE";
const YEL_BG = "FFFDE7";
const WHITE = "FFFFFF";
// ─── Helpers ───────────────────────────────────────────────────────────────
function spacer(pts = 120) {
return new Paragraph({ spacing: { before: pts, after: 0 }, children: [] });
}
function sectionTitle(text, colorHex) {
return new Paragraph({
heading: HeadingLevel.HEADING_1,
spacing: { before: 340, after: 120 },
shading: { type: ShadingType.SOLID, color: colorHex, fill: colorHex },
children: [
new TextRun({
text: ` ${text} `,
color: WHITE,
bold: true,
size: 28,
font: "Calibri",
}),
],
});
}
function subTitle(text, colorHex = NAVY) {
return new Paragraph({
heading: HeadingLevel.HEADING_2,
spacing: { before: 220, after: 80 },
children: [
new TextRun({ text, color: colorHex, bold: true, size: 24, font: "Calibri" }),
],
});
}
function bodyPara(text, bold = false, color = "222222") {
return new Paragraph({
spacing: { before: 60, after: 60 },
children: [new TextRun({ text, bold, color, size: 22, font: "Calibri" })],
});
}
function bullet(text, colorHex = NAVY) {
return new Paragraph({
bullet: { level: 0 },
spacing: { before: 40, after: 40 },
children: [new TextRun({ text, color: colorHex, size: 22, font: "Calibri" })],
});
}
function colorBox(children, fillHex, borderHex) {
// Simulated coloured box using a 1-cell table
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
margins: { top: 100, bottom: 100 },
rows: [
new TableRow({
children: [
new TableCell({
shading: { type: ShadingType.SOLID, color: fillHex, fill: fillHex },
borders: {
top: { style: BorderStyle.SINGLE, size: 12, color: borderHex },
bottom: { style: BorderStyle.SINGLE, size: 12, color: borderHex },
left: { style: BorderStyle.SINGLE, size: 12, color: borderHex },
right: { style: BorderStyle.SINGLE, size: 12, color: borderHex },
},
margins: { top: 120, bottom: 120, left: 180, right: 180 },
children,
}),
],
}),
],
});
}
function definitionTable(rows, headerColor) {
// rows = [[term, meaning, example], ...]
const headerRow = new TableRow({
tableHeader: true,
children: [
{ text: "Term", w: 20 },
{ text: "Meaning", w: 35 },
{ text: "Clinical / Body Example", w: 45 },
].map(({ text, w }) =>
new TableCell({
width: { size: w, type: WidthType.PERCENTAGE },
shading: { type: ShadingType.SOLID, color: headerColor, fill: headerColor },
verticalAlign: VerticalAlign.CENTER,
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text, color: WHITE, bold: true, size: 20, font: "Calibri" })],
}),
],
})
),
});
const dataRows = rows.map((row, ri) => {
const bg = ri % 2 === 0 ? WHITE : "F8F9FF";
return new TableRow({
children: row.map((cell, ci) =>
new TableCell({
width: { size: [20, 35, 45][ci], type: WidthType.PERCENTAGE },
shading: { type: ShadingType.SOLID, color: bg, fill: bg },
verticalAlign: VerticalAlign.CENTER,
children: [
new Paragraph({
children: [
new TextRun({
text: cell,
bold: ci === 0,
color: ci === 0 ? headerColor : "333333",
size: 20,
font: "Calibri",
}),
],
}),
],
})
),
});
});
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [headerRow, ...dataRows],
});
}
function mcqBlock(num, question, options, answer, explanation) {
const optLetters = ["A", "B", "C", "D", "E"];
return [
spacer(160),
new Paragraph({
spacing: { before: 60, after: 40 },
children: [
new TextRun({ text: `Q${num}. `, color: NAVY, bold: true, size: 23, font: "Calibri" }),
new TextRun({ text: question, color: "111111", size: 22, font: "Calibri" }),
],
}),
...options.map((opt, i) =>
new Paragraph({
indent: { left: 440 },
spacing: { before: 30, after: 30 },
children: [
new TextRun({
text: `${optLetters[i]}. ${opt}`,
color: optLetters[i] === answer ? GREEN : "444444",
bold: optLetters[i] === answer,
size: 21,
font: "Calibri",
}),
],
})
),
colorBox(
[
new Paragraph({
children: [
new TextRun({ text: `Answer: ${answer} | `, color: GREEN, bold: true, size: 20, font: "Calibri" }),
new TextRun({ text: explanation, color: "1B5E20", size: 20, font: "Calibri" }),
],
}),
],
GRN_BG, GREEN
),
];
}
function tfBlock(num, statement, isTrue, explanation) {
return [
spacer(120),
new Paragraph({
spacing: { before: 60, after: 40 },
children: [
new TextRun({ text: `Q${num}. `, color: PURPLE, bold: true, size: 23, font: "Calibri" }),
new TextRun({ text: statement, color: "111111", size: 22, font: "Calibri" }),
],
}),
new Paragraph({
indent: { left: 440 },
spacing: { before: 20, after: 20 },
children: [new TextRun({ text: "A. True B. False", color: "555555", size: 21, font: "Calibri" })],
}),
colorBox(
[
new Paragraph({
children: [
new TextRun({ text: `Answer: ${isTrue ? "True" : "False"} | `, color: PURPLE, bold: true, size: 20, font: "Calibri" }),
new TextRun({ text: explanation, color: "4A148C", size: 20, font: "Calibri" }),
],
}),
],
PUR_BG, PURPLE
),
];
}
function shortAnswerBlock(num, question, answer) {
return [
spacer(120),
new Paragraph({
spacing: { before: 60, after: 40 },
children: [
new TextRun({ text: `Q${num}. `, color: ORANGE, bold: true, size: 23, font: "Calibri" }),
new TextRun({ text: question, color: "111111", size: 22, font: "Calibri" }),
],
}),
new Paragraph({
indent: { left: 440 },
spacing: { before: 10, after: 10 },
children: [new TextRun({ text: "Answer: _______________________________________________", color: "AAAAAA", size: 21, font: "Calibri" })],
}),
colorBox(
[
new Paragraph({
children: [
new TextRun({ text: "Model Answer: ", color: ORANGE, bold: true, size: 20, font: "Calibri" }),
new TextRun({ text: answer, color: "BF360C", size: 20, font: "Calibri" }),
],
}),
],
ORG_BG, ORANGE
),
];
}
function matchingTable(pairs, leftHeader, rightHeader) {
// pairs = [[left, right], ...]
const headerRow = new TableRow({
tableHeader: true,
children: [leftHeader, rightHeader].map(txt =>
new TableCell({
shading: { type: ShadingType.SOLID, color: TEAL, fill: TEAL },
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: txt, color: WHITE, bold: true, size: 20, font: "Calibri" })],
}),
],
width: { size: 50, type: WidthType.PERCENTAGE },
})
),
});
const dataRows = pairs.map(([l, r], i) => {
const bg = i % 2 === 0 ? WHITE : TEL_BG;
return new TableRow({
children: [l, r].map(txt =>
new TableCell({
shading: { type: ShadingType.SOLID, color: bg, fill: bg },
children: [new Paragraph({ children: [new TextRun({ text: txt, size: 20, font: "Calibri", color: "222222" })] })],
width: { size: 50, type: WidthType.PERCENTAGE },
})
),
});
});
return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows: [headerRow, ...dataRows] });
}
function labelledDiagramBox(title, items) {
return colorBox(
[
new Paragraph({
spacing: { before: 60, after: 60 },
children: [new TextRun({ text: title, color: RED, bold: true, size: 22, font: "Calibri" })],
}),
...items.map(item =>
new Paragraph({
bullet: { level: 0 },
spacing: { before: 40, after: 40 },
children: [new TextRun({ text: item, color: "B71C1C", size: 21, font: "Calibri" })],
})
),
],
RED_BG, RED
);
}
function pageBreakPara() {
return new Paragraph({ children: [new PageBreak()] });
}
// ─── DOCUMENT CONTENT ──────────────────────────────────────────────────────
const doc = new Document({
numbering: {
config: [
{
reference: "bullet-list",
levels: [
{
level: 0,
format: "bullet",
text: "\u2022",
alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 440, hanging: 260 } } },
},
],
},
],
},
styles: {
default: {
document: {
run: { font: "Calibri", size: 22 },
},
},
paragraphStyles: [
{
id: "Heading1",
name: "Heading 1",
basedOn: "Normal",
next: "Normal",
run: { bold: true, color: WHITE, size: 28 },
},
{
id: "Heading2",
name: "Heading 2",
basedOn: "Normal",
next: "Normal",
run: { bold: true, size: 24 },
},
],
},
sections: [
{
headers: {
default: new Header({
children: [
new Paragraph({
alignment: AlignmentType.RIGHT,
children: [
new TextRun({ text: "Anatomical Nomenclature – Study Guide | Gray's Anatomy for Students", color: "888888", size: 18, font: "Calibri" }),
],
}),
],
}),
},
footers: {
default: new Footer({
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
children: [
new TextRun({ text: "Page ", color: "888888", size: 18, font: "Calibri" }),
new TextRun({ children: [PageNumber.CURRENT], color: "888888", size: 18, font: "Calibri" }),
new TextRun({ text: " of ", color: "888888", size: 18, font: "Calibri" }),
new TextRun({ children: [PageNumber.TOTAL_PAGES], color: "888888", size: 18, font: "Calibri" }),
],
}),
],
}),
},
children: [
// ══════════════════════════════════════════════
// COVER / TITLE
// ══════════════════════════════════════════════
spacer(600),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 100 },
children: [
new TextRun({
text: "ANATOMICAL NOMENCLATURE",
color: NAVY,
bold: true,
size: 52,
font: "Calibri",
}),
],
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 80 },
children: [
new TextRun({ text: "Complete Study Guide & Practice Questions", color: BLUE, size: 32, font: "Calibri" }),
],
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 60 },
children: [
new TextRun({ text: "Based on Gray's Anatomy for Students, Chapter 1, pp. 18–20", color: "555555", size: 22, font: "Calibri", italics: true }),
],
}),
colorBox([
new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: "Covers: Anatomical Position · Planes · Directional Terms · Inclusive Terminology", color: NAVY, bold: true, size: 22, font: "Calibri" })] }),
new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: "MCQs · True/False · Short Answer · Matching · Labelling · Clinical Scenarios · Answer Key", color: NAVY, size: 20, font: "Calibri" })] }),
], BLUE_BG, BLUE),
spacer(200),
pageBreakPara(),
// ══════════════════════════════════════════════
// SECTION 1: CORE CONCEPTS REVIEW
// ══════════════════════════════════════════════
sectionTitle("SECTION 1 — CORE CONCEPTS REVIEW", NAVY),
subTitle("What is Anatomical Nomenclature?", NAVY),
bodyPara("Anatomical nomenclature is the standardised system of terms used to describe the location, orientation, and relationships of body structures. It provides a universal reference language so that any anatomist, clinician, or scientist can communicate precisely about the human body, regardless of language or background."),
spacer(100),
subTitle("1.1 The Anatomical Position", BLUE),
colorBox([
new Paragraph({ children: [new TextRun({ text: "All anatomical terms are defined relative to the Anatomical Position:", color: BLUE, bold: true, size: 21, font: "Calibri" })] }),
spacer(60),
...[
"Body standing upright",
"Feet together, toes pointing forward",
"Hands by the sides, palms facing forward",
"Face looking forward; mouth closed, expression neutral",
"Inferior margin of the orbit (bony edge below eye) is in the same horizontal plane as the top of the external auditory meatus (ear opening)",
"Eyes open, focused in the distance",
].map(t => new Paragraph({ bullet: { level: 0 }, spacing: { before: 40, after: 40 }, children: [new TextRun({ text: t, color: "1A237E", size: 21, font: "Calibri" })] })),
], BLUE_BG, BLUE),
spacer(120),
subTitle("1.2 Anatomical Planes", GREEN),
definitionTable([
["Coronal (Frontal)", "Vertical", "Divides Anterior (front) vs Posterior (back)"],
["Sagittal", "Vertical, perpendicular to coronal", "Divides Right vs Left parts"],
["Median Sagittal", "Exactly through the midline", "Divides body into EQUAL right and left halves"],
["Transverse (Axial/Horizontal)", "Horizontal", "Divides Superior (upper) vs Inferior (lower)"],
], GREEN),
spacer(120),
subTitle("1.3 Terms of Direction", ORANGE),
definitionTable([
["Anterior / Ventral", "Toward the front", "Nose is an anterior structure"],
["Posterior / Dorsal", "Toward the back", "Vertebral column is posterior to the sternum"],
["Medial", "Closer to the midline", "Nose is medial to the eyes"],
["Lateral", "Away from the midline", "Thumb is lateral to the little finger"],
["Superior", "Toward the head", "Head is superior to the shoulders"],
["Inferior", "Toward the feet", "Knee is inferior to the hip joint"],
["Proximal", "Closer to origin/attachment","Glenohumeral joint is proximal to the elbow"],
["Distal", "Farther from origin", "Hand is distal to the elbow"],
["Cranial", "Toward the head", "Used in embryology; alternative to Superior"],
["Caudal", "Toward the tail", "Inferior end of the spine; used in comparative anatomy"],
["Rostral", "Toward the nose (head/brain only)", "Forebrain is rostral to the hindbrain"],
["Superficial", "Closer to body surface", "Sternum is superficial to the heart"],
["Deep", "Away from surface / inside deep fascia", "Stomach is deep to the abdominal wall"],
], ORANGE),
spacer(120),
subTitle("1.4 Inclusive Anatomical Terminology", PURPLE),
bodyPara("Modern anatomy acknowledges that not all individuals fit a sex-binary model. The clinically preferred approach is to use the patient's own preferred anatomical terminology and to base clinical care on present anatomy rather than assumptions about gender identity."),
spacer(60),
definitionTable([
["Upper body", "Chest / Breast", "Used for trans and non-binary individuals"],
["Erectile tissue", "Penis / Clitoris", "Describes function without assuming gender"],
["Gonads", "Testes / Ovaries", "Neutral term for reproductive organs"],
], PURPLE),
pageBreakPara(),
// ══════════════════════════════════════════════
// SECTION 2: MULTIPLE CHOICE QUESTIONS
// ══════════════════════════════════════════════
sectionTitle("SECTION 2 — MULTIPLE CHOICE QUESTIONS (MCQs)", BLUE),
bodyPara("Choose the single best answer for each question. Answers with explanations are provided below each question.", false, "555555"),
...mcqBlock(1,
"In the anatomical position, the palms of the hands are facing:",
["Posteriorly (backward)", "Inferiorly (downward)", "Anteriorly (forward)", "Medially (inward)"],
"C",
"The anatomical position requires palms facing forward (anteriorly), which is key for defining terms like supination."
),
...mcqBlock(2,
"The coronal (frontal) plane divides the body into which two parts?",
["Superior and inferior", "Right and left", "Anterior and posterior", "Medial and lateral"],
"C",
"The coronal plane is vertical and divides the body into anterior (front) and posterior (back) portions."
),
...mcqBlock(3,
"Which term describes a structure that is closer to the point of attachment or origin of a limb?",
["Distal", "Lateral", "Proximal", "Superficial"],
"C",
"Proximal means closer to the origin or point of attachment. E.g., the shoulder is proximal to the elbow."
),
...mcqBlock(4,
"The nose is described as __________ to the eyes.",
["Lateral", "Medial", "Posterior", "Inferior"],
"B",
"Medial means closer to the midline. The nose lies on the midline and is therefore medial to the eyes."
),
...mcqBlock(5,
"Which plane divides the body into exactly equal right and left halves?",
["Coronal plane", "Transverse plane", "Sagittal plane", "Median sagittal plane"],
"D",
"The median sagittal plane passes exactly through the midline, creating equal right and left halves."
),
...mcqBlock(6,
"The term 'rostral' is used specifically to describe position relative to the nose within:",
["The thorax", "The abdomen", "The head and brain", "The limbs"],
"C",
"Rostral is used exclusively within the head/brain context. E.g., the forebrain is rostral to the hindbrain."
),
...mcqBlock(7,
"A surgeon notes the stomach is DEEP to the abdominal wall. This means the stomach is:",
["Closer to the skin surface", "On the posterior side", "Farther from the surface, inside the deep fascia", "Superior to the abdominal wall"],
"C",
"Deep means farther from the body surface, enclosed within the outer layer of deep fascia."
),
...mcqBlock(8,
"The term 'caudal' refers to a direction toward:",
["The head", "The nose", "The tail / inferior end of the spine", "The anterior surface"],
"C",
"Caudal means toward the tail (inferior end of the spine). It is the opposite of cranial and an alternative to inferior."
),
...mcqBlock(9,
"The transverse (axial) plane divides the body into which two sections?",
["Anterior and posterior", "Right and left", "Medial and lateral", "Superior and inferior"],
"D",
"The transverse plane is horizontal and divides the body into superior (upper) and inferior (lower) parts."
),
...mcqBlock(10,
"Which of the following is a paired opposite of 'anterior'?",
["Medial", "Inferior", "Posterior", "Proximal"],
"C",
"Anterior (ventral) and posterior (dorsal) are directional opposites referring to front and back of the body."
),
pageBreakPara(),
// ══════════════════════════════════════════════
// SECTION 3: TRUE / FALSE
// ══════════════════════════════════════════════
sectionTitle("SECTION 3 — TRUE / FALSE QUESTIONS", PURPLE),
bodyPara("State whether each statement is True or False. Explanations are provided below each question.", false, "555555"),
...tfBlock(1, "In the anatomical position, the feet are placed apart with toes pointing outward.", false,
"Feet should be TOGETHER with toes pointing FORWARD, not outward."),
...tfBlock(2, "The sagittal plane divides the body into left and right parts.", true,
"Correct. A sagittal plane is vertical and perpendicular to the coronal plane, dividing left from right."),
...tfBlock(3, "The term 'superior' can always be used interchangeably with 'cranial' in all contexts.", false,
"Cranial/caudal are typically reserved for embryology and comparative anatomy. Rostral is used in the head/brain. Superior/inferior is the standard clinical pair."),
...tfBlock(4, "The sternum is superficial to the heart.", true,
"Correct. Superficial means closer to the body surface. The sternum is in the chest wall, superficial to the heart beneath it."),
...tfBlock(5, "The median sagittal plane divides the body into unequal right and left portions.", false,
"The MEDIAN sagittal plane passes exactly through the midline, creating EQUAL right and left halves. Only a non-median sagittal plane creates unequal portions."),
...tfBlock(6, "The thumb is medial to the little finger when the hand is in the anatomical position.", false,
"In anatomical position (palms forward), the thumb is on the LATERAL side and the little finger is on the MEDIAL side."),
...tfBlock(7, "Inclusive anatomical terminology recommends using the term 'gonads' instead of testes/ovaries when using non-binary language.", true,
"Correct. 'Gonads' is the inclusive neutral term used for reproductive glands without implying gender."),
...tfBlock(8, "A proximal structure is farther from the point of attachment than a distal one.", false,
"Proximal = CLOSER to origin. Distal = FARTHER from origin. These terms are reversed in the statement."),
pageBreakPara(),
// ══════════════════════════════════════════════
// SECTION 4: SHORT ANSWER QUESTIONS
// ══════════════════════════════════════════════
sectionTitle("SECTION 4 — SHORT ANSWER QUESTIONS", ORANGE),
bodyPara("Write a concise answer in the space provided. Model answers are shown below each question.", false, "555555"),
...shortAnswerBlock(1,
"Define 'anatomical nomenclature' and explain why it is important in clinical practice.",
"Anatomical nomenclature is the standardised system of terms describing location, orientation and relationships of body structures. It is important because it provides a universal reference language allowing any clinician or scientist worldwide to communicate precisely about the human body, regardless of their native language."
),
...shortAnswerBlock(2,
"List the 6 key features of the anatomical position.",
"(1) Body upright. (2) Feet together, toes forward. (3) Hands by sides, palms forward. (4) Face forward, mouth closed. (5) Inferior orbital margin level with top of external auditory meatus. (6) Eyes open, focused ahead."
),
...shortAnswerBlock(3,
"Explain the difference between a sagittal plane and the median sagittal plane.",
"A sagittal plane is any vertical plane perpendicular to the coronal plane that divides the body into left and right portions (not necessarily equal). The median sagittal plane is a specific sagittal plane that passes exactly through the midline, dividing the body into equal right and left halves."
),
...shortAnswerBlock(4,
"Give one clinical example each for the terms 'proximal' and 'distal'.",
"Proximal: The glenohumeral (shoulder) joint is proximal to the elbow. Distal: The hand is distal to the elbow. Both are used for limbs and linear structures such as blood vessels, nerves, and airways."
),
...shortAnswerBlock(5,
"When is 'rostral' used, and how does it differ from 'cranial'?",
"Rostral is used specifically within the head and brain to describe position relative to the nose (e.g., the forebrain is rostral to the hindbrain). Cranial simply means toward the head in general and is used as an alternative to 'superior' in embryology and comparative anatomy."
),
...shortAnswerBlock(6,
"What is inclusive anatomical terminology and why is it clinically preferred?",
"Inclusive anatomical terminology uses neutral terms (e.g., 'upper body' instead of chest/breast, 'gonads' instead of testes/ovaries) to accommodate transgender and non-binary patients. It is preferred because clinical care should be based on present anatomy, not assumptions about gender identity, and patients should have their own preferred terms respected."
),
pageBreakPara(),
// ══════════════════════════════════════════════
// SECTION 5: MATCHING EXERCISES
// ══════════════════════════════════════════════
sectionTitle("SECTION 5 — MATCHING EXERCISES", TEAL),
subTitle("5A — Match the term to its meaning", TEAL),
bodyPara("Draw a line or write the matching letter in the space provided."),
spacer(80),
matchingTable([
["1. Anterior", "A. Toward the body surface"],
["2. Posterior", "B. Toward the feet"],
["3. Superior", "C. Closer to the midline"],
["4. Inferior", "D. Toward the front"],
["5. Medial", "E. Toward the back"],
["6. Lateral", "F. Toward the head"],
["7. Superficial", "G. Away from the midline"],
], "TERM", "MEANING"),
spacer(120),
colorBox([
new Paragraph({ children: [new TextRun({ text: "Answer Key: 1-D | 2-E | 3-F | 4-B | 5-C | 6-G | 7-A", color: TEAL, bold: true, size: 20, font: "Calibri" })] }),
], TEL_BG, TEAL),
spacer(180),
subTitle("5B — Match the plane to what it divides", TEAL),
spacer(80),
matchingTable([
["1. Coronal (Frontal) Plane", "A. Superior and inferior parts"],
["2. Sagittal Plane", "B. Anterior and posterior parts"],
["3. Median Sagittal Plane", "C. Equal right and left halves"],
["4. Transverse (Axial) Plane", "D. Right and left parts (not necessarily equal)"],
], "PLANE", "DIVIDES INTO"),
spacer(100),
colorBox([
new Paragraph({ children: [new TextRun({ text: "Answer Key: 1-B | 2-D | 3-C | 4-A", color: TEAL, bold: true, size: 20, font: "Calibri" })] }),
], TEL_BG, TEAL),
spacer(180),
subTitle("5C — Match the inclusive term to the traditional term it replaces", TEAL),
spacer(80),
matchingTable([
["1. Upper body", "A. Testes / Ovaries"],
["2. Erectile tissue", "B. Chest / Breast"],
["3. Gonads", "C. Penis / Clitoris"],
], "INCLUSIVE TERM", "REPLACES"),
spacer(100),
colorBox([
new Paragraph({ children: [new TextRun({ text: "Answer Key: 1-B | 2-C | 3-A", color: TEAL, bold: true, size: 20, font: "Calibri" })] }),
], TEL_BG, TEAL),
pageBreakPara(),
// ══════════════════════════════════════════════
// SECTION 6: LABELLING & FILL-IN-THE-BLANK
// ══════════════════════════════════════════════
sectionTitle("SECTION 6 — FILL-IN-THE-BLANK", RED),
bodyPara("Complete each sentence using the correct anatomical term from the word bank below.", false, "555555"),
spacer(60),
colorBox([
new Paragraph({ children: [new TextRun({ text: "Word Bank: ", color: RED, bold: true, size: 21, font: "Calibri" })] }),
new Paragraph({ children: [new TextRun({ text: "anterior | posterior | medial | lateral | superior | inferior | proximal | distal | superficial | deep | cranial | caudal | rostral | coronal | sagittal | transverse", color: "B71C1C", size: 20, font: "Calibri", italics: true })] }),
], RED_BG, RED),
spacer(100),
...[
["1.", "The nose is a(n) ______________ structure because it faces forward."],
["2.", "The vertebral column is ______________ to the sternum."],
["3.", "The ______________ plane divides the body into anterior and posterior parts."],
["4.", "A structure closer to the body surface is described as ______________."],
["5.", "The elbow is ______________ to the hand (farther from the shoulder)."],
["6.", "The knee is ______________ to the hip joint (nearer to the feet)."],
["7.", "In the brain, a structure toward the nose is described as ______________."],
["8.", "The ______________ plane divides the body into superior and inferior parts."],
["9.", "The nose is ______________ to the eyes (closer to the midline)."],
["10.", "The stomach is ______________ to the abdominal wall (farther from the surface)."],
].map(([num, text]) =>
new Paragraph({
spacing: { before: 80, after: 40 },
children: [
new TextRun({ text: `${num} `, color: RED, bold: true, size: 21, font: "Calibri" }),
new TextRun({ text, color: "333333", size: 21, font: "Calibri" }),
],
})
),
spacer(140),
colorBox([
new Paragraph({ children: [new TextRun({ text: "Answer Key:", color: RED, bold: true, size: 21, font: "Calibri" })] }),
new Paragraph({ children: [new TextRun({ text: "1. anterior | 2. posterior | 3. coronal | 4. superficial | 5. distal | 6. inferior | 7. rostral | 8. transverse | 9. medial | 10. deep", color: "B71C1C", size: 20, font: "Calibri" })] }),
], RED_BG, RED),
pageBreakPara(),
// ══════════════════════════════════════════════
// SECTION 7: CLINICAL SCENARIO QUESTIONS
// ══════════════════════════════════════════════
sectionTitle("SECTION 7 — CLINICAL SCENARIO QUESTIONS", GREEN),
bodyPara("Apply anatomical terms to real clinical descriptions. Model answers are provided.", false, "555555"),
...shortAnswerBlock("7.1",
"A radiologist describes a lesion as being on the 'anterior surface of the liver, superficial to the hepatic parenchyma.' Explain what this means using anatomical terminology.",
"The lesion is located on the front-facing surface of the liver (anterior = toward the front of the body in anatomical position). It is closer to the outer surface/capsule of the liver rather than deep within the hepatic tissue (superficial = closer to the body surface or, here, the organ surface)."
),
...shortAnswerBlock("7.2",
"A physiotherapist documents that a patient has pain 3 cm distal to the medial epicondyle of the humerus. Translate this into plain language.",
"The pain is located 3 cm below and further down the arm (distal = farther from the shoulder/origin) from the bony bump on the inner side (medial = closer to the midline) of the lower end of the upper arm bone (humerus/epicondyle)."
),
...shortAnswerBlock("7.3",
"A neurosurgeon states that a tumour is located in the rostral part of the brainstem. What does this mean?",
"Rostral is used in the head/brain to mean toward the nose. The rostral brainstem refers to the upper part of the brainstem (closest to the cerebral hemispheres/nose direction), i.e., the midbrain region, as opposed to the caudal brainstem (pons and medulla oblongata, toward the spinal cord)."
),
...shortAnswerBlock("7.4",
"A patient who identifies as non-binary presents to clinic. The chart uses the term 'gonads' in the clinical notes. Why is this term preferred in this context?",
"'Gonads' is an inclusive anatomical term that refers to the reproductive organs without specifying sex or gender (replacing 'testes' or 'ovaries'). Using such terms respects the patient's identity and ensures clinical care is based on present anatomy rather than assumptions about gender, as recommended by inclusive anatomical nomenclature guidelines."
),
pageBreakPara(),
// ══════════════════════════════════════════════
// SECTION 8: OPPOSITE PAIRS EXERCISE
// ══════════════════════════════════════════════
sectionTitle("SECTION 8 — OPPOSITE PAIRS EXERCISE", NAVY),
bodyPara("For each term, write its anatomical opposite and give a body example for both.", false, "555555"),
spacer(80),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
new TableRow({
tableHeader: true,
children: ["Given Term", "Opposite Term", "Example of Given", "Example of Opposite"].map(t =>
new TableCell({
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: t, color: WHITE, bold: true, size: 19, font: "Calibri" })] })],
width: { size: 25, type: WidthType.PERCENTAGE },
})
),
}),
...[
["Anterior", "Posterior", "Nose (faces front)", "Vertebral column (behind sternum)"],
["Superior", "Inferior", "Head (above shoulders)", "Knee (below hip)"],
["Medial", "Lateral", "Nose (near midline)", "Thumb (outer side of hand)"],
["Proximal", "Distal", "Shoulder (near origin)", "Hand (far from shoulder)"],
["Superficial","Deep", "Sternum (near surface)", "Heart (under sternum)"],
["Cranial", "Caudal", "Toward the head", "Toward the tail/inferior spine"],
].map((row, ri) => {
const bg = ri % 2 === 0 ? WHITE : BLUE_BG;
return new TableRow({
children: row.map((cell, ci) =>
new TableCell({
shading: { type: ShadingType.SOLID, color: bg, fill: bg },
children: [new Paragraph({ children: [new TextRun({ text: cell, bold: ci < 2, color: ci < 2 ? NAVY : "333333", size: 19, font: "Calibri" })] })],
width: { size: 25, type: WidthType.PERCENTAGE },
})
),
});
}),
],
}),
pageBreakPara(),
// ══════════════════════════════════════════════
// SECTION 9: RAPID-FIRE REVISION QUIZ
// ══════════════════════════════════════════════
sectionTitle("SECTION 9 — RAPID-FIRE REVISION QUIZ", ORG_M = "E65100"),
bodyPara("Quick-fire questions — try to answer without looking at notes first! Answers follow.", false, "555555"),
spacer(60),
...[
["1.", "What is the reference posture for all anatomical terms?", "The Anatomical Position"],
["2.", "Name the plane that divides front from back.", "Coronal (Frontal) Plane"],
["3.", "Which directional term means 'toward the midline'?", "Medial"],
["4.", "Is the hand proximal or distal to the shoulder?", "Distal (farther from the shoulder/origin)"],
["5.", "What does 'ventral' mean?", "Anterior / toward the front"],
["6.", "Which plane cuts the body into exactly equal halves?", "Median Sagittal Plane"],
["7.", "Where is 'rostral' used?", "Within the head/brain only (toward the nose)"],
["8.", "The heart is _____ to the sternum.", "Deep"],
["9.", "What does the transverse plane divide?", "Superior (upper) and inferior (lower) parts"],
["10.", "Give the inclusive anatomical term for 'testes or ovaries'.", "Gonads"],
["11.", "Which term is the opposite of 'lateral'?", "Medial"],
["12.", "Name a structure that is posterior in the body.", "Vertebral column (spine)"],
["13.", "In which fields are cranial/caudal most commonly used?", "Embryology and comparative anatomy"],
["14.", "What does the clinically inclusive approach base care on?", "Present anatomy, not gender assumptions"],
["15.", "Is the glenohumeral joint proximal or distal to the wrist?", "Proximal"],
].flatMap(([num, q, a]) => [
new Paragraph({
spacing: { before: 80, after: 20 },
children: [
new TextRun({ text: `${num} `, color: "E65100", bold: true, size: 21, font: "Calibri" }),
new TextRun({ text: q, color: "222222", size: 21, font: "Calibri" }),
],
}),
colorBox([
new Paragraph({ children: [new TextRun({ text: `Answer: ${a}`, color: "BF360C", bold: true, size: 19, font: "Calibri" })] }),
], ORG_BG, ORANGE),
]),
pageBreakPara(),
// ══════════════════════════════════════════════
// SECTION 10: SUMMARY CHEAT SHEET
// ══════════════════════════════════════════════
sectionTitle("SECTION 10 — SUMMARY CHEAT SHEET", NAVY),
bodyPara("Tear out and use for last-minute revision!", false, "555555"),
spacer(80),
definitionTable([
["Anterior / Ventral", "Front", "Nose, navel, chest"],
["Posterior / Dorsal", "Back", "Spine, gluteus, shoulder blades"],
["Superior", "Above / toward head", "Head > shoulders > hips"],
["Inferior", "Below / toward feet", "Feet < knees < hips"],
["Medial", "Toward midline", "Nose, sternum, medial malleolus"],
["Lateral", "Away from midline", "Ears, shoulders, thumb"],
["Proximal", "Closer to origin", "Shoulder > elbow > wrist"],
["Distal", "Farther from origin", "Fingers (most distal of hand)"],
["Cranial", "Toward head", "Used in embryology"],
["Caudal", "Toward tail", "Sacrum is caudal to L5"],
["Rostral", "Toward nose (brain only)", "Forebrain rostral to hindbrain"],
["Superficial", "Near surface", "Skin, superficial fascia"],
["Deep", "Away from surface", "Skeletal muscle, viscera"],
["Coronal plane", "Divides front / back", "Anterior vs posterior"],
["Sagittal plane", "Divides left / right", "Right vs left sides"],
["Median sagittal plane", "Equal halves", "Exact midline cut"],
["Transverse plane", "Divides top / bottom", "Superior vs inferior"],
], NAVY),
spacer(180),
colorBox([
new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: "Source: Gray's Anatomy for Students, Chapter 1 — Important Anatomical Terms, pp. 18–20", color: NAVY, size: 20, font: "Calibri", italics: true })] }),
], BLUE_BG, BLUE),
],
},
],
});
Packer.toBuffer(doc).then(buf => {
const out = "/home/daytona/workspace/study-guide/Anatomical_Nomenclature_Study_Guide.docx";
fs.writeFileSync(out, buf);
console.log("Saved:", out);
});
cd /home/daytona/workspace/study-guide && node build.js 2>&1
python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/study-guide/Anatomical_Nomenclature_Study_Guide.docx 2>&1
# Verify the docx is valid by checking it opens correctly with python-docx python3 -c " from docx import Document doc = Document('/home/daytona/workspace/study-guide/Anatomical_Nomenclature_Study_Guide.docx') print(f'Paragraphs: {len(doc.paragraphs)}') print(f'Tables: {len(doc.tables)}') print('File is valid!') " && \ # Convert to PDF python3 /home/daytona/skills/docx/scripts/office/soffice.py --headless --convert-to pdf /home/daytona/workspace/study-guide/Anatomical_Nomenclature_Study_Guide.docx --outdir /home/daytona/workspace/study-guide/ 2>&1
# Quick sanity check on docx file size and zip structure ls -lh /home/daytona/workspace/study-guide/Anatomical_Nomenclature_Study_Guide.docx && \ python3 -c " import zipfile z = zipfile.ZipFile('/home/daytona/workspace/study-guide/Anatomical_Nomenclature_Study_Guide.docx') names = z.namelist() print('ZIP entries:', len(names)) print('Key files present:', [n for n in names if 'document' in n or 'content' in n.lower()]) print('File looks valid!') "
python3 /home/daytona/skills/docx/scripts/office/soffice.py --headless --convert-to pdf "/home/daytona/workspace/study-guide/Anatomical_Nomenclature_Study_Guide.docx" --outdir /home/daytona/workspace/study-guide/ 2>&1
# Try with libreoffice directly and a temp output dir mkdir -p /tmp/sgout && \ libreoffice --headless --convert-to pdf "/home/daytona/workspace/study-guide/Anatomical_Nomenclature_Study_Guide.docx" --outdir /tmp/sgout/ 2>&1 && \ cp /tmp/sgout/Anatomical_Nomenclature_Study_Guide.pdf /home/daytona/workspace/study-guide/ && \ ls -lh /home/daytona/workspace/study-guide/*.pdf
Anatomical Nomenclature Study Guide
Word Document · DOCX
Anatomical Nomenclature Study Guide
PDF Document · PDF
| Section | Content | Format |
|---|---|---|
| 1 | Core Concepts Review - full definitions, planes table, all directional terms with examples | Reference tables |
| 2 | Multiple Choice Questions (10 MCQs) | 4 options each + answer + explanation |
| 3 | True / False Questions (8 questions) | Answer + explanation |
| 4 | Short Answer Questions (6 questions) | Write-in lines + model answers |
| 5 | Matching Exercises (3 sets - terms/meanings, planes/divisions, inclusive terms) | Match columns + answer key |
| 6 | Fill-in-the-Blank (10 sentences) | Word bank provided + answer key |
| 7 | Clinical Scenario Questions (4 cases) | Apply terms to real clinical descriptions |
| 8 | Opposite Pairs Exercise | Table with 6 term pairs + body examples |
| 9 | Rapid-Fire Revision Quiz (15 questions) | Quick-fire Q&A for last-minute review |
| 10 | Summary Cheat Sheet | All 17 terms in one colour-coded table |