# Patient Bloodwork Protocol

> End-to-end patient bloodwork → Bachmeyer peptide/supplement protocol → published report pipeline. Use when the user provides (or points to) a patient's lab/blood-test documents and asks to analyze them, build a peptide/supplement protocol 'like the other patients', get full dosing, or publish a health report. Handles batched lab bulletins (latest/complete supersedes), updates the patient PROJECT-CARD first, cross-references Bachmeyer NLM + LLM-Wiki for FULL dosing, adds plain-language for non-medical readers, and publishes a de-identified report to GitHub Pages. Trigger signals: 'analyze patient X bloodwork', 'check blood test for [name]', 'run full pipeline on these labs', 'get the peptide/supplement protocol like we did for the other patients', 'full protocol with dosing', 'publish the health report'. ANTI-PATTERN: do not use for the owner's own Apple-Health daily metrics (that is the health-pro daily pipeline), for non-patient research, or for code/marketing reports.

- Skill: `cryptopafi/patient-bloodwork-protocol` (Agent Skill)
- Install (CLI): `npx skillmds@latest add cryptopafi/patient-bloodwork-protocol`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cryptopafi/patient-bloodwork-protocol/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Marketing & Growth
- Author: cryptopafi (https://skillmd.com/u/cryptopafi)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/cryptopafi/patient-bloodwork-protocol

---


# Patient Bloodwork → Bachmeyer Protocol → Published Report

Full clinical-intelligence pipeline for a single patient: ingest labs → flag → build a Bachmeyer-cited peptide + supplement protocol **with complete dosing** → plain-language layer → de-identified published HTML report. Patient-isolated (IL-8). This is the canonical model proven on Ehsan, Bogdan, Ali Faisal, and Ion Borzea.

## Source Hierarchy & HARD Rules (NON-NEGOTIABLE — bind into every run)

- **BACHMEYER PRIMARY** — health knowledge comes from the Bachmeyer corpus first: **NLM** notebooks `cb9cf1fd` (Primary) + `1eef6220` (Extended) + `d9213daf` (Peptide Dosage) via `http://localhost:18790/query`, and the **LLM-Wiki** (`~/Claude/LLM-Wiki/concepts/*.md`, `~/.nexus/knowledge/peptides/*.md`). Cortex (`research`/`health`/`llm_wiki_sources_agent`) mirrors these — search it first to save latency, confirm dose-critical items against NLM/wiki.
- **THRESHOLDS = BACHMEYER, NOT PAFI** — every flag/threshold/dose is Bachmeyer-cited **or** a standard lab reference range. Never invent a number or attribute one to "Pafi". No number → "attending physician sets". Patient = clinical; logistics only otherwise.
- **PATIENT CARD FIRST** — on ANY new labs, update `~/.nexus/projects/health/patients/{slug}-PROJECT-CARD.md` **before** building the report (create if missing). Group labs by collection date. Append-only.
- **PLAIN-LANGUAGE** — every patient report needs a `💬 In plain words` line (layperson, ≤2 sentences) **per red/abnormal lab item AND per peptide**. New + retrofit-on-touch.
- **PUBLISH + DE-IDENT** — publish a de-identified copy to GitHub Pages (`cryptopafi/nexusos-reports`) via **shared-reporter**; keep a full named local copy. **KEEP FIRST NAME** (body + filename) for identification; scrub surname/DOB/CNP/phone/lab-IDs/sample-codes only. Verify **HTTP 200 + grep-clean**.
- **REPORT VIA SHARED-REPORTER** — never hand-roll the HTML/publish; always route through the `shared-reporter` skill.
- **CLINICAL BOUNDARY** — every report states it is informational decision-support, not a diagnosis/prescription; the attending physician decides.
- **SAVE INSIGHTS** — final state to Cortex (`research` collection) + PROJECT-CARD.

## Inputs

- `patient` (required): name or slug. Resolve to slug `firstname-lastname` (e.g. `ion-borzea`). Map known aliases.
- `--source` (default `~/Desktop/Health`): folder holding the lab documents.
- `--version` (default: auto-increment): report version `vN`. v1 = first pass; bump when re-running with new markers/scope.
- `--add` / `--hold`: explicit peptides to add to or hold from the protocol (e.g. `--add tesamorelin,5-amino-1mq --hold ipamorelin,cjc-1295`). User instructions here override defaults.

## Pipeline (ordered, idempotent)

### 1 — Gather ALL documents for the patient
- `ls`/`Glob` the source folder; collect every file whose name matches the patient (name, surname, slug, common misspellings). Watch for **mislabeled files** (a file named for patient A can contain patient B — verify identity inside).
- **Batched lab bulletins:** Romanian/clinic labs deliver one collection in stages (part 1, part 2, "… 3", "unlocked"). Same bulletin nr + same collection datetime + same sample code = **one event**. The **latest/most-complete (highest emit date)** version **supersedes** earlier parts — use it as canonical; note earlier parts are subsumed. Prefer `-unlocked` copies for password-protected PDFs.

### 2 — Extract
- PDFs: `python3 -c "import fitz; ..."` (PyMuPDF) → fallback `pdftotext -layout` → fallback OCR (see `pymupdf-scanned-pdf-ocr` skill for old scans / RO/IT docs). Images: vision read.
- Record per marker: value, unit, lab reference range, lab flag (H/L). Note any "teste în lucru" (pending) markers — they will arrive in a later batch.

### 3 — Update PROJECT-CARD (FIRST, before report)
- Open/create `~/.nexus/projects/health/patients/{slug}-PROJECT-CARD.md`. Log every non-locked doc by collection date; mark batched bulletins (which supersedes which). Mark resolved-vs-pending markers. Append-only; bump `last_updated`.

### 4 — Flag + triage
- Mark every out-of-range value (H/L). Identify the **convergent flags** (e.g. insulin resistance cluster, NAFLD/GGT, hormonal). Build a priority map (root cause first — usually metabolic).

### 4.5 — EXISTING PATIENT: longitudinal cross-reference (ALWAYS — non-optional)
If the patient already has a card with prior labs, you MUST cross-reference the new panel against ALL prior draws — never analyze the new panel in isolation. This produces intel a single-panel report cannot:
- **Pull every prior collection date** from the card (and any other lab/Rx files for this patient — e.g. an accompanying prescription explains new findings).
- **Build a trend table** for every marker that overlaps ≥2 draws: `marker | draw1 | draw2 | …| newest | read`. Use ↑/↓/✅/⚠️ to show direction and whether it resolved, worsened, or is newly out of range.
- **Connect the dots → actionable intel** (a dedicated section *on top of* the standard report): which interventions are working (marker moved toward target), which are over-shooting (e.g. TRT → supraphysiologic T / rising hematocrit; GH-secretagogue → IGF-1 over range + glucose/HOMA drift), which prior flags resolved, and what the trend implies for dose titration. Tie each to the patient's active protocol and the prescriber's titration rules already on the card.
- **Flag draw-timing caveats** (trough vs peak for hormones) before recommending any dose change.
- Cross-referenced trend + actionable intel are MANDATORY report sections for any returning patient; the regular flag/protocol report is necessary but not sufficient.

### 5 — Bachmeyer protocol WITH FULL DOSING
- For each flag, pull the matching Bachmeyer protocol from Cortex first, then **confirm dose-critical items via NLM** (`curl -s -m 90 -X POST http://localhost:18790/query -d '{"query":"..."}'`) and the wiki concept pages.
- Every recommended compound MUST carry the full contract: **dose · route (SubQ/IM/oral) · frequency · timing · titration/cycle length · the lab marker Bachmeyer tracks**, each plus a `💬 plain-words` line. A mechanism-only entry is INCOMPLETE — reject it.
- Apply `--add` / `--hold`. Default sequencing = Bachmeyer metabolic-first (Tier-1 metabolic core → Tier-2 adjuncts → hormone restoration). Honor Bachmeyer positions: prefers Retatrutide over semaglutide/tirzepatide for IR; **no first-line TRT** (Kisspeptin/Enclomiphene natural restoration preferred); **no aromatase inhibitors** if E2 low; never mix Tesamorelin + Ipamorelin; once-weekly Retatrutide (not daily); GHK-Cu always separate syringe.
- Add a **supplement stack** (independent clinical, complements Bachmeyer) and a **pre-peptide gating workup** (imaging, parasite/IgE if eosinophilia, thyroid, ApoB/Lp(a), methylation, vit D) + a **phasing table** (gate → start → build → reassess) + a **monitoring plan** with discontinuation red-lines (standard ranges).
- Reference doses (Bachmeyer corpus, start low / physician-set): Retatrutide 0.5 mg SubQ weekly → +0.5 q4wk → 2–4 mg; Tesamorelin 1–2 mg SubQ nightly pre-bed 5on/2off 12–16wk; MOTS-c 5–10 mg SubQ 2–3×/wk (mg!); 5-Amino-1MQ SubQ-only 10–20→50 mg/day belly AM 6on/2off; BPC-157 250 mcg–1 mg/day 5on/2off; Cardarine SubQ 30min pre-workout 30on/30off; KPV 300–400 mcg/day; Kisspeptin-10 100–500 mcg SubQ 2–3×/wk max 8–10wk; Enclomiphene oral ~12.5 mg; CJC-1295 no-DAC 100–300 mcg + Ipamorelin 100–200 mcg nightly 5on/2off. Always re-confirm against live NLM — corpus updates.

### 6 — Plain-language layer
- `💬 In plain words` (≤2 sentences, layperson) per red lab item and per peptide. Mandatory.

### 7 — Render + de-identify + publish (via shared-reporter)
- Author the report markdown to `~/.nexus/projects/health/reports/{slug}/protocol-{version}-{date}.md` (full, named).
- Dispatch the **shared-reporter** (Agent, Sonnet) to produce TWO outputs:
  - **A (local, named, NOT published):** Tier-2 health HTML (`report_type=health`, green accent `#22c55e`), saved to `~/.nexus/projects/health/reports/{slug}/{slug}-bloodwork-{period}-{version}.html`.
  - **B (de-identified, published):** scrub surname → first name only, remove bulletin/sample/client/CNP/phone; title "FirstName (M/F, age) — …"; add `noindex`; publish to `cryptopafi/nexusos-reports` as `{firstname}-bloodwork-{period}-{version}.html` (NO surname in filename); **verify HTTP 200 + grep-clean** (0 occurrences of surname + every numeric ID); also save the de-ident HTML locally.
- Self-audit: no TODO/placeholder, toggle/print/viewport/charts present.

### 8 — Persist
- Update the PROJECT-CARD with report links (local full + published de-ident URL + commit + verification result) and the dosing summary.
- Store to Cortex `research` (metadata: `type=patient_report, patient={slug}, domain=health, framework=bachmeyer, version, date`).

## Versioning
Re-run on new labs or scope change → bump `vN`, note what it adds, mark it supersedes the prior. New pending markers arriving in a later batch is the canonical trigger for a bump.

## Output Contract (to user)
Concise: which docs ingested (+ which batch superseded which), the convergent flags, the full-dosing protocol table (every compound = dose/route/freq/cycle), added/held compounds, the published de-identified URL (HTTP 200 + grep-clean PASS), and the local full-named path. Doses are Bachmeyer-cited/standard-range, physician-set, start low.

## Failure Handling
- NLM unreachable → rely on Cortex + wiki (both Bachmeyer-derived); **do not mention the infra incident** (NO INFRA INCIDENT MENTIONS rule); fix silently.
- Locked PDF → use the `-unlocked` sibling; never block on it.
- Unknown/unrecoverable patient identity (mislabeled file, missing source) → log as BLOCKED in the card, ask the user; do not guess a surname.
- GitHub token missing / Pages 404 → shared-reporter falls back (building/fallback_url/VPS/local); report the real status, never claim "published" without an HTTP 200 + grep-clean.

