@awell-health/awell-extensions 2.0.146 → 2.0.148
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/constructPrivateKey.d.ts +6 -0
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/constructPrivateKey.js +15 -0
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/constructPrivateKey.js.map +1 -0
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/index.d.ts +1 -0
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/index.js +6 -0
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/index.js.map +1 -0
- package/dist/extensions/epic/settings.d.ts +6 -1
- package/dist/extensions/epic/settings.js +7 -1
- package/dist/extensions/epic/settings.js.map +1 -1
- package/dist/extensions/markdown.json +1 -1
- package/package.json +1 -1
@@ -0,0 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* Transforms a single-line private key with explicit \n into a properly formatted private key.
|
3
|
+
* @param inputKey - The single-line private key string.
|
4
|
+
* @returns The correctly formatted private key string.
|
5
|
+
*/
|
6
|
+
export declare const constructPrivateKey: (privateKey: string) => string;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.constructPrivateKey = void 0;
|
4
|
+
/**
|
5
|
+
* Transforms a single-line private key with explicit \n into a properly formatted private key.
|
6
|
+
* @param inputKey - The single-line private key string.
|
7
|
+
* @returns The correctly formatted private key string.
|
8
|
+
*/
|
9
|
+
const constructPrivateKey = (privateKey) => {
|
10
|
+
// Replace explicit \n with actual newlines
|
11
|
+
const formattedKey = privateKey.replace(/\\n/g, '\n');
|
12
|
+
return formattedKey;
|
13
|
+
};
|
14
|
+
exports.constructPrivateKey = constructPrivateKey;
|
15
|
+
//# sourceMappingURL=constructPrivateKey.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constructPrivateKey.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/auth/constructPrivateKey/constructPrivateKey.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACI,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAU,EAAE;IAChE,2CAA2C;IAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAErD,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA;AALY,QAAA,mBAAmB,uBAK/B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { constructPrivateKey } from './constructPrivateKey';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.constructPrivateKey = void 0;
|
4
|
+
var constructPrivateKey_1 = require("./constructPrivateKey");
|
5
|
+
Object.defineProperty(exports, "constructPrivateKey", { enumerable: true, get: function () { return constructPrivateKey_1.constructPrivateKey; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/auth/constructPrivateKey/index.ts"],"names":[],"mappings":";;;AAAA,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA"}
|
@@ -33,7 +33,12 @@ export declare const SettingsValidationSchema: z.ZodObject<{
|
|
33
33
|
baseUrl: z.ZodString;
|
34
34
|
authUrl: z.ZodString;
|
35
35
|
clientId: z.ZodString;
|
36
|
-
|
36
|
+
/**
|
37
|
+
* Private keys turn out to be sensitive to formatting (newlines, etc.)
|
38
|
+
* But in Studio, a user can only enter the value of a setting in a single line.
|
39
|
+
* So we need to transform the value to the correct format here.
|
40
|
+
*/
|
41
|
+
privateKey: z.ZodEffects<z.ZodString, string, string>;
|
37
42
|
}, "strip", z.ZodTypeAny, {
|
38
43
|
authUrl: string;
|
39
44
|
baseUrl: string;
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.SettingsValidationSchema = exports.settings = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
+
const constructPrivateKey_1 = require("./lib/api/auth/constructPrivateKey");
|
5
6
|
exports.settings = {
|
6
7
|
baseUrl: {
|
7
8
|
key: 'baseUrl',
|
@@ -36,6 +37,11 @@ exports.SettingsValidationSchema = zod_1.z.object({
|
|
36
37
|
baseUrl: zod_1.z.string().min(1),
|
37
38
|
authUrl: zod_1.z.string().min(1),
|
38
39
|
clientId: zod_1.z.string().min(1),
|
39
|
-
|
40
|
+
/**
|
41
|
+
* Private keys turn out to be sensitive to formatting (newlines, etc.)
|
42
|
+
* But in Studio, a user can only enter the value of a setting in a single line.
|
43
|
+
* So we need to transform the value to the correct format here.
|
44
|
+
*/
|
45
|
+
privateKey: zod_1.z.string().min(1).transform(constructPrivateKey_1.constructPrivateKey),
|
40
46
|
});
|
41
47
|
//# sourceMappingURL=settings.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/epic/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/epic/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AACxC,4EAAwE;AAE3D,QAAA,QAAQ,GAAG;IACtB,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;QACjB,WAAW,EACT,uFAAuF;KAC1F;IACD,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;QACjB,WAAW,EACT,gGAAgG;KACnG;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,qDAAqD;KACnE;IACD,UAAU,EAAE;QACV,GAAG,EAAE,YAAY;QACjB,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,uDAAuD;KACrE;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B;;;;OAIG;IACH,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,yCAAmB,CAAC;CACT,CAAC,CAAA"}
|
@@ -60,7 +60,7 @@
|
|
60
60
|
"changelog": "# Elation Changelog\n\n## January 30, 2024\n\n- New actions\n - Post letter: Using patient and practice identifier, post a new letter to either Provider, Patient or associate it with an existing Referral.\n\n## October 3, 2023\n\n- The README is now more concise with less unneeded detail. A section on the particularities of Elation subscriptions (webhooks) was added.\n- Misc. updates to labels, descriptions, action fields order\n- Action updates\n - Create Non-Visit Note:\n - Simplify the action by removing some optional action fields (we can always expand later)\n - `document_date` and `chart_date` are now automatically set to the date of today so that the corresponding action fields could be removed\n - Create patient\n - `dob` is now a `date` field type (was a string)\n - You can pass a mobile phone number and email when creating a patient\n - Find physician\n - Only returns the physician ID instead of all the details of the physician. To retrieve the details one can use the new `Get physician` action\n - Update patient\n - `dob` is now a `date` field type (was a string)\n - We are now using `PATCH` instead of `PUT` which allows for a partial update, i.e. only update the fields that are needed.\n- New actions\n - Get physician: Using a physician identifier, retrieve a physician object from Elation.\n- Removed actions\n - Update Non-Visit Note\n- Webhooks\n - Fix the type of `patientId` in `patientCreatedOrUpdated` webhook\n - Added `appointmentCreatedOrUpdated` webhook\n\n## September 4, 2023\n\n- rename `onCreatePatient` webhook to `patientCreatedOrUpdated`\n- filter non `saved` actions for this webhook\n\n## August 21, 2023\n\n- make non-visit note text a large input (`StringType.TEXT`)\n\n## May 23, 2024\n\n- add patient_status.status to patient object in getPatient action\n- add status to updatePatient action\n"
|
61
61
|
},
|
62
62
|
"epic": {
|
63
|
-
"readme": "---\ntitle: Epic\ndescription: Epic is
|
63
|
+
"readme": "---\ntitle: Epic\ndescription: Epic is an Electronic Health Records (EHR) system for healthcare organizations, hospitals and large practices.\n---\n\n# Epic\n\nEpic is an Electronic Health Records (EHR) system for healthcare organizations, hospitals and large practices.\n\n## Introduction\n\n### Integration landscape\n\nEpic provides a comprehensive range of interfaces for integration. We've grouped them into four key categories:\n\n1. **Read**: Retrieve data from Epic (e.g., patient demographics). \n2. **Write**: Send data to Epic (e.g., create a patient, create a document). \n3. **Subscriptions/Events**: Subscribe to events in Epic. \n4. **Embedded Apps**: Embed applications within Epic, SSO launch, and more (typically via SMART-on-FHIR). \n\nEach category offers multiple interfaces tailored to specific workflows and use cases.\n\nWe seamlessly integrates with Epic across all categories using industry-standard protocols like HL7, FHIR, and proprietary APIs. We prioritize trust and flexibility, supporting both REST and non-REST interfaces to meet your organization's needs.\n\n### The Epic extension\n\nThe **Epic Extension** is designed to support **Read** and **Write** integrations via [SMART Backend Services](https://fhir.epic.com/Documentation?docId=oauth2§ion=BackendOAuth2Guide). These integrations are server-to-server (backend) and do not require direct user interaction—whether from patients or practitioners.\n\nThe extension supports a variety of REST-based interfaces, including:\n\n- Vendor Services API\n- FHIR R4\n- FHIR DSTU2\n- FHIR STU3\n\nIn addition to REST interfaces, Epic also supports non-REST standards like HL7, enabling tasks such as querying patient demographics (ADR A19) or creating documents (ORU messages). **Awell supports these non-REST standards as well.** However, the Epic Extension focuses specifically on REST-based interfaces.\n\n## Setup\n\nTo set up the Epic Extension in Awell, you’ll need to configure the following:\n\n- **Base URL**: The Epic instance's base URL (e.g., `https://fhir.epic.com/interconnect-fhir-oauth/api/`). \n- **Auth URL**: The URL for obtaining access tokens (e.g., `https://fhir.epic.com/interconnect-fhir-oauth/oauth2/token`). \n- **Client ID**: The client ID of Awell’s registered Epic application. \n- **Private Key**: The private key for the application, formatted as a single string with new lines explicitly indicated by `\\n`.\n\n**Example of Private Key Format**:\n`-----BEGIN PRIVATE KEY-----\\naaaaaaa\\nbbbbb\\n-----END PRIVATE KEY-----`\n\n## Actions\n\n### Get patient (R4)\n\nRetrieve a patient’s details using their FHIR resource ID. This action returns the full FHIR Patient resource.\n\n### Match patient (R4)\n\nFind a patient using demographic data. The action returns a matching Patient resource **only if a single high-confidence match is found**. \n\n- If multiple high-confidence matches or no matches are found, the action fails. \n- This uses the `Patient.$match` (R4) operation, recommended for backend-to-backend integrations (learn more: [Epic Documentation](https://fhir.epic.com/Sandbox?api=10423)).\n\nThe action will return the FHIR resource ID of the matched patient.\n\n### Create patient (R4)\n\nAdd a new patient to Epic using demographic information. Required fields include: \n\n- SSN\n- Given name\n- Family name\n- Gender\n- Birth date\n\nWhile optional, including an email address is highly recommended to improve accuracy when matching patients in the future. \n\nThe action will return the FHIR resource ID of the created patient.\n\n### Get appointment\n\nRetrieve details of a specific appointment using its FHIR resource ID. The action returns the full FHIR Appointment resource.\n\n### Create clinical note (R4)\n\nCreate a clinical document in Epic. Required fields include:\n\n- **Patient resource ID**: The patient’s FHIR resource ID. \n- **Encounter resource ID**: The related encounter’s FHIR resource ID (currently required; [Pre-Charting support is coming February 2025](https://fhir.epic.com/Sandbox?api=1046)). \n- **Document status**: The status of the document. \n- **Document type**: The type of the document. \n- **Document content**: The content of the document. \n\nThe action will return the FHIR resource ID of the created document.\n\n",
|
64
64
|
"changelog": "# Epic changelog"
|
65
65
|
},
|
66
66
|
"experimental": {
|