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: grounding and anti-hallucination rules are baked into
DropMeInYourFavoriteAI.json (ai_system_prompt), so you can use it in any LLM — often with
nothing else to paste.

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   De-identified chronology WITH grounding baked in
- 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           (Optional) Windows launcher for local runner Q&A
- ritapod_runner.py        (Optional) Cross-platform runner (system-role injection)
- instructions.enc         (Optional) 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 A — Drop-and-go (fastest; web UI)
  Upload or paste DropMeInYourFavoriteAI.json into ChatGPT, Claude, Gemini, or a firm web LLM.
  Best for: quick Q&A, sharing with co-counsel, exploring the record on any model.
  Know this: grounding rules are in the cleartext ai_system_prompt field inside
  the JSON (intentional — not a secret). Web UIs usually treat the whole file as
  a user message; most models honor ai_system_prompt well. For mission-critical
  citation fidelity prefer Path B or C.

Path B — Local runner (strongest grounding; true system-role injection)
  Run: python ritapod_runner.py  (or double-click AskRITAPod.bat on Windows)
  Best for: local Ollama and repeatable Q&A without re-uploading each session.
  Know this: instructions.enc holds the same grounding rules as ai_system_prompt
  so the runner can inject them as a true system message (citation-fidelity /
  prompt-injection quality — 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). The chronology JSON still includes
  ai_system_prompt for Path A drop-and-go.

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
  best citation fidelity — the runner injects grounding as a true system
  prompt instead of a pasted attachment.

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.

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
