# Competing Proposal — "OBGY-AS-SEED": Build Modules/HIS by Instantiating the OBGY Rebuild Blueprint

**Author stance:** senior solution architect, architecture review board submission
**Date:** 2026-06-11
**Thesis in one line:** Do not design the HIS core from abstract FHIR whiteboarding — *instantiate it from the only field-validated clinical design we own*: the OBGY rebuild blueprint (`obgy-erp-analysis.md` §95, 312 → ~85 tables), whose generic layer was *explicitly designed module-agnostic "so the HMS module can consume them"* (§95 2.6). Ship the women's-health hospital first against a real, forced-to-migrate paying customer, and let the generic HIS core be hardened by production use before any second specialty arrives.

---

## 0. What this proposal is NOT (honesty up front)

1. **Not a code port.** Zero legacy OBGY code is reused — hard rule R12 stands (confirmed system-wide SQLi in `patients.php` ~311–419, `financialreport.php`, `visits.php`, `sonar.php:243`; unauthenticated CORS-`*` `mobileservices.php`; 1.6 GB web-accessible dumps). What is reused is the **rebuild blueprint** — the already-written, Laravel-shaped target design of ~85 tables in §95 — plus the production data and ~190 curated Arabic clinical vocabularies.
2. **Not OBGY-schema-as-core verbatim.** The legacy `visits` table conflates appointment + encounter + payment ledger (magic `detectionid` −99/999/9999) and clinical tables never reference visits (§90.1). The blueprint *already fixes both* — Appointment/Encounter split, `PatientLedgerEntry` with explicit entry types, polymorphic order/prescription headers. We instantiate the *fixed* design, not the legacy one.
3. **Not a reopening of settled decisions.** All four binding constraints are honored and load-bearing here:
   - HIS is **ONE module `Modules/HIS`** (D2) — bucket-A generic tables live there under `his_*` names from migration #1.
   - **HIS imports LIS/Accounting/HRM forward; LIS never imports HIS** — backward only via `LabResultReleased` / `LabRequestCompleted` / `CriticalResultDetected`.
   - **LIS production behavior untouchable** (D5 acceptance gates apply to every phase below).
   - **B2B patients stay in `lab_patients`** (D1/D1b) — OBGY's `patients` ETLs *into* the shared `lab_patients` MPI as `internal()` rows; the couple/husband data goes to a 1:1 `his_patient_spouses` table, never into the MPI.

The difference from the rival "generic-HIS-first" proposal is **sequencing and source of truth**, not topology: instead of designing `Modules/HIS` top-down and hoping a specialty shows up to validate it, we derive `Modules/HIS`'s schema from the OBGY blueprint's bucket-A layer (~100 legacy tables → ~30 clean `his_*` tables), build `Modules/Obgy` (bucket B) immediately on top, and go live at the OBGY clinic — which has a *forced security motive* to migrate and supplies 10 years of real clinical data as the acceptance suite.

---

## 1. Why seed-from-OBGY beats design-from-scratch

| Argument | Evidence |
|---|---|
| **It attacks the platform's two weakest scores with proven material.** | HMS feasibility scorecard: appointments **1/10**, hoteling/folio 0–1/10, overall 6/10. OBGY blueprint §1.2 delivers a field-proven Appointment/Encounter/VisitPeriod/queue domain (day-period capacity `max_no`, drag-sortable `visitorder`, waiting-room display app `obgy/screen/`) distilled from years of real bookings. Nothing else in the company's possession addresses the 1/10 gap with anything but a whiteboard. |
| **The design cost is already paid.** | §95 is a complete migration blueprint: consolidation tables (18 clone tables → 4 generic), DDL-level target models, ETL phases P0–P7, risk register R1–R12. The rival proposal must produce an equivalent design document from zero; this proposal starts from a reviewed one. |
| **Every core table gets a production consumer on day one.** | Abstract cores rot: the feasibility report's own Risk #3 is "creeping duplication — the four print engines lesson". An Encounter/CPOE/Q&A engine with no tenant is exactly how a fifth print engine happens. Here, `his_encounters`, `his_prescriptions`, `his_lab_orders`, `his_history_questions`, `his_clinical_examinations` are all exercised by a paying clinic within the first release train. |
| **The genericity is by construction, not by hope.** | 10 identical `*drugs` clones + 8 identical `*invest` clones collapse into 4 polymorphic tables (`prescribable`, `orderable`) usable by cardiology/ortho/derma unchanged; the Q&A history engine (`presenthistoryquestions`/`answers`) and per-body-system exam model are specialty-neutral schemas with OB/GYN *content*. Content is data, not schema — a second specialty seeds different rows, not different tables. |
| **Unique content moat.** | ~190 curated Arabic clinical vocabularies (61% of the legacy schema) exist nowhere else in the market in this form; they seed `his_lookups`/`obgy_lookups` and make the product demo *clinically credible in Arabic* from the first screen. |
| **Earliest revenue, self-funding sequence.** | Tier 3 "Moon Women's Health" is sellable at the end of Phase C (~20–29 pw) — before the expensive inpatient build — and the OBGY clinic engagement itself is billable migration work. The rival sequence reaches its first clinical-content sale later. |

