emuhealth 0.8.0 → 0.9.0

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 (61) hide show
  1. package/README.md +2 -0
  2. package/dist/api.js +19 -19
  3. package/dist/{chunk-5CZOPZI6.js → chunk-XMIM6S4S.js} +20 -20
  4. package/dist/{dist-XFS53WXQ.js → dist-2SPD4VKT.js} +52 -4
  5. package/dist/dist-2SPD4VKT.js.map +1 -0
  6. package/dist/{dist-OC4HAYAN.js → dist-7IG4HX3B.js} +2 -2
  7. package/dist/dist-7IG4HX3B.js.map +1 -0
  8. package/dist/{dist-X65VP455.js → dist-B7QPLCAG.js} +52 -4
  9. package/dist/dist-B7QPLCAG.js.map +1 -0
  10. package/dist/{dist-HFJIIILH.js → dist-D4XTX54S.js} +52 -4
  11. package/dist/{dist-EYL5YC23.js.map → dist-D4XTX54S.js.map} +1 -1
  12. package/dist/{dist-KAXCYBBO.js → dist-HUGQE3UQ.js} +52 -4
  13. package/dist/dist-HUGQE3UQ.js.map +1 -0
  14. package/dist/{dist-PNIIJGYO.js → dist-LU2SZMDZ.js} +17 -10
  15. package/dist/dist-LU2SZMDZ.js.map +1 -0
  16. package/dist/{dist-IIYEXRQ4.js → dist-LYW423OA.js} +2 -2
  17. package/dist/dist-LYW423OA.js.map +1 -0
  18. package/dist/{dist-THKXRTNS.js → dist-MOSHZOI2.js} +52 -4
  19. package/dist/dist-MOSHZOI2.js.map +1 -0
  20. package/dist/{dist-BSFGA454.js → dist-O5VNO6R3.js} +52 -4
  21. package/dist/dist-O5VNO6R3.js.map +1 -0
  22. package/dist/{dist-QG46WNU5.js → dist-P2Q4A2DE.js} +2 -2
  23. package/dist/dist-P2Q4A2DE.js.map +1 -0
  24. package/dist/{dist-X7XRD6G3.js → dist-QNFWXDSF.js} +52 -4
  25. package/dist/{dist-2J7ORJF2.js.map → dist-QNFWXDSF.js.map} +1 -1
  26. package/dist/{dist-K6DWZN23.js → dist-R2RM35T5.js} +52 -4
  27. package/dist/dist-R2RM35T5.js.map +1 -0
  28. package/dist/{dist-E5YUT2ET.js → dist-SRMVCWKJ.js} +2 -2
  29. package/dist/dist-SRMVCWKJ.js.map +1 -0
  30. package/dist/{dist-NRPKESVU.js → dist-SYCRZXDL.js} +8 -8
  31. package/dist/dist-SYCRZXDL.js.map +1 -0
  32. package/dist/{dist-EYL5YC23.js → dist-TRI7TRKP.js} +2 -2
  33. package/dist/dist-TRI7TRKP.js.map +1 -0
  34. package/dist/{dist-CO7RIA5H.js → dist-UUOAP6EN.js} +52 -4
  35. package/dist/dist-UUOAP6EN.js.map +1 -0
  36. package/dist/{dist-7ZKCZXHQ.js → dist-W3BWZ4HD.js} +2 -2
  37. package/dist/dist-W3BWZ4HD.js.map +1 -0
  38. package/dist/{dist-2J7ORJF2.js → dist-XQO4ECK7.js} +2 -2
  39. package/dist/{dist-HFJIIILH.js.map → dist-XQO4ECK7.js.map} +1 -1
  40. package/dist/{dist-TBCWBCG3.js → dist-YLPKKYLR.js} +52 -4
  41. package/dist/dist-YLPKKYLR.js.map +1 -0
  42. package/dist/index.js +2 -2
  43. package/dist/project-worker.js +1 -1
  44. package/package.json +32 -32
  45. package/dist/dist-7ZKCZXHQ.js.map +0 -1
  46. package/dist/dist-BSFGA454.js.map +0 -1
  47. package/dist/dist-CO7RIA5H.js.map +0 -1
  48. package/dist/dist-E5YUT2ET.js.map +0 -1
  49. package/dist/dist-IIYEXRQ4.js.map +0 -1
  50. package/dist/dist-K6DWZN23.js.map +0 -1
  51. package/dist/dist-KAXCYBBO.js.map +0 -1
  52. package/dist/dist-NRPKESVU.js.map +0 -1
  53. package/dist/dist-OC4HAYAN.js.map +0 -1
  54. package/dist/dist-PNIIJGYO.js.map +0 -1
  55. package/dist/dist-QG46WNU5.js.map +0 -1
  56. package/dist/dist-TBCWBCG3.js.map +0 -1
  57. package/dist/dist-THKXRTNS.js.map +0 -1
  58. package/dist/dist-X65VP455.js.map +0 -1
  59. package/dist/dist-X7XRD6G3.js.map +0 -1
  60. package/dist/dist-XFS53WXQ.js.map +0 -1
  61. /package/dist/{chunk-5CZOPZI6.js.map → chunk-XMIM6S4S.js.map} +0 -0
package/README.md CHANGED
@@ -66,6 +66,8 @@ Health and life science services use a fixed range starting at `http://localhost
66
66
  - **Veeva Vault** on `http://localhost:4126` (REST API under `/api/{version}`: `POST /auth` sessions, Vault object records with create, upsert, update, and delete in JSON or CSV, documents with versions and files, object and document metadata, and VQL queries with relationship fields and paging; synthetic products, studies, sites, countries, and trial documents; browse them at `/_inspector`)
