Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions app/Nightingale/Demo/NightingaleDemoCohort.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,42 @@ final class NightingaleDemoCohort

public const DEMO_NOTICE = 'DEMO — NOT FOR CLINICAL USE';

public const CATALOG_RELEASE_UUID = '019f95de-b9a4-726a-91d3-41d6d911d4c4';

public const CATALOG_DATASET_KEY = 'drg-care-pathways-verification-package-v43.1-20260721';

public const CATALOG_SOURCE_CSV_SHA256 = '2e3ac28238cdb8d7e1002117de6ad824'.'d71882dae54df77fe4abd214b268a6ae';

public const CATALOG_VERIFICATION_WORKBOOK_SHA256 = '42cadf84dce297c5a839784148ebd2c5'.'375320350394c0d143411008ed5bd171';

public const CATALOG_DECLARED_BASELINE_SHA256 = '6819c1e111985da1fc62f38cdd85dd2'.'a34b69308f4cf9be9f8941fbce62bf8fd';

public const CATALOG_GROUPER_VERSION = '43.1';

public const CATALOG_PATHWAY_COUNT = 250;

public const CATALOG_PATHWAY_DRG_ASSOCIATION_COUNT = 802;

public const CATALOG_UNIQUE_DRG_CODE_COUNT = 770;

public const CATALOG_CLAIM_COUNT = 10123;

public const CATALOG_SOURCE_COUNT = 811;

public const CATALOG_CHANGE_COUNT = 324;

public const CATALOG_EVIDENCE_VERIFIED_COUNT = 96;

public const CATALOG_EVIDENCE_LIMITATIONS_COUNT = 154;

public const CATALOG_SIGNOFF_QUEUE_COUNT = 96;

public const CATALOG_SPECIALIST_REVIEW_COUNT = 148;

public const CATALOG_REDESIGN_COUNT = 6;

public const CATALOG_VOLUME_CONTROL_TOTAL = 32967000;

public const CATALOG_COVERAGE_CONTROL_PERCENT = '99.000';

public const RELEASE_POLICY_VERSION = 'nightingale-investor-demo-disclosure-v1';