---

## 2. Module layout (exact nwidart modules and key tables)

### 2.1 `Modules/HIS` — the generic clinical core, harvested from OBGY blueprint bucket A

All tables follow LIS column conventions (`company_id` first, `decimal(12,3)`, `created_by/updated_by`, softDeletes, `branch_id` + Core `DataScope`), extend `App\Models\BaseModel` (TenantAware + Auditable + HasArabicContent).

| Sub-domain | Tables | Seeded from (legacy → blueprint) |
|---|---|---|
| Encounter spine (D4, design approved) | `his_encounters` (encounter_number, patient_id→`lab_patients`, type opd/ipd/er/daycase, status, attending_doctor_id→`lab_doctors`, parent_encounter_id, **queue_position**, branch_id), `his_folios` (payer_type self_pay/insurance/b2b_account, totals), `his_folio_charges` (morph source_type/source_id + `UNIQUE(source_type, source_id)`, service_code per `sbscs_code` pattern, cost_center_id, unit_cost COGS) | `visits` encounter-half + `endvisitreports` + `totalbalance` → Encounter/Folio/PatientLedgerEntry (§95 1.2); per data-spine DDL (md/08) |
| Scheduling & queue | `his_appointments`, `his_visit_periods` (capacity `max_no` enforced in DB transaction), `his_clinic_closures`, `his_queue` columns on encounters; public waiting-screen display | `visits` booking-half, `visit_periods`, `vacations`, `obgy/screen/` app (§95 1.2) |
| Service catalog | `his_services` (price, branch, SBS code field for NPHIES) | `detections` (§95 1.2) |
| CPOE — prescriptions | `his_prescriptions`, `his_prescription_items` (morph `prescribable`, `subject` enum patient/companion) | 10 `*drugs` clones → 2 tables (§95 consolidation) |
| CPOE — lab/service orders | `his_lab_orders`, `his_lab_order_items` (morph `orderable`, lab_test_id → LIS catalog) | 8 `*invest` clones → 2 tables; executes via `Modules/LIS/app/Actions/CreateLabRequest` |
| Clinical questionnaire engine | `his_history_questions`, `his_history_answer_options`, `his_patient_history_answers` | `presenthistoryquestions`/`answers` + runtime `gynaph` (§95, A3) |
| Examination engine | `his_clinical_examinations` (typed vitals), `his_examination_findings` (body_system enum, finding_option_id / free_text) | `examination` + 9 finding lookups (A4) |
| Perioperative (explicitly designed for HMS by §95 2.6) | `his_surgical_bookings`, `his_operative_notes`, `his_operative_note_staff` (role enum), `his_anesthesia_types`, `his_incision_types` (self-ref), `his_hospitals`, `his_pathology_results` | `op_wait_list`, `operativedetails`, anesthesia/incision cascades, `hospitalnames`, `pathology`/`histopath` (A5) |
| Encounter documentation | `his_followup_cards`, `his_instruction_templates`, `his_referrals` | `followupcard`, `instruction` (A6) |
| Companion pattern | `his_patient_spouses` (1:1 to `lab_patients`) | `patients` husband columns; generic `subject` discriminator (A9) |
| Vocabulary engine | `his_lookups` (domain, parent_id, title_ar, title_en, sort, is_active) | the ~190-list lookup engine (A8) — engine in HIS, OB/GYN *content* seeded by Obgy module |
| Media | spatie medialibrary + `his_annotated_diagrams`, `his_diagram_markers` | `sonar` 3.1 GB, `gtimage`/`gtdetail` (A7) |

