@awell-health/awell-extensions 2.1.141 → 2.1.142
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 +1 -1
- package/dist/extensions/metriport/actions/cohort/dataPoints.d.ts +10 -0
- package/dist/extensions/metriport/actions/cohort/dataPoints.js +14 -0
- package/dist/extensions/metriport/actions/cohort/dataPoints.js.map +1 -0
- package/dist/extensions/metriport/actions/cohort/fields.d.ts +17 -0
- package/dist/extensions/metriport/actions/cohort/fields.js +21 -0
- package/dist/extensions/metriport/actions/cohort/fields.js.map +1 -0
- package/dist/extensions/metriport/actions/cohort/removePatientFromCohort.d.ts +5 -0
- package/dist/extensions/metriport/actions/cohort/removePatientFromCohort.js +40 -0
- package/dist/extensions/metriport/actions/cohort/removePatientFromCohort.js.map +1 -0
- package/dist/extensions/metriport/actions/index.d.ts +31 -0
- package/dist/extensions/metriport/actions/index.js +2 -0
- package/dist/extensions/metriport/actions/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -160,7 +160,7 @@
|
|
|
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## 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",
|
|
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
164
|
"changelog": "# Metriport changelog"
|
|
165
165
|
},
|
|
166
166
|
"nexuzhealth": {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removePatientFromCohortDataPoints = void 0;
|
|
4
|
+
exports.removePatientFromCohortDataPoints = {
|
|
5
|
+
message: {
|
|
6
|
+
key: 'message',
|
|
7
|
+
valueType: 'string',
|
|
8
|
+
},
|
|
9
|
+
cohort: {
|
|
10
|
+
key: 'cohort',
|
|
11
|
+
valueType: 'json',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=dataPoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../extensions/metriport/actions/cohort/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,iCAAiC,GAAG;IAC/C,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,SAAS,EAAE,QAAQ;KACpB;IACD,MAAM,EAAE;QACN,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,MAAM;KAClB;CAC4C,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
|
2
|
+
export declare const removePatientFromCohortFields: {
|
|
3
|
+
cohortId: {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description: string;
|
|
7
|
+
type: FieldType.STRING;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
patientId: {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
description: string;
|
|
14
|
+
type: FieldType.STRING;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removePatientFromCohortFields = void 0;
|
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
|
+
exports.removePatientFromCohortFields = {
|
|
6
|
+
cohortId: {
|
|
7
|
+
id: 'cohortId',
|
|
8
|
+
label: 'Cohort ID',
|
|
9
|
+
description: 'The ID of the cohort to remove the Patient from',
|
|
10
|
+
type: extensions_core_1.FieldType.STRING,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
patientId: {
|
|
14
|
+
id: 'patientId',
|
|
15
|
+
label: 'Patient ID',
|
|
16
|
+
description: 'The Metriport ID of the Patient to remove from the cohort',
|
|
17
|
+
type: extensions_core_1.FieldType.STRING,
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../extensions/metriport/actions/cohort/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAExD,QAAA,6BAA6B,GAAG;IAC3C,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,iDAAiD;QAC9D,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,2DAA2D;QACxE,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 { removePatientFromCohortFields } from './fields';
|
|
4
|
+
import { removePatientFromCohortDataPoints as dataPoints } from './dataPoints';
|
|
5
|
+
export declare const removePatientFromCohort: Action<typeof removePatientFromCohortFields, typeof settings, keyof typeof dataPoints>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removePatientFromCohort = void 0;
|
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
|
+
const client_1 = require("../../client");
|
|
6
|
+
const errorHandler_1 = require("../../shared/errorHandler");
|
|
7
|
+
const generic_zod_1 = require("../../validation/generic.zod");
|
|
8
|
+
const fields_1 = require("./fields");
|
|
9
|
+
const dataPoints_1 = require("./dataPoints");
|
|
10
|
+
exports.removePatientFromCohort = {
|
|
11
|
+
key: 'removePatientFromCohort',
|
|
12
|
+
category: extensions_core_1.Category.EHR_INTEGRATIONS,
|
|
13
|
+
title: 'Remove Patient from Cohort',
|
|
14
|
+
description: 'Removes the specified Patient from a cohort.',
|
|
15
|
+
fields: fields_1.removePatientFromCohortFields,
|
|
16
|
+
previewable: true,
|
|
17
|
+
supports_automated_retries: true,
|
|
18
|
+
dataPoints: dataPoints_1.removePatientFromCohortDataPoints,
|
|
19
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
|
20
|
+
try {
|
|
21
|
+
const cohortId = generic_zod_1.stringId.parse(payload.fields.cohortId);
|
|
22
|
+
const patientId = generic_zod_1.stringId.parse(payload.fields.patientId);
|
|
23
|
+
const api = (0, client_1.createMetriportApi)(payload.settings);
|
|
24
|
+
const { message, cohort } = await api.removePatientsFromCohort({
|
|
25
|
+
cohortId,
|
|
26
|
+
patientIds: [patientId],
|
|
27
|
+
});
|
|
28
|
+
await onComplete({
|
|
29
|
+
data_points: {
|
|
30
|
+
message,
|
|
31
|
+
cohort: JSON.stringify(cohort),
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
await (0, errorHandler_1.handleErrorMessage)(err, onError);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=removePatientFromCohort.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removePatientFromCohort.js","sourceRoot":"","sources":["../../../../../extensions/metriport/actions/cohort/removePatientFromCohort.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AAExD,yCAAiD;AACjD,4DAA8D;AAC9D,8DAAuD;AACvD,qCAAwD;AACxD,6CAA8E;AAEjE,QAAA,uBAAuB,GAIhC;IACF,GAAG,EAAE,yBAAyB;IAC9B,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,4BAA4B;IACnC,WAAW,EAAE,8CAA8C;IAC3D,MAAM,EAAE,sCAA6B;IACrC,WAAW,EAAE,IAAI;IACjB,0BAA0B,EAAE,IAAI;IAChC,UAAU,EAAV,8CAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,sBAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;YACxD,MAAM,SAAS,GAAG,sBAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;YAE1D,MAAM,GAAG,GAAG,IAAA,2BAAkB,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;YAChD,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,wBAAwB,CAAC;gBAC7D,QAAQ;gBACR,UAAU,EAAE,CAAC,SAAS,CAAC;aACxB,CAAC,CAAA;YAEF,MAAM,UAAU,CAAC;gBACf,WAAW,EAAE;oBACX,OAAO;oBACP,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"}
|
|
@@ -481,4 +481,35 @@ export declare const actions: {
|
|
|
481
481
|
required: false;
|
|
482
482
|
};
|
|
483
483
|
}, "status" | "queries">;
|
|
484
|
+
removePatientFromCohort: import("@awell-health/extensions-core").Action<{
|
|
485
|
+
cohortId: {
|
|
486
|
+
id: string;
|
|
487
|
+
label: string;
|
|
488
|
+
description: string;
|
|
489
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
|
490
|
+
required: true;
|
|
491
|
+
};
|
|
492
|
+
patientId: {
|
|
493
|
+
id: string;
|
|
494
|
+
label: string;
|
|
495
|
+
description: string;
|
|
496
|
+
type: import("@awell-health/extensions-core").FieldType.STRING;
|
|
497
|
+
required: true;
|
|
498
|
+
};
|
|
499
|
+
}, {
|
|
500
|
+
apiKey: {
|
|
501
|
+
key: string;
|
|
502
|
+
label: string;
|
|
503
|
+
obfuscated: true;
|
|
504
|
+
description: string;
|
|
505
|
+
required: true;
|
|
506
|
+
};
|
|
507
|
+
baseUrl: {
|
|
508
|
+
key: string;
|
|
509
|
+
label: string;
|
|
510
|
+
obfuscated: false;
|
|
511
|
+
description: string;
|
|
512
|
+
required: false;
|
|
513
|
+
};
|
|
514
|
+
}, "message" | "cohort">;
|
|
484
515
|
};
|
|
@@ -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 removePatientFromCohort_1 = require("./cohort/removePatientFromCohort");
|
|
14
15
|
exports.actions = {
|
|
15
16
|
getPatient: get_1.getPatient,
|
|
16
17
|
createPatient: create_1.createPatient,
|
|
@@ -22,5 +23,6 @@ exports.actions = {
|
|
|
22
23
|
startNetworkQuery: startNetworkQuery_1.startNetworkQuery,
|
|
23
24
|
startConsolidatedQuery: startConsolidatedQuery_1.startConsolidatedQuery,
|
|
24
25
|
getConsolidatedQueryStatus: getConsolidatedQueryStatus_1.getConsolidatedQueryStatus,
|
|
26
|
+
removePatientFromCohort: removePatientFromCohort_1.removePatientFromCohort,
|
|
25
27
|
};
|
|
26
28
|
//# 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;
|
|
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"}
|