NREHub

MedCORE Assembly Line — Conversion Prompt (for Serena)

You are continuing the MedCORE HTML conversion pipeline. Your job: convert the remaining MedCORE source documents into the polished, interactive HTML format — the…

1,065 words ~5 min

MedCORE Assembly Line — Conversion Prompt (for Serena)

You are continuing the MedCORE HTML conversion pipeline. Your job: convert the remaining MedCORE source documents into the polished, interactive HTML format — the exact same format as Cardiology, Pediatrics, and Obstetrics. Execute autonomously. Do not ask for confirmation on routine steps; confirm only the subject order if it is genuinely ambiguous (otherwise use the suggested order below).

Canonical references — read ALL of these first

  1. Template: ~/Library/Mobile Documents/com~apple~CloudDocs/NRE Prep/MedCORE Systems/MedCORE Template/template.html
  2. Pipeline guide (every rule and gotcha): ~/Library/Mobile Documents/com~apple~CloudDocs/NRE Prep/MedCORE Systems/MedCORE Template/MedCORE Conversion Guide.md
  3. Design spec: ~/Library/Mobile Documents/com~apple~CloudDocs/NRE Prep/MedCORE Production/MedCORE_Design_Spec.md
  4. Reference conversions (match their structure exactly):
    • .../MedCORE Systems/Cardiology/Cardiology MedCORE.html
    • .../MedCORE Systems/Pediatrics/Pediatrics MedCORE.html
    • .../MedCORE Systems/Obstetrics/5. Obstetrics - MedCORE.html
  5. This prompt: ~/Library/Mobile Documents/com~apple~CloudDocs/NRE Prep/MedCORE Systems/MedCORE Template/MedCORE Assembly Line Prompt.md

Inventory — sources waiting for conversion

System Source file(s) Status
Neurology 4. Neurology - MedCORE Publish Ready.docx (+ 4. Neurology - MedCORE.pdf, Render QA Publish Ready/ folder) Ready — publish-quality source
Ophthalmology 8. Ophthalmology - MedCORE.pdf (+ DOCX, pages) Source present
ENT MedCORE_ENT_FULL.docx (+ notes + diagnostic codes DOCX) Source present
Gynecology 6. Gynecology - MedCORE v5.docx (v4/ODT/PDF also present) Source present, mature
Dermatology 3. Dermatology - MedCORE.pdf (+ DOCX) Source present
Respiratory / Pulmonology Pulmonology MedCORE Complete Color.docx Source present
Urology Urology MedCORE Complete Color.docx Source present
Colorectal Haemorrhoids.html (fragment only) Fragmented — do NOT build a full system from this alone

Full paths are under ~/Library/Mobile Documents/com~apple~CloudDocs/NRE Prep/MedCORE Systems/<Subject>/.

Suggested order (confirm only if ambiguous; otherwise execute)

  1. Neurology — publish-ready source, highest quality input; smallest render friction.
  2. Ophthalmology — known exam-prep gap subject (MCQ Production Plan flagged Ophtho as a gap); convert it so it gets a practice section.
  3. ENT — same reason: known gap subject, source exists.
  4. Gynecology — mature v5 source.
  5. Dermatology, then Respiratory, then Urology — complete the library.

Rationale for the order: ready-input first (Neurology), then exam-weight gap subjects, then the rest. If he overrides, follow his order.

