Pilot Readiness — Scope A
Shadow / parallel-run checklist for the two pilot pharmacies — track tasks, owners and the Go/No-Go gate
Scopes the left nav to the real (Postgres-backed) modules and shows a “parallel run — not the legal record” banner across the app. Mock modules are hidden (revealable as “Preview”).
- Compounding Lab MES — formulas · lots · worksheets · BUD/USP gates · QA
- Patients-360
- Catalog & Pricing
- Compliance — PDMP documentation + audit trail
- 503A facility model
- Agentic safety gates running over real lab data
- eRx intake · live claims adjudication · EPCS
- PDMP gateway submission · carriers · payments · messaging
- Mock front-of-house (Rx Entry / Verify / Pipeline / Dispensing) · CRM · Portal — "Preview"
Buildable in-app today, no external dependency:
- 2.3Import each pharmacy's master formulary → lab_formulas / ingredients (stability/BUD, station mapping)
- 2.4Import active patients (demographics / insurance / allergies)
- 6.3Metrics baseline + dashboard (time-to-release, first-pass yield, gate catches, discrepancies, NPS)
Compliance is split, not one-sided. 1QRx secures the platform; the pharmacy owns its operation. The BAA is signed by both — and no patient data flows until it is.
- Provide & sign the BAA — plus BAAs with our subprocessors (DB host, etc.)
- Platform safeguards: encryption, tenant isolation (RLS), audit trail, backups
- Our own Security Risk Assessment + the SOC 2 / HITRUST path
- Build the features that enable your compliance (USP rules, EPCS/PDMP hooks, RBAC)
- Your own HIPAA program: SRA, policies, workforce training, minimum-necessary
- State board license, DEA, and physical USP <795>/<797>/<800> + your SOPs
- EPCS identity-proofing + the PDMP reporting duty (we provide the tooling)
- Execute the BAA, sign off the USP rules, and the clinical practice of pharmacy
Infrastructure & Security
- 1.1Provision HIPAA-eligible managed Postgres (encryption at rest, TLS, automated backups + PITR) to replace the dev VPS Docker DBAcceptance: DB reachable only over TLS; encryption-at-rest on; daily backup + a tested restoreINFRALP0
- 1.2Sign a BAA with the DB / host provider and any PHI subprocessorAcceptance: Countersigned BAA on fileLEGALSECMP0
- 1.3Set a strong production SESSION_SECRET — fail-closed on the insecure dev fallbackBuild-readyAcceptance: App refuses to run with the dev fallback in production; secret in a manager, not the repoShipped — lib/auth.ts now throws in production rather than signing with the dev key (prod secret verified set).ENGSP0
- 1.4Enforce MFA + password policy + lockout + idle timeout for PIC/adminAcceptance: MFA required for privileged roles; lockout after N fails; idle timeout ≤15 minENGMP0
- 1.5Re-verify tenant isolation under RLS (app runs as a non-owner DB role)Acceptance: Documented test: tenant A cannot read tenant B via any action/routeENGSECMP0
- 1.6Network lockdown — DB not publicly exposed; private app↔DB; least-privilege rolesAcceptance: Port scan clean; DB rejects public connectionsINFRAMP0
- 1.7Monitoring / alerting / error tracking / log aggregation / uptimeAcceptance: Alert on error-rate + downtime; centralized logsINFRAMP0
- 1.8Backup / restore drill + documented RTO/RPOAcceptance: Restore rehearsed; RTO/RPO writtenINFRASP0
- 1.9TLS/HTTPS + HSTS on the pilot domainAcceptance: A-grade TLS; HSTS onINFRASP0
Data Onboarding & Tenant Provisioning
- 2.1Confirm both tenants (503A patient-specific compounding)Acceptance: Both tenants exist; facility set to 503AAlready seeded — just verify in the DB.ENGSP0
- 2.2Create real user accounts per site (PIC, techs) with RBAC; remove demo credentialsAcceptance: Each user has a least-privilege role; demo logins disabledENGOPSMP1
- 2.3Import each pharmacy's master formulary → lab_formulas / ingredients (stability/BUD, station mapping)Build-readyAcceptance: Top-N formulas loaded and PIC-verified per siteI can build a CSV importer for formulary + ingredients.ENGPICLP1
- 2.4Import active patients (demographics / insurance / allergies) — minimum-necessaryBuild-readyAcceptance: Import tool + reconciliation spot-checkReuse the same CSV-import tool for patients.ENGOPSLP1
- 2.5Import ingredient inventory + reorder thresholds → lab_ingredientsAcceptance: On-hand / thresholds match a physical countENGOPSMP1
- 2.6Load provider pricing into pharmacy_pricing for in-scope SKUsAcceptance: Prices set; prescriber markup demoedOPSMP1
Application Readiness
- 3.1Pilot-scope the navigation — surface only the real modules; hide/label mock modules "Preview"Build-readyAcceptance: Pilot users see Lab / Patients / Pricing / Compliance / Standards; mock front-of-house hidden or labeledShipped — Pilot mode toggle (top of this page) scopes the sidebar to real modules; mock ones hide or show a "Preview" badge.ENGMP1
- 3.2Add a "Pilot — parallel run; not the legal record" banner in-appBuild-readyAcceptance: Banner visible on every page for pilot tenantsShipped — amber banner appears app-wide when Pilot mode is on.ENGSP1
- 3.3PHI guard on address autocomplete — the geocoder proxy must not receive patient address fragmentsBuild-readyAcceptance: No patient address text leaves to a non-BAA endpoint (verified in a network trace)Shipped — patient intake + order ship-to now use external={false} (no third-party lookup); pharmacy/prescriber addresses still autocomplete.ENGSECMP1
- 3.4Confirm NPI lookup sends only a provider NPI (public data, no PHI)Acceptance: Documented in the PHI data-flow inventorySECSP1
- 3.5Finalize daily-use polish on the in-scope modules from PIC dry-run feedbackAcceptance: PIC sign-off that each in-scope screen is usable for real workENGPICMP1
- 3.6Verify append-only audit trail + inspector CSV exportAcceptance: Tamper-evident log; export worksAlready built on /compliance — verify retention.ENGSP1
HIPAA & Administrative Compliance
- 4.1Execute a BAA between each pharmacy (covered entity) and 1QRx (business associate)Acceptance: Signed BAA per siteLEGALMP0
- 4.2Security Risk Assessment (HIPAA §164.308(a)(1))Acceptance: SRA complete; critical findings remediated or risk-acceptedSECLP0
- 4.3Policy set — access control, audit, incident response, breach notification, contingency/backup, sanction, retention/disposalAcceptance: Policy set approved and acknowledgedSECLP1
- 4.4Workforce training + signed confidentiality for pilot usersAcceptance: Training log + signatures on fileOPSSECMP1
- 4.5Minimum-necessary + RBAC review per roleAcceptance: Role↔permission matrix signed offSECSP1
- 4.6PHI data-flow inventory (where PHI lives, every subprocessor, what leaves the system)Acceptance: Diagram + subprocessor list; matches the geocoder/NPI findingsSECMP1
- 4.7Incident / breach runbook + contacts (60-day notification path)Acceptance: Runbook approvedSECSP1
USP & Clinical Validation (pharmacist sign-off)
- 5.1PIC validates the USP rule tables (<795>/<797>/<800> BUD, weight tol, assay ±10%, station env) vs current USP + site SOPsAcceptance: Signed validation per chapter; site-specific overrides captured in configPICENGLP1
- 5.2Run the pharmacist-review-loop per in-scope module (MoSCoW × severity; safety = Must)Acceptance: Each module reaches sign-off; Must-issues closedPICLP2
- 5.3Parallel-run concordance — for N lots, compare 1QRx lab record vs the official record; reconcileAcceptance: ≥ target concordance; zero unresolved safety discrepanciesPICENGLP2
- 5.4Document that 1QRx is NOT the legal batch record during the pilotAcceptance: Statement signed by both PICsPICPMSP1
- 5.5Confirm 503A patient-specific workflow fit at each siteAcceptance: 503A rules behave correctly per sitePICMP1
Pilot Operations
- 6.1Training sessions per site (PIC + techs)Acceptance: Users complete the core lab/patient/pricing flows unaidedPMOPSMP1
- 6.2Real support channel + SLA (helpdesk module is mock — use email/Slack + on-call)Acceptance: Channel live; response SLA definedPMSP1
- 6.3Metrics baseline + dashboard (time-to-release, first-pass yield, gate catches, discrepancies, NPS)Build-readyAcceptance: Baseline captured before go-live; weekly snapshotI can build an in-app pilot-metrics view over the real lab/compliance data.PMENGMP1
- 6.4Weekly review cadence (review → triage → build → re-review)Acceptance: Standing weekly; tracked backlogPMSP2
- 6.5Rollback / exit plan — pharmacy can revert to incumbent with no data lossAcceptance: Documented; data export availablePMSP1
Each criterion turns green when its gating tasks are Done.
- Zero unresolved safety discrepancies; record concordance ≥ target (5.3)
- USP rule tables validated & signed by both PICs (5.1)
- HIPAA: BAAs signed + SRA complete, no open criticals (1.2, 4.1, 4.2)
- No PHI leakage — geocoder guard verified; data-flow clean (3.3, 4.6)
- Demonstrated value + adoption (6.3)
- PHI sent to a non-BAA geocoder on patient intakeTask 3.3 — guard/replace before any patient data is entered
- DB still on the dev VPS (no BAA, no encryption-at-rest)Tasks 1.1 + 1.2 — managed HIPAA-eligible DB + BAA
- Dev SESSION_SECRET fallback in productionTask 1.3 — fail-closed
- Pharmacist validation time is the critical pathFront-load WS5 in Phase 0/1; keep scope tight
- Scope creep into mock modulesTask 3.1 — hide/label "Preview"; pilot banner 3.2
Infra + security + BAAs + SRA kickoff + tenant provisioning
Data import + app pilot-scoping + PHI guard + USP validation + training
Live shadow operation; metrics + weekly reviews + concordance
Measure vs exit criteria → Go/No-Go for Scope B
Internal pilot planning. Your progress is saved in this browser only. Full detail: docs/PILOT-SCOPE-A-READINESS.md.