# Enterprise GO/HOLD Command Gate 0.78.9

## Rola architektoniczna

Enterprise GO/HOLD Command Gate jest warstwą konsolidującą przedoperacyjną gotowość sprawy pacjenta.

Nie zastępuje źródłowych modułów. Czyta ich sygnały i zapisuje jeden centralny wynik w Case Spine.

```text
Case Spine
→ Document & Consent Gate
→ GO/HOLD Command Gate
→ Journey Orchestrator
→ Work Queue
→ Communication Bridge
```

## Modele danych

### `enterprise_go_live_gate_domains`

Blueprint domen bramki. Każda domena ma:

- `domain_key`,
- `source_strategy`,
- `severity`,
- `responsible_role`,
- `required_flag`,
- `hard_block_go`,
- `action_key`.

### `enterprise_case_go_live_status`

Centralny status dla sprawy:

- `master_status`: `GO`, `HOLD`, `NO-GO`,
- statusy domenowe,
- score,
- liczba blockerów,
- liczba ostrzeżeń,
- źródła legacy i OR Readiness,
- `summary_json`.

### `enterprise_case_go_live_items`

Szczegółowe elementy bramki dla domen:

- dokumenty,
- badania,
- anestezjologia,
- płatności,
- implanty,
- SITE,
- OR Readiness,
- komunikacja.

### `enterprise_go_live_gate_runs`

Historia uruchomień oraz liczby GO/HOLD/NO-GO.

## Algorytm decyzji

1. Każda aktywna domena jest oceniana jako `GO`, `HOLD` albo `NO-GO`.
2. Jeżeli jakakolwiek domena ma `NO-GO`, master status = `NO-GO`.
3. Jeżeli nie ma `NO-GO`, ale istnieje wymagany hard blocker, master status = `HOLD`.
4. W przeciwnym razie master status = `GO`.

## Integracje

- Legacy `case_go_live_gatekeeper` jest używany jako adapter, jeżeli jest dostępny.
- Document Gate jest uruchamiany jako zależność przed oceną centralną.
- Journey dostaje gate `enterprise_go_live_gate`.
- Work Queue dostaje zadania dla odpowiednich ról.
- Communication Bridge może przygotować draft komunikacji, ale bez automatycznej wysyłki.

## Safety

0.78.9 nie wykonuje automatycznego release GO, nie wysyła komunikacji pacjentowi i nie podpisuje dokumentów.