67
67
  - **Medidata Rave** on `http://localhost:4127` (Rave Web Services under `/RaveWebServices` with HTTP Basic auth: study lists, CRF metadata as ODM, subjects with status and links, ODM clinical data datasets by study, subject, and form, `ClinicalAuditRecords` paging, and `PostODMClinicalData` imports with Rave's `Response` format; synthetic studies with demographics, vital signs, and adverse events; browse subjects at `/_inspector`)
68
68
 
69
+ End-to-end examples, each with a test that runs the whole flow: a [SMART on FHIR app against Epic](examples/smart-on-fhir-epic), an [HL7 v2 feed into FHIR](examples/hl7v2-to-fhir), and an [incremental EDC sync from Rave](examples/rave-edc-sync).
70
+
69
71
  Stripe webhooks configured with a secret include a `Stripe-Signature` header signed over the timestamp and raw request body.
70
72
 
71
73
  Slack event callbacks use `X-Slack-Request-Timestamp` and `X-Slack-Signature` when `slack.signing_secret` is configured. The signature is an HMAC-SHA256 over `v0:<timestamp>:<raw-body>`; configure the receiver with the same secret and verify against the unparsed request body. Existing event subscriptions remain unsigned when the secret is absent or empty.
package/dist/api.js CHANGED
@@ -1980,7 +1980,7 @@ var HEALTH_SERVICE_REGISTRY = {
1980
1980
  label: "FHIR R4 server emulator",
1981
1981
  endpoints: "create, read, vread, update (including create on update), JSON Patch, logical delete, _history, search with includes and chaining, batch and transaction Bundles, CapabilityStatement at /metadata, Patient/$everything, Bulk Data $export, SMART App Launch and Backend Services, ETag and If-Match, generated synthetic patients, terminology $lookup and $validate-code, inspector at /_inspector",
1982
1982
  async load() {
1983
- const mod = await import("./dist-TBCWBCG3.js");
1983
+ const mod = await import("./dist-YLPKKYLR.js");
1984
1984
  return { plugin: mod.fhirPlugin, seedFromConfig: mod.seedFromConfig };
1985
1985
  },
1986
1986
  defaultFallback() {
@@ -2005,7 +2005,7 @@ var HEALTH_SERVICE_REGISTRY = {
2005
2005
  label: "Epic FHIR R4 emulator",
2006
2006
  endpoints: "Epic URL shape (/api/FHIR/R4) over the full FHIR server, OAuth 2.0 at /oauth2/authorize and /oauth2/token with SMART App Launch and Backend Services, __epic.dstu2.patient in token responses, informational OperationOutcome (4101) on empty searches, Schedules and Slots with Appointment/$find and Appointment/$book, generated synthetic patients, inspector at /_inspector",
2007
2007
  async load() {
2008
- const mod = await import("./dist-X7XRD6G3.js");
2008
+ const mod = await import("./dist-QNFWXDSF.js");
2009
2009
  return { plugin: mod.epicPlugin, seedFromConfig: mod.seedFromConfig };
2010
2010
  },
2011
2011
  defaultFallback() {
@@ -2158,7 +2158,7 @@ var HEALTH_SERVICE_REGISTRY = {
2158
2158
  label: "Oracle Health (Cerner) Millennium FHIR R4 emulator",
2159
2159
  endpoints: "Millennium tenant URL shape (/r4/{tenant}) over the full FHIR server, persona OAuth endpoints under /tenants/{tenant}/protocols/oauth2/profiles/smart-v1, system accounts with client_credentials and a client secret, tenant and username in token responses, Millennium's required search parameters, generated synthetic patients, inspector at /_inspector",
2160
2160
  async load() {
2161
- const mod = await import("./dist-X65VP455.js");
2161
+ const mod = await import("./dist-B7QPLCAG.js");
2162
2162
  return { plugin: mod.cernerPlugin, seedFromConfig: mod.seedFromConfig };
2163
2163
  },
2164
2164
  defaultFallback() {
@@ -2185,7 +2185,7 @@ var HEALTH_SERVICE_REGISTRY = {
2185
2185
  label: "athenahealth API emulator",
2186
2186
  endpoints: "OAuth client credentials at /oauth2/v1/token; proprietary REST under /v1/{practiceid}: departments, providers, patients (search, read, create), chart problems, allergies, medications, vitals, appointments open, booked, book, cancel, with offset and limit paging; FHIR R4 under /fhir/r4 with ah-practice; synthetic records; inspector at /_inspector",
2187
2187
  async load() {
2188
- const mod = await import("./dist-XFS53WXQ.js");
2188
+ const mod = await import("./dist-2SPD4VKT.js");
2189
2189
  return { plugin: mod.athenaPlugin, seedFromConfig: mod.seedFromConfig };
2190
2190
  },
2191
2191
  defaultFallback() {
@@ -2208,7 +2208,7 @@ var HEALTH_SERVICE_REGISTRY = {
2208
2208
  label: "CMS Blue Button 2.0 emulator",
2209
2209
  endpoints: "Patient access OAuth at /v2/o/authorize/ and /v2/o/token/ with a beneficiary picker, /v2/connect/userinfo, FHIR R4 at /v2/fhir with Patient (synthetic MBIs), Coverage (Parts A, B, D), and ExplanationOfBenefit (carrier and Part D claims), read-only and token-only; synthetic beneficiaries",
2210
2210
  async load() {
2211
- const mod = await import("./dist-BSFGA454.js");
2211
+ const mod = await import("./dist-O5VNO6R3.js");
2212
2212
  return { plugin: mod.bluebuttonPlugin, seedFromConfig: mod.seedFromConfig };
2213
2213
  },
2214
2214
  defaultFallback() {
@@ -2235,7 +2235,7 @@ var HEALTH_SERVICE_REGISTRY = {
2235
2235
  label: "CDS Hooks emulator (simulated EHR and sample services)",
2236
2236
  endpoints: "Simulated EHR: POST /ehr/fire reads your CDS service discovery and fires patient-view, order-sign, order-select, or encounter-start with a signed JWT (JWKS at /.well-known/jwks.json), context, prefetch, and fhirAuthorization from its FHIR server at /fhir, then validates the cards; GET /ehr/invocations; sample CDS services at /cds-services (patient-greeting, allergy-check) with feedback; inspector form at /_inspector",
2237
2237
  async load() {
2238
- const mod = await import("./dist-CO7RIA5H.js");
2238
+ const mod = await import("./dist-UUOAP6EN.js");
2239
2239
  return { plugin: mod.cdshooksPlugin, seedFromConfig: mod.seedFromConfig };
2240
2240
  },
2241
2241
  defaultFallback() {
@@ -2251,7 +2251,7 @@ var HEALTH_SERVICE_REGISTRY = {
2251
2251
  label: "Redox API emulator",
2252
2252
  endpoints: "Authentication (/auth/authenticate, /auth/refreshToken, /v2/auth/token), POST /endpoint for Redox JSON data models (PatientSearch Query, ClinicalSummary PatientQuery, PatientAdmin NewPatient and PatientUpdate, Scheduling New, Reschedule, Cancel, Results, Notes, Media) with Meta.Errors, destination webhooks with the verification-token header, the challenge handshake, and POST /ehr/send to simulate EHR events; synthetic records; inspector at /_inspector",
2253
2253
  async load() {
2254
- const mod = await import("./dist-HFJIIILH.js");
2254
+ const mod = await import("./dist-D4XTX54S.js");
2255
2255
  return { plugin: mod.redoxPlugin, seedFromConfig: mod.seedFromConfig };
2256
2256
  },
2257
2257
  defaultFallback() {
@@ -2272,7 +2272,7 @@ var HEALTH_SERVICE_REGISTRY = {
2272
2272
  label: "AWS HealthLake emulator",
2273
2273
  endpoints: "HealthLake JSON control plane at POST / (X-Amz-Target HealthLake.*: Create, Describe, List, Delete FHIR datastores; Start, Describe, List import and export jobs) and a FHIR R4 data plane per datastore at /datastore/{id}/r4, with SigV4 verification for service healthlake; a default datastore preloaded with synthetic data; inspector at /_inspector",
2274
2274
  async load() {
2275
- const mod = await import("./dist-THKXRTNS.js");
2275
+ const mod = await import("./dist-MOSHZOI2.js");
2276
2276
  return { plugin: mod.healthlakePlugin, seedFromConfig: mod.seedFromConfig };
2277
2277
  },
2278
2278
  defaultFallback() {
@@ -2295,7 +2295,7 @@ var HEALTH_SERVICE_REGISTRY = {
2295
2295
  label: "Google Cloud Healthcare API emulator (FHIR stores)",
2296
2296
  endpoints: "Cloud Healthcare API v1 under /v1/projects/{project}/locations/{location}: datasets (create as operations, get, list, delete, operations), FHIR stores (create, get, list, patch with updateMask, delete, :export and :import operations), and a FHIR R4 API per store at .../fhirStores/{store}/fhir honoring enableUpdateCreate; any Bearer token; Google JSON errors; inspector at /_inspector",
2297
2297
  async load() {
2298
- const mod = await import("./dist-K6DWZN23.js");
2298
+ const mod = await import("./dist-R2RM35T5.js");
2299
2299
  return { plugin: mod.gcphealthcarePlugin, seedFromConfig: mod.seedFromConfig };
2300
2300
  },
2301
2301
  defaultFallback() {
@@ -2324,7 +2324,7 @@ var HEALTH_SERVICE_REGISTRY = {
2324
2324
  label: "Azure Health Data Services emulator (FHIR services)",
2325
2325
  endpoints: "FHIR services per workspace at /{workspace}-{fhirservice} (the path form of {workspace}-{fhirservice}.fhir.azurehealthcareapis.com), each a full FHIR R4 server; Entra ID Bearer tokens required (public metadata), verified against an issuer's JWKS such as the emuhealth Microsoft emulator when azurehealth.entra is set; inspector at /_inspector",
2326
2326
  async load() {
2327
- const mod = await import("./dist-KAXCYBBO.js");
2327
+ const mod = await import("./dist-HUGQE3UQ.js");
2328
2328
  return { plugin: mod.azurehealthPlugin, seedFromConfig: mod.seedFromConfig };
2329
2329
  },
2330
2330
  defaultFallback() {
@@ -2350,7 +2350,7 @@ var HEALTH_SERVICE_REGISTRY = {
2350
2350
  label: "Stedi healthcare clearinghouse emulator",
2351
2351
  endpoints: "Stedi 2024-04-01 healthcare APIs with an API key: eligibility v3 (270/271), professional claims v3 submission (837P) with immediate adjudication, claim status v2 (276/277), 835 ERA reports by transaction, transactions list, payers; transaction.processed.v2 events to webhooks; synthetic payers and members; inspector at /_inspector",
2352
2352
  async load() {
2353
- const mod = await import("./dist-2J7ORJF2.js");
2353
+ const mod = await import("./dist-XQO4ECK7.js");
2354
2354
  return { plugin: mod.stediPlugin, seedFromConfig: mod.seedFromConfig };
2355
2355
  },
2356
2356
  defaultFallback() {
@@ -2369,7 +2369,7 @@ var HEALTH_SERVICE_REGISTRY = {
2369
2369
  label: "Availity API emulator",
2370
2370
  endpoints: "Availity HIPAA transaction APIs under /availity: OAuth client credentials (/v1/token), availity-payer-list, v1/configurations, asynchronous v1/coverages (270/271) and v1/claim-statuses (276/277) polled until statusCode 4, v2/service-reviews (278) with Location polling, and Demo plan X-Api-Mock-Scenario-ID scenarios; synthetic payers, members, and claims; inspector at /_inspector",
2371
2371
  async load() {
2372
- const mod = await import("./dist-OC4HAYAN.js");
2372
+ const mod = await import("./dist-7IG4HX3B.js");
2373
2373
  return { plugin: mod.availityPlugin, seedFromConfig: mod.seedFromConfig };
2374
2374
  },
2375
2375
  defaultFallback() {
@@ -2389,7 +2389,7 @@ var HEALTH_SERVICE_REGISTRY = {
2389
2389
  label: "Dexcom API v3 emulator",
2390
2390
  endpoints: "OAuth 2.0 at /v2/oauth2/login (consent page with synthetic users) and /v2/oauth2/token; /v3/users/self/egvs (5 minute glucose, 30 day windows), events, devices, alerts, calibrations, dataRange; synthetic G7 users; inspector at /_inspector",
2391
2391
  async load() {
2392
- const mod = await import("./dist-E5YUT2ET.js");
2392
+ const mod = await import("./dist-SRMVCWKJ.js");
2393
2393
  return { plugin: mod.dexcomPlugin, seedFromConfig: mod.seedFromConfig };
2394
2394
  },
2395
2395
  defaultFallback() {
@@ -2411,7 +2411,7 @@ var HEALTH_SERVICE_REGISTRY = {
2411
2411
  label: "Fitbit Web API emulator",
2412
2412
  endpoints: "OAuth 2.0 (/oauth2/authorize consent page, /oauth2/token with Basic auth, /oauth2/revoke); /1/user/-/profile.json, activities/date, activity time series (steps, distance, calories), heart rate with intraday, /1.2 sleep with stages, weight logs; scopes, error envelope, rate limit headers; synthetic users; inspector at /_inspector",
2413
2413
  async load() {
2414
- const mod = await import("./dist-EYL5YC23.js");
2414
+ const mod = await import("./dist-TRI7TRKP.js");
2415
2415
  return { plugin: mod.fitbitPlugin, seedFromConfig: mod.seedFromConfig };
2416
2416
  },
2417
2417
  defaultFallback() {
@@ -2433,7 +2433,7 @@ var HEALTH_SERVICE_REGISTRY = {
2433
2433
  label: "Oura API v2 emulator",
2434
2434
  endpoints: "OAuth 2.0 (/oauth/authorize consent page, /oauth/token); /v2/usercollection personal_info, daily_sleep, daily_activity, daily_readiness, daily_spo2, sleep (periods), heartrate, workout, session, ring_configuration, with start_date and end_date, next_token paging, documents by id, scopes, and {detail} errors; synthetic users; inspector at /_inspector",
2435
2435
  async load() {
2436
- const mod = await import("./dist-IIYEXRQ4.js");
2436
+ const mod = await import("./dist-LYW423OA.js");
2437
2437
  return { plugin: mod.ouraPlugin, seedFromConfig: mod.seedFromConfig };
2438
2438
  },
2439
2439
  defaultFallback() {
@@ -2455,7 +2455,7 @@ var HEALTH_SERVICE_REGISTRY = {
2455
2455
  label: "Withings API emulator",
2456
2456
  endpoints: "OAuth 2.0 (/oauth2_user/authorize2 consent page, /v2/oauth2 action=requesttoken); /measure getmeas (weight, blood pressure, heart pulse, SpO2), /v2/measure getactivity, /v2/sleep getsummary, /v2/user getdevice, /notify subscribe, list, revoke with callbacks; HTTP 200 with status codes; synthetic users; inspector at /_inspector",
2457
2457
  async load() {
2458
- const mod = await import("./dist-QG46WNU5.js");
2458
+ const mod = await import("./dist-P2Q4A2DE.js");
2459
2459
  return { plugin: mod.withingsPlugin, seedFromConfig: mod.seedFromConfig };
2460
2460
  },
2461
2461
  defaultFallback() {
@@ -2477,7 +2477,7 @@ var HEALTH_SERVICE_REGISTRY = {
2477
2477
  label: "Terra API emulator",
2478
2478
  endpoints: "dev-id and x-api-key auth; /v2/auth/generateWidgetSession and /v2/auth/authenticateUser with a connect page (provider, then a synthetic account), /v2/auth/deauthenticateUser, /v2/userInfo, /v2/subscriptions; normalized /v2/daily, sleep, activity, body (with glucose for CGM providers) inline (to_webhook=false) or to your webhook signed with terra-signature; inspector at /_inspector",
2479
2479
  async load() {
2480
- const mod = await import("./dist-7ZKCZXHQ.js");
2480
+ const mod = await import("./dist-W3BWZ4HD.js");
2481
2481
  return { plugin: mod.terraPlugin, seedFromConfig: mod.seedFromConfig };
2482
2482
  },
2483
2483
  defaultFallback() {
@@ -2533,7 +2533,7 @@ var HEALTH_SERVICE_REGISTRY = {
2533
2533
  label: "Veeva Vault REST API emulator",
2534
2534
  endpoints: "Vault REST API under /api/{version}: username and password auth with session IDs, Vault object records (list, retrieve, create, upsert with idParam, update, delete; JSON or CSV), documents (list, retrieve, versions, file download, create, update, delete), object and document metadata, and VQL queries with relationships and paging; synthetic products, studies, sites, countries, and trial documents; inspector at /_inspector",
2535
2535
  async load() {
2536
- const mod = await import("./dist-NRPKESVU.js");
2536
+ const mod = await import("./dist-SYCRZXDL.js");
2537
2537
  return { plugin: mod.veevaPlugin, seedFromConfig: mod.seedFromConfig };
2538
2538
  },
2539
2539
  defaultFallback() {
@@ -2554,7 +2554,7 @@ var HEALTH_SERVICE_REGISTRY = {
2554
2554
  label: "Medidata Rave Web Services (RWS) emulator",
2555
2555
  endpoints: "Rave Web Services under /RaveWebServices: version and diagnostics, HTTP Basic auth, study and metadata study lists, CRF versions and full ODM metadata, subjects with status and links, ODM clinical data datasets by study, subject, CRF version, and form, ClinicalAuditRecords with paging, and webservice.aspx?PostODMClinicalData imports that apply transactionally; synthetic studies EMU-101 and EMU-202 in Prod and UAT; inspector at /_inspector",
2556
2556
  async load() {
2557
- const mod = await import("./dist-PNIIJGYO.js");
2557
+ const mod = await import("./dist-LU2SZMDZ.js");
2558
2558
  return { plugin: mod.ravePlugin, seedFromConfig: mod.seedFromConfig };
2559
2559
  },
2560
2560
  defaultFallback() {
@@ -39,7 +39,7 @@ var HEALTH_SERVICE_REGISTRY = {
39
39
  label: "FHIR R4 server emulator",
40
40
  endpoints: "create, read, vread, update (including create on update), JSON Patch, logical delete, _history, search with includes and chaining, batch and transaction Bundles, CapabilityStatement at /metadata, Patient/$everything, Bulk Data $export, SMART App Launch and Backend Services, ETag and If-Match, generated synthetic patients, terminology $lookup and $validate-code, inspector at /_inspector",
41
41
  async load() {
42
- const mod = await import("./dist-TBCWBCG3.js");
42
+ const mod = await import("./dist-YLPKKYLR.js");
43
43
  return { plugin: mod.fhirPlugin, seedFromConfig: mod.seedFromConfig };
44
44
  },
45
45
  defaultFallback() {
@@ -64,7 +64,7 @@ var HEALTH_SERVICE_REGISTRY = {
64
64
  label: "Epic FHIR R4 emulator",
65
65
  endpoints: "Epic URL shape (/api/FHIR/R4) over the full FHIR server, OAuth 2.0 at /oauth2/authorize and /oauth2/token with SMART App Launch and Backend Services, __epic.dstu2.patient in token responses, informational OperationOutcome (4101) on empty searches, Schedules and Slots with Appointment/$find and Appointment/$book, generated synthetic patients, inspector at /_inspector",
66
66
  async load() {
67
- const mod = await import("./dist-X7XRD6G3.js");
67
+ const mod = await import("./dist-QNFWXDSF.js");
68
68
  return { plugin: mod.epicPlugin, seedFromConfig: mod.seedFromConfig };
69
69
  },
70
70
  defaultFallback() {
@@ -217,7 +217,7 @@ var HEALTH_SERVICE_REGISTRY = {
217
217
  label: "Oracle Health (Cerner) Millennium FHIR R4 emulator",
218
218
  endpoints: "Millennium tenant URL shape (/r4/{tenant}) over the full FHIR server, persona OAuth endpoints under /tenants/{tenant}/protocols/oauth2/profiles/smart-v1, system accounts with client_credentials and a client secret, tenant and username in token responses, Millennium's required search parameters, generated synthetic patients, inspector at /_inspector",
219
219
  async load() {
220
- const mod = await import("./dist-X65VP455.js");
220
+ const mod = await import("./dist-B7QPLCAG.js");
221
221
  return { plugin: mod.cernerPlugin, seedFromConfig: mod.seedFromConfig };
222
222
  },
223
223
  defaultFallback() {
@@ -244,7 +244,7 @@ var HEALTH_SERVICE_REGISTRY = {
244
244
  label: "athenahealth API emulator",
245
245
  endpoints: "OAuth client credentials at /oauth2/v1/token; proprietary REST under /v1/{practiceid}: departments, providers, patients (search, read, create), chart problems, allergies, medications, vitals, appointments open, booked, book, cancel, with offset and limit paging; FHIR R4 under /fhir/r4 with ah-practice; synthetic records; inspector at /_inspector",
246
246
  async load() {
247
- const mod = await import("./dist-XFS53WXQ.js");
247
+ const mod = await import("./dist-2SPD4VKT.js");
248
248
  return { plugin: mod.athenaPlugin, seedFromConfig: mod.seedFromConfig };
249
249
  },
250
250
  defaultFallback() {
@@ -267,7 +267,7 @@ var HEALTH_SERVICE_REGISTRY = {
267
267
  label: "CMS Blue Button 2.0 emulator",
268
268
  endpoints: "Patient access OAuth at /v2/o/authorize/ and /v2/o/token/ with a beneficiary picker, /v2/connect/userinfo, FHIR R4 at /v2/fhir with Patient (synthetic MBIs), Coverage (Parts A, B, D), and ExplanationOfBenefit (carrier and Part D claims), read-only and token-only; synthetic beneficiaries",
269
269
  async load() {
270
- const mod = await import("./dist-BSFGA454.js");
270
+ const mod = await import("./dist-O5VNO6R3.js");
271
271
  return { plugin: mod.bluebuttonPlugin, seedFromConfig: mod.seedFromConfig };
272
272
  },
273
273
  defaultFallback() {
@@ -294,7 +294,7 @@ var HEALTH_SERVICE_REGISTRY = {
294
294
  label: "CDS Hooks emulator (simulated EHR and sample services)",
295
295
  endpoints: "Simulated EHR: POST /ehr/fire reads your CDS service discovery and fires patient-view, order-sign, order-select, or encounter-start with a signed JWT (JWKS at /.well-known/jwks.json), context, prefetch, and fhirAuthorization from its FHIR server at /fhir, then validates the cards; GET /ehr/invocations; sample CDS services at /cds-services (patient-greeting, allergy-check) with feedback; inspector form at /_inspector",
296
296
  async load() {
297
- const mod = await import("./dist-CO7RIA5H.js");
297
+ const mod = await import("./dist-UUOAP6EN.js");
298
298
  return { plugin: mod.cdshooksPlugin, seedFromConfig: mod.seedFromConfig };
299
299
  },
300
300
  defaultFallback() {
@@ -310,7 +310,7 @@ var HEALTH_SERVICE_REGISTRY = {
310
310
  label: "Redox API emulator",
311
311
  endpoints: "Authentication (/auth/authenticate, /auth/refreshToken, /v2/auth/token), POST /endpoint for Redox JSON data models (PatientSearch Query, ClinicalSummary PatientQuery, PatientAdmin NewPatient and PatientUpdate, Scheduling New, Reschedule, Cancel, Results, Notes, Media) with Meta.Errors, destination webhooks with the verification-token header, the challenge handshake, and POST /ehr/send to simulate EHR events; synthetic records; inspector at /_inspector",
312
312
  async load() {
313
- const mod = await import("./dist-HFJIIILH.js");
313
+ const mod = await import("./dist-D4XTX54S.js");
314
314
  return { plugin: mod.redoxPlugin, seedFromConfig: mod.seedFromConfig };
315
315
  },
316
316
  defaultFallback() {
@@ -331,7 +331,7 @@ var HEALTH_SERVICE_REGISTRY = {
331
331
  label: "AWS HealthLake emulator",
332
332
  endpoints: "HealthLake JSON control plane at POST / (X-Amz-Target HealthLake.*: Create, Describe, List, Delete FHIR datastores; Start, Describe, List import and export jobs) and a FHIR R4 data plane per datastore at /datastore/{id}/r4, with SigV4 verification for service healthlake; a default datastore preloaded with synthetic data; inspector at /_inspector",
333
333
  async load() {
334
- const mod = await import("./dist-THKXRTNS.js");
334
+ const mod = await import("./dist-MOSHZOI2.js");
335
335
  return { plugin: mod.healthlakePlugin, seedFromConfig: mod.seedFromConfig };
336
336
  },
337
337
  defaultFallback() {
@@ -354,7 +354,7 @@ var HEALTH_SERVICE_REGISTRY = {
354
354
  label: "Google Cloud Healthcare API emulator (FHIR stores)",
355
355
  endpoints: "Cloud Healthcare API v1 under /v1/projects/{project}/locations/{location}: datasets (create as operations, get, list, delete, operations), FHIR stores (create, get, list, patch with updateMask, delete, :export and :import operations), and a FHIR R4 API per store at .../fhirStores/{store}/fhir honoring enableUpdateCreate; any Bearer token; Google JSON errors; inspector at /_inspector",
356
356
  async load() {
357
- const mod = await import("./dist-K6DWZN23.js");
357
+ const mod = await import("./dist-R2RM35T5.js");
358
358
  return { plugin: mod.gcphealthcarePlugin, seedFromConfig: mod.seedFromConfig };
359
359
  },
360
360
  defaultFallback() {
@@ -383,7 +383,7 @@ var HEALTH_SERVICE_REGISTRY = {
383
383
  label: "Azure Health Data Services emulator (FHIR services)",
384
384
  endpoints: "FHIR services per workspace at /{workspace}-{fhirservice} (the path form of {workspace}-{fhirservice}.fhir.azurehealthcareapis.com), each a full FHIR R4 server; Entra ID Bearer tokens required (public metadata), verified against an issuer's JWKS such as the emuhealth Microsoft emulator when azurehealth.entra is set; inspector at /_inspector",
385
385
  async load() {
386
- const mod = await import("./dist-KAXCYBBO.js");
386
+ const mod = await import("./dist-HUGQE3UQ.js");
387
387
  return { plugin: mod.azurehealthPlugin, seedFromConfig: mod.seedFromConfig };
388
388
  },
389
389
  defaultFallback() {
@@ -409,7 +409,7 @@ var HEALTH_SERVICE_REGISTRY = {
409
409
  label: "Stedi healthcare clearinghouse emulator",
410
410
  endpoints: "Stedi 2024-04-01 healthcare APIs with an API key: eligibility v3 (270/271), professional claims v3 submission (837P) with immediate adjudication, claim status v2 (276/277), 835 ERA reports by transaction, transactions list, payers; transaction.processed.v2 events to webhooks; synthetic payers and members; inspector at /_inspector",
411
411
  async load() {
412
- const mod = await import("./dist-2J7ORJF2.js");
412
+ const mod = await import("./dist-XQO4ECK7.js");
413
413
  return { plugin: mod.stediPlugin, seedFromConfig: mod.seedFromConfig };
414
414
  },
415
415
  defaultFallback() {
@@ -428,7 +428,7 @@ var HEALTH_SERVICE_REGISTRY = {
428
428
  label: "Availity API emulator",
429
429
  endpoints: "Availity HIPAA transaction APIs under /availity: OAuth client credentials (/v1/token), availity-payer-list, v1/configurations, asynchronous v1/coverages (270/271) and v1/claim-statuses (276/277) polled until statusCode 4, v2/service-reviews (278) with Location polling, and Demo plan X-Api-Mock-Scenario-ID scenarios; synthetic payers, members, and claims; inspector at /_inspector",
430
430
  async load() {
431
- const mod = await import("./dist-OC4HAYAN.js");
431
+ const mod = await import("./dist-7IG4HX3B.js");
432
432
  return { plugin: mod.availityPlugin, seedFromConfig: mod.seedFromConfig };
433
433
  },
434
434
  defaultFallback() {
@@ -448,7 +448,7 @@ var HEALTH_SERVICE_REGISTRY = {
448
448
  label: "Dexcom API v3 emulator",
449
449
  endpoints: "OAuth 2.0 at /v2/oauth2/login (consent page with synthetic users) and /v2/oauth2/token; /v3/users/self/egvs (5 minute glucose, 30 day windows), events, devices, alerts, calibrations, dataRange; synthetic G7 users; inspector at /_inspector",
450
450
  async load() {
451
- const mod = await import("./dist-E5YUT2ET.js");
451
+ const mod = await import("./dist-SRMVCWKJ.js");
452
452
  return { plugin: mod.dexcomPlugin, seedFromConfig: mod.seedFromConfig };
453
453
  },
454
454
  defaultFallback() {
@@ -470,7 +470,7 @@ var HEALTH_SERVICE_REGISTRY = {
470
470
  label: "Fitbit Web API emulator",
471
471
  endpoints: "OAuth 2.0 (/oauth2/authorize consent page, /oauth2/token with Basic auth, /oauth2/revoke); /1/user/-/profile.json, activities/date, activity time series (steps, distance, calories), heart rate with intraday, /1.2 sleep with stages, weight logs; scopes, error envelope, rate limit headers; synthetic users; inspector at /_inspector",
472
472
  async load() {
473
- const mod = await import("./dist-EYL5YC23.js");
473
+ const mod = await import("./dist-TRI7TRKP.js");
474
474
  return { plugin: mod.fitbitPlugin, seedFromConfig: mod.seedFromConfig };
475
475
  },
476
476
  defaultFallback() {
@@ -492,7 +492,7 @@ var HEALTH_SERVICE_REGISTRY = {
492
492
  label: "Oura API v2 emulator",
493
493
  endpoints: "OAuth 2.0 (/oauth/authorize consent page, /oauth/token); /v2/usercollection personal_info, daily_sleep, daily_activity, daily_readiness, daily_spo2, sleep (periods), heartrate, workout, session, ring_configuration, with start_date and end_date, next_token paging, documents by id, scopes, and {detail} errors; synthetic users; inspector at /_inspector",
494
494
  async load() {
495
- const mod = await import("./dist-IIYEXRQ4.js");
495
+ const mod = await import("./dist-LYW423OA.js");
496
496
  return { plugin: mod.ouraPlugin, seedFromConfig: mod.seedFromConfig };
497
497
  },
498
498
  defaultFallback() {
@@ -514,7 +514,7 @@ var HEALTH_SERVICE_REGISTRY = {
514
514
  label: "Withings API emulator",
515
515
  endpoints: "OAuth 2.0 (/oauth2_user/authorize2 consent page, /v2/oauth2 action=requesttoken); /measure getmeas (weight, blood pressure, heart pulse, SpO2), /v2/measure getactivity, /v2/sleep getsummary, /v2/user getdevice, /notify subscribe, list, revoke with callbacks; HTTP 200 with status codes; synthetic users; inspector at /_inspector",
516
516
  async load() {
517
- const mod = await import("./dist-QG46WNU5.js");
517
+ const mod = await import("./dist-P2Q4A2DE.js");
518
518
  return { plugin: mod.withingsPlugin, seedFromConfig: mod.seedFromConfig };
519
519
  },
520
520
  defaultFallback() {
@@ -536,7 +536,7 @@ var HEALTH_SERVICE_REGISTRY = {
536
536
  label: "Terra API emulator",
537
537
  endpoints: "dev-id and x-api-key auth; /v2/auth/generateWidgetSession and /v2/auth/authenticateUser with a connect page (provider, then a synthetic account), /v2/auth/deauthenticateUser, /v2/userInfo, /v2/subscriptions; normalized /v2/daily, sleep, activity, body (with glucose for CGM providers) inline (to_webhook=false) or to your webhook signed with terra-signature; inspector at /_inspector",
538
538
  async load() {
539
- const mod = await import("./dist-7ZKCZXHQ.js");
539
+ const mod = await import("./dist-W3BWZ4HD.js");
540
540
  return { plugin: mod.terraPlugin, seedFromConfig: mod.seedFromConfig };
541
541
  },
542
542
  defaultFallback() {
@@ -592,7 +592,7 @@ var HEALTH_SERVICE_REGISTRY = {
592
592
  label: "Veeva Vault REST API emulator",
593
593
  endpoints: "Vault REST API under /api/{version}: username and password auth with session IDs, Vault object records (list, retrieve, create, upsert with idParam, update, delete; JSON or CSV), documents (list, retrieve, versions, file download, create, update, delete), object and document metadata, and VQL queries with relationships and paging; synthetic products, studies, sites, countries, and trial documents; inspector at /_inspector",
594
594
  async load() {
595
- const mod = await import("./dist-NRPKESVU.js");
595
+ const mod = await import("./dist-SYCRZXDL.js");
596
596
  return { plugin: mod.veevaPlugin, seedFromConfig: mod.seedFromConfig };
597
597
  },
598
598
  defaultFallback() {
@@ -613,7 +613,7 @@ var HEALTH_SERVICE_REGISTRY = {
613
613
  label: "Medidata Rave Web Services (RWS) emulator",
614
614
  endpoints: "Rave Web Services under /RaveWebServices: version and diagnostics, HTTP Basic auth, study and metadata study lists, CRF versions and full ODM metadata, subjects with status and links, ODM clinical data datasets by study, subject, CRF version, and form, ClinicalAuditRecords with paging, and webservice.aspx?PostODMClinicalData imports that apply transactionally; synthetic studies EMU-101 and EMU-202 in Prod and UAT; inspector at /_inspector",
615
615
  async load() {
616
- const mod = await import("./dist-PNIIJGYO.js");
616
+ const mod = await import("./dist-LU2SZMDZ.js");
617
617
  return { plugin: mod.ravePlugin, seedFromConfig: mod.seedFromConfig };
618
618
  },
619
619
  defaultFallback() {
@@ -4187,4 +4187,4 @@ export {
4187
4187
  * Copyright (c) 2021 - present, Yusuke Wada and Hono contributors
4188
4188
  * MIT license: see THIRD_PARTY_NOTICES.md in the repository and npm packages.
4189
4189
  */
4190
- //# sourceMappingURL=chunk-5CZOPZI6.js.map
4190
+ //# sourceMappingURL=chunk-XMIM6S4S.js.map
@@ -542,7 +542,7 @@ var SEARCH_PARAMS = {
542
542
  p("identifier", "token", ["identifier"]),
543
543
  p("name", "string", ["name", "alias"]),
544
544
  p("active", "token", ["active"]),
545
- p("address", "string", ["address"])
545
+ p("address", "string", ["address", "contact.address"])
546
546
  ],
547
547
  Location: [
548
548
  p("identifier", "token", ["identifier"]),
@@ -5415,9 +5415,48 @@ function endpoint(r) {
5415
5415
  ...payloadType ? { payload: [{ type: payloadType.map((t) => t.text ? { ...t, text: t.text.replace("R4", "R5") } : t) }] } : {}
5416
5416
  };
5417
5417
  }
5418
+ function careTeam(r) {
5419
+ const { participant, ...rest } = r;
5420
+ return {
5421
+ ...rest,
5422
+ ...participant ? { participant: participant.map(({ role, ...p2 }) => ({ ...p2, ...role?.[0] ? { role: role[0] } : {} })) } : {}
5423
+ };
5424
+ }
5425
+ function allergyIntolerance(r) {
5426
+ const { reaction, ...rest } = r;
5427
+ return {
5428
+ ...rest,
5429
+ ...reaction ? {
5430
+ reaction: reaction.map(({ manifestation, ...x }) => ({
5431
+ ...x,
5432
+ ...manifestation ? { manifestation: manifestation.map((concept) => ({ concept })) } : {}
5433
+ }))
5434
+ } : {}
5435
+ };
5436
+ }
5437
+ function contacts(r, moveAddress) {
5438
+ const { telecom, address, ...rest } = r;
5439
+ const addresses = moveAddress ? address ?? [] : [];
5440
+ const contact = addresses.map((a, i) => ({ ...i === 0 && telecom ? { telecom } : {}, address: a }));
5441
+ if (telecom && contact.length === 0) contact.push({ telecom });
5442
+ return {
5443
+ ...rest,
5444
+ ...!moveAddress && address ? { address } : {},
5445
+ ...contact.length ? { contact: [...r.contact ?? [], ...contact] } : {}
5446
+ };
5447
+ }
5418
5448
  function device(r) {
5419
- const { patient, type, distinctIdentifier: _distinct, ...rest } = r;
5420
- const out = [{ ...rest, ...type ? { type: [type] } : {} }];
5449
+ const { patient, type, distinctIdentifier: _distinct, udiCarrier, ...rest } = r;
5450
+ const out = [
5451
+ {
5452
+ ...rest,
5453
+ // R5 requires the issuer; the generated UDIs are GS1 (application identifier 01).
5454
+ ...udiCarrier ? {
5455
+ udiCarrier: udiCarrier.map((u) => ({ issuer: "http://hl7.org/fhir/NamingSystem/gs1-di", ...u }))
5456
+ } : {},
5457
+ ...type ? { type: [type] } : {}
5458
+ }
5459
+ ];
5421
5460
  if (patient)
5422
5461
  out.push({
5423
5462
  resourceType: "DeviceAssociation",
@@ -5444,6 +5483,15 @@ function toR5(resources) {
5444
5483
  return [endpoint(r)];
5445
5484
  case "Device":
5446
5485
  return device(r);
5486
+ case "CareTeam":
5487
+ return [careTeam(r)];
5488
+ case "AllergyIntolerance":
5489
+ return [allergyIntolerance(r)];
5490
+ case "Organization":
5491
+ return [contacts(r, true)];
5492
+ case "PractitionerRole":
5493
+ case "Location":
5494
+ return [contacts(r, false)];
5447
5495
  default:
5448
5496
  return [r];
5449
5497
  }
@@ -5926,4 +5974,4 @@ export {
5926
5974
  * Copyright (c) 2021 - present, Yusuke Wada and Hono contributors
5927
5975
  * MIT license: see THIRD_PARTY_NOTICES.md in the repository and npm packages.
5928
5976
  */
5929
- //# sourceMappingURL=dist-XFS53WXQ.js.map
5977
+ //# sourceMappingURL=dist-2SPD4VKT.js.map