RITAPod™ (de-identified chronology pod)
=====================================================

RITAPod™ is a trademark of Precision Medical Legal Consulting, LLC. All rights reserved.

This RITAPod contains a HIPAA-oriented, de-identified medical chronology that
is SELF-CONTAINED: citation and grounding guidelines are baked into
DropMeInYourFavoriteAI.json (ai_system_prompt). The recommended way to use
it is the local runner (Path B) or API (Path C), which inject those guidelines
as a true system message. Pasting the JSON into a web chat (Path A) is a
best-effort shortcut.

Why the pod is the primary deliverable
--------------------------------------
The RITAPod IS the case intelligence product: a portable, de-identified,
grounded chronology you can drop into any LLM and interrogate with citations.
Formatted RITA reports are optional presentation layers — the pod carries the
full record, Citation Contract grounding, and lens emphasis in one file.

Contents
--------
- DropMeInYourFavoriteAI.json   Drop-in chronology (events[].raw_text clipped;
                           reader blocks first). Paste this into a web assistant.
- DropMeInYourCaseSystem.pdf   Same pod as a PDF for systems that only take PDF.
- RITAPod_full.json          Full chronology for ritapod_runner.py
- START-HERE.txt           Lens-specific quick start (read this first)
- manifest.json            Package metadata + PHI-verification result
- GUIDE.txt                This file — full usage reference
- AskRITAPod.bat           Recommended Windows launcher for local runner Q&A
- ritapod_runner.py        Recommended cross-platform runner (system-role injection)
- instructions.enc         Same grounding as ai_system_prompt, packaged
                           for the runner to inject as a true system message
                           (citation fidelity — not a confidentiality seal)

Which path should I use?
------------------------

Path B — Local runner (recommended; true system-role injection)
  Run: python ritapod_runner.py  (or double-click AskRITAPod.bat on Windows)
  Best for: citation fidelity, consistent disclaimers, and repeatable Q&A
  without re-uploading each session.
  Know this: instructions.enc holds the same grounding guidelines as
  ai_system_prompt so the runner can inject them as a true system message
  (citation fidelity — NOT confidentiality). The runner ALSO prints the
  opening legal-advice disclaimer BEFORE the first model call — that part is
  hard-coded (not left to the model).

Path C — API (production / firm-hosted)
  python ritapod_runner.py --provider openai
  Set OPENAI_API_BASE, OPENAI_API_KEY, and OPENAI_MODEL (or Ollama vars).
  Best for: firm-hosted or BAA-covered endpoints, scripted workflows, and the
  same system-role injection as Path B.

Path A — Drop-and-go (quickest; best-effort web paste)
  Upload or paste DropMeInYourFavoriteAI.json into ChatGPT, Claude, Gemini, or a firm web LLM.
  Best for: a quick look or sharing with co-counsel on a model you already use.
  Know this: grounding guidelines are in the cleartext ai_system_prompt field
  (intentional — not a secret). Web UIs treat the whole file as a user
  message; answer quality depends on how closely the receiving model follows
  written context, which varies by model and can change over time.

Lens disclaimer
---------------
The export lens (Plaintiff, Defense, Expert Prep, or Neutral) sets DEFAULT
SUMMARY EMPHASIS ONLY — it is not advocacy AI and it is not a cage. The pod
answers any question the chronology supports, including opposing-side theories.
Ask directly; explicit questions always take precedence over lens defaults.

DropMeInYourCaseSystem.pdf is the same pod for systems that only take PDF (Filevine, Supio, and the like); its first page carries the hash of the JSON.

PHI scrubbing and verification
------------------------------
Patient identifiers (names, DOB, MRN, SSN, phone, email) are scrubbed and
machine-verified before packaging — export is blocked if residual patient PHI
is detected. Provider and facility names are intentionally retained for
litigation analysis. Counsel remains responsible for HIPAA compliance and
vendor BAAs.

Production export machines (RITA administrators)
--------------------------------------------------
Set RITAPOD_REQUIRE_NER=1 and install Presidio (see Install Presidio.bat in
the RITA repo) so pod export fails closed when the NER verifier is missing.
Without it, export falls back to regex-only PHI scanning — adequate for
development, not recommended for production counsel deliverables.

Runner setup examples
-------------------
Ollama (local):
  set OLLAMA_BASE_URL=http://127.0.0.1:11434
  set OLLAMA_MODEL=llama3.1
  python ritapod_runner.py

OpenAI-compatible API:
  set OPENAI_API_BASE=https://api.openai.com/v1
  set OPENAI_API_KEY=sk-...
  set OPENAI_MODEL=gpt-4o-mini
  python ritapod_runner.py --provider openai
