@openhi/constructs 0.0.159 → 0.0.161

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.
Files changed (129) hide show
  1. package/lib/{chunk-HQ67J7BP.mjs → chunk-5S6VFBLT.mjs} +12 -70
  2. package/lib/chunk-5S6VFBLT.mjs.map +1 -0
  3. package/lib/{chunk-MVQWAIMC.mjs → chunk-6BB4CRSS.mjs} +3 -312
  4. package/lib/chunk-6BB4CRSS.mjs.map +1 -0
  5. package/lib/{chunk-WPCBVDFZ.mjs → chunk-76UM2LQ5.mjs} +2 -2
  6. package/lib/chunk-7TRO2STL.mjs +4616 -0
  7. package/lib/chunk-7TRO2STL.mjs.map +1 -0
  8. package/lib/chunk-BUAYVN3C.mjs +87 -0
  9. package/lib/chunk-BUAYVN3C.mjs.map +1 -0
  10. package/lib/{chunk-23PUSHBV.mjs → chunk-D2Y6DDOC.mjs} +2 -2
  11. package/lib/chunk-DWSWCUZR.mjs +123 -0
  12. package/lib/chunk-DWSWCUZR.mjs.map +1 -0
  13. package/lib/{chunk-VZCPGQXA.mjs → chunk-EUIP2U5F.mjs} +69 -1
  14. package/lib/{chunk-VZCPGQXA.mjs.map → chunk-EUIP2U5F.mjs.map} +1 -1
  15. package/lib/chunk-GJTPXJKD.mjs +46 -0
  16. package/lib/chunk-GJTPXJKD.mjs.map +1 -0
  17. package/lib/chunk-I6LUPJUY.mjs +61 -0
  18. package/lib/chunk-I6LUPJUY.mjs.map +1 -0
  19. package/lib/{chunk-KR2Y2CVQ.mjs → chunk-KA3OMP3X.mjs} +2 -2
  20. package/lib/{chunk-ZM4GDHHC.mjs → chunk-KMEWULMX.mjs} +51 -3
  21. package/lib/chunk-KMEWULMX.mjs.map +1 -0
  22. package/lib/chunk-LKKLO66E.mjs +25 -0
  23. package/lib/chunk-LKKLO66E.mjs.map +1 -0
  24. package/lib/{chunk-CFJDATDK.mjs → chunk-MLFMW5IF.mjs} +43 -9
  25. package/lib/chunk-MLFMW5IF.mjs.map +1 -0
  26. package/lib/chunk-O5VQWB6U.mjs +315 -0
  27. package/lib/chunk-O5VQWB6U.mjs.map +1 -0
  28. package/lib/{chunk-7BQHLC7U.mjs → chunk-P3CTZWC2.mjs} +8 -40
  29. package/lib/chunk-P3CTZWC2.mjs.map +1 -0
  30. package/lib/chunk-P3NFCKTZ.mjs +502 -0
  31. package/lib/chunk-P3NFCKTZ.mjs.map +1 -0
  32. package/lib/{chunk-M7Y3BOQW.mjs → chunk-Q3MKITPY.mjs} +5 -5
  33. package/lib/chunk-Q64MOYJ7.mjs +218 -0
  34. package/lib/chunk-Q64MOYJ7.mjs.map +1 -0
  35. package/lib/chunk-RQKJNMX5.mjs +89 -0
  36. package/lib/chunk-RQKJNMX5.mjs.map +1 -0
  37. package/lib/{chunk-ZWSGM6PZ.mjs → chunk-SD7J3N3C.mjs} +2 -2
  38. package/lib/{chunk-7RZHFI77.mjs → chunk-VESULYQQ.mjs} +2 -2
  39. package/lib/{chunk-AOSEKL7U.mjs → chunk-WOTU36P3.mjs} +6 -103
  40. package/lib/chunk-WOTU36P3.mjs.map +1 -0
  41. package/lib/{chunk-X5E4YJGZ.mjs → chunk-YPTJJ35S.mjs} +2 -2
  42. package/lib/counter-apply-operation-DZM3MIDm.d.mts +63 -0
  43. package/lib/counter-apply-operation-DZM3MIDm.d.ts +63 -0
  44. package/lib/counter-maintenance.handler.d.mts +38 -0
  45. package/lib/counter-maintenance.handler.d.ts +38 -0
  46. package/lib/counter-maintenance.handler.js +2885 -0
  47. package/lib/counter-maintenance.handler.js.map +1 -0
  48. package/lib/counter-maintenance.handler.mjs +180 -0
  49. package/lib/counter-maintenance.handler.mjs.map +1 -0
  50. package/lib/counter-reconciliation.handler.d.mts +116 -0
  51. package/lib/counter-reconciliation.handler.d.ts +116 -0
  52. package/lib/counter-reconciliation.handler.js +3324 -0
  53. package/lib/counter-reconciliation.handler.js.map +1 -0
  54. package/lib/counter-reconciliation.handler.mjs +295 -0
  55. package/lib/counter-reconciliation.handler.mjs.map +1 -0
  56. package/lib/data-store-postgres-replication.handler.js +50 -2
  57. package/lib/data-store-postgres-replication.handler.js.map +1 -1
  58. package/lib/data-store-postgres-replication.handler.mjs +2 -2
  59. package/lib/delete-chunk.handler.js +118 -2
  60. package/lib/delete-chunk.handler.js.map +1 -1
  61. package/lib/delete-chunk.handler.mjs +3 -3
  62. package/lib/{events-DTgo2dcW.d.mts → events-TG654e7L.d.mts} +68 -19
  63. package/lib/{events-DTgo2dcW.d.ts → events-TG654e7L.d.ts} +68 -19
  64. package/lib/finalize.handler.js +50 -2
  65. package/lib/finalize.handler.js.map +1 -1
  66. package/lib/finalize.handler.mjs +4 -4
  67. package/lib/firehose-archive-transform.handler.js +50 -2
  68. package/lib/firehose-archive-transform.handler.js.map +1 -1
  69. package/lib/firehose-archive-transform.handler.mjs +2 -2
  70. package/lib/index.d.mts +1283 -4
  71. package/lib/index.d.ts +1389 -24
  72. package/lib/index.js +4113 -320
  73. package/lib/index.js.map +1 -1
  74. package/lib/index.mjs +602 -195
  75. package/lib/index.mjs.map +1 -1
  76. package/lib/list-chunks.handler.js +118 -2
  77. package/lib/list-chunks.handler.js.map +1 -1
  78. package/lib/list-chunks.handler.mjs +3 -3
  79. package/lib/platform-deploy-bridge.handler.js +50 -2
  80. package/lib/platform-deploy-bridge.handler.js.map +1 -1
  81. package/lib/platform-deploy-bridge.handler.mjs +1 -1
  82. package/lib/pre-token-generation.handler.js +68 -0
  83. package/lib/pre-token-generation.handler.js.map +1 -1
  84. package/lib/pre-token-generation.handler.mjs +9 -5
  85. package/lib/pre-token-generation.handler.mjs.map +1 -1
  86. package/lib/provision-default-workspace.handler.js +887 -4
  87. package/lib/provision-default-workspace.handler.js.map +1 -1
  88. package/lib/provision-default-workspace.handler.mjs +14 -9
  89. package/lib/provision-default-workspace.handler.mjs.map +1 -1
  90. package/lib/rename-finalize.handler.js +50 -2
  91. package/lib/rename-finalize.handler.js.map +1 -1
  92. package/lib/rename-finalize.handler.mjs +2 -2
  93. package/lib/rename-list-targets.handler.js +118 -2
  94. package/lib/rename-list-targets.handler.js.map +1 -1
  95. package/lib/rename-list-targets.handler.mjs +11 -9
  96. package/lib/rename-list-targets.handler.mjs.map +1 -1
  97. package/lib/rename-rewrite-chunk.handler.js +68 -0
  98. package/lib/rename-rewrite-chunk.handler.js.map +1 -1
  99. package/lib/rename-rewrite-chunk.handler.mjs +2 -2
  100. package/lib/rest-api-lambda.handler.js +1454 -251
  101. package/lib/rest-api-lambda.handler.js.map +1 -1
  102. package/lib/rest-api-lambda.handler.mjs +673 -821
  103. package/lib/rest-api-lambda.handler.mjs.map +1 -1
  104. package/lib/seed-demo-data.handler.d.mts +1 -1
  105. package/lib/seed-demo-data.handler.d.ts +1 -1
  106. package/lib/seed-demo-data.handler.js +4004 -201
  107. package/lib/seed-demo-data.handler.js.map +1 -1
  108. package/lib/seed-demo-data.handler.mjs +10 -7
  109. package/lib/seed-system-data.handler.js +118 -2
  110. package/lib/seed-system-data.handler.js.map +1 -1
  111. package/lib/seed-system-data.handler.mjs +5 -5
  112. package/package.json +1 -1
  113. package/lib/chunk-7BQHLC7U.mjs.map +0 -1
  114. package/lib/chunk-AOSEKL7U.mjs.map +0 -1
  115. package/lib/chunk-BQMJSDOD.mjs +0 -1136
  116. package/lib/chunk-BQMJSDOD.mjs.map +0 -1
  117. package/lib/chunk-CFJDATDK.mjs.map +0 -1
  118. package/lib/chunk-E6MCKJVS.mjs +0 -212
  119. package/lib/chunk-E6MCKJVS.mjs.map +0 -1
  120. package/lib/chunk-HQ67J7BP.mjs.map +0 -1
  121. package/lib/chunk-MVQWAIMC.mjs.map +0 -1
  122. package/lib/chunk-ZM4GDHHC.mjs.map +0 -1
  123. /package/lib/{chunk-WPCBVDFZ.mjs.map → chunk-76UM2LQ5.mjs.map} +0 -0
  124. /package/lib/{chunk-23PUSHBV.mjs.map → chunk-D2Y6DDOC.mjs.map} +0 -0
  125. /package/lib/{chunk-KR2Y2CVQ.mjs.map → chunk-KA3OMP3X.mjs.map} +0 -0
  126. /package/lib/{chunk-M7Y3BOQW.mjs.map → chunk-Q3MKITPY.mjs.map} +0 -0
  127. /package/lib/{chunk-ZWSGM6PZ.mjs.map → chunk-SD7J3N3C.mjs.map} +0 -0
  128. /package/lib/{chunk-7RZHFI77.mjs.map → chunk-VESULYQQ.mjs.map} +0 -0
  129. /package/lib/{chunk-X5E4YJGZ.mjs.map → chunk-YPTJJ35S.mjs.map} +0 -0