Hard rules (locked — never violate)

  • No emojis anywhere. All icons are SF Symbols (Swift-rendered PNGs tinted white/navy/red, or inline SVG mirroring SF Symbol aesthetics). NEVER invent symbol names — verify against /Applications/SF Symbols Beta.app/Contents/Resources/Metadata/name_availability.plist (known invalid: microscope, siren, bacteria — use microbe; known valid: lightbulb, scope, waveform.path.ecg, cross.case, checklist, stethoscope, pills, exclamationmark.triangle, xmark.octagon, list.number, timer, bolt.heart, alarm, arrow.triangle.2.circlepath, waveform, music.note, circle.lefthalf.filled, circle, figure.walk, drop, chart.bar, chart.line.downtrend.xyaxis).
  • Never write any official board/exam naming (the specific regulatory names are banned in all deliverables). Use neutral phrasing: “the exam”, “board exam”, “licensure exam”, “resident exam”, “national exam”. Content stays identical otherwise.
  • Zero border-radius, A4 boxy pages — hybrid boxes with header band + bottom stripe; box color code: navy core / teal recognition / red trap / amber power / deep-red never. DM Serif Display + DM Sans + JetBrains Mono.
  • Preserve ALL source content — no dropping sections, no “cleaning” that loses material. Map into the block pattern: core concept / recognition / diagnostics / treatment / traps / power numbers.
  • Section 1.15-style practice MCQ section (50 unified questions, full-length vignette stems, unsolved) + 1.16 Answer Key — see practice-session spec below.

Per-system build steps

  1. Extract source (pdftotext for PDFs; python-docx for DOCX). Tables scramble in pdftotext — check page images; ligatures break. For DOCX sources prefer direct python-docx parsing.
  2. Map content into the block pattern (above).
  3. Build from a copy of template.html, preserving all content.
  4. Add SF Symbols icons via the pipeline (verify names → Swift NSImage 96pt + tint → PIL crop + quantize → CSS .sfi-{slug}-{tint}).
  5. Append the practice session: Rapid-Fire Recall Drill + Clinical Vignette Practice (unsolved), then Answer Key & Full Breakdown.
  6. Auto-renumber ALL page-num spans sequentially (first = ii for TOC, rest 1..N) — never hand-number.
  7. Run the integrity checklist (below) before declaring done.

Practice-session spec (locked)

Three sections at the end of each document:

  1. Rapid-Fire Recall Drill — 10–12 short one-line recall questions, unsolved, compact .mcq-sm cards.
  2. Clinical Vignette Practice — exam-style vignettes with full stems (age/sex, presentation, vitals, ECG/labs), 5 options A–E, lead-ins like next best step / most likely diagnosis / contraindicated medication, ~90 sec each, unsolved, each stem carries a mono jump chip linking to its breakdown (href=#ans-qN).
  3. Answer Key and Full Breakdown — every question gets a teal box recog ansbox (checklist-white icon + “Q N — Answer and Breakdown”: correct line in teal; Concept + cognitive level chip (Recall/Interpretation/Analysis); Why-correct; Discriminator line; kill table — letter-by-letter why each wrong option fails, td.opt fixed 34mm, tr.ok for correct rows; Trap type line; Future alert one-liner).

Question bank rules: every question derived from the MedCORE document content itself (no outside invention); covers all content sections proportionally (~3–4 per major section); continuous numbering across recall+vignette (Q1..QN). TOC carries all three sections; cover section count updated.

Build mechanics gotchas

  • The write tool fails past ~90KB — chunk via bash heredocs, then python splice.
  • Bounded non-greedy regex; an unanchored DOTALL once deleted 7 pages of a document. Be surgical.
  • Class ansbox never appears alone (it is box recog ansbox) — count breakdowns via the ansbox substring; count questions via mcq plus mcq-sm.

Verification checklist (run before done)

  • Anchored page ids resolve; div balance clean
  • Question count == breakdown count
  • All jump anchors resolve to ids
  • Zero CORRECT markers left in the question section
  • Zero emoji, zero banned regulatory naming
  • Zero border-radius anywhere
  • All SF Symbol icons verified against the plist and rendering
  • Source content complete (spot-check vs source)

Definition of done

A .html file in the subject’s folder, matching the reference conversions structurally and visually, passing every item in the verification checklist, verified live in BrowserOS neo if possible. Report: what was converted, question counts, any content that had to be reconstructed, and anything left unresolved. Rebuild from a fresh copy of the template for each system — never let one conversion’s edits leak into the next.