### 2.2 `Modules/Obgy` — the women's-health specialty module (bucket B)

Owns: `obgy_pregnancies`, `obgy_antenatal_visits`, `obgy_antenatal_ultrasounds`, `obgy_pregnancy_losses`, `obgy_delivery_registrations`, `obgy_ivf_cycles` (one active per patient via partial unique index), `obgy_ivf_cycle_visits` + `obgy_follicle_measurements`, stage tables (`obgy_oocyte_retrievals`, `obgy_semen_samples`, `obgy_embryo_transfers`, `obgy_cryopreservations`, `obgy_endometrial_preps`, `obgy_cycle_outcomes`), `obgy_semen_analyses` (WHO flags), `obgy_hormone_results` + `obgy_hormone_definitions`, `obgy_imaging_studies` + `obgy_fetal_scan_findings` + `obgy_gyna_scan_findings`, `obgy_endoscopy_procedures/findings/terms`, `obgy_infertility_files`, `obgy_menstrual_histories`, `obgy_obstetric_histories` + `obgy_obstetric_babies`, `obgy_contraception_histories`, `obgy_past_art_cycles`, `obgy_lis_test_map` (276 legacy tests → LIS catalog), plus the OB/GYN lookup **content** rows in `his_lookups` namespaced `obgy.*`.

Every clinical row FKs `encounter_id → his_encounters.id`. Every billable act posts a `his_folio_charges` row through the HIS charge service. The module ships its own `ObgyPermissionDependencies` and setting definitions, exactly like `LisPermissionDependencies` / `LabSettingDefinitionSeeder`.

### 2.3 Untouched modules

`Modules/LIS` (governing constraint), `Modules/Accounting`, `Modules/HRM`, `Modules/Inventory`, `Modules/NPHIES` (generalized in Phase D, not rebuilt), `Modules/Core` (gains only the Phase-0 items: `DataScope`, `PermissionDependencyRegistry`, later `ChargePostingService`).

---

## 3. Role of OBGY assets — exact statement

**OBGY is the validated seed, the content donor, and the first proof tenant of Modules/HIS — never its codebase and never a dependency of it.**

- **Seed:** bucket A of the rebuild blueprint (~100 legacy tables → ~30 `his_*` tables) *is* the initial schema of `Modules/HIS`; D4's approved-but-deferred Encounter/Folio design is enriched with OBGY's proven queue/period/closure mechanics.
- **Content donor:** ~190 production-curated Arabic vocabularies (exported fresh from production — risk R7: the 2024 dump ships them empty, and RedBean fluid-mode tables `gynaph`/`sefo`/`followupdrugs` exist only in production) seed `his_lookups`; the ~2,000-item drug catalog masters into the Core Product item master.
- **Proof tenant:** the OBGY clinic — with three immediate-remediation security findings forcing migration — is the first paying customer; its 10-year dataset is the ETL rehearsal and acceptance corpus (patient dedup R10, encounter heuristic matcher R2).
- **Specialty module:** bucket B (~150 tables → ~40 `obgy_*` tables) becomes `Modules/Obgy`, importing HIS forward; **HIS never imports Obgy**, so Tier 2 "Moon Clinic" remains sellable without a single OB/GYN table installed.
- **Discarded outright:** bucket C (~60 tables), the entire `aw` framework, all legacy endpoints (R12), the cURL ERP sync (`client.obygyPatientId`, `erpSellbill`) — replaced natively by `lab_patients.partner_id` + `AccBpExt` + `CreateJournalEntry`.

---

## 4. Dependency graph and rules

```
                Modules/Core (DataScope, PermissionDependencyRegistry,
                              SequenceService, SettingsService, ChargePostingService*)
                     ▲  ▲  ▲  ▲
   Modules/Accounting│  │HRM│  │Inventory          Modules/LIS
        ▲            │  ▲  │  ▲                       ▲   │ events only
        │            │  │  │  │   forward imports     │   ▼
        └────────────┴──┴──┴──┴───── Modules/HIS ─────┘  (LabResultReleased,
                                          ▲               LabRequestCompleted,
                                          │ forward        CriticalResultDetected)
                                    Modules/Obgy
```

Rules (each one testable in CI):