package/lib/index.d.mts CHANGED
@@ -26,10 +26,11 @@ 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
- 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
+ export { ControlPlaneMembershipCreatedV1, ControlPlaneMembershipDeletedV1, ControlPlaneOwningDeleteCompleteV1, ControlPlaneOwningDeleteCompleteV1Detail, ControlPlaneOwningDeleteFailedV1, ControlPlaneOwningDeleteFailedV1Detail, ControlPlaneOwningDeleteV1, ControlPlaneOwningDeleteV1Detail, ControlPlaneRenameCompleteV1, ControlPlaneRenameCompleteV1Detail, ControlPlaneRenameFailedV1, ControlPlaneRenameFailedV1Detail, ControlPlaneRenameV1, ControlPlaneRenameV1Detail, ControlPlaneRoleAssignmentCreatedV1, ControlPlaneRoleAssignmentDeletedV1, ControlPlaneWorkspaceCreatedV1, ControlPlaneWorkspaceDeletedV1, 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';
34
35
  import 'aws-lambda';
35
36
 
@@ -2076,6 +2077,113 @@ declare class OpenHiRestApiService extends OpenHiService {
2076
2077
  protected resolveRuntimeConfigEnvVars(): Record<string, string>;
2077
2078
  }
2078
2079
 
2080
+ /**
2081
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/counter-maintenance/events.md
2082
+ *
2083
+ * Wiring constants for the ADR-028 counter-maintenance consumer: the
2084
+ * dedup consumer name and the set of `openhi.control` detail-types the
2085
+ * EventBridge rule routes to the Lambda.
2086
+ */
2087
+ /**
2088
+ * Stable logical name this workflow registers with the shared
2089
+ * `WorkflowDedupTable` (TR-015). Used in both the construct grant
2090
+ * (`WorkflowDedupTable.grantConsumerFromLookup(... , COUNTER_MAINTENANCE_CONSUMER_NAME)`)
2091
+ * and the handler's runtime `recordIfAbsent` call — keep them aligned by
2092
+ * importing this constant in both places.
2093
+ */
2094
+ declare const COUNTER_MAINTENANCE_CONSUMER_NAME = "counter-maintenance";
2095
+ /**
2096
+ * The six `openhi.control` detail-types the counter-maintenance consumer
2097
+ * subscribes to. The EventBridge rule matches `source: ["openhi.control"]`
2098
+ * and this exact detail-type list; the handler dispatches on the
2099
+ * `detail-type` to choose the counter routing.
2100
+ */
2101
+ declare const COUNTER_MAINTENANCE_DETAIL_TYPES: readonly [string, string, string, string, string, string];
2102
+
2103
+ interface CounterMaintenanceLambdaProps {
2104
+ /**
2105
+ * Control event bus carrying the `openhi.control` membership /
2106
+ * role-assignment / workspace lifecycle events. The Rule mounts here.
2107
+ */
2108
+ readonly controlEventBus: IEventBus;
2109
+ /**
2110
+ * Data-store table the consumer applies atomic counter ADDs against.
2111
+ * Wired via `DYNAMO_TABLE_NAME`; granted `dynamodb:UpdateItem` (the
2112
+ * counter mutation is a conditional `ADD` — no reads, no other writes).
2113
+ */
2114
+ readonly dataStoreTable: ITable;
2115
+ }
2116
+ /** Lambda + EventBridge Rule for the counter-maintenance consumer. */
2117
+ declare class CounterMaintenanceLambda extends Construct {
2118
+ readonly lambda: NodejsFunction;
2119
+ readonly rule: Rule;
2120
+ constructor(scope: Construct, props: CounterMaintenanceLambdaProps);
2121
+ }
2122
+
2123
+ /**
2124
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/counter-maintenance/counter-maintenance-workflow.md
2125
+ *
2126
+ * ADR-028 counter-maintenance workflow. Subscribes to the control-plane
2127
+ * membership / role-assignment / workspace lifecycle events on the
2128
+ * control event bus and maintains the denormalized counters on the
2129
+ * canonical Tenant / Workspace / User records via idempotent atomic ADD.
2130
+ *
2131
+ * Mounted on the data-service stack so the IAM grant against the
2132
+ * data-store table stays local. The control event bus and the workflow
2133
+ * dedup table reach in cross-stack via the SSM lookups
2134
+ * `OpenHiGlobalService.controlEventBusFromConstruct` and
2135
+ * `WorkflowDedupTable.grantConsumerFromLookup` respectively — the same
2136
+ * pattern the seed-demo-data workflow uses.
2137
+ */
2138
+ interface CounterMaintenanceWorkflowProps {
2139
+ /** Control event bus carrying the `openhi.control` counter-relevant events. */
2140
+ readonly controlEventBus: IEventBus;
2141
+ /** Data-store table the counters live on / are mutated against. */
2142
+ readonly dataStoreTable: ITable;
2143
+ }
2144
+ /** Composes the counter-maintenance Lambda and wires it to the dedup table. */
2145
+ declare class CounterMaintenanceWorkflow extends Construct {
2146
+ readonly counterMaintenance: CounterMaintenanceLambda;
2147
+ constructor(scope: Construct, props: CounterMaintenanceWorkflowProps);
2148
+ }
2149
+
2150
+ interface CounterReconciliationLambdaProps {
2151
+ /**
2152
+ * Data-store table the job recomputes counters from and SETs the
2153
+ * repaired values onto. Wired via `DYNAMO_TABLE_NAME`; granted read +
2154
+ * write because the sweep reads every canonical record (and its GSI1 /
2155
+ * projection rows) and writes the recomputed counter back.
2156
+ */
2157
+ readonly dataStoreTable: ITable;
2158
+ }
2159
+ /** On-demand Lambda for the counter-reconciliation job (no EventBridge trigger). */
2160
+ declare class CounterReconciliationLambda extends Construct {
2161
+ readonly lambda: NodejsFunction;
2162
+ constructor(scope: Construct, props: CounterReconciliationLambdaProps);
2163
+ }
2164
+
2165
+ /**
2166
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/counter-reconciliation/counter-reconciliation-workflow.md
2167
+ *
2168
+ * ADR-028 counter-reconciliation workflow. Composes the on-demand
2169
+ * reconciliation Lambda and mounts it on the data-service stack so the
2170
+ * DynamoDB grant against the data-store table stays local.
2171
+ *
2172
+ * Unlike the event-driven counter-maintenance workflow, this job needs no
2173
+ * control-event-bus subscription and no `WorkflowDedupTable` wiring — it
2174
+ * is invoked on demand and is idempotent (it SETs absolute recomputed
2175
+ * values, so re-running corrects nothing on unchanged data).
2176
+ */
2177
+ interface CounterReconciliationWorkflowProps {
2178
+ /** Data-store table the job recomputes counters from / repairs. */
2179
+ readonly dataStoreTable: ITable;
2180
+ }
2181
+ /** Composes the counter-reconciliation Lambda. */
2182
+ declare class CounterReconciliationWorkflow extends Construct {
2183
+ readonly counterReconciliation: CounterReconciliationLambda;
2184
+ constructor(scope: Construct, props: CounterReconciliationWorkflowProps);
2185
+ }
2186
+
2079
2187
  /**
2080
2188
  * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/data-plane-fixtures.md
2081
2189
  *
@@ -2115,6 +2223,111 @@ interface DemoWorkspaceDataPlaneFixtures {
2115
2223
  readonly observations: ReadonlyArray<Observation>;
2116
2224
  readonly encounters: ReadonlyArray<Encounter>;
2117
2225
  readonly accounts: ReadonlyArray<Account>;
2226
+ /**
2227
+ * Facility (FHIR Location) fixtures. Optional — only the
2228
+ * on-site UAT demo workspace seeds facilities (#1303). Defaults
2229
+ * to the empty array when omitted.
2230
+ */
2231
+ readonly locations?: ReadonlyArray<Location>;
2232
+ /**
2233
+ * Directory Organization fixtures (#1308). Optional — only the
2234
+ * on-site UAT demo workspace seeds Organizations today. Covers
2235
+ * DME suppliers and insurance payor contacts; defaults to the
2236
+ * empty array when omitted.
2237
+ */
2238
+ readonly organizations?: ReadonlyArray<Organization>;
2239
+ /**
2240
+ * Insurance Coverage fixtures (#1304). Optional — only the
2241
+ * on-site UAT demo workspace seeds Coverages today. Defaults to
2242
+ * the empty array when omitted. Coverages reference their
2243
+ * `beneficiary` Patient via `Patient/<id>`, so the seeder writes
2244
+ * Coverages after Patients in the same workspace pass.
2245
+ */
2246
+ readonly coverages?: ReadonlyArray<Coverage>;
2247
+ /**
2248
+ * Optional dynamic Patient builder. Resolved by the seeder at
2249
+ * write time so per-tenant fixtures that depend on other
2250
+ * fixture modules (cross-module references between blocks +
2251
+ * facilities + facility patients) can be evaluated lazily,
2252
+ * avoiding the TDZ that hits when one fixture module reads a
2253
+ * top-level const from another mid-cycle. When set, the seeder
2254
+ * iterates `buildPatients()` instead of `patients`.
2255
+ */
2256
+ readonly buildPatients?: () => ReadonlyArray<Patient>;
2257
+ /**
2258
+ * Optional dynamic Coverage builder. Same lazy-evaluation
2259
+ * contract as {@link buildPatients}.
2260
+ */
2261
+ readonly buildCoverages?: () => ReadonlyArray<Coverage>;
2262
+ /**
2263
+ * Optional dynamic Appointment builder. Resolved by the seeder
2264
+ * with `baseContext` so block-style Appointments can anchor
2265
+ * their recurrence to the current ISO week (#1303 — block
2266
+ * Appointments must show up at a useful position on the demo
2267
+ * calendar relative to "today"). When omitted, no Appointments
2268
+ * are written for this workspace.
2269
+ */
2270
+ readonly buildAppointments?: (baseContext: OpenHiContext) => ReadonlyArray<Appointment>;
2271
+ /**
2272
+ * Optional static wound / problem Condition fixtures (#1306).
2273
+ * Wound Conditions reference their Patient via `subject` and
2274
+ * sit upstream of wound-exam Observations (which reference the
2275
+ * Condition via `focus`) and wound Procedures (which reference
2276
+ * the Condition via `reasonReference`). The seeder writes
2277
+ * Conditions immediately after Patients so the reference chain
2278
+ * resolves cleanly on read paths.
2279
+ */
2280
+ readonly conditions?: ReadonlyArray<Condition>;
2281
+ /**
2282
+ * Optional static Procedure fixtures (#1306). Procedures
2283
+ * reference their Encounter via `encounter`, their wound
2284
+ * Condition via `reasonReference[0]`, and their Patient via
2285
+ * `subject`. Written after Encounters and Conditions so the
2286
+ * reference chain resolves cleanly on read paths.
2287
+ */
2288
+ readonly procedures?: ReadonlyArray<Procedure>;
2289
+ /**
2290
+ * Optional dynamic Condition builder. Same lazy-evaluation
2291
+ * contract as {@link buildPatients} — used so the on-site
2292
+ * encounter fixtures can anchor wound Conditions to the same
2293
+ * `baseContext.date` window the encounter dates are derived
2294
+ * from.
2295
+ */
2296
+ readonly buildConditions?: (baseContext: OpenHiContext) => ReadonlyArray<Condition>;
2297
+ /**
2298
+ * Optional dynamic Encounter builder. Same lazy-evaluation
2299
+ * contract as {@link buildPatients} — encounter dates depend on
2300
+ * `baseContext.date` (past block occurrences for facility
2301
+ * patients, past visit cadence for home-health patients).
2302
+ */
2303
+ readonly buildEncounters?: (baseContext: OpenHiContext) => ReadonlyArray<Encounter>;
2304
+ /**
2305
+ * Optional dynamic Observation builder. Same lazy-evaluation
2306
+ * contract as {@link buildPatients} — wound-exam Observations
2307
+ * reference encounters that depend on `baseContext.date`.
2308
+ */
2309
+ readonly buildObservations?: (baseContext: OpenHiContext) => ReadonlyArray<Observation>;
2310
+ /**
2311
+ * Optional dynamic Procedure builder. Same lazy-evaluation
2312
+ * contract as {@link buildPatients} — wound Procedures
2313
+ * reference encounters that depend on `baseContext.date`.
2314
+ */
2315
+ readonly buildProcedures?: (baseContext: OpenHiContext) => ReadonlyArray<Procedure>;
2316
+ /**
2317
+ * Optional dynamic Claim builder (#1307). Claims reference
2318
+ * the encounter they bill via `item[].encounter`, the
2319
+ * patient's primary Coverage via `insurance[0].coverage`, and
2320
+ * therefore depend on the encounter + coverage builders above.
2321
+ * Written after Procedures so every reference chain resolves
2322
+ * cleanly on read paths.
2323
+ */
2324
+ readonly buildClaims?: (baseContext: OpenHiContext) => ReadonlyArray<Claim>;
2325
+ /**
2326
+ * Optional dynamic PaymentNotice builder (#1307). One
2327
+ * PaymentNotice per accepted Claim; references the Claim via
2328
+ * `request` + `payment`. Written after Claims.
2329
+ */
2330
+ readonly buildPaymentNotices?: (baseContext: OpenHiContext) => ReadonlyArray<PaymentNotice>;
2118
2331
  }
