@awell-health/awell-extensions 2.1.142 → 2.1.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extensions/markdown.json +2 -2
- package/dist/extensions/metriport/actions/index.d.ts +108 -0
- package/dist/extensions/metriport/actions/index.js +2 -0
- package/dist/extensions/metriport/actions/index.js.map +1 -1
- package/dist/extensions/metriport/actions/webhookBundle/dataPoints.d.ts +6 -0
- package/dist/extensions/metriport/actions/webhookBundle/dataPoints.js +10 -0
- package/dist/extensions/metriport/actions/webhookBundle/dataPoints.js.map +1 -0
- package/dist/extensions/metriport/actions/webhookBundle/fetchBundle.d.ts +7 -0
- package/dist/extensions/metriport/actions/webhookBundle/fetchBundle.js +23 -0
- package/dist/extensions/metriport/actions/webhookBundle/fetchBundle.js.map +1 -0
- package/dist/extensions/metriport/actions/webhookBundle/fields.d.ts +10 -0
- package/dist/extensions/metriport/actions/webhookBundle/fields.js +14 -0
- package/dist/extensions/metriport/actions/webhookBundle/fields.js.map +1 -0
- package/dist/extensions/metriport/actions/webhookBundle/getWebhookBundle.d.ts +5 -0
- package/dist/extensions/metriport/actions/webhookBundle/getWebhookBundle.js +34 -0
- package/dist/extensions/metriport/actions/webhookBundle/getWebhookBundle.js.map +1 -0
- package/dist/extensions/metriport/actions/webhookBundle/validation.d.ts +8 -0
- package/dist/extensions/metriport/actions/webhookBundle/validation.js +11 -0
- package/dist/extensions/metriport/actions/webhookBundle/validation.js.map +1 -0
- package/dist/extensions/metriport/index.js +2 -2
- package/dist/extensions/metriport/index.js.map +1 -1
- package/dist/extensions/metriport/settings.d.ts +7 -0
- package/dist/extensions/metriport/settings.js +7 -0
- package/dist/extensions/metriport/settings.js.map +1 -1
- package/dist/extensions/metriport/shared/verifyWebhookSignature.d.ts +29 -0
- package/dist/extensions/metriport/shared/verifyWebhookSignature.js +45 -0
- package/dist/extensions/metriport/shared/verifyWebhookSignature.js.map +1 -0
- package/dist/extensions/metriport/webhooks/enrollment.d.ts +41 -0
- package/dist/extensions/metriport/webhooks/enrollment.js +168 -0
- package/dist/extensions/metriport/webhooks/enrollment.js.map +1 -0
- package/dist/extensions/metriport/webhooks/index.d.ts +24 -0
- package/dist/extensions/metriport/webhooks/index.js +6 -0
- package/dist/extensions/metriport/webhooks/index.js.map +1 -0
- package/dist/extensions/metriport/webhooks/types.d.ts +108 -0
- package/dist/extensions/metriport/webhooks/types.js +26 -0
- package/dist/extensions/metriport/webhooks/types.js.map +1 -0
- package/dist/extensions/metriport/webhooks/validation.zod.d.ts +407 -0
- package/dist/extensions/metriport/webhooks/validation.zod.js +85 -0
- package/dist/extensions/metriport/webhooks/validation.zod.js.map +1 -0
- package/package.json +1 -1
|
@@ -160,8 +160,8 @@
|
|
|
160
160
|
"changelog": "# MessageBird changelog"
|
|
161
161
|
},
|
|
162
162
|
"metriport": {
|
|
163
|
-
"readme": "---\ntitle: Metriport\ndescription: Metriport is Plaid for healthcare data.\n---\n# Metriport\n\nMetriport is Plaid for healthcare data. We help digital health companies access and manage patient health and medical data, through an open-source and universal API.\n\nThrough a single integration, our API enables modern health companies to get the comprehensive patient data they need from both HIEs and EHRs, as well as popular wearable devices.\n\nAs a developer-first interoperability solution, Metriport is powering the next wave of innovative companies, accelerating a revolution in digital health.\n\nTo learn more visit [https://www.metriport.com/](https://www.metriport.com/)\n# Extension settings\n\nIn order to set up this extension, **you will need to provide a Metriport API key**. You can obtain an API key via the Metriport dashboard by selecting the `Developers tab`. To learn more on how to get started with Metriport visit our [quick start docs](https://docs.metriport.com/medical-api/getting-started/quickstart) for our Medical API. Also, to better understand how our API keys work check out the [API Keys section](https://docs.metriport.com/home/api-info/api-keys) of our docs as well.\n\n# Custom Actions\n\n**GENERAL NOTE: Make sure to create Organizations and Facilities in Metriport before using this extension. A Patient must be associated with a Facility by providing the facilityId when stated in the actions.**\n\n## Create Patient\n\nCreates a Patient in Metriport for the specified Facility where the Patient is receiving care.\n\nOptionally, providing a **Cohort** ID enrolls the Patient in real-time monitoring by adding them to that cohort. Note that enrolling a Patient in real-time monitoring has downstream consequences: once you start receiving updates about the Patient, you are expected to contribute data back to Metriport.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/patient/create-patient) for more info.\n\n## Update Patient\n\nUpdates the specified Patient.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/patient/update-patient) for more info.\n\n## Get Patient\n\nRetrieves the specified Patient.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/patient/get-patient) for more info.\n\n## Remove Patient\n\nRemoves a Patient at Metriport and at HIEs the Patient is linked to.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/patient/delete-patient) for more info.\n\n## List Documents\n\nLists all Documents that can be retrieved for a Patient.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/document/list-documents) for more info.\n\n**NOTE: It also returns the status of querying Document references across HIEs, indicating whether there is an asynchronous query in progress (status processing) or not (status completed). If the query is in progress, you will also receive the total number of Documents to be queried as well as the ones that have already been completed.**\n\n## Query Documents\n\nTriggers a Document query for the specified Patient across HIEs.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/document/start-document-query) for more info.\n\n**NOTE: When executed, this endpoint triggers an asynchronous Document query with HIEs and immediately returns the status of Document query, processing .**\n\n## Get Document Url\n\nGets a presigned URL for downloading the specified Document.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/document/get-document) for more info.\n\n**NOTE: This endpoint returns a URL which you can use to download the specified Document using the file name provided from the List Documents endpoint.**\n\n## Remove Patient from Cohort\n\nRemoves the specified Patient from a cohort.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/cohort/remove-patients-from-cohort) for more info.\n\n## More Info\n\nFor more information on how to integrate with Metriport please visit our [Medical API docs](https://docs.metriport.com/medical-api/getting-started/quickstart)\n",
|
|
164
|
-
"changelog": "# Metriport changelog"
|
|
163
|
+
"readme": "---\ntitle: Metriport\ndescription: Metriport is Plaid for healthcare data.\n---\n# Metriport\n\nMetriport is Plaid for healthcare data. We help digital health companies access and manage patient health and medical data, through an open-source and universal API.\n\nThrough a single integration, our API enables modern health companies to get the comprehensive patient data they need from both HIEs and EHRs, as well as popular wearable devices.\n\nAs a developer-first interoperability solution, Metriport is powering the next wave of innovative companies, accelerating a revolution in digital health.\n\nTo learn more visit [https://www.metriport.com/](https://www.metriport.com/)\n# Extension settings\n\nIn order to set up this extension, **you will need to provide a Metriport API key**. You can obtain an API key via the Metriport dashboard by selecting the `Developers tab`. To learn more on how to get started with Metriport visit our [quick start docs](https://docs.metriport.com/medical-api/getting-started/quickstart) for our Medical API. Also, to better understand how our API keys work check out the [API Keys section](https://docs.metriport.com/home/api-info/api-keys) of our docs as well.\n\n# Custom Actions\n\n**GENERAL NOTE: Make sure to create Organizations and Facilities in Metriport before using this extension. A Patient must be associated with a Facility by providing the facilityId when stated in the actions.**\n\n## Create Patient\n\nCreates a Patient in Metriport for the specified Facility where the Patient is receiving care.\n\nOptionally, providing a **Cohort** ID enrolls the Patient in real-time monitoring by adding them to that cohort. Note that enrolling a Patient in real-time monitoring has downstream consequences: once you start receiving updates about the Patient, you are expected to contribute data back to Metriport.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/patient/create-patient) for more info.\n\n## Update Patient\n\nUpdates the specified Patient.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/patient/update-patient) for more info.\n\n## Get Patient\n\nRetrieves the specified Patient.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/patient/get-patient) for more info.\n\n## Remove Patient\n\nRemoves a Patient at Metriport and at HIEs the Patient is linked to.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/patient/delete-patient) for more info.\n\n## List Documents\n\nLists all Documents that can be retrieved for a Patient.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/document/list-documents) for more info.\n\n**NOTE: It also returns the status of querying Document references across HIEs, indicating whether there is an asynchronous query in progress (status processing) or not (status completed). If the query is in progress, you will also receive the total number of Documents to be queried as well as the ones that have already been completed.**\n\n## Query Documents\n\nTriggers a Document query for the specified Patient across HIEs.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/document/start-document-query) for more info.\n\n**NOTE: When executed, this endpoint triggers an asynchronous Document query with HIEs and immediately returns the status of Document query, processing .**\n\n## Get Document Url\n\nGets a presigned URL for downloading the specified Document.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/document/get-document) for more info.\n\n**NOTE: This endpoint returns a URL which you can use to download the specified Document using the file name provided from the List Documents endpoint.**\n\n## Remove Patient from Cohort\n\nRemoves the specified Patient from a cohort.\n\nVisit [endpoint docs](https://docs.metriport.com/medical-api/api-reference/cohort/remove-patients-from-cohort) for more info.\n\n## Get Webhook Bundle\n\nFetches the FHIR bundle from a Metriport webhook payload URL — e.g. the [Encounter Bundle](https://docs.metriport.com/medical-api/handling-data/patient-encounter-bundle) from an ADT notification, or a discharge summary. Pass the `bundleUrl` data point emitted by the **Enrollment** webhook; the action downloads the bundle and returns it on the `bundle` data point.\n\n**NOTE: Metriport pre-signed URLs are only valid for 10 minutes, so this action should run early in the care flow, shortly after the enrollment webhook fires.**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `url` | string | The pre-signed payload URL to fetch (the webhook's `bundleUrl` data point). |\n\n| Data point | Type | Description |\n| --- | --- | --- |\n| `bundle` | json | The FHIR bundle fetched from the URL. |\n\n# Webhooks\n\n## Enrollment\n\nAn enrollment trigger that starts a care flow when Metriport sends a [real-time patient notification](https://docs.metriport.com/medical-api/handling-data/realtime-patient-notifications).\n\nMetriport POSTs every notification type to the same endpoint, so this webhook discriminates on the notification `type` and only enrolls on two events. The `eventType` data point carries the raw Metriport webhook type:\n\n- `patient.admit` (HL7 ADT^A01) → `eventType` = `patient.admit`. The payload carries a pre-signed URL to the [FHIR Encounter Bundle](https://docs.metriport.com/medical-api/handling-data/patient-encounter-bundle).\n- `medical.discharge-summary` → `eventType` = `medical.discharge-summary`. This event is currently undocumented by Metriport and is modelled on the published `medical.*` webhook family (a `patients` array).\n\nThe webhook validates the request, emits the data points (including the pre-signed bundle URL on `bundleUrl`), and replies immediately — it does **not** download the bundle. Fetch the bundle later in the care flow with the **Get Webhook Bundle** action, using the `bundleUrl` data point. Because the URL expires after 10 minutes, run that action early.\n\nUse the `eventType` data point in your care flow to branch on admit vs discharge. Every other notification type (`patient.discharge`, `patient.transfer`, ...) is acknowledged with a `200` but does not enroll a patient. Metriport [verification `ping` messages](https://docs.metriport.com/medical-api/getting-started/webhooks#the-ping-message) are answered with a `200` that echoes the ping value back as `pong: <value>`.\n\n### Data points\n\n| Data point | Type | Description |\n| --- | --- | --- |\n| `eventType` | string | The Metriport webhook type: `patient.admit` or `medical.discharge-summary` |\n| `metriportPatientId` | string | The Metriport patient ID (also used as the patient identifier for enrollment) |\n| `externalId` | string | Your external patient ID, if provided to Metriport |\n| `admitTimestamp` | date | When the patient was admitted (admit events only) |\n| `whenSourceSent` | date | When the source sent the notification, if available (admit events) |\n| `messageId` | string | The Metriport message ID for the notification |\n| `bundleUrl` | string | Pre-signed URL to the FHIR bundle; fetch it with the **Get Webhook Bundle** action (valid for 10 minutes) |\n\n### Verifying incoming requests\n\nOptionally set the **Webhook Key** setting to the webhook key from the Metriport dashboard (Settings/Developers tab). Metriport [authenticates each webhook](https://docs.metriport.com/medical-api/getting-started/webhooks#authentication) with an HMAC-SHA256 signature of the raw request body, keyed with your webhook key and sent in the `x-metriport-signature` header. When the setting is populated, the webhook recomputes the HMAC over the raw body and rejects any request whose signature is missing or does not match (`401`). When left empty, requests are not verified.\n\n## More Info\n\nFor more information on how to integrate with Metriport please visit our [Medical API docs](https://docs.metriport.com/medical-api/getting-started/quickstart)\n",
|
|
164
|
+
"changelog": "# Metriport changelog\n\n## July 2026\n\n- Add `enrollment` webhook: an enrollment trigger for Metriport real-time patient notifications. The `eventType` data point carries the Metriport webhook type (`patient.admit` or `medical.discharge-summary`) so care flows can distinguish on it. The webhook validates and replies immediately, emitting the pre-signed FHIR bundle URL on the `bundleUrl` data point rather than downloading the bundle inline.\n- Add `Get Webhook Bundle` action: fetches the FHIR bundle from a Metriport webhook payload URL (the webhook's `bundleUrl`), for use later in the care flow.\n- Add optional `Webhook Key` setting used to verify incoming webhook requests via Metriport's HMAC-SHA256 signature (`x-metriport-signature` header), computed over the raw request body."
|
|
165
165
|
},
|
|
166
166
|
"nexuzhealth": {
|
|
167
167
|
"readme": "---\ntitle: nexuzhealth\ndescription: Demo extension for nexuzhealth\n---\n\nThis is an extension that can only be used for demo purposes.",
|
|
@@ -22,6 +22,13 @@ export declare const actions: {
|
|
|
22
22
|
description: string;
|
|
23
23
|
required: false;
|
|
24
24
|
};
|
|
25
|
+
webhookKey: {
|
|
26
|
+
key: string;
|
|
27
|
+
label: string;
|
|
28
|
+
obfuscated: true;
|
|
29
|
+
description: string;
|
|
30
|
+
required: false;
|
|
31
|
+
};
|
|
25
32
|
}, "firstName" | "lastName" | "email" | "dob" | "phone" | "city" | "country" | "state" | "zip" | "addressLine1" | "addressLine2" | "genderAtBirth" | "driversLicenseValue" | "driversLicenseState">;
|
|
26
33
|
createPatient: import("@awell-health/extensions-core").Action<{
|
|
27
34
|
phone: {
|
|
@@ -145,6 +152,13 @@ export declare const actions: {
|
|
|
145
152
|
description: string;
|
|
146
153
|
required: false;
|
|
147
154
|
};
|
|
155
|
+
webhookKey: {
|
|
156
|
+
key: string;
|
|
157
|
+
label: string;
|
|
158
|
+
obfuscated: true;
|
|
159
|
+
description: string;
|
|
160
|
+
required: false;
|
|
161
|
+
};
|
|
148
162
|
}, "patientId">;
|
|
149
163
|
updatePatient: import("@awell-health/extensions-core").Action<{
|
|
150
164
|
phone: {
|
|
@@ -275,6 +289,13 @@ export declare const actions: {
|
|
|
275
289
|
description: string;
|
|
276
290
|
required: false;
|
|
277
291
|
};
|
|
292
|
+
webhookKey: {
|
|
293
|
+
key: string;
|
|
294
|
+
label: string;
|
|
295
|
+
obfuscated: true;
|
|
296
|
+
description: string;
|
|
297
|
+
required: false;
|
|
298
|
+
};
|
|
278
299
|
}, string>;
|
|
279
300
|
deletePatient: import("@awell-health/extensions-core").Action<{
|
|
280
301
|
facilityId: {
|
|
@@ -306,6 +327,13 @@ export declare const actions: {
|
|
|
306
327
|
description: string;
|
|
307
328
|
required: false;
|
|
308
329
|
};
|
|
330
|
+
webhookKey: {
|
|
331
|
+
key: string;
|
|
332
|
+
label: string;
|
|
333
|
+
obfuscated: true;
|
|
334
|
+
description: string;
|
|
335
|
+
required: false;
|
|
336
|
+
};
|
|
309
337
|
}, string>;
|
|
310
338
|
listDocuments: import("@awell-health/extensions-core").Action<{
|
|
311
339
|
patientId: {
|
|
@@ -330,6 +358,13 @@ export declare const actions: {
|
|
|
330
358
|
description: string;
|
|
331
359
|
required: false;
|
|
332
360
|
};
|
|
361
|
+
webhookKey: {
|
|
362
|
+
key: string;
|
|
363
|
+
label: string;
|
|
364
|
+
obfuscated: true;
|
|
365
|
+
description: string;
|
|
366
|
+
required: false;
|
|
367
|
+
};
|
|
333
368
|
}, "documents">;
|
|
334
369
|
queryDocs: import("@awell-health/extensions-core").Action<{
|
|
335
370
|
patientId: {
|
|
@@ -360,6 +395,13 @@ export declare const actions: {
|
|
|
360
395
|
description: string;
|
|
361
396
|
required: false;
|
|
362
397
|
};
|
|
398
|
+
webhookKey: {
|
|
399
|
+
key: string;
|
|
400
|
+
label: string;
|
|
401
|
+
obfuscated: true;
|
|
402
|
+
description: string;
|
|
403
|
+
required: false;
|
|
404
|
+
};
|
|
363
405
|
}, "downloadStatus" | "downloadTotal" | "downloadSuccessful" | "requestId">;
|
|
364
406
|
getUrl: import("@awell-health/extensions-core").Action<{
|
|
365
407
|
fileName: {
|
|
@@ -384,6 +426,13 @@ export declare const actions: {
|
|
|
384
426
|
description: string;
|
|
385
427
|
required: false;
|
|
386
428
|
};
|
|
429
|
+
webhookKey: {
|
|
430
|
+
key: string;
|
|
431
|
+
label: string;
|
|
432
|
+
obfuscated: true;
|
|
433
|
+
description: string;
|
|
434
|
+
required: false;
|
|
435
|
+
};
|
|
387
436
|
}, "url">;
|
|
388
437
|
startNetworkQuery: import("@awell-health/extensions-core").Action<{
|
|
389
438
|
patientId: {
|
|
@@ -408,6 +457,13 @@ export declare const actions: {
|
|
|
408
457
|
description: string;
|
|
409
458
|
required: false;
|
|
410
459
|
};
|
|
460
|
+
webhookKey: {
|
|
461
|
+
key: string;
|
|
462
|
+
label: string;
|
|
463
|
+
obfuscated: true;
|
|
464
|
+
description: string;
|
|
465
|
+
required: false;
|
|
466
|
+
};
|
|
411
467
|
}, "status" | "requestId">;
|
|
412
468
|
startConsolidatedQuery: import("@awell-health/extensions-core").Action<{
|
|
413
469
|
patientId: {
|
|
@@ -456,6 +512,13 @@ export declare const actions: {
|
|
|
456
512
|
description: string;
|
|
457
513
|
required: false;
|
|
458
514
|
};
|
|
515
|
+
webhookKey: {
|
|
516
|
+
key: string;
|
|
517
|
+
label: string;
|
|
518
|
+
obfuscated: true;
|
|
519
|
+
description: string;
|
|
520
|
+
required: false;
|
|
521
|
+
};
|
|
459
522
|
}, "status" | "requestId">;
|
|
460
523
|
getConsolidatedQueryStatus: import("@awell-health/extensions-core").Action<{
|
|
461
524
|
patientId: {
|
|
@@ -480,7 +543,45 @@ export declare const actions: {
|
|
|
480
543
|
description: string;
|
|
481
544
|
required: false;
|
|
482
545
|
};
|
|
546
|
+
webhookKey: {
|
|
547
|
+
key: string;
|
|
548
|
+
label: string;
|
|
549
|
+
obfuscated: true;
|
|
550
|
+
description: string;
|
|
551
|
+
required: false;
|
|
552
|
+
};
|
|
483
553
|
}, "status" | "queries">;
|
|
554
|
+
getWebhookBundle: import("@awell-health/extensions-core").Action<{
|
|
555
|
+
url: {
|
|
556
|
+
id: string;
|
|
557
|
+
label: string;
|
|
558
|
+
description: string;
|
|
559
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
|
560
|
+
required: true;
|
|
561
|
+
};
|
|
562
|
+
}, {
|
|
563
|
+
apiKey: {
|
|
564
|
+
key: string;
|
|
565
|
+
label: string;
|
|
566
|
+
obfuscated: true;
|
|
567
|
+
description: string;
|
|
568
|
+
required: true;
|
|
569
|
+
};
|
|
570
|
+
baseUrl: {
|
|
571
|
+
key: string;
|
|
572
|
+
label: string;
|
|
573
|
+
obfuscated: false;
|
|
574
|
+
description: string;
|
|
575
|
+
required: false;
|
|
576
|
+
};
|
|
577
|
+
webhookKey: {
|
|
578
|
+
key: string;
|
|
579
|
+
label: string;
|
|
580
|
+
obfuscated: true;
|
|
581
|
+
description: string;
|
|
582
|
+
required: false;
|
|
583
|
+
};
|
|
584
|
+
}, "bundle">;
|
|
484
585
|
removePatientFromCohort: import("@awell-health/extensions-core").Action<{
|
|
485
586
|
cohortId: {
|
|
486
587
|
id: string;
|
|
@@ -511,5 +612,12 @@ export declare const actions: {
|
|
|
511
612
|
description: string;
|
|
512
613
|
required: false;
|
|
513
614
|
};
|
|
615
|
+
webhookKey: {
|
|
616
|
+
key: string;
|
|
617
|
+
label: string;
|
|
618
|
+
obfuscated: true;
|
|
619
|
+
description: string;
|
|
620
|
+
required: false;
|
|
621
|
+
};
|
|
514
622
|
}, "message" | "cohort">;
|
|
515
623
|
};
|
|
@@ -11,6 +11,7 @@ const getUrl_1 = require("./document/getUrl");
|
|
|
11
11
|
const startNetworkQuery_1 = require("./network/startNetworkQuery");
|
|
12
12
|
const startConsolidatedQuery_1 = require("./consolidated/startConsolidatedQuery");
|
|
13
13
|
const getConsolidatedQueryStatus_1 = require("./consolidated/getConsolidatedQueryStatus");
|
|
14
|
+
const getWebhookBundle_1 = require("./webhookBundle/getWebhookBundle");
|
|
14
15
|
const removePatientFromCohort_1 = require("./cohort/removePatientFromCohort");
|
|
15
16
|
exports.actions = {
|
|
16
17
|
getPatient: get_1.getPatient,
|
|
@@ -23,6 +24,7 @@ exports.actions = {
|
|
|
23
24
|
startNetworkQuery: startNetworkQuery_1.startNetworkQuery,
|
|
24
25
|
startConsolidatedQuery: startConsolidatedQuery_1.startConsolidatedQuery,
|
|
25
26
|
getConsolidatedQueryStatus: getConsolidatedQueryStatus_1.getConsolidatedQueryStatus,
|
|
27
|
+
getWebhookBundle: getWebhookBundle_1.getWebhookBundle,
|
|
26
28
|
removePatientFromCohort: removePatientFromCohort_1.removePatientFromCohort,
|
|
27
29
|
};
|
|
28
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/metriport/actions/index.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,6CAAgD;AAChD,6CAAgD;AAChD,6CAAgD;AAChD,0CAA+C;AAC/C,4CAA4C;AAC5C,8CAA0C;AAC1C,mEAA+D;AAC/D,kFAA8E;AAC9E,0FAAsF;AACtF,8EAA0E;AAE7D,QAAA,OAAO,GAAG;IACrB,UAAU,EAAV,gBAAU;IACV,aAAa,EAAb,sBAAa;IACb,aAAa,EAAb,sBAAa;IACb,aAAa,EAAb,sBAAa;IACb,aAAa,EAAb,oBAAa;IACb,SAAS,EAAT,iBAAS;IACT,MAAM,EAAN,eAAM;IACN,iBAAiB,EAAjB,qCAAiB;IACjB,sBAAsB,EAAtB,+CAAsB;IACtB,0BAA0B,EAA1B,uDAA0B;IAC1B,uBAAuB,EAAvB,iDAAuB;CACxB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/metriport/actions/index.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,6CAAgD;AAChD,6CAAgD;AAChD,6CAAgD;AAChD,0CAA+C;AAC/C,4CAA4C;AAC5C,8CAA0C;AAC1C,mEAA+D;AAC/D,kFAA8E;AAC9E,0FAAsF;AACtF,uEAAmE;AACnE,8EAA0E;AAE7D,QAAA,OAAO,GAAG;IACrB,UAAU,EAAV,gBAAU;IACV,aAAa,EAAb,sBAAa;IACb,aAAa,EAAb,sBAAa;IACb,aAAa,EAAb,sBAAa;IACb,aAAa,EAAb,oBAAa;IACb,SAAS,EAAT,iBAAS;IACT,MAAM,EAAN,eAAM;IACN,iBAAiB,EAAjB,qCAAiB;IACjB,sBAAsB,EAAtB,+CAAsB;IACtB,0BAA0B,EAA1B,uDAA0B;IAC1B,gBAAgB,EAAhB,mCAAgB;IAChB,uBAAuB,EAAvB,iDAAuB;CACxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../extensions/metriport/actions/webhookBundle/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Bundle } from '@medplum/fhirtypes';
|
|
2
|
+
/**
|
|
3
|
+
* Downloads the FHIR bundle from a Metriport webhook payload URL. The URL is
|
|
4
|
+
* pre-signed and only valid for 10 minutes.
|
|
5
|
+
* https://docs.metriport.com/medical-api/handling-data/patient-encounter-bundle
|
|
6
|
+
*/
|
|
7
|
+
export declare const fetchBundle: (url: string) => Promise<Bundle>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.fetchBundle = void 0;
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
|
+
/**
|
|
9
|
+
* Downloads the FHIR bundle from a Metriport webhook payload URL. The URL is
|
|
10
|
+
* pre-signed and only valid for 10 minutes.
|
|
11
|
+
* https://docs.metriport.com/medical-api/handling-data/patient-encounter-bundle
|
|
12
|
+
*/
|
|
13
|
+
const fetchBundle = async (url) => {
|
|
14
|
+
const { data } = await axios_1.default.get(url, {
|
|
15
|
+
// The bundle can be large; give it room and expect JSON back.
|
|
16
|
+
responseType: 'json',
|
|
17
|
+
maxContentLength: Infinity,
|
|
18
|
+
maxBodyLength: Infinity,
|
|
19
|
+
});
|
|
20
|
+
return data;
|
|
21
|
+
};
|
|
22
|
+
exports.fetchBundle = fetchBundle;
|
|
23
|
+
//# sourceMappingURL=fetchBundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchBundle.js","sourceRoot":"","sources":["../../../../../extensions/metriport/actions/webhookBundle/fetchBundle.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAGzB;;;;GAIG;AACI,MAAM,WAAW,GAAG,KAAK,EAAE,GAAW,EAAmB,EAAE;IAChE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,eAAK,CAAC,GAAG,CAAS,GAAG,EAAE;QAC5C,8DAA8D;QAC9D,YAAY,EAAE,MAAM;QACpB,gBAAgB,EAAE,QAAQ;QAC1B,aAAa,EAAE,QAAQ;KACxB,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AARY,QAAA,WAAW,eAQvB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fields = void 0;
|
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
|
+
exports.fields = {
|
|
6
|
+
url: {
|
|
7
|
+
id: 'url',
|
|
8
|
+
label: 'Bundle URL',
|
|
9
|
+
description: 'The pre-signed Metriport payload URL to fetch the FHIR bundle from. This is the `bundleUrl` data point emitted by the enrollment webhook. Note: Metriport pre-signed URLs are only valid for 10 minutes, so this action should run shortly after the webhook fires.',
|
|
10
|
+
type: extensions_core_1.FieldType.STRING,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../extensions/metriport/actions/webhookBundle/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,GAAG,EAAE;QACH,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,qQAAqQ;QACvQ,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Action } from '@awell-health/extensions-core';
|
|
2
|
+
import { type settings } from '../../settings';
|
|
3
|
+
import { fields } from './fields';
|
|
4
|
+
import { dataPoints } from './dataPoints';
|
|
5
|
+
export declare const getWebhookBundle: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWebhookBundle = void 0;
|
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
|
+
const errorHandler_1 = require("../../shared/errorHandler");
|
|
6
|
+
const fields_1 = require("./fields");
|
|
7
|
+
const validation_1 = require("./validation");
|
|
8
|
+
const dataPoints_1 = require("./dataPoints");
|
|
9
|
+
const fetchBundle_1 = require("./fetchBundle");
|
|
10
|
+
exports.getWebhookBundle = {
|
|
11
|
+
key: 'getWebhookBundle',
|
|
12
|
+
category: extensions_core_1.Category.EHR_INTEGRATIONS,
|
|
13
|
+
title: 'Get Webhook Bundle',
|
|
14
|
+
description: 'Fetches the FHIR bundle from a Metriport webhook payload URL (e.g. the Encounter Bundle from an ADT notification, or a discharge summary). The URL is provided by the enrollment webhook on the `bundleUrl` data point and is only valid for 10 minutes.',
|
|
15
|
+
fields: fields_1.fields,
|
|
16
|
+
previewable: true,
|
|
17
|
+
supports_automated_retries: true,
|
|
18
|
+
dataPoints: dataPoints_1.dataPoints,
|
|
19
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
|
20
|
+
try {
|
|
21
|
+
const { url } = validation_1.getWebhookBundleSchema.parse(payload.fields);
|
|
22
|
+
const bundle = await (0, fetchBundle_1.fetchBundle)(url);
|
|
23
|
+
await onComplete({
|
|
24
|
+
data_points: {
|
|
25
|
+
bundle: JSON.stringify(bundle),
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
await (0, errorHandler_1.handleErrorMessage)(err, onError);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=getWebhookBundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWebhookBundle.js","sourceRoot":"","sources":["../../../../../extensions/metriport/actions/webhookBundle/getWebhookBundle.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,4DAA8D;AAC9D,qCAAiC;AACjC,6CAAqD;AACrD,6CAAyC;AACzC,+CAA2C;AAE9B,QAAA,gBAAgB,GAIzB;IACF,GAAG,EAAE,kBAAkB;IACvB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,0PAA0P;IAC5P,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,0BAA0B,EAAE,IAAI;IAChC,UAAU,EAAV,uBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,EAAE,GAAG,mCAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YAE5D,MAAM,MAAM,GAAG,MAAM,IAAA,yBAAW,EAAC,GAAG,CAAC,CAAA;YAErC,MAAM,UAAU,CAAC;gBACf,WAAW,EAAE;oBACX,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;iBAC/B;aACF,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,IAAA,iCAAkB,EAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;CACF,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWebhookBundleSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.getWebhookBundleSchema = zod_1.z.object({
|
|
6
|
+
url: zod_1.z
|
|
7
|
+
.string({ errorMap: () => ({ message: 'Missing url' }) })
|
|
8
|
+
.trim()
|
|
9
|
+
.url({ message: 'A valid bundle URL is required' }),
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../../extensions/metriport/actions/webhookBundle/validation.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,GAAG,EAAE,OAAC;SACH,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;SACxD,IAAI,EAAE;SACN,GAAG,CAAC,EAAE,OAAO,EAAE,gCAAgC,EAAE,CAAC;CACtD,CAAC,CAAA"}
|
|
@@ -4,7 +4,7 @@ exports.Metriport = void 0;
|
|
|
4
4
|
const actions_1 = require("./actions");
|
|
5
5
|
const settings_1 = require("./settings");
|
|
6
6
|
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
7
|
-
|
|
7
|
+
const webhooks_1 = require("./webhooks");
|
|
8
8
|
exports.Metriport = {
|
|
9
9
|
key: 'metriport',
|
|
10
10
|
title: 'Metriport',
|
|
@@ -17,6 +17,6 @@ exports.Metriport = {
|
|
|
17
17
|
},
|
|
18
18
|
settings: settings_1.settings,
|
|
19
19
|
actions: actions_1.actions,
|
|
20
|
-
|
|
20
|
+
webhooks: webhooks_1.webhooks,
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/metriport/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,yCAAqC;AACrC,mEAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/metriport/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,yCAAqC;AACrC,mEAAoE;AACpE,yCAAqC;AAExB,QAAA,SAAS,GAAc;IAClC,GAAG,EAAE,WAAW;IAChB,KAAK,EAAE,WAAW;IAClB,WAAW,EACT,qHAAqH;IACvH,QAAQ,EACN,gGAAgG;IAClG,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,QAAQ;QAC/B,UAAU,EAAE,WAAW;KACxB;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAP,iBAAO;IACP,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
|
|
@@ -16,5 +16,12 @@ exports.settings = {
|
|
|
16
16
|
description: 'The base URL of the Metriport Medical API.',
|
|
17
17
|
required: false,
|
|
18
18
|
},
|
|
19
|
+
webhookKey: {
|
|
20
|
+
key: 'webhookKey',
|
|
21
|
+
label: 'Webhook Key',
|
|
22
|
+
obfuscated: true,
|
|
23
|
+
description: 'The Metriport webhook key used to verify incoming webhook requests. Metriport signs each request with an HMAC-SHA256 of the raw body using this key, sent in the `x-metriport-signature` header. Found in the Settings/Developers tab of the Metriport dashboard. When left empty, incoming webhook requests are not verified.',
|
|
24
|
+
required: false,
|
|
25
|
+
},
|
|
19
26
|
};
|
|
20
27
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/metriport/settings.ts"],"names":[],"mappings":";;;AAEa,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,4CAA4C;QACzD,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,4CAA4C;QACzD,QAAQ,EAAE,KAAK;KAChB;CACgC,CAAA"}
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/metriport/settings.ts"],"names":[],"mappings":";;;AAEa,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,4CAA4C;QACzD,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,4CAA4C;QACzD,QAAQ,EAAE,KAAK;KAChB;IACD,UAAU,EAAE;QACV,GAAG,EAAE,YAAY;QACjB,KAAK,EAAE,aAAa;QACpB,UAAU,EAAE,IAAI;QAChB,WAAW,EACT,gUAAgU;QAClU,QAAQ,EAAE,KAAK;KAChB;CACgC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type IncomingHttpHeaders } from 'http';
|
|
2
|
+
/**
|
|
3
|
+
* The header Metriport uses to deliver the webhook signature.
|
|
4
|
+
* https://docs.metriport.com/medical-api/getting-started/webhooks#authentication
|
|
5
|
+
*/
|
|
6
|
+
export declare const METRIPORT_SIGNATURE_HEADER = "x-metriport-signature";
|
|
7
|
+
/**
|
|
8
|
+
* Extracts the signature from the request headers, normalising the
|
|
9
|
+
* `string | string[] | undefined` type that `IncomingHttpHeaders` allows.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getSignatureFromHeaders: (headers: IncomingHttpHeaders) => string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Verifies a Metriport webhook request.
|
|
14
|
+
*
|
|
15
|
+
* Metriport signs each request with an HMAC-SHA256 of the raw request body
|
|
16
|
+
* using the webhook key, delivered in the `x-metriport-signature` header. The
|
|
17
|
+
* hash must be computed over the raw body (never the re-serialized payload),
|
|
18
|
+
* which is why this takes the `rawBody` buffer.
|
|
19
|
+
* https://docs.metriport.com/medical-api/getting-started/webhooks#authentication
|
|
20
|
+
*
|
|
21
|
+
* @returns `true` if the request is authorized: either no webhook key is
|
|
22
|
+
* configured (verification disabled) or the signature is present and valid.
|
|
23
|
+
* `false` when a key is configured but the signature is missing or invalid.
|
|
24
|
+
*/
|
|
25
|
+
export declare const isWebhookRequestAuthorized: ({ webhookKey, rawBody, headers, }: {
|
|
26
|
+
webhookKey: string | undefined;
|
|
27
|
+
rawBody: Buffer;
|
|
28
|
+
headers: IncomingHttpHeaders;
|
|
29
|
+
}) => boolean;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isWebhookRequestAuthorized = exports.getSignatureFromHeaders = exports.METRIPORT_SIGNATURE_HEADER = void 0;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
const api_sdk_1 = require("@metriport/api-sdk");
|
|
6
|
+
/**
|
|
7
|
+
* The header Metriport uses to deliver the webhook signature.
|
|
8
|
+
* https://docs.metriport.com/medical-api/getting-started/webhooks#authentication
|
|
9
|
+
*/
|
|
10
|
+
exports.METRIPORT_SIGNATURE_HEADER = 'x-metriport-signature';
|
|
11
|
+
/**
|
|
12
|
+
* Extracts the signature from the request headers, normalising the
|
|
13
|
+
* `string | string[] | undefined` type that `IncomingHttpHeaders` allows.
|
|
14
|
+
*/
|
|
15
|
+
const getSignatureFromHeaders = (headers) => {
|
|
16
|
+
const header = headers[exports.METRIPORT_SIGNATURE_HEADER];
|
|
17
|
+
return Array.isArray(header) ? header[0] : header;
|
|
18
|
+
};
|
|
19
|
+
exports.getSignatureFromHeaders = getSignatureFromHeaders;
|
|
20
|
+
/**
|
|
21
|
+
* Verifies a Metriport webhook request.
|
|
22
|
+
*
|
|
23
|
+
* Metriport signs each request with an HMAC-SHA256 of the raw request body
|
|
24
|
+
* using the webhook key, delivered in the `x-metriport-signature` header. The
|
|
25
|
+
* hash must be computed over the raw body (never the re-serialized payload),
|
|
26
|
+
* which is why this takes the `rawBody` buffer.
|
|
27
|
+
* https://docs.metriport.com/medical-api/getting-started/webhooks#authentication
|
|
28
|
+
*
|
|
29
|
+
* @returns `true` if the request is authorized: either no webhook key is
|
|
30
|
+
* configured (verification disabled) or the signature is present and valid.
|
|
31
|
+
* `false` when a key is configured but the signature is missing or invalid.
|
|
32
|
+
*/
|
|
33
|
+
const isWebhookRequestAuthorized = ({ webhookKey, rawBody, headers, }) => {
|
|
34
|
+
// When no webhook key is configured, signature verification is disabled.
|
|
35
|
+
if ((0, lodash_1.isNil)(webhookKey) || webhookKey.length === 0) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
const signature = (0, exports.getSignatureFromHeaders)(headers);
|
|
39
|
+
if ((0, lodash_1.isNil)(signature) || signature.length === 0) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return api_sdk_1.MetriportMedicalApi.verifyWebhookSignature(webhookKey, rawBody, signature);
|
|
43
|
+
};
|
|
44
|
+
exports.isWebhookRequestAuthorized = isWebhookRequestAuthorized;
|
|
45
|
+
//# sourceMappingURL=verifyWebhookSignature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyWebhookSignature.js","sourceRoot":"","sources":["../../../../extensions/metriport/shared/verifyWebhookSignature.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAE9B,gDAAwD;AAExD;;;GAGG;AACU,QAAA,0BAA0B,GAAG,uBAAuB,CAAA;AAEjE;;;GAGG;AACI,MAAM,uBAAuB,GAAG,CACrC,OAA4B,EACR,EAAE;IACtB,MAAM,MAAM,GAAG,OAAO,CAAC,kCAA0B,CAAC,CAAA;IAClD,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;AACnD,CAAC,CAAA;AALY,QAAA,uBAAuB,2BAKnC;AAED;;;;;;;;;;;;GAYG;AACI,MAAM,0BAA0B,GAAG,CAAC,EACzC,UAAU,EACV,OAAO,EACP,OAAO,GAKR,EAAW,EAAE;IACZ,yEAAyE;IACzE,IAAI,IAAA,cAAK,EAAC,UAAU,CAAC,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,SAAS,GAAG,IAAA,+BAAuB,EAAC,OAAO,CAAC,CAAA;IAClD,IAAI,IAAA,cAAK,EAAC,SAAS,CAAC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,6BAAmB,CAAC,sBAAsB,CAC/C,UAAU,EACV,OAAO,EACP,SAAS,CACV,CAAA;AACH,CAAC,CAAA;AAxBY,QAAA,0BAA0B,8BAwBtC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type Webhook } from '@awell-health/extensions-core';
|
|
2
|
+
import { type settings } from '../settings';
|
|
3
|
+
import { type MetriportEnrollmentWebhookPayload } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* The identifier system used to enroll a patient based on their Metriport
|
|
6
|
+
* patient ID.
|
|
7
|
+
*/
|
|
8
|
+
export declare const METRIPORT_PATIENT_IDENTIFIER_SYSTEM = "https://metriport.com/fhir/patient";
|
|
9
|
+
declare const dataPoints: {
|
|
10
|
+
eventType: {
|
|
11
|
+
key: string;
|
|
12
|
+
valueType: "string";
|
|
13
|
+
};
|
|
14
|
+
metriportPatientId: {
|
|
15
|
+
key: string;
|
|
16
|
+
valueType: "string";
|
|
17
|
+
};
|
|
18
|
+
externalId: {
|
|
19
|
+
key: string;
|
|
20
|
+
valueType: "string";
|
|
21
|
+
};
|
|
22
|
+
admitTimestamp: {
|
|
23
|
+
key: string;
|
|
24
|
+
valueType: "date";
|
|
25
|
+
};
|
|
26
|
+
whenSourceSent: {
|
|
27
|
+
key: string;
|
|
28
|
+
valueType: "date";
|
|
29
|
+
};
|
|
30
|
+
messageId: {
|
|
31
|
+
key: string;
|
|
32
|
+
valueType: "string";
|
|
33
|
+
};
|
|
34
|
+
bundleUrl: {
|
|
35
|
+
key: string;
|
|
36
|
+
valueType: "string";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare const enrollment: Webhook<keyof typeof dataPoints, MetriportEnrollmentWebhookPayload, typeof settings>;
|
|
40
|
+
export type Enrollment = typeof enrollment;
|
|
41
|
+
export {};
|