1. `Modules/HIS` imports LIS/Accounting/HRM/Inventory/Core **forward** via Actions/Services only (`CreateLabRequest`, `CreateJournalEntry`, `StockService`, `SequenceService`).
2. `Modules/LIS` never imports HIS — backward information flows exclusively through the three existing events; no LIS migration, route, or hot path changes (D5 gate: suites green + before/after curl timing on worklist + reception, regression reverts the item).
3. `Modules/Obgy` imports HIS forward; **HIS never imports Obgy** — same golden rule one level up, protecting Tier 2 vs Tier 3 license separation.
4. Patient access from HIS/Obgy only via `LabPatient::internal()` named scope; no global scope on `lab_patients`; B2B rows never visible to clinical UIs.
5. All GL posting via `Modules/Accounting/Actions/CreateJournalEntry` behind the generalized `ChargePostingService` (settings prefix `his.*`); a clinical act bills exactly once — enforced by `UNIQUE(source_type, source_id)` on `his_folio_charges`; lab invoices enter the folio **by reference, never re-posted** (D4 anti-double-posting).
6. Permissions: `PermissionDependencyRegistry::register('his', HisPermissionDependencies::class)` and `::register('obgy', ...)` from each ServiceProvider boot — the W1-4 pattern.
7. Specialty modules never define their own patient, doctor, drug, service-price, or treasury tables — those are `lab_patients`, `lab_doctors` (+`employee_id` chain), Core Product, `his_services`, and the LIS/Core cashier stack respectively.

---

## 5. Event / FK contracts (real names)

### Existing — consumed as-is
| Contract | Direction | Source |
|---|---|---|
| `LabResultReleased`, `LabRequestCompleted`, `CriticalResultDetected` | LIS → HIS (events, backward) | `Modules/LIS/app/Events/`; dispatched at `LabResultController.php:516,1058`, `LabWorkflowService.php:75,120` |
| `Modules/LIS/app/Actions/CreateLabRequest(..., encounter_id)` | HIS → LIS (forward action, W1-3) | extracted byte-identical from `LabRequestController::store` ~172–471 |
| `lab_requests.encounter_id` → `his_encounters.id` | FK added at HIS kickoff | inert column live since migration `2026_06_10_160000` |
| `lab_doctors.employee_id` → `employees.id` → `users.id` | identity chain (W1-2) | HRM migration `2026_03_01_100003:18` |
| `lab_patients.partner_id` → `business_partners` → `AccBpExt.ar_account_id` | finance bridge | `CreatePartnerAccounts::ensurePartnerAccounts` |
| `Modules/Accounting/Actions/CreateJournalEntry` (`source_type='his_invoice'`) | HIS → Accounting | pattern: `PostLabInvoice.php` / `PostLabPayment.php` |
| `NphiesClaimService::submit()` → `nphies_transactions` | invoice → claims | generalized in Phase D (LabPatient/LabInvoice type-hints widened) |

### New — defined by Modules/HIS
| Event | Payload | Consumers |
|---|---|---|
| `EncounterOpened` / `EncounterClosed` | encounter_id, patient_id, type | Obgy sheet routing, dashboards |
| `AppointmentBooked` / `AppointmentCancelled` | appointment_id, period_id | queue board, portal, notifications |
| `FolioChargePosted` | folio_id, source_type, source_id, total | folio running totals, audit |
| `FolioClosed` | folio_id, payer split | payer-split invoice generation (self_pay / insurance) |
| `PrescriptionDispensed` | prescription_id, items[] | Inventory `StockService::decreaseStock` (movement_type=issue, reference morph) — replaces legacy `recepittmp`/`receiptdrugs` push |
| `SurgicalBookingScheduled` / `OperativeNoteSigned` | booking/note ids | OR list, pathology, folio charges |

`Modules/Obgy` defines its own domain events (`PregnancyOpened`, `DeliveryRecorded`, `IvfCycleStageCompleted`) consumed only inside Obgy and by reporting — HIS never listens to Obgy (rule 3).

---

## 6. Angular frontend organization

Follows the proven LIS triple-context pattern (embedded `/core/lis/*`, standalone `/lab/*`, public portal):