2119
2332
  /**
2120
2333
  * Per-workspace fixtures the data-plane phase writes on every fire.
@@ -2154,6 +2367,1041 @@ declare const DEMO_DATA_PLANE_FIXTURES: ReadonlyArray<DemoWorkspaceDataPlaneFixt
2154
2367
  */
2155
2368
  declare const PLATFORM_SCOPE_TENANT_ID = "platform";
2156
2369
 
2370
+ /**
2371
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-blocks.md
2372
+ *
2373
+ * Hand-authored weekly scheduling block fixtures the
2374
+ * `seed-demo-data` workflow upserts into the on-site-medical UAT
2375
+ * demo tenant ({@link ON_SITE_DEMO_TENANT_ID} +
2376
+ * {@link ON_SITE_DEMO_WORKSPACE_ID}) on every non-prod deploy
2377
+ * (issue #1303).
2378
+ *
2379
+ * Modelling choice: blocks are represented as FHIR
2380
+ * `Appointment` resources with `appointmentType.code = "block"`
2381
+ * (matching the on-site app's `isBlockAppointment` helper at
2382
+ * `sites/app-ehr/src/types/appointment.ts`). The on-site
2383
+ * calendar reads `Appointment` records, not `Schedule`/`Slot`
2384
+ * resources, so seeding `Appointment`s is the path that
2385
+ * actually renders something for UAT testers. Each block is
2386
+ * "recurring weekly" — we materialize that as a window of
2387
+ * concrete weekly occurrences anchored to the week containing
2388
+ * the seeder's `baseContext.date`, so blocks always show up at
2389
+ * a useful position relative to "today" on the demo schedule.
2390
+ *
2391
+ * Topology — issue #1303 design:
2392
+ * - Facility 1 (Druid Hills Skilled Nursing) — TWO weekly
2393
+ * blocks: Tuesday + Thursday (the high-volume facility).
2394
+ * - Facility 2 (Buckhead Rehabilitation Center) — one
2395
+ * weekly block on Wednesday.
2396
+ * - Facility 3 (Decatur Senior Living) — one weekly block
2397
+ * on Monday.
2398
+ *
2399
+ * Each block is assigned one doctor and one scribe from the
2400
+ * demo provider pool (#1302). Doctors are distributed so no
2401
+ * single doctor covers all four blocks. Capacities accommodate
2402
+ * 12-20 patients each (the upstream patient-distribution
2403
+ * ticket #1304 reads {@link ON_SITE_DEMO_BLOCK_CAPACITY_EXTENSION_URL}
2404
+ * to spread patients across blocks).
2405
+ */
2406
+ /**
2407
+ * Extension URL stamped on every block Appointment carrying the
2408
+ * block's intended capacity (number of patients the block can
2409
+ * accommodate). FHIR Appointment has no first-class capacity
2410
+ * field, so we publish a local URL under the on-site
2411
+ * convention.
2412
+ */
2413
+ declare const ON_SITE_DEMO_BLOCK_CAPACITY_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/block-capacity";
2414
+ /** Coding system the on-site app expects on Appointment.appointmentType. */
2415
+ declare const ON_SITE_APPOINTMENT_TYPE_SYSTEM = "https://onsite-medical.org/appointment-type";
2416
+ /**
2417
+ * Weeks of past occurrences materialized per block. Past
2418
+ * occurrences let UAT testers exercise "history" views without
2419
+ * waiting through time.
2420
+ */
2421
+ declare const BLOCK_OCCURRENCE_WEEKS_PAST = 4;
2422
+ /**
2423
+ * Weeks of future occurrences materialized per block. Future
2424
+ * occurrences cover the calendar's default "month ahead"
2425
+ * window plus room for testers to navigate forward.
2426
+ */
2427
+ declare const BLOCK_OCCURRENCE_WEEKS_FUTURE = 8;
2428
+ /**
2429
+ * Total weekly occurrences materialized per block template
2430
+ * (past + current week + future). Re-fires with the same
2431
+ * `baseContext.date` produce byte-identical occurrence ids.
2432
+ */
2433
+ declare const BLOCK_OCCURRENCES_PER_TEMPLATE: number;
2434
+ /**
2435
+ * ISO day-of-week index used by {@link BlockTemplate.dayOfWeek}.
2436
+ * 1 = Monday, ..., 7 = Sunday (matches ISO 8601 / FHIR usage).
2437
+ */
2438
+ type IsoDayOfWeek = 1 | 2 | 3 | 4 | 5 | 6 | 7;
2439
+ /** Stable block-template ids in dispatch order. Re-exported for downstream tickets. */
2440
+ declare const ON_SITE_DEMO_BLOCK_TEMPLATE_IDS: ReadonlyArray<string>;
2441
+ /**
2442
+ * Materialize every block template's weekly occurrences,
2443
+ * anchored to the Monday of the ISO week containing
2444
+ * `referenceIso` (typically `baseContext.date`). Each template
2445
+ * produces {@link BLOCK_OCCURRENCES_PER_TEMPLATE} appointments:
2446
+ * `BLOCK_OCCURRENCE_WEEKS_PAST` past weeks, the current week,
2447
+ * and `BLOCK_OCCURRENCE_WEEKS_FUTURE` future weeks. With the
2448
+ * default window of 4 + 1 + 8 = 13 occurrences per template ×
2449
+ * 4 templates, the seeder writes 52 block Appointments per
2450
+ * fire.
2451
+ *
2452
+ * Idempotency: ids are derived from `(templateId, weekOffset)`,
2453
+ * not from a wall-clock timestamp, so re-fires of the seeder
2454
+ * with the same `referenceIso` upsert the same Appointment
2455
+ * records (no duplicates). A re-fire with a different
2456
+ * `referenceIso` (e.g., the deploy event days later) writes a
2457
+ * new set of occurrences and leaves prior weeks' records as
2458
+ * orphaned past history — that is acceptable for UAT.
2459
+ */
2460
+ declare const buildOnSiteDemoBlockAppointments: (referenceIso: string) => ReadonlyArray<Appointment>;
2461
+ /**
2462
+ * Stable per-template (doctor, scribe) pair for the on-site
2463
+ * block schedule. Downstream tickets (e.g., the patient-
2464
+ * distribution helper in #1304) call this to look up which
2465
+ * provider pair staffs a given block without re-reading the
2466
+ * block-template list.
2467
+ */
2468
+ declare const findOnSiteDemoBlockTemplate: (templateId: string) => {
2469
+ readonly id: string;
2470
+ readonly facilityId: string;
2471
+ readonly displayName: string;
2472
+ readonly doctorId: string;
2473
+ readonly scribeId: string;
2474
+ readonly capacity: number;
2475
+ readonly dayOfWeek: IsoDayOfWeek;
2476
+ } | undefined;
2477
+
2478
+ /**
2479
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-claims.md
2480
+ *
2481
+ * Hand-authored Claim + PaymentNotice fixtures the `seed-demo-data`
2482
+ * workflow upserts into the on-site-medical UAT demo tenant
2483
+ * ({@link ON_SITE_DEMO_TENANT_ID} + {@link ON_SITE_DEMO_WORKSPACE_ID})
2484
+ * on every non-prod deploy (issue #1307).
2485
+ *
2486
+ * Topology — issue #1307 design:
2487
+ * - For each historical encounter (#1306), decide deterministically
2488
+ * whether the visit is billed or explicitly unbilled. The unbilled
2489
+ * decision is recorded by the *absence* of a Claim resource on
2490
+ * that encounter id; the on-site UI can derive "unbilled" by
2491
+ * listing claims and finding no match for an encounter.
2492
+ * - Billed encounters get exactly one {@link Claim} resource keyed
2493
+ * `<encounter-id>-claim`. The Claim carries:
2494
+ * - `status: "active"` (FHIR R4 enum only has
2495
+ * `active|cancelled|draft|entered-in-error`, none of which
2496
+ * encode our domain workflow status — see
2497
+ * {@link CLAIM_WORKFLOW_STATUS_EXTENSION_URL}).
2498
+ * - `claim-workflow-status` extension carrying the domain
2499
+ * status: `submitted` / `accepted` / `rejected` /
2500
+ * `reworked` / `resubmitted`.
2501
+ * - `insurance[0].coverage` referencing the patient's primary
2502
+ * {@link Coverage} (which is what carries the actual payor).
2503
+ * - `item[]` carrying one line: a wound-debridement CPT for
2504
+ * encounters that have a procedure (#1306), otherwise an
2505
+ * E/M visit code (99213/99214/99215) chosen deterministically.
2506
+ * - `total` denormalised from the single line item's `net`.
2507
+ * - Accepted claims get a {@link PaymentNotice} resource keyed
2508
+ * `<encounter-id>-payment` whose `paymentStatus` CodeableConcept
2509
+ * carries the domain payment status: `partial` / `full` /
2510
+ * `write-off`. Submitted / rejected / reworked / resubmitted
2511
+ * claims do not emit a PaymentNotice — the "in flux" subset is
2512
+ * specifically every `submitted` claim with no PaymentNotice.
2513
+ *
2514
+ * Modelling choices:
2515
+ * - **Single Claim per encounter** (not a chain). The "reworked"
2516
+ * status implies history (original rejected → resubmitted),
2517
+ * denormalised onto the same Claim via the
2518
+ * `claim-workflow-status` extension. On-site's current UI
2519
+ * (`sites/app-ehr/src/pages/patient/tabs/insurance/ClaimsTable.tsx`)
2520
+ * shows a single status badge per claim and does not need a
2521
+ * chain to render correctly.
2522
+ * - **PaymentNotice over a denormalised payment summary** —
2523
+ * PaymentNotice operations already exist in the data layer
2524
+ * (`packages/@openhi/constructs/src/data/operations/data/paymentnotice/`),
2525
+ * so we lean on real FHIR resources rather than adding a new
2526
+ * extension schema.
2527
+ * - **Domain status as an extension** — FHIR R4 `Claim.status`
2528
+ * does not include the workflow-status concepts the demo
2529
+ * needs, and stamping a non-standard string onto the enum
2530
+ * would fail the zod schema. The extension approach mirrors
2531
+ * how on-site already encodes domain state on other
2532
+ * resources (hospice status, QMB status, care-context, etc.).
2533
+ *
2534
+ * Distribution targets — chosen so all 5 workflow statuses plus
2535
+ * unbilled appear in the demo data, with payment-status variety
2536
+ * on the accepted bucket and a meaningful "in flux" submitted
2537
+ * bucket:
2538
+ * - ~15% of encounters are unbilled (no Claim)
2539
+ * - ~20% of claims are submitted (no PaymentNotice — "in flux")
2540
+ * - ~45% of claims are accepted (with PaymentNotice)
2541
+ * - ~40% of accepted: partial payment
2542
+ * - ~40% of accepted: full payment
2543
+ * - ~20% of accepted: write-off
2544
+ * - ~10% of claims are rejected
2545
+ * - ~15% of claims are reworked
2546
+ * - ~10% of claims are resubmitted
2547
+ *
2548
+ * Ids are deterministic — re-fires upsert the same records,
2549
+ * matching the workflow's idempotency contract.
2550
+ */
2551
+ /**
2552
+ * Extension URL stamped on every seeded Claim recording the
2553
+ * domain workflow status — submitted / accepted / rejected /
2554
+ * reworked / resubmitted. FHIR R4 `Claim.status` only carries
2555
+ * the lifecycle states `active|cancelled|draft|entered-in-error`,
2556
+ * so the demo's workflow status sits on this extension instead
2557
+ * of squeezing into the base enum.
2558
+ */
2559
+ declare const CLAIM_WORKFLOW_STATUS_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/claim-workflow-status";
2560
+ /** Sub-extension under {@link CLAIM_WORKFLOW_STATUS_EXTENSION_URL}. */
2561
+ declare const CLAIM_WORKFLOW_STATUS_VALUE_SUB_EXTENSION_URL = "status";
2562
+ /** Sub-extension under {@link CLAIM_WORKFLOW_STATUS_EXTENSION_URL}. */
2563
+ declare const CLAIM_WORKFLOW_STATUS_LAST_TRANSITION_SUB_EXTENSION_URL = "lastTransition";
2564
+ /**
2565
+ * Domain workflow status values written to
2566
+ * {@link CLAIM_WORKFLOW_STATUS_EXTENSION_URL}.
2567
+ */
2568
+ declare const CLAIM_WORKFLOW_STATUS: {
2569
+ readonly SUBMITTED: "submitted";
2570
+ readonly ACCEPTED: "accepted";
2571
+ readonly REJECTED: "rejected";
2572
+ readonly REWORKED: "reworked";
2573
+ readonly RESUBMITTED: "resubmitted";
2574
+ };
2575
+ type ClaimWorkflowStatus = (typeof CLAIM_WORKFLOW_STATUS)[keyof typeof CLAIM_WORKFLOW_STATUS];
2576
+ /**
2577
+ * Domain payment status values written to
2578
+ * {@link PaymentNotice.paymentStatus} on accepted claims.
2579
+ */
2580
+ declare const PAYMENT_STATUS: {
2581
+ readonly PARTIAL: "partial";
2582
+ readonly FULL: "full";
2583
+ readonly WRITE_OFF: "write-off";
2584
+ };
2585
+ type PaymentStatus = (typeof PAYMENT_STATUS)[keyof typeof PAYMENT_STATUS];
2586
+ /** CodeSystem URL stamped on the {@link PaymentNotice.paymentStatus} coding. */
2587
+ declare const PAYMENT_STATUS_SYSTEM = "https://on-site-medical.app/fhir/CodeSystem/payment-status";
2588
+ /**
2589
+ * Test seam — clear caches between test invocations so stale
2590
+ * state from a prior seed run does not leak into the next.
2591
+ */
2592
+ declare const __resetOnSiteDemoClaimCachesForTests: () => void;
2593
+ /**
2594
+ * Materialise every Claim resource for the on-site UAT demo
2595
+ * workspace. Walks every historical encounter (#1306); skips the
2596
+ * ~15% flagged as unbilled. Returns an empty array if no
2597
+ * encounter metadata is available (intake-only deployments).
2598
+ */
2599
+ declare const buildOnSiteDemoClaims: (referenceIso: string) => ReadonlyArray<Claim>;
2600
+ /**
2601
+ * Materialise every PaymentNotice resource for the on-site UAT
2602
+ * demo workspace. One per `accepted` Claim (no PaymentNotice on
2603
+ * submitted / rejected / reworked / resubmitted — submitted-with-
2604
+ * no-payment is the "in flux" subset the AC asks for).
2605
+ */
2606
+ declare const buildOnSiteDemoPaymentNotices: (referenceIso: string) => ReadonlyArray<PaymentNotice>;
2607
+ /**
2608
+ * Stable list of every Claim id seeded for the on-site UAT demo
2609
+ * workspace, anchored to `referenceIso`. Order matches the
2610
+ * underlying encounter list. Downstream tickets (#1308 — billing
2611
+ * directory, etc.) read this to fan out per-claim work.
2612
+ */
2613
+ declare const onSiteDemoClaimIds: (referenceIso: string) => ReadonlyArray<string>;
2614
+ /**
2615
+ * Stable list of every PaymentNotice id seeded for the on-site
2616
+ * UAT demo workspace, anchored to `referenceIso`.
2617
+ */
2618
+ declare const onSiteDemoPaymentNoticeIds: (referenceIso: string) => ReadonlyArray<string>;
2619
+ /**
2620
+ * Encounter ids the seeder flags as unbilled (no Claim emitted).
2621
+ * Exposed so tests and downstream tickets can assert the
2622
+ * unbilled cut without re-deriving the hash.
2623
+ */
2624
+ declare const onSiteDemoUnbilledEncounterIds: (referenceIso: string) => ReadonlyArray<string>;
2625
+ /**
2626
+ * Encounter ids the seeder flags as billed (one Claim emitted per
2627
+ * id). Exposed so tests and downstream tickets can fan out per
2628
+ * billed encounter without re-deriving the hash.
2629
+ */
2630
+ declare const onSiteDemoBilledEncounterIds: (referenceIso: string) => ReadonlyArray<string>;
2631
+
2632
+ /**
2633
+ * FHIR `Organization.type[0].coding.system` for the standard
2634
+ * organization-type valueset. Carrying the standard coding alongside
2635
+ * the domain category keeps the bodies interoperable.
2636
+ */
2637
+ declare const FHIR_ORGANIZATION_TYPE_SYSTEM = "http://terminology.hl7.org/CodeSystem/organization-type";
2638
+ /**
2639
+ * On-site domain category system for directory categorisation —
2640
+ * separates `dme-supplier` from `insurance-payor` so the directory
2641
+ * UI's category filter can match a single coding without parsing
2642
+ * the FHIR-standard `prov` / `pay` codes.
2643
+ */
2644
+ declare const ON_SITE_DIRECTORY_CATEGORY_SYSTEM = "https://on-site-medical.app/fhir/CodeSystem/directory-category";
2645
+ /** Domain category code stamped on every DME-supplier Organization. */
2646
+ declare const DME_SUPPLIER_CATEGORY_CODE = "dme-supplier";
2647
+ /** Domain category code stamped on every insurance-payor Organization. */
2648
+ declare const INSURANCE_PAYOR_CATEGORY_CODE = "insurance-payor";
2649
+ /**
2650
+ * Sub-category coding system stamped on the payor Organization's
2651
+ * `type[1]` so the directory UI can group payors by plan family
2652
+ * (commercial / Medicare / Medicare Advantage) without re-parsing
2653
+ * the display name. Mirrors the
2654
+ * {@link COVERAGE_PAYOR_TYPE_SYSTEM} convention used on Coverage
2655
+ * resources in #1304.
2656
+ */
2657
+ declare const INSURANCE_PAYOR_PLAN_TYPE_SYSTEM = "https://on-site-medical.app/fhir/CodeSystem/payor-plan-type";
2658
+ /** Commercial plan payor (Aetna, Cigna, UnitedHealthcare, etc.). */
2659
+ declare const PAYOR_PLAN_TYPE_COMMERCIAL = "commercial";
2660
+ /** Traditional Medicare (FFS) — single payor. */
2661
+ declare const PAYOR_PLAN_TYPE_MEDICARE = "medicare";
2662
+ /** Medicare Advantage plan payor (Humana MA, Anthem MA, etc.). */
2663
+ declare const PAYOR_PLAN_TYPE_MEDICARE_ADVANTAGE = "medicare-advantage";
2664
+ /** Union of the three plan-type codes a payor Organization may carry. */
2665
+ type PayorPlanType = typeof PAYOR_PLAN_TYPE_COMMERCIAL | typeof PAYOR_PLAN_TYPE_MEDICARE | typeof PAYOR_PLAN_TYPE_MEDICARE_ADVANTAGE;
2666
+ /**
2667
+ * Root extension URL stamped on each `qualification[]` entry recording
2668
+ * the per-state credentialing context (state code + status). FHIR R4
2669
+ * `Practitioner_Qualification` carries `identifier`, `code`, `period`,
2670
+ * and `issuer` natively but has no `status` field; the extension fills
2671
+ * that gap without forking the schema.
2672
+ */
2673
+ declare const PRACTITIONER_CREDENTIALING_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/practitioner-credentialing";
2674
+ /** Sub-extension under {@link PRACTITIONER_CREDENTIALING_EXTENSION_URL}. */
2675
+ declare const PRACTITIONER_CREDENTIALING_STATE_SUB_EXTENSION_URL = "state";
2676
+ /** Sub-extension under {@link PRACTITIONER_CREDENTIALING_EXTENSION_URL}. */
2677
+ declare const PRACTITIONER_CREDENTIALING_STATUS_SUB_EXTENSION_URL = "status";
2678
+ /**
2679
+ * Credentialing status values. Mirrors the wound-care industry
2680
+ * convention — credentialing is either active (license current and in
2681
+ * good standing), suspended (under board action), or expired (lapsed
2682
+ * past expiration date).
2683
+ */
2684
+ declare const CREDENTIALING_STATUS: {
2685
+ readonly ACTIVE: "active";
2686
+ readonly SUSPENDED: "suspended";
2687
+ readonly EXPIRED: "expired";
2688
+ };
2689
+ type CredentialingStatus = (typeof CREDENTIALING_STATUS)[keyof typeof CREDENTIALING_STATUS];
2690
+ /**
2691
+ * FHIR `Identifier.system` for a US state medical license. Uses the
2692
+ * on-site-medical URL prefix so the identifier round-trips through
2693
+ * the on-site directory UI without colliding with the NPI system.
2694
+ */
2695
+ declare const STATE_MEDICAL_LICENSE_SYSTEM = "https://on-site-medical.app/fhir/sid/state-medical-license";
2696
+ /** Demo DME-supplier Organizations seeded into the on-site UAT workspace. */
2697
+ declare const ON_SITE_DEMO_DME_SUPPLIERS: ReadonlyArray<Organization>;
2698
+ /** Demo insurance-payor Organizations seeded into the on-site UAT workspace. */
2699
+ declare const ON_SITE_DEMO_INSURANCE_PAYORS: ReadonlyArray<Organization>;
2700
+ /** Stable DME-supplier ids in dispatch order. */
2701
+ declare const onSiteDemoDmeSupplierIds: () => ReadonlyArray<string>;
2702
+ /** Stable insurance-payor ids in dispatch order. */
2703
+ declare const onSiteDemoInsurancePayorIds: () => ReadonlyArray<string>;
2704
+ /**
2705
+ * The full directory Organization pool seeded into the on-site UAT
2706
+ * workspace — DME suppliers followed by insurance payors. The seeder
2707
+ * walks this in order via `buildOrganizations`.
2708
+ */
2709
+ declare const ON_SITE_DEMO_DIRECTORY_ORGANIZATIONS: ReadonlyArray<Organization>;
2710
+ /**
2711
+ * Per-state credentialing spec for one license. The doctor specs in
2712
+ * `on-site-demo-fixtures.ts` carry a small array of these and the
2713
+ * build helper below converts each into a FHIR
2714
+ * `Practitioner_Qualification` entry appended after the "Physician"
2715
+ * qualification.
2716
+ */
2717
+ interface PractitionerCredentialingSpec {
2718
+ /** Two-letter USPS state code (GA, AL, TN, …). */
2719
+ readonly state: string;
2720
+ /** State medical board display label used for `issuer.display`. */
2721
+ readonly stateBoardDisplay: string;
2722
+ /** Opaque license number (real format varies by state). */
2723
+ readonly licenseNumber: string;
2724
+ /** ISO date the license was issued. */
2725
+ readonly issued: string;
2726
+ /** ISO date the license expires (after-end-of-period if expired). */
2727
+ readonly expires: string;
2728
+ readonly status: CredentialingStatus;
2729
+ }
2730
+ /**
2731
+ * Lookup helper: per-state credentialing entries for one doctor. Returns
2732
+ * an empty array if the practitioner id is not a seeded on-site doctor.
2733
+ */
2734
+ declare const practitionerCredentialingForDoctor: (practitionerId: string) => ReadonlyArray<PractitionerCredentialingSpec>;
2735
+ /**
2736
+ * Lookup helper: per-state credentialing entry for a specific
2737
+ * (practitionerId, stateCode) pair. Returns `undefined` when the pair
2738
+ * has no credentialing entry — the on-site UI can render this as
2739
+ * "not credentialed in <state>" without inspecting the full list.
2740
+ */
2741
+ declare const practitionerCredentialingForState: (practitionerId: string, stateCode: string) => PractitionerCredentialingSpec | undefined;
2742
+ /**
2743
+ * Build the FHIR `qualification[]` entries representing per-state
2744
+ * credentialing for one doctor. The on-site demo doctor builder
2745
+ * appends these after the base "Physician" qualification so the
2746
+ * resulting Practitioner.qualification array carries:
2747
+ * - [0] role label (`{text: "Physician"}`)
2748
+ * - [1..N] per-state licenses (one entry per state in the
2749
+ * credentialing map for this doctor)
2750
+ *
2751
+ * Each license entry's identifier is keyed under
2752
+ * {@link STATE_MEDICAL_LICENSE_SYSTEM} so the on-site UI can pluck the
2753
+ * license number without parsing the issuer display.
2754
+ */
2755
+ declare const buildCredentialingQualifications: (practitionerId: string) => ReadonlyArray<Practitioner_Qualification>;
2756
+
2757
+ /**
2758
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-encounters.md
2759
+ *
2760
+ * Historical Encounter + wound-Condition + wound-exam Observation +
2761
+ * wound-debridement Procedure fixtures the `seed-demo-data` workflow
2762
+ * upserts into the on-site-medical UAT demo tenant
2763
+ * ({@link ON_SITE_DEMO_TENANT_ID} + {@link ON_SITE_DEMO_WORKSPACE_ID})
2764
+ * on every non-prod deploy (issue #1306).
2765
+ *
2766
+ * Topology — issue #1306 design:
2767
+ * - Brand-new intake patients (6 facility intake-only + 3 home
2768
+ * intake-only) get **no** encounters. They carry intake +
2769
+ * insurance only.
2770
+ * - Scheduled facility patients (60 patients across 4 blocks) get
2771
+ * one Encounter per past block occurrence their block ran on
2772
+ * (the `BLOCK_OCCURRENCE_WEEKS_PAST` window = 4 past weeks).
2773
+ * Authored by the block's doctor + scribe, dated to that
2774
+ * occurrence's date.
2775
+ * - Scheduled home-health patients (17 patients) get one Encounter
2776
+ * per past visit at their cadence, stepping back from the
2777
+ * reference date. With cadence 14 days and 4 past visits, the
2778
+ * dates land at -14, -28, -42, -56 days. Authored by the
2779
+ * assigned home-health provider.
2780
+ * - ~70% of scheduled patients carry a "current wound" — one
2781
+ * {@link Condition} per patient with `category.text = "wound"`
2782
+ * plus a deterministic lower-extremity body site and wound type.
2783
+ * Every encounter for that patient records a wound-exam
2784
+ * {@link Observation} (LOINC panel 39135-9) whose components
2785
+ * show progression — length / width / depth shrink (healing) or
2786
+ * grow (worsening) across encounters depending on a
2787
+ * deterministic per-patient trajectory.
2788
+ * - ~25% of wound-bearing patients get one wound-debridement
2789
+ * {@link Procedure} on the most-recent wound encounter, using a
2790
+ * CPT code from the on-site EHR's
2791
+ * `PRESET_PROCEDURES` catalogue (e.g. 97597 Sharp Debridement).
2792
+ *
2793
+ * Modelling choices:
2794
+ * - Encounter `class` follows the on-site EHR's
2795
+ * `ENCOUNTER_CLASS_BY_LOCATION` map at
2796
+ * `sites/app-ehr/src/types/encounter.ts` — facility encounters
2797
+ * carry `code: "IMP", display: "Facility"`; home-health
2798
+ * encounters carry `code: "HH", display: "Home Health"`. The
2799
+ * `system` matches the v3 ActCode URL the on-site EHR reads.
2800
+ * - Wound is encoded as a FHIR {@link Condition} with
2801
+ * `category: [{ text: "wound" }]` (mirroring the on-site
2802
+ * `mapWoundFormToCondition` helper at
2803
+ * `sites/app-ehr/src/pages/visit/encounter/components/AddWoundDialog/woundFormMapping.ts`).
2804
+ * Wound exams are encoded as a single panel Observation per
2805
+ * encounter (LOINC 39135-9), with components for length /
2806
+ * width / depth — matching the on-site `buildWoundExamObservation`
2807
+ * mapper at `sites/app-ehr/src/features/wounds/mappers/woundExamMappers.ts`.
2808
+ * - Procedure carries a CPT code on `code.coding[0]` with system
2809
+ * `http://www.ama-assn.org/go/cpt` (the on-site EHR's
2810
+ * `CPT_SYSTEM` constant). `reasonReference` points at the wound
2811
+ * Condition; `encounter` points at the encounter the procedure
2812
+ * was performed during.
2813
+ *
2814
+ * Ids are deterministic — re-fires upsert the same records,
2815
+ * matching the workflow's idempotency contract.
2816
+ */
2817
+ /** FHIR v3 ActEncounter coding system, used on `Encounter.class`. */
2818
+ declare const ENCOUNTER_CLASS_SYSTEM = "http://terminology.hl7.org/CodeSystem/v3-ActCode";
2819
+ /** Encounter class coding for facility encounters (on-site `ENCOUNTER_CLASS_BY_LOCATION.facility`). */
2820
+ declare const ENCOUNTER_CLASS_FACILITY: {
2821
+ readonly system: "http://terminology.hl7.org/CodeSystem/v3-ActCode";
2822
+ readonly code: "IMP";
2823
+ readonly display: "Facility";
2824
+ };
2825
+ /** Encounter class coding for home-health encounters (on-site `ENCOUNTER_CLASS_BY_LOCATION.home`). */
2826
+ declare const ENCOUNTER_CLASS_HOME_HEALTH: {
2827
+ readonly system: "http://terminology.hl7.org/CodeSystem/v3-ActCode";
2828
+ readonly code: "HH";
2829
+ readonly display: "Home Health";
2830
+ };
2831
+ /** LOINC system URL used on Observation.code.coding entries. */
2832
+ declare const LOINC_SYSTEM = "http://loinc.org";
2833
+ /** SNOMED CT system URL used on Condition.code / bodySite coding entries. */
2834
+ declare const SNOMED_SYSTEM = "http://snomed.info/sct";
2835
+ /** CPT coding system used on Procedure.code (matches on-site `CPT_SYSTEM`). */
2836
+ declare const CPT_SYSTEM = "http://www.ama-assn.org/go/cpt";
2837
+ /**
2838
+ * LOINC panel code for the wound assessment panel (matches on-site
2839
+ * `WOUND_EXAM_PANEL_CODE` at
2840
+ * `sites/app-ehr/src/features/wounds/types/woundExamCodes.ts`).
2841
+ */
2842
+ declare const WOUND_EXAM_PANEL_CODE = "39135-9";
2843
+ /** Display for {@link WOUND_EXAM_PANEL_CODE}. */
2844
+ declare const WOUND_EXAM_PANEL_DISPLAY = "Wound assessment panel";
2845
+ /** LOINC component code for wound length (cm). */
2846
+ declare const WOUND_LENGTH_CODE = "39126-8";
2847
+ /** LOINC component code for wound width (cm). */
2848
+ declare const WOUND_WIDTH_CODE = "39125-0";
2849
+ /** LOINC component code for wound depth (cm). */
2850
+ declare const WOUND_DEPTH_CODE = "39127-6";
2851
+ /** LOINC component code for wound status (declining / stagnant / improving). */
2852
+ declare const WOUND_STATUS_CODE = "72311-4";
2853
+ /**
2854
+ * Hl7 condition-clinical system URL used on Condition.clinicalStatus.
2855
+ */
2856
+ declare const CONDITION_CLINICAL_STATUS_SYSTEM = "http://terminology.hl7.org/CodeSystem/condition-clinical";
2857
+ /**
2858
+ * Number of past home-health visits materialized per scheduled
2859
+ * home-health patient. Matches {@link BLOCK_OCCURRENCE_WEEKS_PAST}
2860
+ * so the facility and home-health populations carry comparable
2861
+ * history depths (~4 historical encounters per scheduled patient).
2862
+ */
2863
+ declare const HOME_HEALTH_VISITS_PAST = 4;
2864
+ /**
2865
+ * Stable wound-Condition id for a patient. The id is the patient
2866
+ * id suffixed with `-wound-001` — one wound per patient suffices
2867
+ * for UAT.
2868
+ */
2869
+ declare const woundConditionIdForPatient: (patientId: string) => string;
2870
+ /**
2871
+ * Test seam — clear the spec cache between test invocations so
2872
+ * stale state from a prior seed run does not leak into the next.
2873
+ * Not part of the public API contract.
2874
+ */
2875
+ declare const __resetOnSiteDemoEncounterCachesForTests: () => void;
2876
+ /**
2877
+ * Materialize every Encounter resource for the on-site UAT demo
2878
+ * workspace. Scheduled facility patients fan out over the past 4
2879
+ * block occurrences; scheduled home-health patients fan out over
2880
+ * the past {@link HOME_HEALTH_VISITS_PAST} cadence visits. Intake-
2881
+ * only patients contribute zero encounters.
2882
+ */
2883
+ declare const buildOnSiteDemoEncounters: (referenceIso: string) => ReadonlyArray<Encounter>;
2884
+ /**
2885
+ * Materialize every wound {@link Condition} resource for the
2886
+ * on-site UAT demo workspace. One Condition per wound-bearing
2887
+ * patient, dated to that patient's earliest encounter.
2888
+ */
2889
+ declare const buildOnSiteDemoWoundConditions: (referenceIso: string) => ReadonlyArray<Condition>;
2890
+ /**
2891
+ * Materialize every wound-exam {@link Observation} for the on-site
2892
+ * UAT demo workspace. One per encounter on a wound-bearing
2893
+ * patient, with progressing length / width / depth components.
2894
+ */
2895
+ declare const buildOnSiteDemoWoundObservations: (referenceIso: string) => ReadonlyArray<Observation>;
2896
+ /**
2897
+ * Materialize every wound-debridement {@link Procedure} for the
2898
+ * on-site UAT demo workspace. One per qualifying wound-bearing
2899
+ * patient, on their most-recent encounter, with a real CPT code.
2900
+ */
2901
+ declare const buildOnSiteDemoWoundProcedures: (referenceIso: string) => ReadonlyArray<Procedure>;
2902
+ /**
2903
+ * Stable list of every Encounter id seeded for the on-site UAT
2904
+ * demo workspace, anchored to `referenceIso`. Downstream tickets
2905
+ * (e.g. #1307 — claims walking each historical encounter) read
2906
+ * this to fan out per-encounter work without re-deriving the
2907
+ * mapping.
2908
+ */
2909
+ declare const onSiteDemoEncounterIds: (referenceIso: string) => ReadonlyArray<string>;
2910
+ /**
2911
+ * Encounters scoped to a single patient, ordered earliest first.
2912
+ * Returns the empty array for intake-only patients (no
2913
+ * encounters) and for unknown patient ids.
2914
+ */
2915
+ declare const onSiteDemoEncountersForPatient: (patientId: string, referenceIso: string) => ReadonlyArray<string>;
2916
+ /**
2917
+ * Public projection of an encounter's seed metadata. Downstream
2918
+ * tickets (e.g. #1307 — claims walking each historical encounter)
2919
+ * read this instead of re-parsing the encounter id string.
2920
+ */
2921
+ interface OnSiteDemoEncounterMetadata {
2922
+ /** Stable Encounter id. */
2923
+ readonly id: string;
2924
+ /** Patient the encounter is authored against. */
2925
+ readonly patientId: string;
2926
+ /** 1-based sequence ordinal within the patient's encounter list (1 = earliest). */
2927
+ readonly sequence: number;
2928
+ /** Total encounters seeded for this patient. */
2929
+ readonly totalEncounters: number;
2930
+ /** ISO 8601 start instant the encounter is dated to. */
2931
+ readonly periodStart: string;
2932
+ /** Whether this encounter carries a wound-debridement Procedure. */
2933
+ readonly hasWoundProcedure: boolean;
2934
+ }
2935
+ /**
2936
+ * Materialize every encounter's seed metadata for the on-site UAT
2937
+ * demo workspace. Order matches {@link onSiteDemoEncounterIds}.
2938
+ * The `hasWoundProcedure` flag is `true` only on the patient's
2939
+ * most-recent encounter when {@link onSiteDemoWoundProcedurePatientIds}
2940
+ * lists that patient — mirroring the procedure-attachment rule in
2941
+ * {@link buildOnSiteDemoWoundProcedures}.
2942
+ */
2943
+ declare const onSiteDemoEncounterMetadata: (referenceIso: string) => ReadonlyArray<OnSiteDemoEncounterMetadata>;
2944
+ /**
2945
+ * Subset of patients (facility + home-health) the seeder flags as
2946
+ * carrying a current wound. Exported so tests and downstream
2947
+ * tickets can assert wound-coverage targets without re-deriving
2948
+ * the hash. Order matches the input list of scheduled patients.
2949
+ */
2950
+ declare const onSiteDemoWoundBearingPatientIds: () => ReadonlyArray<string>;
2951
+ /**
2952
+ * Subset of {@link onSiteDemoWoundBearingPatientIds} whose patients
2953
+ * also get a CPT-coded debridement Procedure on their most-recent
2954
+ * encounter.
2955
+ */
2956
+ declare const onSiteDemoWoundProcedurePatientIds: () => ReadonlyArray<string>;
2957
+
2958
+ /**
2959
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-facilities.md
2960
+ *
2961
+ * Hand-authored Facility (FHIR Location) fixtures the
2962
+ * `seed-demo-data` workflow upserts into the on-site-medical UAT
2963
+ * demo tenant ({@link ON_SITE_DEMO_TENANT_ID} +
2964
+ * {@link ON_SITE_DEMO_WORKSPACE_ID}) on every non-prod deploy
2965
+ * (issue #1303).
2966
+ *
2967
+ * Three facilities — UAT testers exercise the calendar's "View by
2968
+ * facility" filter and the home-health vs facility-visit
2969
+ * routing. The on-site `AdminLocationFormPage` reads:
2970
+ * - `name`
2971
+ * - `type[0].text` — `"facility"` (drives the
2972
+ * classification dropdown)
2973
+ * - `address.line/city/state/postalCode/country`
2974
+ * - `telecom` (phone + email + optional fax)
2975
+ * - `status` (`"active"`)
2976
+ *
2977
+ * Director-of-nursing is not a first-class FHIR R4 `Location`
2978
+ * field. We denormalize it as an `extension` (single root
2979
+ * extension with three sub-extensions: `name`, `phone`,
2980
+ * `email`) under the established on-site URL convention
2981
+ * (`https://on-site-medical.app/fhir/StructureDefinition/*`) so a
2982
+ * later on-site UI iteration can pick it up without a schema
2983
+ * change.
2984
+ *
2985
+ * Ids are deterministic — re-fires upsert the same records,
2986
+ * matching the workflow's idempotency contract.
2987
+ */
2988
+ /**
2989
+ * Root extension URL stamped on every facility Location for the
2990
+ * director-of-nursing contact. The root extension carries three
2991
+ * sub-extensions (`name`, `phone`, `email`) — none of FHIR R4's
2992
+ * shipped extensions cover this exact triple, so we publish a
2993
+ * local URL under the on-site convention.
2994
+ */
2995
+ declare const DIRECTOR_OF_NURSING_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/director-of-nursing";
2996
+ /** Sub-extension URL: director-of-nursing display name. */
2997
+ declare const DIRECTOR_OF_NURSING_NAME_EXTENSION_URL = "name";
2998
+ /** Sub-extension URL: director-of-nursing phone (E.164). */
2999
+ declare const DIRECTOR_OF_NURSING_PHONE_EXTENSION_URL = "phone";
3000
+ /** Sub-extension URL: director-of-nursing email. */
3001
+ declare const DIRECTOR_OF_NURSING_EMAIL_EXTENSION_URL = "email";
3002
+ /** Demo facilities seeded into the on-site UAT demo workspace. */
3003
+ declare const ON_SITE_DEMO_FACILITIES: ReadonlyArray<Location>;
3004
+ /** Stable facility ids in dispatch order. Re-exported for downstream tickets. */
3005
+ declare const ON_SITE_DEMO_FACILITY_IDS: ReadonlyArray<string>;
3006
+
3007
+ /**
3008
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-facility-patients.md
3009
+ *
3010
+ * Hand-authored facility Patient + Coverage fixtures the
3011
+ * `seed-demo-data` workflow upserts into the on-site-medical UAT
3012
+ * demo tenant ({@link ON_SITE_DEMO_TENANT_ID} +
3013
+ * {@link ON_SITE_DEMO_WORKSPACE_ID}) on every non-prod deploy
3014
+ * (issue #1304).
3015
+ *
3016
+ * Topology — issue #1304 design:
3017
+ * - 4 blocks (#1303) × per-block patient count (16 + 14 + 18 +
3018
+ * 12 = 60 scheduled patients). No patient appears in more
3019
+ * than one block.
3020
+ * - Plus 6 intake-complete-not-yet-scheduled patients (2 per
3021
+ * facility — small subset that exercises the "new intake,
3022
+ * not yet on a calendar" UI state). Total: 66 Patients.
3023
+ * - Every patient is assigned `care-context = facility` via
3024
+ * the on-site `patient-default-care-setting` /
3025
+ * `patient-default-care-location` extension pair
3026
+ * (`sites/app-ehr/src/types/fhir-extensions/patient.ts`). The
3027
+ * UI distinguishes facility vs home-health patients by
3028
+ * reading those extensions, so seeding them is the path that
3029
+ * actually surfaces the patient under the right "Patient
3030
+ * Type" column in the on-site EHR.
3031
+ *
3032
+ * Insurance:
3033
+ * - Every patient gets a primary Coverage with
3034
+ * `status: "active"` and a verification date stamped on the
3035
+ * coverage body via the on-site `coverage-verification-date`
3036
+ * extension.
3037
+ * - A subset (~40%) gets a secondary Coverage.
3038
+ * - Payor mix: commercial / Medicare / Medicare Advantage.
3039
+ * - QMB is a Medicare-only program (real-world constraint); the
3040
+ * QMB extension only attaches to Medicare-primary patients.
3041
+ * - ~20% of patients carry the `patient-hospice-status`
3042
+ * extension on the Patient resource (CMS hospice billing
3043
+ * status — separate from QMB).
3044
+ *
3045
+ * Modelling choice — block assignment. The seeder also records
3046
+ * which block template a patient is assigned to so downstream
3047
+ * tickets (#1306 — encounters per scheduled patient per block
3048
+ * occurrence) can fan out without re-deriving the mapping.
3049
+ * Encounters are NOT created here; this ticket only attaches the
3050
+ * block reference via an extension on the Patient body. Intake-
3051
+ * only patients omit the extension entirely.
3052
+ *
3053
+ * Ids are deterministic — re-fires upsert the same records,
3054
+ * matching the workflow's idempotency contract. Adding,
3055
+ * renaming, or moving a patient is a one-line edit here plus a
3056
+ * redeploy.
3057
+ */
3058
+ /**
3059
+ * Extension URL stamped on the Patient body when the patient's
3060
+ * default care setting is facility-based (mirrors the on-site
3061
+ * EHR's `EXT_PATIENT_DEFAULT_CARE_SETTING` constant at
3062
+ * `sites/app-ehr/src/types/fhir-extensions/patient.ts`).
3063
+ */
3064
+ declare const PATIENT_DEFAULT_CARE_SETTING_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-default-care-setting";
3065
+ /**
3066
+ * Extension URL stamped on the Patient body when the patient's
3067
+ * default care setting is `facility`, carrying the Location id
3068
+ * (mirrors the on-site EHR's `EXT_PATIENT_DEFAULT_CARE_LOCATION`
3069
+ * constant).
3070
+ */
3071
+ declare const PATIENT_DEFAULT_CARE_LOCATION_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-default-care-location";
3072
+ /** Extension URL: patient residency admission date (facility-only). */
3073
+ declare const PATIENT_RESIDENCY_ADMISSION_DATE_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-residency-admission-date";
3074
+ /** Extension URL: patient residency room number (facility-only). */
3075
+ declare const PATIENT_RESIDENCY_ROOM_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-residency-room";
3076
+ /**
3077
+ * Extension URL stamped on the Patient body recording which
3078
+ * weekly scheduling block template the patient is assigned to
3079
+ * (#1303 + #1304). Downstream tickets (#1306 — encounters per
3080
+ * block occurrence) read this to fan out per-occurrence
3081
+ * Encounter records. Intake-only patients (no block yet) omit
3082
+ * the extension entirely.
3083
+ */
3084
+ declare const PATIENT_ASSIGNED_BLOCK_TEMPLATE_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-assigned-block-template";
3085
+ /**
3086
+ * Root extension URL stamped on the Patient body recording the
3087
+ * patient's hospice status (CMS hospice billing flag). Carries
3088
+ * three sub-extensions (`status`, `effectiveDate`,
3089
+ * `terminationDate`) mirroring the on-site Medicare form's
3090
+ * hospice fields at
3091
+ * `sites/app-ehr/src/fixtures/medicareForm.ts`. Only ~20% of
3092
+ * patients carry this extension; the absence of the extension
3093
+ * means the patient is not in hospice.
3094
+ */
3095
+ declare const PATIENT_HOSPICE_STATUS_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-hospice-status";
3096
+ /** Sub-extension URL under {@link PATIENT_HOSPICE_STATUS_EXTENSION_URL}. */
3097
+ declare const HOSPICE_STATUS_VALUE_SUB_EXTENSION_URL = "status";
3098
+ /** Sub-extension URL under {@link PATIENT_HOSPICE_STATUS_EXTENSION_URL}. */
3099
+ declare const HOSPICE_EFFECTIVE_DATE_SUB_EXTENSION_URL = "effectiveDate";
3100
+ /**
3101
+ * Extension URL stamped on every primary Coverage body recording
3102
+ * the most-recent verification timestamp. The on-site
3103
+ * `VerificationHistoryTable` displays verification rows from this
3104
+ * value (and from the Coverage's audit history downstream). The
3105
+ * value is an ISO 8601 instant in UTC.
3106
+ */
3107
+ declare const COVERAGE_VERIFICATION_DATE_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/coverage-verification-date";
3108
+ /**
3109
+ * Root extension URL stamped on a Medicare-primary Coverage
3110
+ * recording the QMB (Qualified Medicare Beneficiary) status.
3111
+ * Carries `status` + `effectiveDate` sub-extensions mirroring
3112
+ * the on-site Medicare form (`sites/app-ehr/src/fixtures/medicareForm.ts`).
3113
+ * QMB only attaches to Medicare-primary patients — it is a
3114
+ * Medicare program and is invalid on commercial-primary or
3115
+ * Medicare-Advantage-primary coverages.
3116
+ */
3117
+ declare const COVERAGE_QMB_STATUS_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/coverage-qmb-status";
3118
+ /** Sub-extension URL under {@link COVERAGE_QMB_STATUS_EXTENSION_URL}. */
3119
+ declare const QMB_STATUS_VALUE_SUB_EXTENSION_URL = "status";
3120
+ /** Sub-extension URL under {@link COVERAGE_QMB_STATUS_EXTENSION_URL}. */
3121
+ declare const QMB_EFFECTIVE_DATE_SUB_EXTENSION_URL = "effectiveDate";
3122
+ /**
3123
+ * Payor codes the on-site app reads from Coverage.type.coding[0].
3124
+ * The values mirror the labels used in the on-site Medicare and
3125
+ * insurance forms. `medicare-advantage` is intentionally distinct
3126
+ * from `medicare` — Medicare Advantage is a private-plan layer on
3127
+ * top of Medicare and bills through different payor pathways.
3128
+ */
3129
+ declare const COVERAGE_PAYOR_TYPE_SYSTEM = "https://on-site-medical.app/fhir/CodeSystem/coverage-payor-type";
3130
+ /** Payor type values written to {@link COVERAGE_PAYOR_TYPE_SYSTEM}. */
3131
+ declare const PAYOR_TYPE_COMMERCIAL = "commercial";
3132
+ /** Payor type values written to {@link COVERAGE_PAYOR_TYPE_SYSTEM}. */
3133
+ declare const PAYOR_TYPE_MEDICARE = "medicare";
3134
+ /** Payor type values written to {@link COVERAGE_PAYOR_TYPE_SYSTEM}. */
3135
+ declare const PAYOR_TYPE_MEDICARE_ADVANTAGE = "medicare-advantage";
3136
+ /**
3137
+ * Lazily materialize the facility-patient Patient resources
3138
+ * seeded into the on-site UAT demo workspace. Called by the
3139
+ * fixture group when the seeder iterates `group.patients`.
3140
+ */
3141
+ declare const buildOnSiteDemoFacilityPatients: () => ReadonlyArray<Patient>;
3142
+ /**
3143
+ * Lazily materialize the facility-patient Coverage resources
3144
+ * (primary + optional secondary) for the on-site UAT demo
3145
+ * workspace. Called by the fixture group when the seeder
3146
+ * iterates `group.coverages`.
3147
+ */
3148
+ declare const buildOnSiteDemoFacilityCoverages: () => ReadonlyArray<Coverage>;
3149
+ /**
3150
+ * Stable facility-patient ids in dispatch order. Lazy — call
3151
+ * this from downstream tickets (e.g. #1306 — encounters per
3152
+ * scheduled patient per block occurrence) instead of capturing
3153
+ * the array at module load.
3154
+ */
3155
+ declare const onSiteDemoFacilityPatientIds: () => ReadonlyArray<string>;
3156
+ /**
3157
+ * Subset of {@link onSiteDemoFacilityPatientIds} whose patients
3158
+ * are scheduled into a weekly block. Excludes the intake-only
3159
+ * subset. Order matches `PATIENTS_PER_BLOCK` (all block-001
3160
+ * patients first, then block-002, etc.).
3161
+ */
3162
+ declare const onSiteDemoScheduledFacilityPatientIds: () => ReadonlyArray<string>;
3163
+ /**
3164
+ * Subset of {@link onSiteDemoFacilityPatientIds} whose patients
3165
+ * are intake-complete but not yet on a schedule. These patients
3166
+ * have a facility assignment but no block reference and no
3167
+ * Encounter records (downstream tickets must respect that
3168
+ * absence).
3169
+ */
3170
+ declare const onSiteDemoIntakeOnlyFacilityPatientIds: () => ReadonlyArray<string>;
3171
+ /**
3172
+ * Look up the block template a facility patient is scheduled
3173
+ * into, or `undefined` for intake-only patients.
3174
+ */
3175
+ declare const findOnSiteDemoFacilityPatientBlock: (patientId: string) => string | undefined;
3176
+ /**
3177
+ * List facility patients scheduled into a given block template
3178
+ * id. Downstream tickets (encounters, scribe assignments) call
3179
+ * this to fan out per-block work without re-deriving the
3180
+ * mapping.
3181
+ */
3182
+ declare const facilityPatientsForBlock: (blockTemplateId: string) => ReadonlyArray<string>;
3183
+
3184
+ /**
3185
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-fixtures.md
3186
+ *
3187
+ * Hand-authored Practitioner fixtures the `seed-demo-data` workflow
3188
+ * upserts into the on-site-medical UAT demo tenant
3189
+ * ({@link ON_SITE_DEMO_TENANT_ID} + {@link ON_SITE_DEMO_WORKSPACE_ID})
3190
+ * on every non-prod deploy. Issue #1302 — the on-site repo's facility
3191
+ * blocks, home-health visits, and encounter records need a realistic
3192
+ * pool of doctors and scribes to reference.
3193
+ *
3194
+ * Two sets are seeded:
3195
+ * - {@link ON_SITE_DEMO_DOCTORS} — ten Practitioners with
3196
+ * `qualification[0].code.text = "Physician"`. The first five carry
3197
+ * a `home-health-eligible` boolean extension set to `true` so the
3198
+ * on-site UI can filter the home-health-eligible subset for
3199
+ * home-visit scheduling.
3200
+ * - {@link ON_SITE_DEMO_SCRIBES} — five Practitioners with
3201
+ * `qualification[0].code.text = "Scribe"`. Scribes share the
3202
+ * Practitioner resource shape with doctors so the on-site
3203
+ * practitioner CRUD form can edit both without a new resource
3204
+ * type; the `qualification` value distinguishes the role.
3205
+ *
3206
+ * Field set matches what the on-site provider form expects today
3207
+ * (`sites/app-ehr/src/pages/admin/AdminPractitionerFormPage.tsx`):
3208
+ * - `name[0]` — given + family + text
3209
+ * - `qualification[0].code.text` — role label
3210
+ * - `active`
3211
+ * - `gender`, `birthDate`
3212
+ * - `telecom[]` — phone (E.164) + email
3213
+ * - `identifier[0]` — NPI (US national provider identifier)
3214
+ * - `address[0]` — line / city / state / postalCode / country
3215
+ * - `extension[]` — home-health-eligible boolean (doctors only)
3216
+ *
3217
+ * Ids are deterministic — re-fires upsert the same records, matching
3218
+ * the workflow's idempotency contract. Adding or renaming a Practitioner
3219
+ * is a one-line edit here plus a redeploy.
3220
+ */
3221
+ /** FHIR `Identifier.system` for the US NPI (National Provider Identifier). */
3222
+ declare const US_NPI_SYSTEM = "http://hl7.org/fhir/sid/us-npi";
3223
+ /**
3224
+ * Extension URL stamped on a Practitioner body when the practitioner
3225
+ * is approved to take home-health visits. Mirrors the on-site repo's
3226
+ * convention (`https://on-site-medical.app/fhir/StructureDefinition/*`)
3227
+ * — the on-site UI can pick this extension up directly without a
3228
+ * schema change. Boolean `valueBoolean: true` means eligible.
3229
+ */
3230
+ declare const HOME_HEALTH_ELIGIBLE_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/home-health-eligible";
3231
+ /** Practitioner.qualification code-text for a physician (matches on-site form). */
3232
+ declare const PRACTITIONER_ROLE_PHYSICIAN = "Physician";
3233
+ /** Practitioner.qualification code-text for a scribe. */
3234
+ declare const PRACTITIONER_ROLE_SCRIBE = "Scribe";
3235
+ /** FHIR `Identifier.system` for internal on-site staff ids (non-NPI). */
3236
+ declare const ON_SITE_STAFF_ID_SYSTEM = "https://on-site-medical.app/fhir/sid/staff-id";
3237
+ /** Demo doctors seeded into the on-site UAT demo workspace. */
3238
+ declare const ON_SITE_DEMO_DOCTORS: ReadonlyArray<Practitioner>;
3239
+ /** Demo scribes seeded into the on-site UAT demo workspace. */
3240
+ declare const ON_SITE_DEMO_SCRIBES: ReadonlyArray<Practitioner>;
3241
+ /** Stable doctor ids in dispatch order. Re-exported for downstream tickets. */
3242
+ declare const ON_SITE_DEMO_DOCTOR_IDS: ReadonlyArray<string>;
3243
+ /** Stable scribe ids in dispatch order. Re-exported for downstream tickets. */
3244
+ declare const ON_SITE_DEMO_SCRIBE_IDS: ReadonlyArray<string>;
3245
+ /**
3246
+ * Subset of {@link ON_SITE_DEMO_DOCTORS} flagged as home-health-eligible
3247
+ * (via the {@link HOME_HEALTH_ELIGIBLE_EXTENSION_URL} extension on the
3248
+ * Practitioner body). Downstream tickets (home-health visit scheduling,
3249
+ * facility-block fixtures) use this helper to attach realistic providers
3250
+ * to home-visit-only encounters without re-reading the extension list.
3251
+ */
3252
+ declare const homeHealthEligibleDoctors: () => ReadonlyArray<Practitioner>;
3253
+ /**
3254
+ * Fixture group the seeder writes into the on-site UAT demo workspace.
3255
+ * Carries practitioners (doctors + scribes — #1302), facilities
3256
+ * (#1303), recurring weekly block Appointments (#1303), facility
3257
+ * patients + their insurance Coverages (#1304), home-health
3258
+ * patients + their insurance Coverages (#1305), historical
3259
+ * encounters / wounds / wound observations / wound debridement
3260
+ * procedures (#1306), and claims + payment notices tied to those
3261
+ * encounters (#1307). Accounts for this tenant are owned by later
3262
+ * tickets.
3263
+ *
3264
+ * `buildAppointments` is dynamic so the recurring block occurrences
3265
+ * anchor to the ISO week containing the seeder's `baseContext.date`
3266
+ * — re-fires on the same date produce byte-identical Appointment ids,
3267
+ * and re-fires on a later date roll the window forward without
3268
+ * duplicating prior weeks' records.
3269
+ */
3270
+ declare const ON_SITE_DEMO_FIXTURES: DemoWorkspaceDataPlaneFixtures;
3271
+
3272
+ /**
3273
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/on-site-demo-home-health-patients.md
3274
+ *
3275
+ * Hand-authored home-health Patient + Coverage fixtures the
3276
+ * `seed-demo-data` workflow upserts into the on-site-medical UAT
3277
+ * demo tenant ({@link ON_SITE_DEMO_TENANT_ID} +
3278
+ * {@link ON_SITE_DEMO_WORKSPACE_ID}) on every non-prod deploy
3279
+ * (issue #1305).
3280
+ *
3281
+ * Topology — issue #1305 design:
3282
+ * - 20 home-health patients total. None are assigned to a
3283
+ * facility — `patient-default-care-setting` is `home`
3284
+ * (mirrors the on-site EHR's `LocationClassification = "home"`
3285
+ * at `sites/app-ehr/src/utils/patient/patientDefaultCareSetting.ts`),
3286
+ * and the `patient-default-care-location` extension is
3287
+ * intentionally omitted (home patients have no Location
3288
+ * reference).
3289
+ * - 17 patients are scheduled to a home-health-eligible doctor
3290
+ * (see {@link homeHealthEligibleDoctors}) with a recurring
3291
+ * visit cadence. Doctor assignment is a deterministic
3292
+ * round-robin over the 5 home-health-eligible doctors.
3293
+ * - 3 patients are intake-complete-but-not-yet-scheduled —
3294
+ * they carry a home address + care-context = home but have
3295
+ * no provider assignment and no visit cadence (the on-site
3296
+ * UI state for a brand-new home-health intake that hasn't
3297
+ * been put on the calendar yet).
3298
+ *
3299
+ * Insurance is identical to the facility-patient rules (#1304):
3300
+ * - Every patient gets a primary Coverage with
3301
+ * `status: "active"` and a verification date.
3302
+ * - A subset (~40%) gets a secondary Coverage.
3303
+ * - Payor mix: commercial / Medicare / Medicare Advantage.
3304
+ * - QMB only attaches to Medicare-primary patients.
3305
+ * - ~20% of patients carry the `patient-hospice-status`
3306
+ * extension on the Patient resource.
3307
+ *
3308
+ * Modelling choice — visit cadence. On-site has no formal
3309
+ * home-health visit cadence schema today (the `REPEAT_OPTIONS`
3310
+ * at `sites/app-ehr/src/features/calendar/components/eventPopoverUtils.ts`
3311
+ * are calendar-level recurrences, not patient-level cadences).
3312
+ * Each scheduled home-health patient therefore carries a simple
3313
+ * `home-health-visit-cadence-days` valueInteger extension with
3314
+ * a value drawn from the set 7 / 14 / 28 — weekly / bi-weekly /
3315
+ * monthly — distributed deterministically across the roster so
3316
+ * the UAT tenant exercises all three cadences. Intake-only
3317
+ * patients omit the extension entirely.
3318
+ *
3319
+ * Modelling choice — provider assignment. The home-health
3320
+ * analogue of the facility-patient's block reference is a
3321
+ * `patient-assigned-home-health-provider` `valueReference`
3322
+ * pointing at `Practitioner/<doctor-id>`. Downstream tickets
3323
+ * (#1306 — encounters) read this reference to fan out per-
3324
+ * patient visit Encounters. Intake-only patients omit the
3325
+ * extension (no provider yet → no encounters).
3326
+ *
3327
+ * Ids are deterministic — re-fires upsert the same records,
3328
+ * matching the workflow's idempotency contract. Adding,
3329
+ * renaming, or moving a patient is a one-line edit here plus a
3330
+ * redeploy.
3331
+ */
3332
+ /**
3333
+ * Extension URL stamped on a home-health Patient body recording
3334
+ * the {@link Practitioner} id of the home-health-eligible doctor
3335
+ * the patient is currently scheduled with. Carries a
3336
+ * `valueReference` shaped `{ reference: "Practitioner/<id>" }`.
3337
+ * Intake-only patients omit this extension.
3338
+ */
3339
+ declare const PATIENT_ASSIGNED_HOME_HEALTH_PROVIDER_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/patient-assigned-home-health-provider";
3340
+ /**
3341
+ * Extension URL stamped on a home-health Patient body recording
3342
+ * the patient's recurring visit cadence in days. The value is a
3343
+ * `valueInteger` drawn from {@link HOME_HEALTH_VISIT_CADENCE_OPTIONS}
3344
+ * — weekly (7), bi-weekly (14), or monthly (28). On-site has no
3345
+ * formal cadence schema today, so this denormalised extension
3346
+ * captures the visit interval directly on the Patient body until
3347
+ * the on-site team picks a permanent shape. Intake-only patients
3348
+ * omit this extension.
3349
+ */
3350
+ declare const HOME_HEALTH_VISIT_CADENCE_DAYS_EXTENSION_URL = "https://on-site-medical.app/fhir/StructureDefinition/home-health-visit-cadence-days";
3351
+ /**
3352
+ * Allowed visit-cadence day values. Roughly weekly / bi-weekly /
3353
+ * monthly — enough variation for UAT to exercise distinct
3354
+ * cadences in the calendar without modelling every possible
3355
+ * interval.
3356
+ */
3357
+ declare const HOME_HEALTH_VISIT_CADENCE_OPTIONS: ReadonlyArray<number>;
3358
+ /** Total home-health patients seeded. */
3359
+ declare const TOTAL_HOME_HEALTH_PATIENTS: number;
3360
+ /**
3361
+ * Lazily materialize the home-health Patient resources seeded
3362
+ * into the on-site UAT demo workspace. Called by the fixture
3363
+ * group when the seeder iterates `group.buildPatients()`.
3364
+ */
3365
+ declare const buildOnSiteDemoHomeHealthPatients: () => ReadonlyArray<Patient>;
3366
+ /**
3367
+ * Lazily materialize the home-health Coverage resources
3368
+ * (primary + optional secondary) for the on-site UAT demo
3369
+ * workspace.
3370
+ */
3371
+ declare const buildOnSiteDemoHomeHealthCoverages: () => ReadonlyArray<Coverage>;
3372
+ /**
3373
+ * Stable home-health-patient ids in dispatch order. Lazy — call
3374
+ * this from downstream tickets (e.g. #1306 — encounters per
3375
+ * scheduled home-health visit) instead of capturing the array
3376
+ * at module load.
3377
+ */
3378
+ declare const onSiteDemoHomeHealthPatientIds: () => ReadonlyArray<string>;
3379
+ /**
3380
+ * Subset of {@link onSiteDemoHomeHealthPatientIds} whose
3381
+ * patients are scheduled with a home-health-eligible provider +
3382
+ * visit cadence. Excludes the intake-only subset.
3383
+ */
3384
+ declare const onSiteDemoScheduledHomeHealthPatientIds: () => ReadonlyArray<string>;
3385
+ /**
3386
+ * Subset of {@link onSiteDemoHomeHealthPatientIds} whose
3387
+ * patients are intake-complete but not yet on a schedule. These
3388
+ * patients carry a home address + care-context = home but no
3389
+ * provider, no cadence, and (per #1306) no Encounter records.
3390
+ */
3391
+ declare const onSiteDemoIntakeOnlyHomeHealthPatientIds: () => ReadonlyArray<string>;
3392
+ /**
3393
+ * Look up the home-health-eligible provider assigned to a given
3394
+ * home-health patient, or `undefined` for intake-only patients.
3395
+ * Downstream tickets (encounters per scheduled visit) call this
3396
+ * to fan out per-patient encounter records.
3397
+ */
3398
+ declare const findOnSiteDemoHomeHealthPatientProvider: (patientId: string) => string | undefined;
3399
+ /**
3400
+ * Look up the visit cadence (in days) for a given home-health
3401
+ * patient, or `undefined` for intake-only patients.
3402
+ */
3403
+ declare const findOnSiteDemoHomeHealthPatientVisitCadenceDays: (patientId: string) => number | undefined;
3404
+
2157
3405
  interface SeedDemoDataLambdaProps {
2158
3406
  /**
2159
3407
  * Data-store table the workflow upserts demo-data records into.
@@ -2377,6 +3625,24 @@ declare class OpenHiDataService extends OpenHiService {
2377
3625
  * target; the construct itself never checks the stage.
2378
3626
  */
2379
3627
  readonly seedDemoDataWorkflow?: SeedDemoDataWorkflow;
3628
+ /**
3629
+ * ADR-028 counter-maintenance workflow. Subscribes to the
3630
+ * control-plane membership / role-assignment / workspace lifecycle
3631
+ * events on the control event bus and maintains the denormalized
3632
+ * counters on the canonical Tenant / Workspace / User records via
3633
+ * idempotent atomic ADD. Mounted on every stage (the admin console
3634
+ * reads these counters in prod as well as non-prod).
3635
+ */
3636
+ readonly counterMaintenanceWorkflow: CounterMaintenanceWorkflow;
3637
+ /**
3638
+ * ADR-028 counter-reconciliation job (#1319). An on-demand Lambda that
3639
+ * recomputes the denormalized counters from canonical data and repairs
3640
+ * any drift the event-driven counter-maintenance path missed
3641
+ * (dropped / replayed events, rows that predate the counter work).
3642
+ * Mounted on every stage; invoked manually or by a separately-wired
3643
+ * schedule — it has no EventBridge trigger of its own.
3644
+ */
3645
+ readonly counterReconciliationWorkflow: CounterReconciliationWorkflow;
2380
3646
  /**
2381
3647
  * Cached control-event-bus lookup. `OpenHiGlobalService.controlEventBusFromConstruct`
2382
3648
  * registers a child `EventBus.fromEventBusName` construct with a
@@ -2405,6 +3671,19 @@ declare class OpenHiDataService extends OpenHiService {
2405
3671
  * does not exist in prod stacks. Override to customize.
2406
3672
  */
2407
3673
  protected createSeedDemoDataWorkflow(): SeedDemoDataWorkflow | undefined;
3674
+ /**
3675
+ * Creates the ADR-028 counter-maintenance workflow. Override to
3676
+ * customize. Mounted on every stage — the denormalized counters back
3677
+ * the admin console list columns in prod and non-prod alike.
3678
+ */
3679
+ protected createCounterMaintenanceWorkflow(): CounterMaintenanceWorkflow;
3680
+ /**
3681
+ * Creates the ADR-028 counter-reconciliation job (#1319). Override to
3682
+ * customize. Mounted on every stage — the recompute-and-repair backstop
3683
+ * is the correctness authority for the denormalized counters in prod
3684
+ * and non-prod alike. On-demand only (no EventBridge trigger).
3685
+ */
3686
+ protected createCounterReconciliationWorkflow(): CounterReconciliationWorkflow;
2408
3687
  /**
2409
3688
  * Creates the single-table DynamoDB data store.
2410
3689
  * Override to customize.
@@ -2922,4 +4201,4 @@ declare class RenameCascadeWorkflow extends Construct {
2922
4201
  constructor(scope: Construct, props: RenameCascadeWorkflowProps);
2923
4202
  }
2924
4203
 
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 };
4204
+ 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, COUNTER_MAINTENANCE_CONSUMER_NAME, COUNTER_MAINTENANCE_DETAIL_TYPES, 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, CounterMaintenanceLambda, type CounterMaintenanceLambdaProps, CounterMaintenanceWorkflow, type CounterMaintenanceWorkflowProps, CounterReconciliationLambda, type CounterReconciliationLambdaProps, CounterReconciliationWorkflow, type CounterReconciliationWorkflowProps, 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 };