public const SOURCE_SYSTEM_KEY = 'nightingale-synthetic-demo';
Expand Down
31 changes: 28 additions & 3 deletions app/Nightingale/Demo/NightingaleDemoCohortProvisioner.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,16 @@ private function assertPristineReferencePrincipal(PatientPrincipal $principal):
private function catalogBindings(bool $forUpdate): array
{
$releaseQuery = DB::table('care_pathways.catalog_releases')
->where('catalog_release_uuid', NightingaleDemoCohort::CATALOG_RELEASE_UUID)
->where('dataset_key', NightingaleDemoCohort::CATALOG_DATASET_KEY);
->where('dataset_key', NightingaleDemoCohort::CATALOG_DATASET_KEY)
->where('source_csv_sha256', NightingaleDemoCohort::CATALOG_SOURCE_CSV_SHA256)
->where(
'verification_workbook_sha256',
NightingaleDemoCohort::CATALOG_VERIFICATION_WORKBOOK_SHA256,
)
->where(
'declared_baseline_sha256',
NightingaleDemoCohort::CATALOG_DECLARED_BASELINE_SHA256,
);
if ($forUpdate) {
$releaseQuery->lockForUpdate();
}
Expand All @@ -432,6 +440,18 @@ private function catalogBindings(bool $forUpdate): array
$release = $releases->sole();
if ($release->grouper_version !== NightingaleDemoCohort::CATALOG_GROUPER_VERSION
|| (int) $release->pathway_count !== NightingaleDemoCohort::CATALOG_PATHWAY_COUNT
|| (int) $release->pathway_drg_association_count !== NightingaleDemoCohort::CATALOG_PATHWAY_DRG_ASSOCIATION_COUNT
|| (int) $release->unique_drg_code_count !== NightingaleDemoCohort::CATALOG_UNIQUE_DRG_CODE_COUNT
|| (int) $release->claim_count !== NightingaleDemoCohort::CATALOG_CLAIM_COUNT
|| (int) $release->source_count !== NightingaleDemoCohort::CATALOG_SOURCE_COUNT
|| (int) $release->change_count !== NightingaleDemoCohort::CATALOG_CHANGE_COUNT
|| (int) $release->evidence_verified_count !== NightingaleDemoCohort::CATALOG_EVIDENCE_VERIFIED_COUNT
|| (int) $release->evidence_limitations_count !== NightingaleDemoCohort::CATALOG_EVIDENCE_LIMITATIONS_COUNT
|| (int) $release->signoff_queue_count !== NightingaleDemoCohort::CATALOG_SIGNOFF_QUEUE_COUNT
|| (int) $release->specialist_review_count !== NightingaleDemoCohort::CATALOG_SPECIALIST_REVIEW_COUNT
|| (int) $release->redesign_count !== NightingaleDemoCohort::CATALOG_REDESIGN_COUNT
|| (int) $release->volume_control_total !== NightingaleDemoCohort::CATALOG_VOLUME_CONTROL_TOTAL
|| number_format((float) $release->coverage_control_percent, 3, '.', '') !== NightingaleDemoCohort::CATALOG_COVERAGE_CONTROL_PERCENT
|| $release->state !== 'inactive'
|| (bool) $release->clinical_signoff_complete
|| (int) $release->clinical_signoff_count !== 0
Expand Down Expand Up @@ -495,6 +515,7 @@ private function catalogBindings(bool $forUpdate): array
}

$members[$alias] = [
'catalog_release_uuid' => (string) $release->catalog_release_uuid,
'pathway_version_id' => (int) $row->pathway_version_id,
'pathway_version_uuid' => (string) $row->pathway_version_uuid,
'pathway_key' => (string) $row->pathway_key,
Expand Down Expand Up @@ -697,7 +718,7 @@ private function principalPreferences(string $alias, array $binding): array
'clinical_use_permitted' => false,
'automatic_enrollment' => false,
'catalog_binding' => [
'catalog_release_uuid' => NightingaleDemoCohort::CATALOG_RELEASE_UUID,
'catalog_release_uuid' => $binding['catalog_release_uuid'],
'pathway_version_uuid' => $binding['pathway_version_uuid'],
'pathway_key' => $binding['pathway_key'],
'ms_drg' => $binding['ms_drg'],
Expand Down Expand Up @@ -1241,6 +1262,10 @@ private function verifyWithinTransaction(array $catalog): array
}
$unitIds[] = (int) $encounter->unit_id;
$binding = $catalog['members'][$alias];
if ($this->canonicalJson((array) $principal->preferences)
!== $this->canonicalJson($this->principalPreferences($alias, $binding))) {
throw new RuntimeException("nightingale_demo_{$alias}_principal_not_ready");
}
$projections = PatientEncounterProjection::query()
->where('access_grant_id', $grant->getKey())
->get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ The sole release was `inactive`, institutionally `not_reviewed`, and not clinica
signed off. Every observed stage and milestone definition was `draft`. No canonical
catalog row was changed.

The 2026-08-05 pre-provisioning reconciliation confirmed the production release UUID is
`019f8702-a824-7172-b1dc-ab3612d2f1e8`. That UUID is environment-generated provenance,
not the portable content identity. The exact cross-environment identity is the dataset
key plus source CSV, verification workbook, and declared-baseline SHA-256 fingerprints;
the provisioner separately rechecks grouper, all aggregate control counts, inactive
state, and zero clinical signoff before accepting the row. The production evidence values
are recorded in the paired implementation plan.

## Exact selected scenario facts

| Demo handle | Pathway key | MS-DRG | Exact codebook title | Stages | Milestones |
Expand Down Expand Up @@ -110,5 +118,10 @@ authorization to provision.
- App identity: the merged PR #111 uniqueness guard reports seven unique iOS identifiers
and two unique Android identifiers in the reconciled checkout.

No production mutation, account activation, deploy, or live credential verification has
occurred at this checkpoint.
PR #118 passed all 19 required checks, merged through protected `main` as
`06e3d0b363f2ef553f857aa426f220ccff7fc8a4`, and is present in the canonically deployed
`main` release `a38044ca9f0df564b7de08cf915bdcc189a4d860`. The first production cohort preview
failed closed before any account write because the implementation had pinned a generated
fixture release UUID. No cohort principal, credential, grant, encounter, projection,
session, or token was created. A semantic catalog-identity correction is now the only
code gate before the production preview/apply/verify/suspend-and-reapply sequence.
Loading
Loading