@openhi/constructs 0.0.159 → 0.0.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.mts CHANGED
@@ -26,8 +26,9 @@ export { C as CascadeChunkInput, a as CascadeFinalizeInput, b as CascadeFinalize
26
26
  import { StateMachine } from 'aws-cdk-lib/aws-stepfunctions';
27
27
  export { B as BRIDGED_STATUSES, a as BridgedStatus, C as CLOUDFORMATION_EVENT_SOURCE, b as CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE, c as CONTROL_EVENT_BUS_NAME_ENV_VAR, d as CloudFormationStackStatusChangeDetail, O as OPENHI_REPO_TAG_KEY_ENV_VAR, e as OPENHI_TAG_KEY_PREFIX_ENV_VAR, P as PLATFORM_DEPLOY_BRIDGE_ACTOR_SYSTEM } from './events-COI0BuMM.mjs';
28
28
  export { R as RENAME_CASCADE_CONSUMER_NAME, a as RENAME_CASCADE_DEFAULT_CONCURRENCY, b as RENAME_CASCADE_FAILED_THRESHOLD, c as RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR, d as RENAME_CASCADE_SLOW_THRESHOLD_SECONDS, e as RenameCascadeChunkInput, f as RenameCascadeFinalizeInput, g as RenameCascadeFinalizeOutput, h as RenameCascadeListInput, i as RenameCascadeListOutput } from './events-Da_cFgtc.mjs';
29
- import { Patient, Practitioner, Observation, Encounter, Account } from '@openhi/types';
30
- export { D as DEMO_PERIOD, a as DEMO_TENANT_SPECS, b as DEMO_URN_SYSTEM, c as DEV_USERS, d as DemoDevUser, e as DemoTenantSpec, f as DemoWorkspaceSpec, O as OPENHI_RESOURCE_URN_SYSTEM, P as PLACEHOLDER_TENANT_ID, g as PLACEHOLDER_WORKSPACE_ID, S as SEED_DEMO_DATA_CONSUMER_NAME, h as demoMembershipId, i as demoRoleAssignmentId, j as demoRolesForUserInTenant, k as demoScenarioIdentifier, o as openhiResourceIdentifier } from './events-DTgo2dcW.mjs';
29
+ import { Patient, Practitioner, Observation, Encounter, Account, Location, Organization, Coverage, Appointment, Condition, Procedure, Claim, PaymentNotice, Practitioner_Qualification } from '@openhi/types';
30
+ import { O as OpenHiContext } from './openhi-context-CaBH8SFo.mjs';
31
+ export { D as DEMO_PERIOD, a as DEMO_TENANT_SPECS, b as DEMO_URN_SYSTEM, c as DEV_USERS, d as DemoDevUser, e as DemoTenantSpec, f as DemoWorkspaceSpec, O as ON_SITE_DEMO_TENANT_ID, g as ON_SITE_DEMO_WORKSPACE_ID, h as OPENHI_RESOURCE_URN_SYSTEM, P as PLACEHOLDER_TENANT_ID, i as PLACEHOLDER_WORKSPACE_ID, S as SEED_DEMO_DATA_CONSUMER_NAME, j as demoMembershipId, k as demoRoleAssignmentId, l as demoRolesForUserInTenant, m as demoScenarioIdentifier, o as openhiResourceIdentifier } from './events-TG654e7L.mjs';
31
32
  export { P as PROVISION_DEFAULT_WORKSPACE_DETAIL_TYPE, a as ProvisionDefaultWorkspaceRequestedDetail, U as USER_ONBOARDING_EVENT_SOURCE, b as buildProvisionDefaultWorkspaceRequestedDetail } from './events-CVA3_eEB.mjs';
32
33
  export { ControlPlaneOwningDeleteCompleteV1, ControlPlaneOwningDeleteCompleteV1Detail, ControlPlaneOwningDeleteFailedV1, ControlPlaneOwningDeleteFailedV1Detail, ControlPlaneOwningDeleteV1, ControlPlaneOwningDeleteV1Detail, ControlPlaneRenameCompleteV1, ControlPlaneRenameCompleteV1Detail, ControlPlaneRenameFailedV1, ControlPlaneRenameFailedV1Detail, ControlPlaneRenameV1, ControlPlaneRenameV1Detail, OPENHI_DATA_SOURCE, OPENHI_OPS_SOURCE, OWNING_ENTITY_TYPE, OwningEntityType, PlatformDeploymentCompletedV1, PlatformSystemDataSeededV1, RENAMABLE_ENTITY_TYPE, RenamableEntityType } from '@openhi/workflows';
33
34
  import '@aws-sdk/client-dynamodb';
@@ -2115,6 +2116,111 @@ interface DemoWorkspaceDataPlaneFixtures {
2115
2116
  readonly observations: ReadonlyArray<Observation>;
2116
2117
  readonly encounters: ReadonlyArray<Encounter>;
2117
2118
  readonly accounts: ReadonlyArray<Account>;
2119
+ /**
2120
+ * Facility (FHIR Location) fixtures. Optional — only the
2121
+ * on-site UAT demo workspace seeds facilities (#1303). Defaults
2122
+ * to the empty array when omitted.
2123
+ */
2124
+ readonly locations?: ReadonlyArray<Location>;
2125
+ /**
2126
+ * Directory Organization fixtures (#1308). Optional — only the
2127
+ * on-site UAT demo workspace seeds Organizations today. Covers
2128
+ * DME suppliers and insurance payor contacts; defaults to the
2129
+ * empty array when omitted.
2130
+ */
2131
+ readonly organizations?: ReadonlyArray<Organization>;
2132
+ /**
2133
+ * Insurance Coverage fixtures (#1304). Optional — only the
2134
+ * on-site UAT demo workspace seeds Coverages today. Defaults to
2135
+ * the empty array when omitted. Coverages reference their
2136
+ * `beneficiary` Patient via `Patient/<id>`, so the seeder writes
2137
+ * Coverages after Patients in the same workspace pass.
2138
+ */
2139
+ readonly coverages?: ReadonlyArray<Coverage>;
2140
+ /**
2141
+ * Optional dynamic Patient builder. Resolved by the seeder at
2142
+ * write time so per-tenant fixtures that depend on other
2143
+ * fixture modules (cross-module references between blocks +
2144
+ * facilities + facility patients) can be evaluated lazily,
2145
+ * avoiding the TDZ that hits when one fixture module reads a
2146
+ * top-level const from another mid-cycle. When set, the seeder
2147
+ * iterates `buildPatients()` instead of `patients`.
2148
+ */
2149
+ readonly buildPatients?: () => ReadonlyArray<Patient>;
2150
+ /**
2151
+ * Optional dynamic Coverage builder. Same lazy-evaluation
2152
+ * contract as {@link buildPatients}.
2153
+ */
2154
+ readonly buildCoverages?: () => ReadonlyArray<Coverage>;
2155
+ /**
2156
+ * Optional dynamic Appointment builder. Resolved by the seeder
2157
+ * with `baseContext` so block-style Appointments can anchor
2158
+ * their recurrence to the current ISO week (#1303 — block
2159
+ * Appointments must show up at a useful position on the demo
2160
+ * calendar relative to "today"). When omitted, no Appointments
2161
+ * are written for this workspace.
2162
+ */
2163
+ readonly buildAppointments?: (baseContext: OpenHiContext) => ReadonlyArray<Appointment>;
2164
+ /**
2165
+ * Optional static wound / problem Condition fixtures (#1306).
2166
+ * Wound Conditions reference their Patient via `subject` and
2167
+ * sit upstream of wound-exam Observations (which reference the
2168
+ * Condition via `focus`) and wound Procedures (which reference
2169
+ * the Condition via `reasonReference`). The seeder writes
2170
+ * Conditions immediately after Patients so the reference chain
2171
+ * resolves cleanly on read paths.
2172
+ */
2173
+ readonly conditions?: ReadonlyArray<Condition>;
2174
+ /**
2175
+ * Optional static Procedure fixtures (#1306). Procedures
2176
+ * reference their Encounter via `encounter`, their wound
2177
+ * Condition via `reasonReference[0]`, and their Patient via
2178
+ * `subject`. Written after Encounters and Conditions so the
2179
+ * reference chain resolves cleanly on read paths.
2180
+ */
2181
+ readonly procedures?: ReadonlyArray<Procedure>;
2182
+ /**
2183
+ * Optional dynamic Condition builder. Same lazy-evaluation
2184
+ * contract as {@link buildPatients} — used so the on-site
2185
+ * encounter fixtures can anchor wound Conditions to the same
2186
+ * `baseContext.date` window the encounter dates are derived
2187
+ * from.
2188
+ */
2189
+ readonly buildConditions?: (baseContext: OpenHiContext) => ReadonlyArray<Condition>;
2190
+ /**
2191
+ * Optional dynamic Encounter builder. Same lazy-evaluation
2192
+ * contract as {@link buildPatients} — encounter dates depend on
2193
+ * `baseContext.date` (past block occurrences for facility
2194
+ * patients, past visit cadence for home-health patients).
2195
+ */
2196
+ readonly buildEncounters?: (baseContext: OpenHiContext) => ReadonlyArray<Encounter>;
2197
+ /**
2198
+ * Optional dynamic Observation builder. Same lazy-evaluation
2199
+ * contract as {@link buildPatients} — wound-exam Observations
2200
+ * reference encounters that depend on `baseContext.date`.
2201
+ */
2202
+ readonly buildObservations?: (baseContext: OpenHiContext) => ReadonlyArray<Observation>;
2203
+ /**
2204
+ * Optional dynamic Procedure builder. Same lazy-evaluation
2205
+ * contract as {@link buildPatients} — wound Procedures
2206
+ * reference encounters that depend on `baseContext.date`.
2207
+ */
2208
+ readonly buildProcedures?: (baseContext: OpenHiContext) => ReadonlyArray<Procedure>;
2209
+ /**
2210
+ * Optional dynamic Claim builder (#1307). Claims reference
2211
+ * the encounter they bill via `item[].encounter`, the
2212
+ * patient's primary Coverage via `insurance[0].coverage`, and
2213
+ * therefore depend on the encounter + coverage builders above.
2214
+ * Written after Procedures so every reference chain resolves
2215
+ * cleanly on read paths.
2216
+ */
2217
+ readonly buildClaims?: (baseContext: OpenHiContext) => ReadonlyArray<Claim>;
2218
+ /**
2219
+ * Optional dynamic PaymentNotice builder (#1307). One
2220
+ * PaymentNotice per accepted Claim; references the Claim via
2221
+ * `request` + `payment`. Written after Claims.
2222
+ */
2223
+ readonly buildPaymentNotices?: (baseContext: OpenHiContext) => ReadonlyArray<PaymentNotice>;
2118
2224
  }
2119
2225
  /**
2120
2226
  * Per-workspace fixtures the data-plane phase writes on every fire.
@@ -2154,6 +2260,1041 @@ declare const DEMO_DATA_PLANE_FIXTURES: ReadonlyArray<DemoWorkspaceDataPlaneFixt
2154
2260
  */
2155
2261
  declare const PLATFORM_SCOPE_TENANT_ID = "platform";
2156
2262
 
2263
+ /**
2264
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-blocks.md
2265
+ *
2266
+ * Hand-authored weekly scheduling block fixtures the
2267
+ * `seed-demo-data` workflow upserts into the on-site-medical UAT
2268
+ * demo tenant ({@link ON_SITE_DEMO_TENANT_ID} +
2269
+ * {@link ON_SITE_DEMO_WORKSPACE_ID}) on every non-prod deploy
2270
+ * (issue #1303).
2271
+ *
2272
+ * Modelling choice: blocks are represented as FHIR
2273
+ * `Appointment` resources with `appointmentType.code = "block"`
2274
+ * (matching the on-site app's `isBlockAppointment` helper at
2275
+ * `sites/app-ehr/src/types/appointment.ts`). The on-site
2276
+ * calendar reads `Appointment` records, not `Schedule`/`Slot`
2277
+ * resources, so seeding `Appointment`s is the path that
2278
+ * actually renders something for UAT testers. Each block is
2279
+ * "recurring weekly" — we materialize that as a window of
2280
+ * concrete weekly occurrences anchored to the week containing
2281
+ * the seeder's `baseContext.date`, so blocks always show up at
2282
+ * a useful position relative to "today" on the demo schedule.
2283
+ *
2284
+ * Topology — issue #1303 design:
2285
+ * - Facility 1 (Druid Hills Skilled Nursing) — TWO weekly
2286
+ * blocks: Tuesday + Thursday (the high-volume facility).
2287
+ * - Facility 2 (Buckhead Rehabilitation Center) — one
2288
+ * weekly block on Wednesday.
2289
+ * - Facility 3 (Decatur Senior Living) — one weekly block
2290
+ * on Monday.
2291
+ *
2292
+ * Each block is assigned one doctor and one scribe from the
2293
+ * demo provider pool (#1302). Doctors are distributed so no
2294
+ * single doctor covers all four blocks. Capacities accommodate
2295
+ * 12-20 patients each (the upstream patient-distribution
2296
+ * ticket #1304 reads {@link ON_SITE_DEMO_BLOCK_CAPACITY_EXTENSION_URL}
2297
+ * to spread patients across blocks).
2298
+ */
2299
+ /**
2300
+ * Extension URL stamped on every block Appointment carrying the
2301
+ * block's intended capacity (number of patients the block can
2302
+ * accommodate). FHIR Appointment has no first-class capacity
2303
+ * field, so we publish a local URL under the on-site
2304
+ * convention.
2305
+ */
2306
+ declare const ON_SITE_DEMO_BLOCK_CAPACITY_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/block-capacity";
2307
+ /** Coding system the on-site app expects on Appointment.appointmentType. */
2308
+ declare const ON_SITE_APPOINTMENT_TYPE_SYSTEM = "https://onsite-medical.org/appointment-type";
2309
+ /**
2310
+ * Weeks of past occurrences materialized per block. Past
2311
+ * occurrences let UAT testers exercise "history" views without
2312
+ * waiting through time.
2313
+ */
2314
+ declare const BLOCK_OCCURRENCE_WEEKS_PAST = 4;
2315
+ /**
2316
+ * Weeks of future occurrences materialized per block. Future
2317
+ * occurrences cover the calendar's default "month ahead"
2318
+ * window plus room for testers to navigate forward.
2319
+ */
2320
+ declare const BLOCK_OCCURRENCE_WEEKS_FUTURE = 8;
2321
+ /**
2322
+ * Total weekly occurrences materialized per block template
2323
+ * (past + current week + future). Re-fires with the same
2324
+ * `baseContext.date` produce byte-identical occurrence ids.
2325
+ */
2326
+ declare const BLOCK_OCCURRENCES_PER_TEMPLATE: number;
2327
+ /**
2328
+ * ISO day-of-week index used by {@link BlockTemplate.dayOfWeek}.
2329
+ * 1 = Monday, ..., 7 = Sunday (matches ISO 8601 / FHIR usage).
2330
+ */
2331
+ type IsoDayOfWeek = 1 | 2 | 3 | 4 | 5 | 6 | 7;
2332
+ /** Stable block-template ids in dispatch order. Re-exported for downstream tickets. */
2333
+ declare const ON_SITE_DEMO_BLOCK_TEMPLATE_IDS: ReadonlyArray<string>;
2334
+ /**
2335
+ * Materialize every block template's weekly occurrences,
2336
+ * anchored to the Monday of the ISO week containing
2337
+ * `referenceIso` (typically `baseContext.date`). Each template
2338
+ * produces {@link BLOCK_OCCURRENCES_PER_TEMPLATE} appointments:
2339
+ * `BLOCK_OCCURRENCE_WEEKS_PAST` past weeks, the current week,
2340
+ * and `BLOCK_OCCURRENCE_WEEKS_FUTURE` future weeks. With the
2341
+ * default window of 4 + 1 + 8 = 13 occurrences per template ×
2342
+ * 4 templates, the seeder writes 52 block Appointments per
2343
+ * fire.
2344
+ *
2345
+ * Idempotency: ids are derived from `(templateId, weekOffset)`,
2346
+ * not from a wall-clock timestamp, so re-fires of the seeder
2347
+ * with the same `referenceIso` upsert the same Appointment
2348
+ * records (no duplicates). A re-fire with a different
2349
+ * `referenceIso` (e.g., the deploy event days later) writes a
2350
+ * new set of occurrences and leaves prior weeks' records as
2351
+ * orphaned past history — that is acceptable for UAT.
2352
+ */
2353
+ declare const buildOnSiteDemoBlockAppointments: (referenceIso: string) => ReadonlyArray<Appointment>;
2354
+ /**
2355
+ * Stable per-template (doctor, scribe) pair for the on-site
2356
+ * block schedule. Downstream tickets (e.g., the patient-
2357
+ * distribution helper in #1304) call this to look up which
2358
+ * provider pair staffs a given block without re-reading the
2359
+ * block-template list.
2360
+ */
2361
+ declare const findOnSiteDemoBlockTemplate: (templateId: string) => {
2362
+ readonly id: string;
2363
+ readonly facilityId: string;
2364
+ readonly displayName: string;
2365
+ readonly doctorId: string;
2366
+ readonly scribeId: string;
2367
+ readonly capacity: number;
2368
+ readonly dayOfWeek: IsoDayOfWeek;
2369
+ } | undefined;
2370
+
2371
+ /**
2372
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-claims.md
2373
+ *
2374
+ * Hand-authored Claim + PaymentNotice fixtures the `seed-demo-data`
2375
+ * workflow upserts into the on-site-medical UAT demo tenant
2376
+ * ({@link ON_SITE_DEMO_TENANT_ID} + {@link ON_SITE_DEMO_WORKSPACE_ID})
2377
+ * on every non-prod deploy (issue #1307).
2378
+ *
2379
+ * Topology — issue #1307 design:
2380
+ * - For each historical encounter (#1306), decide deterministically
2381
+ * whether the visit is billed or explicitly unbilled. The unbilled
2382
+ * decision is recorded by the *absence* of a Claim resource on
2383
+ * that encounter id; the on-site UI can derive "unbilled" by
2384
+ * listing claims and finding no match for an encounter.
2385
+ * - Billed encounters get exactly one {@link Claim} resource keyed
2386
+ * `<encounter-id>-claim`. The Claim carries:
2387
+ * - `status: "active"` (FHIR R4 enum only has
2388
+ * `active|cancelled|draft|entered-in-error`, none of which
2389
+ * encode our domain workflow status — see
2390
+ * {@link CLAIM_WORKFLOW_STATUS_EXTENSION_URL}).
2391
+ * - `claim-workflow-status` extension carrying the domain
2392
+ * status: `submitted` / `accepted` / `rejected` /
2393
+ * `reworked` / `resubmitted`.
2394
+ * - `insurance[0].coverage` referencing the patient's primary
2395
+ * {@link Coverage} (which is what carries the actual payor).
2396
+ * - `item[]` carrying one line: a wound-debridement CPT for
2397
+ * encounters that have a procedure (#1306), otherwise an
2398
+ * E/M visit code (99213/99214/99215) chosen deterministically.
2399
+ * - `total` denormalised from the single line item's `net`.
2400
+ * - Accepted claims get a {@link PaymentNotice} resource keyed
2401
+ * `<encounter-id>-payment` whose `paymentStatus` CodeableConcept
2402
+ * carries the domain payment status: `partial` / `full` /
2403
+ * `write-off`. Submitted / rejected / reworked / resubmitted
2404
+ * claims do not emit a PaymentNotice — the "in flux" subset is
2405
+ * specifically every `submitted` claim with no PaymentNotice.
2406
+ *
2407
+ * Modelling choices:
2408
+ * - **Single Claim per encounter** (not a chain). The "reworked"
2409
+ * status implies history (original rejected → resubmitted),
2410
+ * denormalised onto the same Claim via the
2411
+ * `claim-workflow-status` extension. On-site's current UI
2412
+ * (`sites/app-ehr/src/pages/patient/tabs/insurance/ClaimsTable.tsx`)
2413
+ * shows a single status badge per claim and does not need a
2414
+ * chain to render correctly.
2415
+ * - **PaymentNotice over a denormalised payment summary** —
2416
+ * PaymentNotice operations already exist in the data layer
2417
+ * (`packages/@openhi/constructs/src/data/operations/data/paymentnotice/`),
2418
+ * so we lean on real FHIR resources rather than adding a new
2419
+ * extension schema.
2420
+ * - **Domain status as an extension** — FHIR R4 `Claim.status`
2421
+ * does not include the workflow-status concepts the demo
2422
+ * needs, and stamping a non-standard string onto the enum
2423
+ * would fail the zod schema. The extension approach mirrors
2424
+ * how on-site already encodes domain state on other
2425
+ * resources (hospice status, QMB status, care-context, etc.).
2426
+ *
2427
+ * Distribution targets — chosen so all 5 workflow statuses plus
2428
+ * unbilled appear in the demo data, with payment-status variety
2429
+ * on the accepted bucket and a meaningful "in flux" submitted
2430
+ * bucket:
2431
+ * - ~15% of encounters are unbilled (no Claim)
2432
+ * - ~20% of claims are submitted (no PaymentNotice — "in flux")
2433
+ * - ~45% of claims are accepted (with PaymentNotice)
2434
+ * - ~40% of accepted: partial payment
2435
+ * - ~40% of accepted: full payment
2436
+ * - ~20% of accepted: write-off
2437
+ * - ~10% of claims are rejected
2438
+ * - ~15% of claims are reworked
2439
+ * - ~10% of claims are resubmitted
2440
+ *
2441
+ * Ids are deterministic — re-fires upsert the same records,
2442
+ * matching the workflow's idempotency contract.
2443
+ */
2444
+ /**
2445
+ * Extension URL stamped on every seeded Claim recording the
2446
+ * domain workflow status — submitted / accepted / rejected /
2447
+ * reworked / resubmitted. FHIR R4 `Claim.status` only carries
2448
+ * the lifecycle states `active|cancelled|draft|entered-in-error`,
2449
+ * so the demo's workflow status sits on this extension instead
2450
+ * of squeezing into the base enum.
2451
+ */
2452
+ declare const CLAIM_WORKFLOW_STATUS_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/claim-workflow-status";
2453
+ /** Sub-extension under {@link CLAIM_WORKFLOW_STATUS_EXTENSION_URL}. */
2454
+ declare const CLAIM_WORKFLOW_STATUS_VALUE_SUB_EXTENSION_URL = "status";
2455
+ /** Sub-extension under {@link CLAIM_WORKFLOW_STATUS_EXTENSION_URL}. */
2456
+ declare const CLAIM_WORKFLOW_STATUS_LAST_TRANSITION_SUB_EXTENSION_URL = "lastTransition";
2457
+ /**
2458
+ * Domain workflow status values written to
2459
+ * {@link CLAIM_WORKFLOW_STATUS_EXTENSION_URL}.
2460
+ */
2461
+ declare const CLAIM_WORKFLOW_STATUS: {
2462
+ readonly SUBMITTED: "submitted";
2463
+ readonly ACCEPTED: "accepted";
2464
+ readonly REJECTED: "rejected";
2465
+ readonly REWORKED: "reworked";
2466
+ readonly RESUBMITTED: "resubmitted";
2467
+ };
2468
+ type ClaimWorkflowStatus = (typeof CLAIM_WORKFLOW_STATUS)[keyof typeof CLAIM_WORKFLOW_STATUS];
2469
+ /**
2470
+ * Domain payment status values written to
2471
+ * {@link PaymentNotice.paymentStatus} on accepted claims.
2472
+ */
2473
+ declare const PAYMENT_STATUS: {
2474
+ readonly PARTIAL: "partial";
2475
+ readonly FULL: "full";
2476
+ readonly WRITE_OFF: "write-off";
2477
+ };
2478
+ type PaymentStatus = (typeof PAYMENT_STATUS)[keyof typeof PAYMENT_STATUS];
2479
+ /** CodeSystem URL stamped on the {@link PaymentNotice.paymentStatus} coding. */
2480
+ declare const PAYMENT_STATUS_SYSTEM = "https://on-site-medical.app/fhir/CodeSystem/payment-status";
2481
+ /**
2482
+ * Test seam — clear caches between test invocations so stale
2483
+ * state from a prior seed run does not leak into the next.
2484
+ */
2485
+ declare const __resetOnSiteDemoClaimCachesForTests: () => void;
2486
+ /**
2487
+ * Materialise every Claim resource for the on-site UAT demo
2488
+ * workspace. Walks every historical encounter (#1306); skips the
2489
+ * ~15% flagged as unbilled. Returns an empty array if no
2490
+ * encounter metadata is available (intake-only deployments).
2491
+ */
2492
+ declare const buildOnSiteDemoClaims: (referenceIso: string) => ReadonlyArray<Claim>;
2493
+ /**
2494
+ * Materialise every PaymentNotice resource for the on-site UAT
2495
+ * demo workspace. One per `accepted` Claim (no PaymentNotice on
2496
+ * submitted / rejected / reworked / resubmitted — submitted-with-
2497
+ * no-payment is the "in flux" subset the AC asks for).
2498
+ */
2499
+ declare const buildOnSiteDemoPaymentNotices: (referenceIso: string) => ReadonlyArray<PaymentNotice>;
2500
+ /**
2501
+ * Stable list of every Claim id seeded for the on-site UAT demo
2502
+ * workspace, anchored to `referenceIso`. Order matches the
2503
+ * underlying encounter list. Downstream tickets (#1308 — billing
2504
+ * directory, etc.) read this to fan out per-claim work.
2505
+ */
2506
+ declare const onSiteDemoClaimIds: (referenceIso: string) => ReadonlyArray<string>;
2507
+ /**
2508
+ * Stable list of every PaymentNotice id seeded for the on-site
2509
+ * UAT demo workspace, anchored to `referenceIso`.
2510
+ */
2511
+ declare const onSiteDemoPaymentNoticeIds: (referenceIso: string) => ReadonlyArray<string>;
2512
+ /**
2513
+ * Encounter ids the seeder flags as unbilled (no Claim emitted).
2514
+ * Exposed so tests and downstream tickets can assert the
2515
+ * unbilled cut without re-deriving the hash.
2516
+ */
2517
+ declare const onSiteDemoUnbilledEncounterIds: (referenceIso: string) => ReadonlyArray<string>;
2518
+ /**
2519
+ * Encounter ids the seeder flags as billed (one Claim emitted per
2520
+ * id). Exposed so tests and downstream tickets can fan out per
2521
+ * billed encounter without re-deriving the hash.
2522
+ */
2523
+ declare const onSiteDemoBilledEncounterIds: (referenceIso: string) => ReadonlyArray<string>;
2524
+
2525
+ /**
2526
+ * FHIR `Organization.type[0].coding.system` for the standard
2527
+ * organization-type valueset. Carrying the standard coding alongside
2528
+ * the domain category keeps the bodies interoperable.
2529
+ */
2530
+ declare const FHIR_ORGANIZATION_TYPE_SYSTEM = "http://terminology.hl7.org/CodeSystem/organization-type";
2531
+ /**
2532
+ * On-site domain category system for directory categorisation —
2533
+ * separates `dme-supplier` from `insurance-payor` so the directory
2534
+ * UI's category filter can match a single coding without parsing
2535
+ * the FHIR-standard `prov` / `pay` codes.
2536
+ */
2537
+ declare const ON_SITE_DIRECTORY_CATEGORY_SYSTEM = "https://on-site-medical.app/fhir/CodeSystem/directory-category";
2538
+ /** Domain category code stamped on every DME-supplier Organization. */
2539
+ declare const DME_SUPPLIER_CATEGORY_CODE = "dme-supplier";
2540
+ /** Domain category code stamped on every insurance-payor Organization. */
2541
+ declare const INSURANCE_PAYOR_CATEGORY_CODE = "insurance-payor";
2542
+ /**
2543
+ * Sub-category coding system stamped on the payor Organization's
2544
+ * `type[1]` so the directory UI can group payors by plan family
2545
+ * (commercial / Medicare / Medicare Advantage) without re-parsing
2546
+ * the display name. Mirrors the
2547
+ * {@link COVERAGE_PAYOR_TYPE_SYSTEM} convention used on Coverage
2548
+ * resources in #1304.
2549
+ */
2550
+ declare const INSURANCE_PAYOR_PLAN_TYPE_SYSTEM = "https://on-site-medical.app/fhir/CodeSystem/payor-plan-type";
2551
+ /** Commercial plan payor (Aetna, Cigna, UnitedHealthcare, etc.). */
2552
+ declare const PAYOR_PLAN_TYPE_COMMERCIAL = "commercial";
2553
+ /** Traditional Medicare (FFS) — single payor. */
2554
+ declare const PAYOR_PLAN_TYPE_MEDICARE = "medicare";
2555
+ /** Medicare Advantage plan payor (Humana MA, Anthem MA, etc.). */
2556
+ declare const PAYOR_PLAN_TYPE_MEDICARE_ADVANTAGE = "medicare-advantage";
2557
+ /** Union of the three plan-type codes a payor Organization may carry. */
2558
+ type PayorPlanType = typeof PAYOR_PLAN_TYPE_COMMERCIAL | typeof PAYOR_PLAN_TYPE_MEDICARE | typeof PAYOR_PLAN_TYPE_MEDICARE_ADVANTAGE;
2559
+ /**
2560
+ * Root extension URL stamped on each `qualification[]` entry recording
2561
+ * the per-state credentialing context (state code + status). FHIR R4
2562
+ * `Practitioner_Qualification` carries `identifier`, `code`, `period`,
2563
+ * and `issuer` natively but has no `status` field; the extension fills
2564
+ * that gap without forking the schema.
2565
+ */
2566
+ declare const PRACTITIONER_CREDENTIALING_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/practitioner-credentialing";
2567
+ /** Sub-extension under {@link PRACTITIONER_CREDENTIALING_EXTENSION_URL}. */
2568
+ declare const PRACTITIONER_CREDENTIALING_STATE_SUB_EXTENSION_URL = "state";
2569
+ /** Sub-extension under {@link PRACTITIONER_CREDENTIALING_EXTENSION_URL}. */
2570
+ declare const PRACTITIONER_CREDENTIALING_STATUS_SUB_EXTENSION_URL = "status";
2571
+ /**
2572
+ * Credentialing status values. Mirrors the wound-care industry
2573
+ * convention — credentialing is either active (license current and in
2574
+ * good standing), suspended (under board action), or expired (lapsed
2575
+ * past expiration date).
2576
+ */
2577
+ declare const CREDENTIALING_STATUS: {
2578
+ readonly ACTIVE: "active";
2579
+ readonly SUSPENDED: "suspended";
2580
+ readonly EXPIRED: "expired";
2581
+ };
2582
+ type CredentialingStatus = (typeof CREDENTIALING_STATUS)[keyof typeof CREDENTIALING_STATUS];
2583
+ /**
2584
+ * FHIR `Identifier.system` for a US state medical license. Uses the
2585
+ * on-site-medical URL prefix so the identifier round-trips through
2586
+ * the on-site directory UI without colliding with the NPI system.
2587
+ */
2588
+ declare const STATE_MEDICAL_LICENSE_SYSTEM = "https://on-site-medical.app/fhir/sid/state-medical-license";
2589
+ /** Demo DME-supplier Organizations seeded into the on-site UAT workspace. */
2590
+ declare const ON_SITE_DEMO_DME_SUPPLIERS: ReadonlyArray<Organization>;
2591
+ /** Demo insurance-payor Organizations seeded into the on-site UAT workspace. */
2592
+ declare const ON_SITE_DEMO_INSURANCE_PAYORS: ReadonlyArray<Organization>;
2593
+ /** Stable DME-supplier ids in dispatch order. */
2594
+ declare const onSiteDemoDmeSupplierIds: () => ReadonlyArray<string>;
2595
+ /** Stable insurance-payor ids in dispatch order. */
2596
+ declare const onSiteDemoInsurancePayorIds: () => ReadonlyArray<string>;
2597
+ /**
2598
+ * The full directory Organization pool seeded into the on-site UAT
2599
+ * workspace — DME suppliers followed by insurance payors. The seeder
2600
+ * walks this in order via `buildOrganizations`.
2601
+ */
2602
+ declare const ON_SITE_DEMO_DIRECTORY_ORGANIZATIONS: ReadonlyArray<Organization>;
2603
+ /**
2604
+ * Per-state credentialing spec for one license. The doctor specs in
2605
+ * `on-site-demo-fixtures.ts` carry a small array of these and the
2606
+ * build helper below converts each into a FHIR
2607
+ * `Practitioner_Qualification` entry appended after the "Physician"
2608
+ * qualification.
2609
+ */
2610
+ interface PractitionerCredentialingSpec {
2611
+ /** Two-letter USPS state code (GA, AL, TN, …). */
2612
+ readonly state: string;
2613
+ /** State medical board display label used for `issuer.display`. */
2614
+ readonly stateBoardDisplay: string;
2615
+ /** Opaque license number (real format varies by state). */
2616
+ readonly licenseNumber: string;
2617
+ /** ISO date the license was issued. */
2618
+ readonly issued: string;
2619
+ /** ISO date the license expires (after-end-of-period if expired). */
2620
+ readonly expires: string;
2621
+ readonly status: CredentialingStatus;
2622
+ }
2623
+ /**
2624
+ * Lookup helper: per-state credentialing entries for one doctor. Returns
2625
+ * an empty array if the practitioner id is not a seeded on-site doctor.
2626
+ */
2627
+ declare const practitionerCredentialingForDoctor: (practitionerId: string) => ReadonlyArray<PractitionerCredentialingSpec>;
2628
+ /**
2629
+ * Lookup helper: per-state credentialing entry for a specific
2630
+ * (practitionerId, stateCode) pair. Returns `undefined` when the pair
2631
+ * has no credentialing entry — the on-site UI can render this as
2632
+ * "not credentialed in <state>" without inspecting the full list.
2633
+ */
2634
+ declare const practitionerCredentialingForState: (practitionerId: string, stateCode: string) => PractitionerCredentialingSpec | undefined;
2635
+ /**
2636
+ * Build the FHIR `qualification[]` entries representing per-state
2637
+ * credentialing for one doctor. The on-site demo doctor builder
2638
+ * appends these after the base "Physician" qualification so the
2639
+ * resulting Practitioner.qualification array carries:
2640
+ * - [0] role label (`{text: "Physician"}`)
2641
+ * - [1..N] per-state licenses (one entry per state in the
2642
+ * credentialing map for this doctor)
2643
+ *
2644
+ * Each license entry's identifier is keyed under
2645
+ * {@link STATE_MEDICAL_LICENSE_SYSTEM} so the on-site UI can pluck the
2646
+ * license number without parsing the issuer display.
2647
+ */
2648
+ declare const buildCredentialingQualifications: (practitionerId: string) => ReadonlyArray<Practitioner_Qualification>;
2649
+
2650
+ /**
2651
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-encounters.md
2652
+ *
2653
+ * Historical Encounter + wound-Condition + wound-exam Observation +
2654
+ * wound-debridement Procedure fixtures the `seed-demo-data` workflow
2655
+ * upserts into the on-site-medical UAT demo tenant
2656
+ * ({@link ON_SITE_DEMO_TENANT_ID} + {@link ON_SITE_DEMO_WORKSPACE_ID})
2657
+ * on every non-prod deploy (issue #1306).
2658
+ *
2659
+ * Topology — issue #1306 design:
2660
+ * - Brand-new intake patients (6 facility intake-only + 3 home
2661
+ * intake-only) get **no** encounters. They carry intake +
2662
+ * insurance only.
2663
+ * - Scheduled facility patients (60 patients across 4 blocks) get
2664
+ * one Encounter per past block occurrence their block ran on
2665
+ * (the `BLOCK_OCCURRENCE_WEEKS_PAST` window = 4 past weeks).
2666
+ * Authored by the block's doctor + scribe, dated to that
2667
+ * occurrence's date.
2668
+ * - Scheduled home-health patients (17 patients) get one Encounter
2669
+ * per past visit at their cadence, stepping back from the
2670
+ * reference date. With cadence 14 days and 4 past visits, the
2671
+ * dates land at -14, -28, -42, -56 days. Authored by the
2672
+ * assigned home-health provider.
2673
+ * - ~70% of scheduled patients carry a "current wound" — one
2674
+ * {@link Condition} per patient with `category.text = "wound"`
2675
+ * plus a deterministic lower-extremity body site and wound type.
2676
+ * Every encounter for that patient records a wound-exam
2677
+ * {@link Observation} (LOINC panel 39135-9) whose components
2678
+ * show progression — length / width / depth shrink (healing) or
2679
+ * grow (worsening) across encounters depending on a
2680
+ * deterministic per-patient trajectory.
2681
+ * - ~25% of wound-bearing patients get one wound-debridement
2682
+ * {@link Procedure} on the most-recent wound encounter, using a
2683
+ * CPT code from the on-site EHR's
2684
+ * `PRESET_PROCEDURES` catalogue (e.g. 97597 Sharp Debridement).
2685
+ *
2686
+ * Modelling choices:
2687
+ * - Encounter `class` follows the on-site EHR's
2688
+ * `ENCOUNTER_CLASS_BY_LOCATION` map at
2689
+ * `sites/app-ehr/src/types/encounter.ts` — facility encounters
2690
+ * carry `code: "IMP", display: "Facility"`; home-health
2691
+ * encounters carry `code: "HH", display: "Home Health"`. The
2692
+ * `system` matches the v3 ActCode URL the on-site EHR reads.
2693
+ * - Wound is encoded as a FHIR {@link Condition} with
2694
+ * `category: [{ text: "wound" }]` (mirroring the on-site
2695
+ * `mapWoundFormToCondition` helper at
2696
+ * `sites/app-ehr/src/pages/visit/encounter/components/AddWoundDialog/woundFormMapping.ts`).
2697
+ * Wound exams are encoded as a single panel Observation per
2698
+ * encounter (LOINC 39135-9), with components for length /
2699
+ * width / depth — matching the on-site `buildWoundExamObservation`
2700
+ * mapper at `sites/app-ehr/src/features/wounds/mappers/woundExamMappers.ts`.
2701
+ * - Procedure carries a CPT code on `code.coding[0]` with system
2702
+ * `http://www.ama-assn.org/go/cpt` (the on-site EHR's
2703
+ * `CPT_SYSTEM` constant). `reasonReference` points at the wound
2704
+ * Condition; `encounter` points at the encounter the procedure
2705
+ * was performed during.
2706
+ *
2707
+ * Ids are deterministic — re-fires upsert the same records,
2708
+ * matching the workflow's idempotency contract.
2709
+ */
2710
+ /** FHIR v3 ActEncounter coding system, used on `Encounter.class`. */
2711
+ declare const ENCOUNTER_CLASS_SYSTEM = "http://terminology.hl7.org/CodeSystem/v3-ActCode";
2712
+ /** Encounter class coding for facility encounters (on-site `ENCOUNTER_CLASS_BY_LOCATION.facility`). */
2713
+ declare const ENCOUNTER_CLASS_FACILITY: {
2714
+ readonly system: "http://terminology.hl7.org/CodeSystem/v3-ActCode";
2715
+ readonly code: "IMP";
2716
+ readonly display: "Facility";
2717
+ };
2718
+ /** Encounter class coding for home-health encounters (on-site `ENCOUNTER_CLASS_BY_LOCATION.home`). */
2719
+ declare const ENCOUNTER_CLASS_HOME_HEALTH: {
2720
+ readonly system: "http://terminology.hl7.org/CodeSystem/v3-ActCode";
2721
+ readonly code: "HH";
2722
+ readonly display: "Home Health";
2723
+ };
2724
+ /** LOINC system URL used on Observation.code.coding entries. */
2725
+ declare const LOINC_SYSTEM = "http://loinc.org";
2726
+ /** SNOMED CT system URL used on Condition.code / bodySite coding entries. */
2727
+ declare const SNOMED_SYSTEM = "http://snomed.info/sct";
2728
+ /** CPT coding system used on Procedure.code (matches on-site `CPT_SYSTEM`). */
2729
+ declare const CPT_SYSTEM = "http://www.ama-assn.org/go/cpt";
2730
+ /**
2731
+ * LOINC panel code for the wound assessment panel (matches on-site
2732
+ * `WOUND_EXAM_PANEL_CODE` at
2733
+ * `sites/app-ehr/src/features/wounds/types/woundExamCodes.ts`).
2734
+ */
2735
+ declare const WOUND_EXAM_PANEL_CODE = "39135-9";
2736
+ /** Display for {@link WOUND_EXAM_PANEL_CODE}. */
2737
+ declare const WOUND_EXAM_PANEL_DISPLAY = "Wound assessment panel";
2738
+ /** LOINC component code for wound length (cm). */
2739
+ declare const WOUND_LENGTH_CODE = "39126-8";
2740
+ /** LOINC component code for wound width (cm). */
2741
+ declare const WOUND_WIDTH_CODE = "39125-0";
2742
+ /** LOINC component code for wound depth (cm). */
2743
+ declare const WOUND_DEPTH_CODE = "39127-6";
2744
+ /** LOINC component code for wound status (declining / stagnant / improving). */
2745
+ declare const WOUND_STATUS_CODE = "72311-4";
2746
+ /**
2747
+ * Hl7 condition-clinical system URL used on Condition.clinicalStatus.
2748
+ */
2749
+ declare const CONDITION_CLINICAL_STATUS_SYSTEM = "http://terminology.hl7.org/CodeSystem/condition-clinical";
2750
+ /**
2751
+ * Number of past home-health visits materialized per scheduled
2752
+ * home-health patient. Matches {@link BLOCK_OCCURRENCE_WEEKS_PAST}
2753
+ * so the facility and home-health populations carry comparable
2754
+ * history depths (~4 historical encounters per scheduled patient).
2755
+ */
2756
+ declare const HOME_HEALTH_VISITS_PAST = 4;
2757
+ /**
2758
+ * Stable wound-Condition id for a patient. The id is the patient
2759
+ * id suffixed with `-wound-001` — one wound per patient suffices
2760
+ * for UAT.
2761
+ */
2762
+ declare const woundConditionIdForPatient: (patientId: string) => string;
2763
+ /**
2764
+ * Test seam — clear the spec cache between test invocations so
2765
+ * stale state from a prior seed run does not leak into the next.
2766
+ * Not part of the public API contract.
2767
+ */
2768
+ declare const __resetOnSiteDemoEncounterCachesForTests: () => void;
2769
+ /**
2770
+ * Materialize every Encounter resource for the on-site UAT demo
2771
+ * workspace. Scheduled facility patients fan out over the past 4
2772
+ * block occurrences; scheduled home-health patients fan out over
2773
+ * the past {@link HOME_HEALTH_VISITS_PAST} cadence visits. Intake-
2774
+ * only patients contribute zero encounters.
2775
+ */
2776
+ declare const buildOnSiteDemoEncounters: (referenceIso: string) => ReadonlyArray<Encounter>;
2777
+ /**
2778
+ * Materialize every wound {@link Condition} resource for the
2779
+ * on-site UAT demo workspace. One Condition per wound-bearing
2780
+ * patient, dated to that patient's earliest encounter.
2781
+ */
2782
+ declare const buildOnSiteDemoWoundConditions: (referenceIso: string) => ReadonlyArray<Condition>;
2783
+ /**
2784
+ * Materialize every wound-exam {@link Observation} for the on-site
2785
+ * UAT demo workspace. One per encounter on a wound-bearing
2786
+ * patient, with progressing length / width / depth components.
2787
+ */
2788
+ declare const buildOnSiteDemoWoundObservations: (referenceIso: string) => ReadonlyArray<Observation>;
2789
+ /**
2790
+ * Materialize every wound-debridement {@link Procedure} for the
2791
+ * on-site UAT demo workspace. One per qualifying wound-bearing
2792
+ * patient, on their most-recent encounter, with a real CPT code.
2793
+ */
2794
+ declare const buildOnSiteDemoWoundProcedures: (referenceIso: string) => ReadonlyArray<Procedure>;
2795
+ /**
2796
+ * Stable list of every Encounter id seeded for the on-site UAT
2797
+ * demo workspace, anchored to `referenceIso`. Downstream tickets
2798
+ * (e.g. #1307 — claims walking each historical encounter) read
2799
+ * this to fan out per-encounter work without re-deriving the
2800
+ * mapping.
2801
+ */
2802
+ declare const onSiteDemoEncounterIds: (referenceIso: string) => ReadonlyArray<string>;
2803
+ /**
2804
+ * Encounters scoped to a single patient, ordered earliest first.
2805
+ * Returns the empty array for intake-only patients (no
2806
+ * encounters) and for unknown patient ids.
2807
+ */
2808
+ declare const onSiteDemoEncountersForPatient: (patientId: string, referenceIso: string) => ReadonlyArray<string>;
2809
+ /**
2810
+ * Public projection of an encounter's seed metadata. Downstream
2811
+ * tickets (e.g. #1307 — claims walking each historical encounter)
2812
+ * read this instead of re-parsing the encounter id string.
2813
+ */
2814
+ interface OnSiteDemoEncounterMetadata {
2815
+ /** Stable Encounter id. */
2816
+ readonly id: string;
2817
+ /** Patient the encounter is authored against. */
2818
+ readonly patientId: string;
2819
+ /** 1-based sequence ordinal within the patient's encounter list (1 = earliest). */
2820
+ readonly sequence: number;
2821
+ /** Total encounters seeded for this patient. */
2822
+ readonly totalEncounters: number;
2823
+ /** ISO 8601 start instant the encounter is dated to. */
2824
+ readonly periodStart: string;
2825
+ /** Whether this encounter carries a wound-debridement Procedure. */
2826
+ readonly hasWoundProcedure: boolean;
2827
+ }
2828
+ /**
2829
+ * Materialize every encounter's seed metadata for the on-site UAT
2830
+ * demo workspace. Order matches {@link onSiteDemoEncounterIds}.
2831
+ * The `hasWoundProcedure` flag is `true` only on the patient's
2832
+ * most-recent encounter when {@link onSiteDemoWoundProcedurePatientIds}
2833
+ * lists that patient — mirroring the procedure-attachment rule in
2834
+ * {@link buildOnSiteDemoWoundProcedures}.
2835
+ */
2836
+ declare const onSiteDemoEncounterMetadata: (referenceIso: string) => ReadonlyArray<OnSiteDemoEncounterMetadata>;
2837
+ /**
2838
+ * Subset of patients (facility + home-health) the seeder flags as
2839
+ * carrying a current wound. Exported so tests and downstream
2840
+ * tickets can assert wound-coverage targets without re-deriving
2841
+ * the hash. Order matches the input list of scheduled patients.
2842
+ */
2843
+ declare const onSiteDemoWoundBearingPatientIds: () => ReadonlyArray<string>;
2844
+ /**
2845
+ * Subset of {@link onSiteDemoWoundBearingPatientIds} whose patients
2846
+ * also get a CPT-coded debridement Procedure on their most-recent
2847
+ * encounter.
2848
+ */
2849
+ declare const onSiteDemoWoundProcedurePatientIds: () => ReadonlyArray<string>;
2850
+
2851
+ /**
2852
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-facilities.md
2853
+ *
2854
+ * Hand-authored Facility (FHIR Location) fixtures the
2855
+ * `seed-demo-data` workflow upserts into the on-site-medical UAT
2856
+ * demo tenant ({@link ON_SITE_DEMO_TENANT_ID} +
2857
+ * {@link ON_SITE_DEMO_WORKSPACE_ID}) on every non-prod deploy
2858
+ * (issue #1303).
2859
+ *
2860
+ * Three facilities — UAT testers exercise the calendar's "View by
2861
+ * facility" filter and the home-health vs facility-visit
2862
+ * routing. The on-site `AdminLocationFormPage` reads:
2863
+ * - `name`
2864
+ * - `type[0].text` — `"facility"` (drives the
2865
+ * classification dropdown)
2866
+ * - `address.line/city/state/postalCode/country`
2867
+ * - `telecom` (phone + email + optional fax)
2868
+ * - `status` (`"active"`)
2869
+ *
2870
+ * Director-of-nursing is not a first-class FHIR R4 `Location`
2871
+ * field. We denormalize it as an `extension` (single root
2872
+ * extension with three sub-extensions: `name`, `phone`,
2873
+ * `email`) under the established on-site URL convention
2874
+ * (`https://on-site-medical.app/fhir/StructureDefinition/*`) so a
2875
+ * later on-site UI iteration can pick it up without a schema
2876
+ * change.
2877
+ *
2878
+ * Ids are deterministic — re-fires upsert the same records,
2879
+ * matching the workflow's idempotency contract.
2880
+ */
2881
+ /**
2882
+ * Root extension URL stamped on every facility Location for the
2883
+ * director-of-nursing contact. The root extension carries three
2884
+ * sub-extensions (`name`, `phone`, `email`) — none of FHIR R4's
2885
+ * shipped extensions cover this exact triple, so we publish a
2886
+ * local URL under the on-site convention.
2887
+ */
2888
+ declare const DIRECTOR_OF_NURSING_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/director-of-nursing";
2889
+ /** Sub-extension URL: director-of-nursing display name. */
2890
+ declare const DIRECTOR_OF_NURSING_NAME_EXTENSION_URL = "name";
2891
+ /** Sub-extension URL: director-of-nursing phone (E.164). */
2892
+ declare const DIRECTOR_OF_NURSING_PHONE_EXTENSION_URL = "phone";
2893
+ /** Sub-extension URL: director-of-nursing email. */
2894
+ declare const DIRECTOR_OF_NURSING_EMAIL_EXTENSION_URL = "email";
2895
+ /** Demo facilities seeded into the on-site UAT demo workspace. */
2896
+ declare const ON_SITE_DEMO_FACILITIES: ReadonlyArray<Location>;
2897
+ /** Stable facility ids in dispatch order. Re-exported for downstream tickets. */
2898
+ declare const ON_SITE_DEMO_FACILITY_IDS: ReadonlyArray<string>;
2899
+
2900
+ /**
2901
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-facility-patients.md
2902
+ *
2903
+ * Hand-authored facility Patient + Coverage fixtures the
2904
+ * `seed-demo-data` workflow upserts into the on-site-medical UAT
2905
+ * demo tenant ({@link ON_SITE_DEMO_TENANT_ID} +
2906
+ * {@link ON_SITE_DEMO_WORKSPACE_ID}) on every non-prod deploy
2907
+ * (issue #1304).
2908
+ *
2909
+ * Topology — issue #1304 design:
2910
+ * - 4 blocks (#1303) × per-block patient count (16 + 14 + 18 +
2911
+ * 12 = 60 scheduled patients). No patient appears in more
2912
+ * than one block.
2913
+ * - Plus 6 intake-complete-not-yet-scheduled patients (2 per
2914
+ * facility — small subset that exercises the "new intake,
2915
+ * not yet on a calendar" UI state). Total: 66 Patients.
2916
+ * - Every patient is assigned `care-context = facility` via
2917
+ * the on-site `patient-default-care-setting` /
2918
+ * `patient-default-care-location` extension pair
2919
+ * (`sites/app-ehr/src/types/fhir-extensions/patient.ts`). The
2920
+ * UI distinguishes facility vs home-health patients by
2921
+ * reading those extensions, so seeding them is the path that
2922
+ * actually surfaces the patient under the right "Patient
2923
+ * Type" column in the on-site EHR.
2924
+ *
2925
+ * Insurance:
2926
+ * - Every patient gets a primary Coverage with
2927
+ * `status: "active"` and a verification date stamped on the
2928
+ * coverage body via the on-site `coverage-verification-date`
2929
+ * extension.
2930
+ * - A subset (~40%) gets a secondary Coverage.
2931
+ * - Payor mix: commercial / Medicare / Medicare Advantage.
2932
+ * - QMB is a Medicare-only program (real-world constraint); the
2933
+ * QMB extension only attaches to Medicare-primary patients.
2934
+ * - ~20% of patients carry the `patient-hospice-status`
2935
+ * extension on the Patient resource (CMS hospice billing
2936
+ * status — separate from QMB).
2937
+ *
2938
+ * Modelling choice — block assignment. The seeder also records
2939
+ * which block template a patient is assigned to so downstream
2940
+ * tickets (#1306 — encounters per scheduled patient per block
2941
+ * occurrence) can fan out without re-deriving the mapping.
2942
+ * Encounters are NOT created here; this ticket only attaches the
2943
+ * block reference via an extension on the Patient body. Intake-
2944
+ * only patients omit the extension entirely.
2945
+ *
2946
+ * Ids are deterministic — re-fires upsert the same records,
2947
+ * matching the workflow's idempotency contract. Adding,
2948
+ * renaming, or moving a patient is a one-line edit here plus a
2949
+ * redeploy.
2950
+ */
2951
+ /**
2952
+ * Extension URL stamped on the Patient body when the patient's
2953
+ * default care setting is facility-based (mirrors the on-site
2954
+ * EHR's `EXT_PATIENT_DEFAULT_CARE_SETTING` constant at
2955
+ * `sites/app-ehr/src/types/fhir-extensions/patient.ts`).
2956
+ */
2957
+ declare const PATIENT_DEFAULT_CARE_SETTING_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-default-care-setting";
2958
+ /**
2959
+ * Extension URL stamped on the Patient body when the patient's
2960
+ * default care setting is `facility`, carrying the Location id
2961
+ * (mirrors the on-site EHR's `EXT_PATIENT_DEFAULT_CARE_LOCATION`
2962
+ * constant).
2963
+ */
2964
+ declare const PATIENT_DEFAULT_CARE_LOCATION_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-default-care-location";
2965
+ /** Extension URL: patient residency admission date (facility-only). */
2966
+ declare const PATIENT_RESIDENCY_ADMISSION_DATE_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-residency-admission-date";
2967
+ /** Extension URL: patient residency room number (facility-only). */
2968
+ declare const PATIENT_RESIDENCY_ROOM_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-residency-room";
2969
+ /**
2970
+ * Extension URL stamped on the Patient body recording which
2971
+ * weekly scheduling block template the patient is assigned to
2972
+ * (#1303 + #1304). Downstream tickets (#1306 — encounters per
2973
+ * block occurrence) read this to fan out per-occurrence
2974
+ * Encounter records. Intake-only patients (no block yet) omit
2975
+ * the extension entirely.
2976
+ */
2977
+ declare const PATIENT_ASSIGNED_BLOCK_TEMPLATE_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-assigned-block-template";
2978
+ /**
2979
+ * Root extension URL stamped on the Patient body recording the
2980
+ * patient's hospice status (CMS hospice billing flag). Carries
2981
+ * three sub-extensions (`status`, `effectiveDate`,
2982
+ * `terminationDate`) mirroring the on-site Medicare form's
2983
+ * hospice fields at
2984
+ * `sites/app-ehr/src/fixtures/medicareForm.ts`. Only ~20% of
2985
+ * patients carry this extension; the absence of the extension
2986
+ * means the patient is not in hospice.
2987
+ */
2988
+ declare const PATIENT_HOSPICE_STATUS_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-hospice-status";
2989
+ /** Sub-extension URL under {@link PATIENT_HOSPICE_STATUS_EXTENSION_URL}. */
2990
+ declare const HOSPICE_STATUS_VALUE_SUB_EXTENSION_URL = "status";
2991
+ /** Sub-extension URL under {@link PATIENT_HOSPICE_STATUS_EXTENSION_URL}. */
2992
+ declare const HOSPICE_EFFECTIVE_DATE_SUB_EXTENSION_URL = "effectiveDate";
2993
+ /**
2994
+ * Extension URL stamped on every primary Coverage body recording
2995
+ * the most-recent verification timestamp. The on-site
2996
+ * `VerificationHistoryTable` displays verification rows from this
2997
+ * value (and from the Coverage's audit history downstream). The
2998
+ * value is an ISO 8601 instant in UTC.
2999
+ */
3000
+ declare const COVERAGE_VERIFICATION_DATE_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/coverage-verification-date";
3001
+ /**
3002
+ * Root extension URL stamped on a Medicare-primary Coverage
3003
+ * recording the QMB (Qualified Medicare Beneficiary) status.
3004
+ * Carries `status` + `effectiveDate` sub-extensions mirroring
3005
+ * the on-site Medicare form (`sites/app-ehr/src/fixtures/medicareForm.ts`).
3006
+ * QMB only attaches to Medicare-primary patients — it is a
3007
+ * Medicare program and is invalid on commercial-primary or
3008
+ * Medicare-Advantage-primary coverages.
3009
+ */
3010
+ declare const COVERAGE_QMB_STATUS_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/coverage-qmb-status";
3011
+ /** Sub-extension URL under {@link COVERAGE_QMB_STATUS_EXTENSION_URL}. */
3012
+ declare const QMB_STATUS_VALUE_SUB_EXTENSION_URL = "status";
3013
+ /** Sub-extension URL under {@link COVERAGE_QMB_STATUS_EXTENSION_URL}. */
3014
+ declare const QMB_EFFECTIVE_DATE_SUB_EXTENSION_URL = "effectiveDate";
3015
+ /**
3016
+ * Payor codes the on-site app reads from Coverage.type.coding[0].
3017
+ * The values mirror the labels used in the on-site Medicare and
3018
+ * insurance forms. `medicare-advantage` is intentionally distinct
3019
+ * from `medicare` — Medicare Advantage is a private-plan layer on
3020
+ * top of Medicare and bills through different payor pathways.
3021
+ */
3022
+ declare const COVERAGE_PAYOR_TYPE_SYSTEM = "https://on-site-medical.app/fhir/CodeSystem/coverage-payor-type";
3023
+ /** Payor type values written to {@link COVERAGE_PAYOR_TYPE_SYSTEM}. */
3024
+ declare const PAYOR_TYPE_COMMERCIAL = "commercial";
3025
+ /** Payor type values written to {@link COVERAGE_PAYOR_TYPE_SYSTEM}. */
3026
+ declare const PAYOR_TYPE_MEDICARE = "medicare";
3027
+ /** Payor type values written to {@link COVERAGE_PAYOR_TYPE_SYSTEM}. */
3028
+ declare const PAYOR_TYPE_MEDICARE_ADVANTAGE = "medicare-advantage";
3029
+ /**
3030
+ * Lazily materialize the facility-patient Patient resources
3031
+ * seeded into the on-site UAT demo workspace. Called by the
3032
+ * fixture group when the seeder iterates `group.patients`.
3033
+ */
3034
+ declare const buildOnSiteDemoFacilityPatients: () => ReadonlyArray<Patient>;
3035
+ /**
3036
+ * Lazily materialize the facility-patient Coverage resources
3037
+ * (primary + optional secondary) for the on-site UAT demo
3038
+ * workspace. Called by the fixture group when the seeder
3039
+ * iterates `group.coverages`.
3040
+ */
3041
+ declare const buildOnSiteDemoFacilityCoverages: () => ReadonlyArray<Coverage>;
3042
+ /**
3043
+ * Stable facility-patient ids in dispatch order. Lazy — call
3044
+ * this from downstream tickets (e.g. #1306 — encounters per
3045
+ * scheduled patient per block occurrence) instead of capturing
3046
+ * the array at module load.
3047
+ */
3048
+ declare const onSiteDemoFacilityPatientIds: () => ReadonlyArray<string>;
3049
+ /**
3050
+ * Subset of {@link onSiteDemoFacilityPatientIds} whose patients
3051
+ * are scheduled into a weekly block. Excludes the intake-only
3052
+ * subset. Order matches `PATIENTS_PER_BLOCK` (all block-001
3053
+ * patients first, then block-002, etc.).
3054
+ */
3055
+ declare const onSiteDemoScheduledFacilityPatientIds: () => ReadonlyArray<string>;
3056
+ /**
3057
+ * Subset of {@link onSiteDemoFacilityPatientIds} whose patients
3058
+ * are intake-complete but not yet on a schedule. These patients
3059
+ * have a facility assignment but no block reference and no
3060
+ * Encounter records (downstream tickets must respect that
3061
+ * absence).
3062
+ */
3063
+ declare const onSiteDemoIntakeOnlyFacilityPatientIds: () => ReadonlyArray<string>;
3064
+ /**
3065
+ * Look up the block template a facility patient is scheduled
3066
+ * into, or `undefined` for intake-only patients.
3067
+ */
3068
+ declare const findOnSiteDemoFacilityPatientBlock: (patientId: string) => string | undefined;
3069
+ /**
3070
+ * List facility patients scheduled into a given block template
3071
+ * id. Downstream tickets (encounters, scribe assignments) call
3072
+ * this to fan out per-block work without re-deriving the
3073
+ * mapping.
3074
+ */
3075
+ declare const facilityPatientsForBlock: (blockTemplateId: string) => ReadonlyArray<string>;
3076
+
3077
+ /**
3078
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-fixtures.md
3079
+ *
3080
+ * Hand-authored Practitioner fixtures the `seed-demo-data` workflow
3081
+ * upserts into the on-site-medical UAT demo tenant
3082
+ * ({@link ON_SITE_DEMO_TENANT_ID} + {@link ON_SITE_DEMO_WORKSPACE_ID})
3083
+ * on every non-prod deploy. Issue #1302 — the on-site repo's facility
3084
+ * blocks, home-health visits, and encounter records need a realistic
3085
+ * pool of doctors and scribes to reference.
3086
+ *
3087
+ * Two sets are seeded:
3088
+ * - {@link ON_SITE_DEMO_DOCTORS} — ten Practitioners with
3089
+ * `qualification[0].code.text = "Physician"`. The first five carry
3090
+ * a `home-health-eligible` boolean extension set to `true` so the
3091
+ * on-site UI can filter the home-health-eligible subset for
3092
+ * home-visit scheduling.
3093
+ * - {@link ON_SITE_DEMO_SCRIBES} — five Practitioners with
3094
+ * `qualification[0].code.text = "Scribe"`. Scribes share the
3095
+ * Practitioner resource shape with doctors so the on-site
3096
+ * practitioner CRUD form can edit both without a new resource
3097
+ * type; the `qualification` value distinguishes the role.
3098
+ *
3099
+ * Field set matches what the on-site provider form expects today
3100
+ * (`sites/app-ehr/src/pages/admin/AdminPractitionerFormPage.tsx`):
3101
+ * - `name[0]` — given + family + text
3102
+ * - `qualification[0].code.text` — role label
3103
+ * - `active`
3104
+ * - `gender`, `birthDate`
3105
+ * - `telecom[]` — phone (E.164) + email
3106
+ * - `identifier[0]` — NPI (US national provider identifier)
3107
+ * - `address[0]` — line / city / state / postalCode / country
3108
+ * - `extension[]` — home-health-eligible boolean (doctors only)
3109
+ *
3110
+ * Ids are deterministic — re-fires upsert the same records, matching
3111
+ * the workflow's idempotency contract. Adding or renaming a Practitioner
3112
+ * is a one-line edit here plus a redeploy.
3113
+ */
3114
+ /** FHIR `Identifier.system` for the US NPI (National Provider Identifier). */
3115
+ declare const US_NPI_SYSTEM = "http://hl7.org/fhir/sid/us-npi";
3116
+ /**
3117
+ * Extension URL stamped on a Practitioner body when the practitioner
3118
+ * is approved to take home-health visits. Mirrors the on-site repo's
3119
+ * convention (`https://on-site-medical.app/fhir/StructureDefinition/*`)
3120
+ * — the on-site UI can pick this extension up directly without a
3121
+ * schema change. Boolean `valueBoolean: true` means eligible.
3122
+ */
3123
+ declare const HOME_HEALTH_ELIGIBLE_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/home-health-eligible";
3124
+ /** Practitioner.qualification code-text for a physician (matches on-site form). */
3125
+ declare const PRACTITIONER_ROLE_PHYSICIAN = "Physician";
3126
+ /** Practitioner.qualification code-text for a scribe. */
3127
+ declare const PRACTITIONER_ROLE_SCRIBE = "Scribe";
3128
+ /** FHIR `Identifier.system` for internal on-site staff ids (non-NPI). */
3129
+ declare const ON_SITE_STAFF_ID_SYSTEM = "https://on-site-medical.app/fhir/sid/staff-id";
3130
+ /** Demo doctors seeded into the on-site UAT demo workspace. */
3131
+ declare const ON_SITE_DEMO_DOCTORS: ReadonlyArray<Practitioner>;
3132
+ /** Demo scribes seeded into the on-site UAT demo workspace. */
3133
+ declare const ON_SITE_DEMO_SCRIBES: ReadonlyArray<Practitioner>;
3134
+ /** Stable doctor ids in dispatch order. Re-exported for downstream tickets. */
3135
+ declare const ON_SITE_DEMO_DOCTOR_IDS: ReadonlyArray<string>;
3136
+ /** Stable scribe ids in dispatch order. Re-exported for downstream tickets. */
3137
+ declare const ON_SITE_DEMO_SCRIBE_IDS: ReadonlyArray<string>;
3138
+ /**
3139
+ * Subset of {@link ON_SITE_DEMO_DOCTORS} flagged as home-health-eligible
3140
+ * (via the {@link HOME_HEALTH_ELIGIBLE_EXTENSION_URL} extension on the
3141
+ * Practitioner body). Downstream tickets (home-health visit scheduling,
3142
+ * facility-block fixtures) use this helper to attach realistic providers
3143
+ * to home-visit-only encounters without re-reading the extension list.
3144
+ */
3145
+ declare const homeHealthEligibleDoctors: () => ReadonlyArray<Practitioner>;
3146
+ /**
3147
+ * Fixture group the seeder writes into the on-site UAT demo workspace.
3148
+ * Carries practitioners (doctors + scribes — #1302), facilities
3149
+ * (#1303), recurring weekly block Appointments (#1303), facility
3150
+ * patients + their insurance Coverages (#1304), home-health
3151
+ * patients + their insurance Coverages (#1305), historical
3152
+ * encounters / wounds / wound observations / wound debridement
3153
+ * procedures (#1306), and claims + payment notices tied to those
3154
+ * encounters (#1307). Accounts for this tenant are owned by later
3155
+ * tickets.
3156
+ *
3157
+ * `buildAppointments` is dynamic so the recurring block occurrences
3158
+ * anchor to the ISO week containing the seeder's `baseContext.date`
3159
+ * — re-fires on the same date produce byte-identical Appointment ids,
3160
+ * and re-fires on a later date roll the window forward without
3161
+ * duplicating prior weeks' records.
3162
+ */
3163
+ declare const ON_SITE_DEMO_FIXTURES: DemoWorkspaceDataPlaneFixtures;
3164
+
3165
+ /**
3166
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-home-health-patients.md
3167
+ *
3168
+ * Hand-authored home-health Patient + Coverage fixtures the
3169
+ * `seed-demo-data` workflow upserts into the on-site-medical UAT
3170
+ * demo tenant ({@link ON_SITE_DEMO_TENANT_ID} +
3171
+ * {@link ON_SITE_DEMO_WORKSPACE_ID}) on every non-prod deploy
3172
+ * (issue #1305).
3173
+ *
3174
+ * Topology — issue #1305 design:
3175
+ * - 20 home-health patients total. None are assigned to a
3176
+ * facility — `patient-default-care-setting` is `home`
3177
+ * (mirrors the on-site EHR's `LocationClassification = "home"`
3178
+ * at `sites/app-ehr/src/utils/patient/patientDefaultCareSetting.ts`),
3179
+ * and the `patient-default-care-location` extension is
3180
+ * intentionally omitted (home patients have no Location
3181
+ * reference).
3182
+ * - 17 patients are scheduled to a home-health-eligible doctor
3183
+ * (see {@link homeHealthEligibleDoctors}) with a recurring
3184
+ * visit cadence. Doctor assignment is a deterministic
3185
+ * round-robin over the 5 home-health-eligible doctors.
3186
+ * - 3 patients are intake-complete-but-not-yet-scheduled —
3187
+ * they carry a home address + care-context = home but have
3188
+ * no provider assignment and no visit cadence (the on-site
3189
+ * UI state for a brand-new home-health intake that hasn't
3190
+ * been put on the calendar yet).
3191
+ *
3192
+ * Insurance is identical to the facility-patient rules (#1304):
3193
+ * - Every patient gets a primary Coverage with
3194
+ * `status: "active"` and a verification date.
3195
+ * - A subset (~40%) gets a secondary Coverage.
3196
+ * - Payor mix: commercial / Medicare / Medicare Advantage.
3197
+ * - QMB only attaches to Medicare-primary patients.
3198
+ * - ~20% of patients carry the `patient-hospice-status`
3199
+ * extension on the Patient resource.
3200
+ *
3201
+ * Modelling choice — visit cadence. On-site has no formal
3202
+ * home-health visit cadence schema today (the `REPEAT_OPTIONS`
3203
+ * at `sites/app-ehr/src/features/calendar/components/eventPopoverUtils.ts`
3204
+ * are calendar-level recurrences, not patient-level cadences).
3205
+ * Each scheduled home-health patient therefore carries a simple
3206
+ * `home-health-visit-cadence-days` valueInteger extension with
3207
+ * a value drawn from the set 7 / 14 / 28 — weekly / bi-weekly /
3208
+ * monthly — distributed deterministically across the roster so
3209
+ * the UAT tenant exercises all three cadences. Intake-only
3210
+ * patients omit the extension entirely.
3211
+ *
3212
+ * Modelling choice — provider assignment. The home-health
3213
+ * analogue of the facility-patient's block reference is a
3214
+ * `patient-assigned-home-health-provider` `valueReference`
3215
+ * pointing at `Practitioner/<doctor-id>`. Downstream tickets
3216
+ * (#1306 — encounters) read this reference to fan out per-
3217
+ * patient visit Encounters. Intake-only patients omit the
3218
+ * extension (no provider yet → no encounters).
3219
+ *
3220
+ * Ids are deterministic — re-fires upsert the same records,
3221
+ * matching the workflow's idempotency contract. Adding,
3222
+ * renaming, or moving a patient is a one-line edit here plus a
3223
+ * redeploy.
3224
+ */
3225
+ /**
3226
+ * Extension URL stamped on a home-health Patient body recording
3227
+ * the {@link Practitioner} id of the home-health-eligible doctor
3228
+ * the patient is currently scheduled with. Carries a
3229
+ * `valueReference` shaped `{ reference: "Practitioner/<id>" }`.
3230
+ * Intake-only patients omit this extension.
3231
+ */
3232
+ declare const PATIENT_ASSIGNED_HOME_HEALTH_PROVIDER_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-assigned-home-health-provider";
3233
+ /**
3234
+ * Extension URL stamped on a home-health Patient body recording
3235
+ * the patient's recurring visit cadence in days. The value is a
3236
+ * `valueInteger` drawn from {@link HOME_HEALTH_VISIT_CADENCE_OPTIONS}
3237
+ * — weekly (7), bi-weekly (14), or monthly (28). On-site has no
3238
+ * formal cadence schema today, so this denormalised extension
3239
+ * captures the visit interval directly on the Patient body until
3240
+ * the on-site team picks a permanent shape. Intake-only patients
3241
+ * omit this extension.
3242
+ */
3243
+ declare const HOME_HEALTH_VISIT_CADENCE_DAYS_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/home-health-visit-cadence-days";
3244
+ /**
3245
+ * Allowed visit-cadence day values. Roughly weekly / bi-weekly /
3246
+ * monthly — enough variation for UAT to exercise distinct
3247
+ * cadences in the calendar without modelling every possible
3248
+ * interval.
3249
+ */
3250
+ declare const HOME_HEALTH_VISIT_CADENCE_OPTIONS: ReadonlyArray<number>;
3251
+ /** Total home-health patients seeded. */
3252
+ declare const TOTAL_HOME_HEALTH_PATIENTS: number;
3253
+ /**
3254
+ * Lazily materialize the home-health Patient resources seeded
3255
+ * into the on-site UAT demo workspace. Called by the fixture
3256
+ * group when the seeder iterates `group.buildPatients()`.
3257
+ */
3258
+ declare const buildOnSiteDemoHomeHealthPatients: () => ReadonlyArray<Patient>;
3259
+ /**
3260
+ * Lazily materialize the home-health Coverage resources
3261
+ * (primary + optional secondary) for the on-site UAT demo
3262
+ * workspace.
3263
+ */
3264
+ declare const buildOnSiteDemoHomeHealthCoverages: () => ReadonlyArray<Coverage>;
3265
+ /**
3266
+ * Stable home-health-patient ids in dispatch order. Lazy — call
3267
+ * this from downstream tickets (e.g. #1306 — encounters per
3268
+ * scheduled home-health visit) instead of capturing the array
3269
+ * at module load.
3270
+ */
3271
+ declare const onSiteDemoHomeHealthPatientIds: () => ReadonlyArray<string>;
3272
+ /**
3273
+ * Subset of {@link onSiteDemoHomeHealthPatientIds} whose
3274
+ * patients are scheduled with a home-health-eligible provider +
3275
+ * visit cadence. Excludes the intake-only subset.
3276
+ */
3277
+ declare const onSiteDemoScheduledHomeHealthPatientIds: () => ReadonlyArray<string>;
3278
+ /**
3279
+ * Subset of {@link onSiteDemoHomeHealthPatientIds} whose
3280
+ * patients are intake-complete but not yet on a schedule. These
3281
+ * patients carry a home address + care-context = home but no
3282
+ * provider, no cadence, and (per #1306) no Encounter records.
3283
+ */
3284
+ declare const onSiteDemoIntakeOnlyHomeHealthPatientIds: () => ReadonlyArray<string>;
3285
+ /**
3286
+ * Look up the home-health-eligible provider assigned to a given
3287
+ * home-health patient, or `undefined` for intake-only patients.
3288
+ * Downstream tickets (encounters per scheduled visit) call this
3289
+ * to fan out per-patient encounter records.
3290
+ */
3291
+ declare const findOnSiteDemoHomeHealthPatientProvider: (patientId: string) => string | undefined;
3292
+ /**
3293
+ * Look up the visit cadence (in days) for a given home-health
3294
+ * patient, or `undefined` for intake-only patients.
3295
+ */
3296
+ declare const findOnSiteDemoHomeHealthPatientVisitCadenceDays: (patientId: string) => number | undefined;
3297
+
2157
3298
  interface SeedDemoDataLambdaProps {
2158
3299
  /**
2159
3300
  * Data-store table the workflow upserts demo-data records into.
@@ -2922,4 +4063,4 @@ declare class RenameCascadeWorkflow extends Construct {
2922
4063
  constructor(scope: Construct, props: RenameCascadeWorkflowProps);
2923
4064
  }
2924
4065
 
2925
- export { ADMIN_DOMAIN_PREFIX, type BuildParameterNameProps, ChildHostedZone, type ChildHostedZoneProps, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, type ComposeServiceDomainOptions, type ComputeBranchHashOptions, ControlEventBus, DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES, DATA_STORE_CHANGE_DETAIL_TYPE, DEFAULT_PREVIEW_EXPIRATION_DAYS, DEMO_DATA_PLANE_FIXTURES, DEV_CORS_ALLOW_ORIGINS, DataEventBus, type DataEventBusOptions, DataStoreHistoricalArchive, type DataStoreHistoricalArchiveProps, DataStorePostgresReplica, type DataStorePostgresReplicaProps, type DemoWorkspaceDataPlaneFixtures, DiscoverableStringParameter, type DiscoverableStringParameterProps, DynamoDbDataStore, type DynamoDbDataStoreProps, type FhirCurrentResourceChangeDetail, type GrantConsumerOptions, HostingMode, LOCALHOST_OAUTH_CALLBACK_URLS, LOCALHOST_OAUTH_LOGOUT_URLS, OPENHI_TAG_SUFFIX_BRANCH_NAME, OPENHI_TAG_SUFFIX_REPO_NAME, OPENHI_TAG_SUFFIX_SERVICE_TYPE, OPENHI_TAG_SUFFIX_STAGE_TYPE, OpenHiApp, type OpenHiAppProps, OpenHiAuthService, type OpenHiAuthServiceProps, OpenHiDataService, type OpenHiDataServiceProps, OpenHiEnvironment, type OpenHiEnvironmentProps, OpenHiGlobalService, type OpenHiGlobalServiceProps, OpenHiGraphqlService, type OpenHiGraphqlServiceProps, OpenHiRestApiService, type OpenHiRestApiServiceProps, OpenHiService, type OpenHiServiceProps, type OpenHiServiceType, OpenHiStage, type OpenHiStageProps, OpenHiWebsiteService, type OpenHiWebsiteServiceProps, OpsEventBus, OwningDeleteCascadeLambdas, type OwningDeleteCascadeLambdasProps, OwningDeleteCascadeWorkflow, type OwningDeleteCascadeWorkflowProps, PER_BRANCH_PREVIEW_PREFIX, PLATFORM_SCOPE_TENANT_ID, POSTGRES_REPLICA_CLUSTER_ARN_SSM_NAME, POSTGRES_REPLICA_DATABASE_NAME_SSM_NAME, POSTGRES_REPLICA_SECRET_ARN_SSM_NAME, PerBranchHostname, type PerBranchHostnameProps, PlatformDeployBridge, PlatformDeployBridgeLambda, type PlatformDeployBridgeLambdaProps, type PlatformDeployBridgeProps, PostAuthenticationLambda, PostConfirmationLambda, type PostConfirmationLambdaProps, PreTokenGenerationLambda, type PreTokenGenerationLambdaProps, ProvisionDefaultWorkspaceLambda, type ProvisionDefaultWorkspaceLambdaProps, REST_API_BASE_URL_SSM_NAME, REST_API_DOMAIN_NAME_SSM_NAME, RenameCascadeLambdas, type RenameCascadeLambdasProps, RenameCascadeWorkflow, type RenameCascadeWorkflowProps, RootGraphqlApi, type RootGraphqlApiProps, RootHostedZone, RootHttpApi, type RootHttpApiProps, RootWildcardCertificate, SEED_SYSTEM_DATA_ACTOR_SYSTEM, SEED_SYSTEM_DATA_CONSUMER_NAME, SEED_SYSTEM_DATA_CONTROL_BUS_ENV_VAR, SSM_PARAM_NAME_FULL_DOMAIN, STATIC_HOSTING_SERVICE_TYPE, SeedDemoDataLambda, type SeedDemoDataLambdaProps, SeedDemoDataWorkflow, type SeedDemoDataWorkflowProps, SeedSystemDataLambda, type SeedSystemDataLambdaProps, SeedSystemDataWorkflow, type SeedSystemDataWorkflowProps, StaticContent, type StaticContentProps, StaticHosting, type StaticHostingProps, UserOnboardingWorkflow, type UserOnboardingWorkflowProps, WorkflowDedupConsumerNameInvalidError, WorkflowDedupTable, WorkflowDedupTableDuplicateError, type WorkflowDedupTableProps, buildFhirCurrentResourceChangeDetail, computeBranchHash, getDynamoDbDataStoreTableName, getPostgresReplicaSchemaName, getWorkflowDedupTableName, openHiTagKey };
4066
+ export { ADMIN_DOMAIN_PREFIX, BLOCK_OCCURRENCES_PER_TEMPLATE, BLOCK_OCCURRENCE_WEEKS_FUTURE, BLOCK_OCCURRENCE_WEEKS_PAST, type BuildParameterNameProps, CLAIM_WORKFLOW_STATUS, CLAIM_WORKFLOW_STATUS_EXTENSION_URL, CLAIM_WORKFLOW_STATUS_LAST_TRANSITION_SUB_EXTENSION_URL, CLAIM_WORKFLOW_STATUS_VALUE_SUB_EXTENSION_URL, CONDITION_CLINICAL_STATUS_SYSTEM, COVERAGE_PAYOR_TYPE_SYSTEM, COVERAGE_QMB_STATUS_EXTENSION_URL, COVERAGE_VERIFICATION_DATE_EXTENSION_URL, CPT_SYSTEM, CREDENTIALING_STATUS, ChildHostedZone, type ChildHostedZoneProps, type ClaimWorkflowStatus, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, type ComposeServiceDomainOptions, type ComputeBranchHashOptions, ControlEventBus, type CredentialingStatus, DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES, DATA_STORE_CHANGE_DETAIL_TYPE, DEFAULT_PREVIEW_EXPIRATION_DAYS, DEMO_DATA_PLANE_FIXTURES, DEV_CORS_ALLOW_ORIGINS, DIRECTOR_OF_NURSING_EMAIL_EXTENSION_URL, DIRECTOR_OF_NURSING_EXTENSION_URL, DIRECTOR_OF_NURSING_NAME_EXTENSION_URL, DIRECTOR_OF_NURSING_PHONE_EXTENSION_URL, DME_SUPPLIER_CATEGORY_CODE, DataEventBus, type DataEventBusOptions, DataStoreHistoricalArchive, type DataStoreHistoricalArchiveProps, DataStorePostgresReplica, type DataStorePostgresReplicaProps, type DemoWorkspaceDataPlaneFixtures, DiscoverableStringParameter, type DiscoverableStringParameterProps, DynamoDbDataStore, type DynamoDbDataStoreProps, ENCOUNTER_CLASS_FACILITY, ENCOUNTER_CLASS_HOME_HEALTH, ENCOUNTER_CLASS_SYSTEM, FHIR_ORGANIZATION_TYPE_SYSTEM, type FhirCurrentResourceChangeDetail, type GrantConsumerOptions, HOME_HEALTH_ELIGIBLE_EXTENSION_URL, HOME_HEALTH_VISITS_PAST, HOME_HEALTH_VISIT_CADENCE_DAYS_EXTENSION_URL, HOME_HEALTH_VISIT_CADENCE_OPTIONS, HOSPICE_EFFECTIVE_DATE_SUB_EXTENSION_URL, HOSPICE_STATUS_VALUE_SUB_EXTENSION_URL, HostingMode, INSURANCE_PAYOR_CATEGORY_CODE, INSURANCE_PAYOR_PLAN_TYPE_SYSTEM, type IsoDayOfWeek, LOCALHOST_OAUTH_CALLBACK_URLS, LOCALHOST_OAUTH_LOGOUT_URLS, LOINC_SYSTEM, ON_SITE_APPOINTMENT_TYPE_SYSTEM, ON_SITE_DEMO_BLOCK_CAPACITY_EXTENSION_URL, ON_SITE_DEMO_BLOCK_TEMPLATE_IDS, ON_SITE_DEMO_DIRECTORY_ORGANIZATIONS, ON_SITE_DEMO_DME_SUPPLIERS, ON_SITE_DEMO_DOCTORS, ON_SITE_DEMO_DOCTOR_IDS, ON_SITE_DEMO_FACILITIES, ON_SITE_DEMO_FACILITY_IDS, ON_SITE_DEMO_FIXTURES, ON_SITE_DEMO_INSURANCE_PAYORS, ON_SITE_DEMO_SCRIBES, ON_SITE_DEMO_SCRIBE_IDS, ON_SITE_DIRECTORY_CATEGORY_SYSTEM, ON_SITE_STAFF_ID_SYSTEM, OPENHI_TAG_SUFFIX_BRANCH_NAME, OPENHI_TAG_SUFFIX_REPO_NAME, OPENHI_TAG_SUFFIX_SERVICE_TYPE, OPENHI_TAG_SUFFIX_STAGE_TYPE, type OnSiteDemoEncounterMetadata, OpenHiApp, type OpenHiAppProps, OpenHiAuthService, type OpenHiAuthServiceProps, OpenHiDataService, type OpenHiDataServiceProps, OpenHiEnvironment, type OpenHiEnvironmentProps, OpenHiGlobalService, type OpenHiGlobalServiceProps, OpenHiGraphqlService, type OpenHiGraphqlServiceProps, OpenHiRestApiService, type OpenHiRestApiServiceProps, OpenHiService, type OpenHiServiceProps, type OpenHiServiceType, OpenHiStage, type OpenHiStageProps, OpenHiWebsiteService, type OpenHiWebsiteServiceProps, OpsEventBus, OwningDeleteCascadeLambdas, type OwningDeleteCascadeLambdasProps, OwningDeleteCascadeWorkflow, type OwningDeleteCascadeWorkflowProps, PATIENT_ASSIGNED_BLOCK_TEMPLATE_EXTENSION_URL, PATIENT_ASSIGNED_HOME_HEALTH_PROVIDER_EXTENSION_URL, PATIENT_DEFAULT_CARE_LOCATION_EXTENSION_URL, PATIENT_DEFAULT_CARE_SETTING_EXTENSION_URL, PATIENT_HOSPICE_STATUS_EXTENSION_URL, PATIENT_RESIDENCY_ADMISSION_DATE_EXTENSION_URL, PATIENT_RESIDENCY_ROOM_EXTENSION_URL, PAYMENT_STATUS, PAYMENT_STATUS_SYSTEM, PAYOR_PLAN_TYPE_COMMERCIAL, PAYOR_PLAN_TYPE_MEDICARE, PAYOR_PLAN_TYPE_MEDICARE_ADVANTAGE, PAYOR_TYPE_COMMERCIAL, PAYOR_TYPE_MEDICARE, PAYOR_TYPE_MEDICARE_ADVANTAGE, PER_BRANCH_PREVIEW_PREFIX, PLATFORM_SCOPE_TENANT_ID, POSTGRES_REPLICA_CLUSTER_ARN_SSM_NAME, POSTGRES_REPLICA_DATABASE_NAME_SSM_NAME, POSTGRES_REPLICA_SECRET_ARN_SSM_NAME, PRACTITIONER_CREDENTIALING_EXTENSION_URL, PRACTITIONER_CREDENTIALING_STATE_SUB_EXTENSION_URL, PRACTITIONER_CREDENTIALING_STATUS_SUB_EXTENSION_URL, PRACTITIONER_ROLE_PHYSICIAN, PRACTITIONER_ROLE_SCRIBE, type PaymentStatus, type PayorPlanType, PerBranchHostname, type PerBranchHostnameProps, PlatformDeployBridge, PlatformDeployBridgeLambda, type PlatformDeployBridgeLambdaProps, type PlatformDeployBridgeProps, PostAuthenticationLambda, PostConfirmationLambda, type PostConfirmationLambdaProps, type PractitionerCredentialingSpec, PreTokenGenerationLambda, type PreTokenGenerationLambdaProps, ProvisionDefaultWorkspaceLambda, type ProvisionDefaultWorkspaceLambdaProps, QMB_EFFECTIVE_DATE_SUB_EXTENSION_URL, QMB_STATUS_VALUE_SUB_EXTENSION_URL, REST_API_BASE_URL_SSM_NAME, REST_API_DOMAIN_NAME_SSM_NAME, RenameCascadeLambdas, type RenameCascadeLambdasProps, RenameCascadeWorkflow, type RenameCascadeWorkflowProps, RootGraphqlApi, type RootGraphqlApiProps, RootHostedZone, RootHttpApi, type RootHttpApiProps, RootWildcardCertificate, SEED_SYSTEM_DATA_ACTOR_SYSTEM, SEED_SYSTEM_DATA_CONSUMER_NAME, SEED_SYSTEM_DATA_CONTROL_BUS_ENV_VAR, SNOMED_SYSTEM, SSM_PARAM_NAME_FULL_DOMAIN, STATE_MEDICAL_LICENSE_SYSTEM, STATIC_HOSTING_SERVICE_TYPE, SeedDemoDataLambda, type SeedDemoDataLambdaProps, SeedDemoDataWorkflow, type SeedDemoDataWorkflowProps, SeedSystemDataLambda, type SeedSystemDataLambdaProps, SeedSystemDataWorkflow, type SeedSystemDataWorkflowProps, StaticContent, type StaticContentProps, StaticHosting, type StaticHostingProps, TOTAL_HOME_HEALTH_PATIENTS, US_NPI_SYSTEM, UserOnboardingWorkflow, type UserOnboardingWorkflowProps, WOUND_DEPTH_CODE, WOUND_EXAM_PANEL_CODE, WOUND_EXAM_PANEL_DISPLAY, WOUND_LENGTH_CODE, WOUND_STATUS_CODE, WOUND_WIDTH_CODE, WorkflowDedupConsumerNameInvalidError, WorkflowDedupTable, WorkflowDedupTableDuplicateError, type WorkflowDedupTableProps, __resetOnSiteDemoClaimCachesForTests, __resetOnSiteDemoEncounterCachesForTests, buildCredentialingQualifications, buildFhirCurrentResourceChangeDetail, buildOnSiteDemoBlockAppointments, buildOnSiteDemoClaims, buildOnSiteDemoEncounters, buildOnSiteDemoFacilityCoverages, buildOnSiteDemoFacilityPatients, buildOnSiteDemoHomeHealthCoverages, buildOnSiteDemoHomeHealthPatients, buildOnSiteDemoPaymentNotices, buildOnSiteDemoWoundConditions, buildOnSiteDemoWoundObservations, buildOnSiteDemoWoundProcedures, computeBranchHash, facilityPatientsForBlock, findOnSiteDemoBlockTemplate, findOnSiteDemoFacilityPatientBlock, findOnSiteDemoHomeHealthPatientProvider, findOnSiteDemoHomeHealthPatientVisitCadenceDays, getDynamoDbDataStoreTableName, getPostgresReplicaSchemaName, getWorkflowDedupTableName, homeHealthEligibleDoctors, onSiteDemoBilledEncounterIds, onSiteDemoClaimIds, onSiteDemoDmeSupplierIds, onSiteDemoEncounterIds, onSiteDemoEncounterMetadata, onSiteDemoEncountersForPatient, onSiteDemoFacilityPatientIds, onSiteDemoHomeHealthPatientIds, onSiteDemoInsurancePayorIds, onSiteDemoIntakeOnlyFacilityPatientIds, onSiteDemoIntakeOnlyHomeHealthPatientIds, onSiteDemoPaymentNoticeIds, onSiteDemoScheduledFacilityPatientIds, onSiteDemoScheduledHomeHealthPatientIds, onSiteDemoUnbilledEncounterIds, onSiteDemoWoundBearingPatientIds, onSiteDemoWoundProcedurePatientIds, openHiTagKey, practitionerCredentialingForDoctor, practitionerCredentialingForState, woundConditionIdForPatient };