- **`features/his/`** — standalone components: reception desk + patient 360, appointment book + period management, **queue board** (server-driven, cloned from the `lis-worklist.service.ts` contract: WorklistCard/WorklistRow + primary actions, behind a feature flag), encounter workspace shell, folio/cashier screens (reusing LIS treasuries/cashier-shift/payment-method screens' structure and services), surgical booking list, generic sheet renderer (Q&A engine + exam engine driven by `his_history_questions`/`his_lookups` metadata).
- **`features/obgy/`** — specialty sheets (ANC, gyna, infertility, IVF monitoring grid with follicle chart, andrology, imaging with annotated diagrams) mounted *inside* the HIS encounter workspace via route children; lazy-loaded, hidden when the Obgy module/license key is off.
- **Standalone clinic layout** `/clinic/*` with `ClinicLayoutComponent`, mirroring `lis-standalone.routes.ts` + `LisLayoutComponent` (`/lab/*`) — same components as embedded mode.
- **Public surfaces:** waiting-room display route (reborn `obgy/screen/` app) and patient portal reusing the `/p/:token` + `PortalLinkDialogComponent` (QR/WhatsApp) pattern for appointment and report access.
- **Services:** `core/services/his-*.service.ts`, `obgy-*.service.ts` — `providedIn:'root'`, `listAll()` forkJoin pagination, `X-Authorization` interceptor; NgRx only for reference data (periods, services, lookups); operational screens use signals like the LIS worklists.
- **Permissions/i18n:** route `data.permissions=['his.']` / `['obgy.']` with `permissionGuard` dot-boundary matching + `*appCan`; `HIS`/`OBGY` UPPER_SNAKE namespaces in `en.json`/`ar.json`, English-first, RTL handled by `LanguageService`.
- **Reports:** `his-report.service.ts` and `obgy-report.service.ts` cloned from `lis-html-report.service.ts` (configurable header) + `lis-report-pdf.service.ts`; financial documents via the shared `shared/print` GenericPrintData engine. The booking wizard reuses `request-wizard-v2`'s 4-step pattern (patient → services → billing → payment); LIS lab ordering opens the existing LIS wizard in embedded Dialog mode (D3).

---

## 7. Build & migration phases (S/M/L; 1 person-week ≈ 5 dev-days)

| Phase | Content | Size | Estimate |
|---|---|---|---|
| **P0 — Platform Readiness** (approved, prerequisite, unchanged) | W1-1 DataScope hoist, W1-2 `employee_id`, W1-3 `CreateLabRequest` + `encounter_id`, W1-4 PermissionDependencyRegistry, W2-1 B2B hardening, W2-2 gating log-only | **S** | ~7–10 dev-days |
| **A — Spine + Front desk** | `his_encounters`/`his_folios`/`his_folio_charges` (FK `lab_requests.encounter_id` activated), `his_appointments`/`his_visit_periods`/queue board + waiting screen, `his_services`, Core `ChargePostingService` (generalized `PostLabInvoice`/`PostLabPayment`, `his.*` settings keys), cashier/treasury reuse, **ETL-1: OBGY patients → `lab_patients` internal rows** (`statusno`→`mrn`, NID→`national_id`, dedup per R10) + `his_patient_spouses` | **M** | 6–9 pw |
| **B — Generic clinical engines** | `his_prescriptions`/`his_lab_orders` (LIS ordering via `CreateLabRequest`, results via `LabResultReleased` listener), Q&A history engine, examination engine, `his_lookups` + **production vocabulary export** (R7 gate: fresh prod dump incl. `gynaph`), follow-up cards/instructions/referrals, media pipeline start (checksummed staged rsync of 4.8 GB) | **M** | 5–8 pw |
| **C — Modules/Obgy + go-live** | ANC (3-generation merge → `obgy_pregnancies`), gyna, infertility file, IVF cycle + monitoring grid, andrology, imaging + annotated diagrams, endoscopy; perioperative core tables (`his_surgical_bookings`/`his_operative_notes`) shipped here driven by real OR demand; **ETL-2: clinical history** (patient+date heuristic encounter matcher, R2) ; first tenant live = **Tier 3 Moon Women's Health** | **L** | 8–12 pw |
| **D — Generalize + second specialty pilot** | NPHIES generalization (widen `LabPatient`/`LabInvoice` type-hints, `nphies_*` columns on HIS invoices per `2026_04_03_000001` pattern), price-list/insurance generalization (the spec's largest register item), one thin second specialty (e.g. general-medicine clinic) to *prove* the engines are content-only | **M** | 4–6 pw |
| **E — Inpatient patch** (honest: OBGY contributes ~nothing here) | wards/rooms/beds + bed map, ADT, nightly bed-day charges → folio, deposits on receipt-voucher/FIFO precedents, basic nursing station + eMAR, ER triage | **L** | 10–16 pw |

**Cumulative:** women's-health hospital sellable at ~20–29 pw (after P0); proven-generic outpatient platform at ~24–35 pw; full general hospital (Tier 4) at ~34–51 pw. Comparable to the approved roadmap's 21–35 pw to inpatient demo, but with a paying reference customer and a content-rich product landed roughly halfway through instead of at the end.

---

## 8. Where this honestly breaks — and the patches

| Break | Honest statement | Patch |
|---|---|---|
| **Inpatient spine (ADT/beds/ER/eMAR/nursing)** | OBGY is outpatient-only; `floors`/`devices`/`device_tracking` were incomplete and dropped (§1.16). 5 of 14 canonical HIS capabilities get **zero** seed from this proposal. | Phase E is budgeted as a full net-new build (10–16 pw) per the approved P2 design; the Encounter spine carries `type=ipd` and `parent_encounter_id` from day one so admission becomes a new encounter type + bed-day charge source, not a schema rework. |
| **OB/GYN bias leaking into the "generic" core** | The exam finding lookups (breast/hirsutism/thyroid), the `subject=husband` discriminator, and the day-period scheduling model all carry women's-clinic fingerprints. | Hard review gate at every Phase A/B PR: schema must be content-free (findings/lookups are data rows in `his_lookups`, `subject` generalized to patient/companion); Phase D's second-specialty pilot is the *binding acceptance test* of genericity, scheduled before inpatient money is spent. |
| **Scheduling model may be too weak** | OBGY's capacity-per-day-period model is simpler than slot/diary/multi-resource scheduling that dental/radiology will demand. | `his_visit_periods` is the v1 engine; the appointment table carries `scheduled_at` + `resource` columns from day one so a slot engine is additive. Acknowledged as the highest-risk seed: budget +1–2 pw contingency in Phase A. |
| **Collision with approved v1 admin-financial scoping (Risk #7, EMR scope creep)** | This proposal ships deep clinical documentation in Phase C — earlier than the HMS report's "EMR is a separate later decision". | Explicit owner reconciliation required at board level: clinical depth lives **only behind the Obgy license key**, funded by the women's-health segment; the HIS core itself stays admin-financial + thin generic engines, consistent with the tiering rule. This is a scoping amendment, not a topology change. |
| **No insurance seed** | Legacy OBGY is cash/visa only; the Saudi-critical NPHIES/claims flow gets zero acceleration from OBGY. | Phase D reuses the production NPHIES module wholesale (generalizing type-hints + invoice columns) — same cost in either proposal; it is simply not a point in OBGY's favor. |
| **Single-customer gravity** | Designing against one clinic risks overfitting and revenue concentration. | The Phase D second-specialty gate + the rule "HIS never imports Obgy" structurally prevent overfit; Tier 2 Moon Clinic (HIS without Obgy) is demoable at end of Phase B for pipeline diversification. |
| **ETL risks R2/R7** | Clinical rows never reference `visits` → encounter linkage is heuristic (patient+date); curated vocabularies exist only in production. | R7: a fresh production export is a Phase B entry gate (blocking). R2: heuristic matcher with confidence scores, unmatched rows land as date-anchored "historical record" encounters flagged `source=migration`; clinicians review queues, never silent guesses. |
| **Legacy security exposure during the build** | The legacy system stays in production for months. | Immediate remediation on legacy (already mandated): close `mobileservices.php`, remove web-accessible dumps, parameterize the four confirmed SQLi sites — billed as part of the migration engagement, independent of this architecture. |

---

## 9. Summary verdict requested from the board

Approve `Modules/HIS` whose initial schema is the OBGY blueprint's module-agnostic layer (§95 2.6 designed it for exactly this), with `Modules/Obgy` as its first specialty consumer and the OBGY clinic as first tenant; sequence revenue Tier 1 → 3 → 2 → 4; honor every settled decision (one HIS module, forward-only imports, untouchable LIS, shared `lab_patients` MPI); and accept two explicit amendments: (1) clinical depth ships early but only behind the Obgy license key, (2) a second-specialty genericity gate is mandatory before inpatient (Phase E) funding.
