@awell-health/awell-extensions 2.0.174 → 2.0.176
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/cerner/actions/createDocument/__testdata__/CreateDocument.mock.d.ts +8 -0
- package/dist/extensions/cerner/actions/createDocument/__testdata__/CreateDocument.mock.js +12 -0
- package/dist/extensions/cerner/actions/createDocument/__testdata__/CreateDocument.mock.js.map +1 -0
- package/dist/extensions/cerner/actions/createDocument/config/datapoints.d.ts +6 -0
- package/dist/extensions/cerner/actions/createDocument/config/datapoints.js +10 -0
- package/dist/extensions/cerner/actions/createDocument/config/datapoints.js.map +1 -0
- package/dist/extensions/cerner/actions/createDocument/config/fields.d.ts +52 -0
- package/dist/extensions/cerner/actions/createDocument/config/fields.js +51 -0
- package/dist/extensions/cerner/actions/createDocument/config/fields.js.map +1 -0
- package/dist/extensions/cerner/actions/createDocument/config/index.d.ts +2 -0
- package/dist/extensions/cerner/actions/createDocument/config/index.js +9 -0
- package/dist/extensions/cerner/actions/createDocument/config/index.js.map +1 -0
- package/dist/extensions/cerner/actions/createDocument/createDocument.d.ts +4 -0
- package/dist/extensions/cerner/actions/createDocument/createDocument.js +90 -0
- package/dist/extensions/cerner/actions/createDocument/createDocument.js.map +1 -0
- package/dist/extensions/cerner/actions/createDocument/index.d.ts +1 -0
- package/dist/extensions/cerner/actions/createDocument/index.js +6 -0
- package/dist/extensions/cerner/actions/createDocument/index.js.map +1 -0
- package/dist/extensions/cerner/actions/createPatient/__testdata__/CreateFhirPatient.mock.js +1 -1
- package/dist/extensions/cerner/actions/createPatient/__testdata__/CreateFhirPatient.mock.js.map +1 -1
- package/dist/extensions/cerner/actions/createPatient/config/fields.d.ts +22 -12
- package/dist/extensions/cerner/actions/createPatient/config/fields.js +15 -7
- package/dist/extensions/cerner/actions/createPatient/config/fields.js.map +1 -1
- package/dist/extensions/cerner/actions/createPatient/createPatient.js +34 -10
- package/dist/extensions/cerner/actions/createPatient/createPatient.js.map +1 -1
- package/dist/extensions/cerner/actions/findPatientByMRN/__testdata__/FhirPatientMatch.mock.d.ts +98 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/__testdata__/FhirPatientMatch.mock.js +127 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/__testdata__/FhirPatientMatch.mock.js.map +1 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/__testdata__/FhirPatientNoMatch.mock.d.ts +10 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/__testdata__/FhirPatientNoMatch.mock.js +16 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/__testdata__/FhirPatientNoMatch.mock.js.map +1 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/__testdata__/index.d.ts +2 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/__testdata__/index.js +19 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/__testdata__/index.js.map +1 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/config/datapoints.d.ts +6 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/config/datapoints.js +10 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/config/datapoints.js.map +1 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/config/fields.d.ts +18 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/config/fields.js +21 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/config/fields.js.map +1 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/config/index.d.ts +2 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/config/index.js +9 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/config/index.js.map +1 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/findPatientByMRN.d.ts +4 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/findPatientByMRN.js +55 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/findPatientByMRN.js.map +1 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/index.d.ts +1 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/index.js +6 -0
- package/dist/extensions/cerner/actions/findPatientByMRN/index.js.map +1 -0
- package/dist/extensions/cerner/actions/getAppointment/__testdata__/GetAppointment.mock.d.ts +103 -0
- package/dist/extensions/cerner/actions/getAppointment/__testdata__/GetAppointment.mock.js +134 -0
- package/dist/extensions/cerner/actions/getAppointment/__testdata__/GetAppointment.mock.js.map +1 -0
- package/dist/extensions/cerner/actions/getAppointment/config/datapoints.d.ts +22 -0
- package/dist/extensions/cerner/actions/getAppointment/config/datapoints.js +26 -0
- package/dist/extensions/cerner/actions/getAppointment/config/datapoints.js.map +1 -0
- package/dist/extensions/cerner/actions/getAppointment/config/fields.d.ts +18 -0
- package/dist/extensions/cerner/actions/getAppointment/config/fields.js +21 -0
- package/dist/extensions/cerner/actions/getAppointment/config/fields.js.map +1 -0
- package/dist/extensions/cerner/actions/getAppointment/config/index.d.ts +2 -0
- package/dist/extensions/cerner/actions/getAppointment/config/index.js +9 -0
- package/dist/extensions/cerner/actions/getAppointment/config/index.js.map +1 -0
- package/dist/extensions/cerner/actions/getAppointment/getAppointment.d.ts +4 -0
- package/dist/extensions/cerner/actions/getAppointment/getAppointment.js +55 -0
- package/dist/extensions/cerner/actions/getAppointment/getAppointment.js.map +1 -0
- package/dist/extensions/cerner/actions/getAppointment/index.d.ts +1 -0
- package/dist/extensions/cerner/actions/getAppointment/index.js +6 -0
- package/dist/extensions/cerner/actions/getAppointment/index.js.map +1 -0
- package/dist/extensions/cerner/actions/getEncounter/__testdata__/GetEncounter.mock.d.ts +270 -0
- package/dist/extensions/cerner/actions/getEncounter/__testdata__/GetEncounter.mock.js +1419 -0
- package/dist/extensions/cerner/actions/getEncounter/__testdata__/GetEncounter.mock.js.map +1 -0
- package/dist/extensions/cerner/actions/getEncounter/config/datapoints.d.ts +6 -0
- package/dist/extensions/cerner/actions/getEncounter/config/datapoints.js +10 -0
- package/dist/extensions/cerner/actions/getEncounter/config/datapoints.js.map +1 -0
- package/dist/extensions/cerner/actions/getEncounter/config/fields.d.ts +18 -0
- package/dist/extensions/cerner/actions/getEncounter/config/fields.js +21 -0
- package/dist/extensions/cerner/actions/getEncounter/config/fields.js.map +1 -0
- package/dist/extensions/cerner/actions/getEncounter/config/index.d.ts +2 -0
- package/dist/extensions/cerner/actions/getEncounter/config/index.js +9 -0
- package/dist/extensions/cerner/actions/getEncounter/config/index.js.map +1 -0
- package/dist/extensions/cerner/actions/getEncounter/getEncounter.d.ts +4 -0
- package/dist/extensions/cerner/actions/getEncounter/getEncounter.js +48 -0
- package/dist/extensions/cerner/actions/getEncounter/getEncounter.js.map +1 -0
- package/dist/extensions/cerner/actions/getEncounter/index.d.ts +1 -0
- package/dist/extensions/cerner/actions/getEncounter/index.js +6 -0
- package/dist/extensions/cerner/actions/getEncounter/index.js.map +1 -0
- package/dist/extensions/cerner/actions/getPatient/__testdata__/PatientRead.mock.d.ts +72 -24
- package/dist/extensions/cerner/actions/getPatient/__testdata__/PatientRead.mock.js +85 -33
- package/dist/extensions/cerner/actions/getPatient/__testdata__/PatientRead.mock.js.map +1 -1
- package/dist/extensions/cerner/actions/getPatient/getPatient.js +1 -2
- package/dist/extensions/cerner/actions/getPatient/getPatient.js.map +1 -1
- package/dist/extensions/cerner/actions/getPatientEncounters/__testdata__/GetPatientEncounters.mock.d.ts +258 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/__testdata__/GetPatientEncounters.mock.js +826 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/__testdata__/GetPatientEncounters.mock.js.map +1 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/config/datapoints.d.ts +6 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/config/datapoints.js +10 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/config/datapoints.js.map +1 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/config/fields.d.ts +18 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/config/fields.js +21 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/config/fields.js.map +1 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/config/index.d.ts +2 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/config/index.js +9 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/config/index.js.map +1 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/getPatientEncounters.d.ts +4 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/getPatientEncounters.js +53 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/getPatientEncounters.js.map +1 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/index.d.ts +1 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/index.js +6 -0
- package/dist/extensions/cerner/actions/getPatientEncounters/index.js.map +1 -0
- package/dist/extensions/cerner/actions/index.d.ts +256 -0
- package/dist/extensions/cerner/actions/index.js +12 -2
- package/dist/extensions/cerner/actions/index.js.map +1 -1
- package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client.d.ts +11 -1
- package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client.js +56 -0
- package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client.js.map +1 -1
- package/dist/extensions/cerner/lib/api/FhirR4/schema/EncounterRead.schema.d.ts +9 -0
- package/dist/extensions/cerner/lib/api/FhirR4/schema/EncounterRead.schema.js +6 -0
- package/dist/extensions/cerner/lib/api/FhirR4/schema/EncounterRead.schema.js.map +1 -0
- package/dist/extensions/cerner/lib/api/FhirR4/schema/EncounterSearch.schema.d.ts +8 -0
- package/dist/extensions/cerner/lib/api/FhirR4/schema/EncounterSearch.schema.js +3 -0
- package/dist/extensions/cerner/lib/api/FhirR4/schema/EncounterSearch.schema.js.map +1 -0
- package/dist/extensions/cerner/lib/api/FhirR4/schema/index.d.ts +2 -0
- package/dist/extensions/cerner/lib/api/FhirR4/schema/index.js +2 -0
- package/dist/extensions/cerner/lib/api/FhirR4/schema/index.js.map +1 -1
- package/dist/extensions/cerner/lib/api/getResourceId.d.ts +1 -0
- package/dist/extensions/cerner/lib/api/getResourceId.js +11 -0
- package/dist/extensions/cerner/lib/api/getResourceId.js.map +1 -0
- package/dist/extensions/cerner/lib/validatePayloadAndCreateSdks.js +8 -1
- package/dist/extensions/cerner/lib/validatePayloadAndCreateSdks.js.map +1 -1
- package/dist/extensions/elation/actions/createMessageThread/createMessageThread.js +1 -1
- package/dist/extensions/elation/actions/createMessageThread/createMessageThread.js.map +1 -1
- package/dist/extensions/elation/actions/index.d.ts +3 -3
- package/dist/extensions/elation/actions/updateReferralOrderResolution/config/fields.d.ts +3 -3
- package/dist/extensions/elation/types/pharmacy.d.ts +2 -2
- package/dist/extensions/elation/validation/labOrder.zod.d.ts +2 -2
- package/dist/extensions/elation/validation/patient.zod.d.ts +4 -4
- package/dist/extensions/elation/validation/referralOrder.zod.d.ts +6 -6
- package/dist/extensions/markdown.json +1 -1
- package/package.json +1 -1
- package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client-backup.d.ts +0 -0
- package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client-backup.js +0 -172
- package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client-backup.js.map +0 -1
@@ -20,4 +20,6 @@ __exportStar(require("./PatientMatch.schema"), exports);
|
|
20
20
|
__exportStar(require("./DocumentReferenceCreate.schema"), exports);
|
21
21
|
__exportStar(require("./AppointmentRead.schema"), exports);
|
22
22
|
__exportStar(require("./PatientSearch.schema"), exports);
|
23
|
+
__exportStar(require("./EncounterSearch.schema"), exports);
|
24
|
+
__exportStar(require("./EncounterRead.schema"), exports);
|
23
25
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/cerner/lib/api/FhirR4/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC;AACpC,yDAAsC;AACtC,wDAAqC;AACrC,mEAAgD;AAChD,2DAAwC;AACxC,yDAAsC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/cerner/lib/api/FhirR4/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC;AACpC,yDAAsC;AACtC,wDAAqC;AACrC,mEAAgD;AAChD,2DAAwC;AACxC,yDAAsC;AACtC,2DAAwC;AACxC,yDAAsC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const getResourceId: (url: string) => string | null;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getResourceId = void 0;
|
4
|
+
const getResourceId = (url) => {
|
5
|
+
// Use regex to match the last part of the URL after the final slash
|
6
|
+
const match = url.match(/\/([^/]+)$/);
|
7
|
+
// Return the matched ID or null if no match is found
|
8
|
+
return match === null ? null : match[1];
|
9
|
+
};
|
10
|
+
exports.getResourceId = getResourceId;
|
11
|
+
//# sourceMappingURL=getResourceId.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getResourceId.js","sourceRoot":"","sources":["../../../../../extensions/cerner/lib/api/getResourceId.ts"],"names":[],"mappings":";;;AAAO,MAAM,aAAa,GAAG,CAAC,GAAW,EAAiB,EAAE;IAC1D,oEAAoE;IACpE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IAErC,qDAAqD;IACrD,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACzC,CAAC,CAAA;AANY,QAAA,aAAa,iBAMzB"}
|
@@ -19,13 +19,20 @@ const validatePayloadAndCreateSdks = async ({ fieldsSchema, payload }) => {
|
|
19
19
|
});
|
20
20
|
const { patient, pathway, activity } = payload;
|
21
21
|
const { authUrl, r4BaseUrl } = (0, auth_1.constructCernerUrls)(settings.tenantId);
|
22
|
+
const SCOPES = [
|
23
|
+
'system/Patient.read',
|
24
|
+
'system/Patient.write',
|
25
|
+
'system/Appointment.read',
|
26
|
+
'system/DocumentReference.write',
|
27
|
+
'system/Encounter.read',
|
28
|
+
];
|
22
29
|
const cernerFhirR4Sdk = new FhirR4_1.CernerR4APIClient({
|
23
30
|
authUrl,
|
24
31
|
baseUrl: r4BaseUrl,
|
25
32
|
requestConfig: {
|
26
33
|
client_id: settings.clientId,
|
27
34
|
client_secret: settings.clientSecret,
|
28
|
-
scope:
|
35
|
+
scope: SCOPES.join(','),
|
29
36
|
},
|
30
37
|
});
|
31
38
|
return {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"validatePayloadAndCreateSdks.js","sourceRoot":"","sources":["../../../../extensions/cerner/lib/validatePayloadAndCreateSdks.ts"],"names":[],"mappings":";;;;;;AAAA,mEAKsC;AACtC,8CAAmB;AACnB,0CAAsD;AAEtD,yCAAgD;AAChD,qCAAgD;AAiBzC,MAAM,4BAA4B,GACvC,KAAK,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE;IAClC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAA,0BAAQ,EAAC;QACpC,MAAM,EAAE,aAAC,CAAC,MAAM,CAAC;YACf,MAAM,EAAE,YAAY;YACpB,QAAQ,EAAE,mCAAwB;SACnC,CAAC;QACF,OAAO;KACR,CAAC,CAAA;IAEF,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;IAE9C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAA,0BAAmB,EAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAErE,MAAM,eAAe,GAAG,IAAI,0BAAiB,CAAC;QAC5C,OAAO;QACP,OAAO,EAAE,SAAS;QAClB,aAAa,EAAE;YACb,SAAS,EAAE,QAAQ,CAAC,QAAQ;YAC5B,aAAa,EAAE,QAAQ,CAAC,YAAY;YACpC,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"validatePayloadAndCreateSdks.js","sourceRoot":"","sources":["../../../../extensions/cerner/lib/validatePayloadAndCreateSdks.ts"],"names":[],"mappings":";;;;;;AAAA,mEAKsC;AACtC,8CAAmB;AACnB,0CAAsD;AAEtD,yCAAgD;AAChD,qCAAgD;AAiBzC,MAAM,4BAA4B,GACvC,KAAK,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE;IAClC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAA,0BAAQ,EAAC;QACpC,MAAM,EAAE,aAAC,CAAC,MAAM,CAAC;YACf,MAAM,EAAE,YAAY;YACpB,QAAQ,EAAE,mCAAwB;SACnC,CAAC;QACF,OAAO;KACR,CAAC,CAAA;IAEF,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;IAE9C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAA,0BAAmB,EAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAErE,MAAM,MAAM,GAAG;QACb,qBAAqB;QACrB,sBAAsB;QACtB,yBAAyB;QACzB,gCAAgC;QAChC,uBAAuB;KACxB,CAAA;IAED,MAAM,eAAe,GAAG,IAAI,0BAAiB,CAAC;QAC5C,OAAO;QACP,OAAO,EAAE,SAAS;QAClB,aAAa,EAAE;YACb,SAAS,EAAE,QAAQ,CAAC,QAAQ;YAC5B,aAAa,EAAE,QAAQ,CAAC,YAAY;YACpC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;SACxB;KACF,CAAC,CAAA;IAEF,OAAO;QACL,eAAe;QACf,QAAQ;QACR,MAAM;QACN,OAAO;QACP,OAAO;QACP,QAAQ;KACT,CAAA;AACH,CAAC,CAAA;AAxCU,QAAA,4BAA4B,gCAwCtC"}
|
@@ -15,7 +15,7 @@ exports.createMessageThread = {
|
|
15
15
|
previewable: true,
|
16
16
|
dataPoints: config_1.dataPoints,
|
17
17
|
onEvent: async ({ payload, onComplete, onError }) => {
|
18
|
-
const { patientId, senderId, practiceId, documentDate, chartDate, messageBody, isUrgent, recipientId, groupId, } = payload.fields;
|
18
|
+
const { patientId, senderId, practiceId, documentDate, chartDate, messageBody, isUrgent, recipientId, groupId, } = config_1.FieldsValidationSchema.parse(payload.fields);
|
19
19
|
const threadMembers = [
|
20
20
|
// Individual recipient
|
21
21
|
...(!(0, lodash_1.isNil)(recipientId)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createMessageThread.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/createMessageThread/createMessageThread.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AAExD,yCAA4C;AAC5C,0EAAwE;AACxE,mCAA8B;AAC9B,
|
1
|
+
{"version":3,"file":"createMessageThread.js","sourceRoot":"","sources":["../../../../../extensions/elation/actions/createMessageThread/createMessageThread.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AAExD,yCAA4C;AAC5C,0EAAwE;AACxE,mCAA8B;AAC9B,qCAAqE;AAExD,QAAA,mBAAmB,GAI5B;IACF,GAAG,EAAE,qBAAqB;IAC1B,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EAAE,wDAAwD;IACrE,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAiB,EAAE;QACjE,MAAM,EACJ,SAAS,EACT,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,WAAW,EACX,OAAO,GACR,GAAG,+BAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAEhD,MAAM,aAAa,GAAG;YACpB,uBAAuB;YACvB,GAAG,CAAC,CAAC,IAAA,cAAK,EAAC,WAAW,CAAC;gBACrB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;gBACrD,CAAC,CAAC,EAAE,CAAC;YACP,kBAAkB;YAClB,GAAG,CAAC,CAAC,IAAA,cAAK,EAAC,OAAO,CAAC;gBACjB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;gBAClD,CAAC,CAAC,EAAE,CAAC;YACP,SAAS;YACT;gBACE,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,WAAW;aACpB;SACF,CAAA;QAED,MAAM,aAAa,GAAG,uCAAmB,CAAC,KAAK,CAAC;YAC9C,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,UAAU;YACpB,aAAa,EAAE,YAAY;YAC3B,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,QAAQ;YACnB,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,WAAW;oBACjB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;oBACnC,MAAM,EAAE,QAAQ;iBACjB;aACF;YACD,OAAO,EAAE,aAAa;SACvB,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,IAAA,sBAAa,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QAC3C,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,GAAG,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAA;QAE3D,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,eAAe,EAAE,MAAM,CAAC,EAAE,CAAC;aAC5B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
@@ -57,7 +57,7 @@ export declare const actions: {
|
|
57
57
|
description: string;
|
58
58
|
required: false;
|
59
59
|
};
|
60
|
-
}, "status" | "firstName" | "lastName" | "email" | "dob" | "mobilePhone" | "preferredLanguage" | "sex" | "
|
60
|
+
}, "status" | "firstName" | "lastName" | "email" | "dob" | "mobilePhone" | "preferredLanguage" | "sex" | "ssn" | "genderIdentity" | "middleName" | "notes" | "pronouns" | "race" | "ethnicity" | "primaryPhysicianId" | "caregiverPracticeId" | "mainPhone" | "actualName" | "legalGenderMarker" | "sexualOrientation" | "previousFirstName" | "previousLastName" | "preferredServiceLocationId" | "patientObject">;
|
61
61
|
createPatient: import("@awell-health/extensions-core").Action<{
|
62
62
|
firstName: {
|
63
63
|
id: string;
|
@@ -611,7 +611,7 @@ export declare const actions: {
|
|
611
611
|
description: string;
|
612
612
|
required: false;
|
613
613
|
};
|
614
|
-
}, "practiceId" | "status" | "patientId" | "duration" | "reason" | "description" | "
|
614
|
+
}, "practiceId" | "status" | "patientId" | "duration" | "reason" | "description" | "appointment" | "physicianId" | "scheduledDate" | "serviceLocationId" | "telehealthDetails">;
|
615
615
|
findAppointments: import("@awell-health/extensions-core").Action<{
|
616
616
|
patientId: {
|
617
617
|
id: string;
|
@@ -2844,7 +2844,7 @@ export declare const actions: {
|
|
2844
2844
|
options: {
|
2845
2845
|
dropdownOptions: {
|
2846
2846
|
label: string;
|
2847
|
-
value: "cancelled" | "
|
2847
|
+
value: "cancelled" | "fulfilled" | "outstanding";
|
2848
2848
|
}[];
|
2849
2849
|
};
|
2850
2850
|
};
|
@@ -15,7 +15,7 @@ export declare const fields: {
|
|
15
15
|
options: {
|
16
16
|
dropdownOptions: {
|
17
17
|
label: string;
|
18
|
-
value: "cancelled" | "
|
18
|
+
value: "cancelled" | "fulfilled" | "outstanding";
|
19
19
|
}[];
|
20
20
|
};
|
21
21
|
};
|
@@ -33,10 +33,10 @@ export declare const FieldsValidationSchema: z.ZodObject<{
|
|
33
33
|
resolvingDocument: z.ZodOptional<z.ZodNumber>;
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
35
35
|
referralOrderId: number;
|
36
|
-
resolutionState: "cancelled" | "
|
36
|
+
resolutionState: "cancelled" | "fulfilled" | "outstanding";
|
37
37
|
resolvingDocument?: number | undefined;
|
38
38
|
}, {
|
39
39
|
referralOrderId: number;
|
40
|
-
resolutionState: "cancelled" | "
|
40
|
+
resolutionState: "cancelled" | "fulfilled" | "outstanding";
|
41
41
|
resolvingDocument?: number | undefined;
|
42
42
|
}>;
|
@@ -17,11 +17,11 @@ export declare const PharmacySchema: z.ZodObject<{
|
|
17
17
|
city: string;
|
18
18
|
state: string;
|
19
19
|
zip: string;
|
20
|
+
fax: string;
|
20
21
|
address_line1: string;
|
21
22
|
address_line2: string;
|
22
23
|
ncpdpid: string;
|
23
24
|
store_name: string;
|
24
|
-
fax: string;
|
25
25
|
npi: string;
|
26
26
|
active_start_time: Date;
|
27
27
|
active_end_time: Date;
|
@@ -31,12 +31,12 @@ export declare const PharmacySchema: z.ZodObject<{
|
|
31
31
|
city: string;
|
32
32
|
state: string;
|
33
33
|
zip: string;
|
34
|
+
fax: string;
|
34
35
|
address_line1: string;
|
35
36
|
address_line2: string;
|
36
37
|
ncpdpid: string;
|
37
38
|
store_name: string;
|
38
39
|
phone_primary: string;
|
39
|
-
fax: string;
|
40
40
|
npi: string;
|
41
41
|
active_start_time: Date;
|
42
42
|
active_end_time: Date;
|
@@ -14,16 +14,16 @@ export declare const labOrderSchema: z.ZodObject<{
|
|
14
14
|
document_date: string;
|
15
15
|
ordering_physician: number;
|
16
16
|
confidential: boolean;
|
17
|
-
vendor?: number | undefined;
|
18
17
|
content?: any;
|
18
|
+
vendor?: number | undefined;
|
19
19
|
site?: number | undefined;
|
20
20
|
}, {
|
21
21
|
patient: number;
|
22
22
|
practice: number;
|
23
23
|
document_date: Date;
|
24
24
|
ordering_physician: number;
|
25
|
-
vendor?: number | undefined;
|
26
25
|
content?: string | null | undefined;
|
26
|
+
vendor?: number | undefined;
|
27
27
|
site?: number | undefined;
|
28
28
|
confidential?: boolean | undefined;
|
29
29
|
}>;
|
@@ -488,6 +488,7 @@ export declare const patientSchema: z.ZodObject<{
|
|
488
488
|
} | null | undefined;
|
489
489
|
preferred_language?: string | null | undefined;
|
490
490
|
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
491
|
+
ssn?: string | null | undefined;
|
491
492
|
tags?: string[] | null | undefined;
|
492
493
|
middle_name?: string | null | undefined;
|
493
494
|
notes?: string | null | undefined;
|
@@ -497,7 +498,6 @@ export declare const patientSchema: z.ZodObject<{
|
|
497
498
|
pronouns?: "he_him_his" | "she_her_hers" | "they_them_theirs" | "not_listed" | null | undefined;
|
498
499
|
sexual_orientation?: "unknown" | "option_not_listed" | "prefer_not_to_say" | "straight" | "gay" | "bisexual" | "lesbian" | "queer" | "asexual" | null | undefined;
|
499
500
|
preferred_service_location?: number | null | undefined;
|
500
|
-
ssn?: string | null | undefined;
|
501
501
|
race?: "Other" | "No race specified" | "American Indian or Alaska Native" | "Asian" | "Black or African American" | "Native Hawaiian or Other Pacific Islander" | "White" | "Declined to specify" | null | undefined;
|
502
502
|
ethnicity?: "Unknown" | "Declined to specify" | "No ethnicity specified" | "Hispanic or Latino" | "Not Hispanic or Latino" | null | undefined;
|
503
503
|
vip?: boolean | null | undefined;
|
@@ -621,6 +621,7 @@ export declare const patientSchema: z.ZodObject<{
|
|
621
621
|
} | null | undefined;
|
622
622
|
preferred_language?: string | null | undefined;
|
623
623
|
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
624
|
+
ssn?: string | null | undefined;
|
624
625
|
tags?: string[] | null | undefined;
|
625
626
|
middle_name?: string | null | undefined;
|
626
627
|
notes?: string | null | undefined;
|
@@ -630,7 +631,6 @@ export declare const patientSchema: z.ZodObject<{
|
|
630
631
|
pronouns?: "he_him_his" | "she_her_hers" | "they_them_theirs" | "not_listed" | null | undefined;
|
631
632
|
sexual_orientation?: "unknown" | "option_not_listed" | "prefer_not_to_say" | "straight" | "gay" | "bisexual" | "lesbian" | "queer" | "asexual" | null | undefined;
|
632
633
|
preferred_service_location?: number | null | undefined;
|
633
|
-
ssn?: string | null | undefined;
|
634
634
|
race?: "Other" | "No race specified" | "American Indian or Alaska Native" | "Asian" | "Black or African American" | "Native Hawaiian or Other Pacific Islander" | "White" | "Declined to specify" | null | undefined;
|
635
635
|
ethnicity?: "Unknown" | "Declined to specify" | "No ethnicity specified" | "Hispanic or Latino" | "Not Hispanic or Latino" | null | undefined;
|
636
636
|
vip?: boolean | null | undefined;
|
@@ -1079,6 +1079,7 @@ export declare const updatePatientSchema: z.ZodObject<{
|
|
1079
1079
|
last_name?: string | null | undefined;
|
1080
1080
|
preferred_language?: string | null | undefined;
|
1081
1081
|
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
1082
|
+
ssn?: string | null | undefined;
|
1082
1083
|
tags?: string[] | null | undefined;
|
1083
1084
|
middle_name?: string | null | undefined;
|
1084
1085
|
notes?: string | null | undefined;
|
@@ -1089,7 +1090,6 @@ export declare const updatePatientSchema: z.ZodObject<{
|
|
1089
1090
|
sexual_orientation?: "unknown" | "option_not_listed" | "prefer_not_to_say" | "straight" | "gay" | "bisexual" | "lesbian" | "queer" | "asexual" | null | undefined;
|
1090
1091
|
primary_physician?: number | null | undefined;
|
1091
1092
|
caregiver_practice?: number | null | undefined;
|
1092
|
-
ssn?: string | null | undefined;
|
1093
1093
|
race?: "Other" | "No race specified" | "American Indian or Alaska Native" | "Asian" | "Black or African American" | "Native Hawaiian or Other Pacific Islander" | "White" | "Declined to specify" | null | undefined;
|
1094
1094
|
ethnicity?: "Unknown" | "Declined to specify" | "No ethnicity specified" | "Hispanic or Latino" | "Not Hispanic or Latino" | null | undefined;
|
1095
1095
|
vip?: boolean | null | undefined;
|
@@ -1211,6 +1211,7 @@ export declare const updatePatientSchema: z.ZodObject<{
|
|
1211
1211
|
last_name?: string | null | undefined;
|
1212
1212
|
preferred_language?: string | null | undefined;
|
1213
1213
|
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
1214
|
+
ssn?: string | null | undefined;
|
1214
1215
|
tags?: string[] | null | undefined;
|
1215
1216
|
middle_name?: string | null | undefined;
|
1216
1217
|
notes?: string | null | undefined;
|
@@ -1221,7 +1222,6 @@ export declare const updatePatientSchema: z.ZodObject<{
|
|
1221
1222
|
sexual_orientation?: "unknown" | "option_not_listed" | "prefer_not_to_say" | "straight" | "gay" | "bisexual" | "lesbian" | "queer" | "asexual" | null | undefined;
|
1222
1223
|
primary_physician?: number | null | undefined;
|
1223
1224
|
caregiver_practice?: number | null | undefined;
|
1224
|
-
ssn?: string | null | undefined;
|
1225
1225
|
race?: "Other" | "No race specified" | "American Indian or Alaska Native" | "Asian" | "Black or African American" | "Native Hawaiian or Other Pacific Islander" | "White" | "Declined to specify" | null | undefined;
|
1226
1226
|
ethnicity?: "Unknown" | "Declined to specify" | "No ethnicity specified" | "Hispanic or Latino" | "Not Hispanic or Latino" | null | undefined;
|
1227
1227
|
vip?: boolean | null | undefined;
|
@@ -12,7 +12,7 @@ export declare const resolutionSchema: z.ZodObject<{
|
|
12
12
|
deleted_date: z.ZodNullable<z.ZodString>;
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
14
14
|
id: number;
|
15
|
-
state: "cancelled" | "
|
15
|
+
state: "cancelled" | "fulfilled" | "outstanding";
|
16
16
|
document: number;
|
17
17
|
note: string | null;
|
18
18
|
created_date: string;
|
@@ -20,7 +20,7 @@ export declare const resolutionSchema: z.ZodObject<{
|
|
20
20
|
deleted_date: string | null;
|
21
21
|
}, {
|
22
22
|
id: number;
|
23
|
-
state: "cancelled" | "
|
23
|
+
state: "cancelled" | "fulfilled" | "outstanding";
|
24
24
|
document: number;
|
25
25
|
note: string | null;
|
26
26
|
created_date: string;
|
@@ -57,7 +57,7 @@ export declare const referralOrderSchema: z.ZodObject<{
|
|
57
57
|
deleted_date: z.ZodNullable<z.ZodString>;
|
58
58
|
}, "strip", z.ZodTypeAny, {
|
59
59
|
id: number;
|
60
|
-
state: "cancelled" | "
|
60
|
+
state: "cancelled" | "fulfilled" | "outstanding";
|
61
61
|
document: number;
|
62
62
|
note: string | null;
|
63
63
|
created_date: string;
|
@@ -65,7 +65,7 @@ export declare const referralOrderSchema: z.ZodObject<{
|
|
65
65
|
deleted_date: string | null;
|
66
66
|
}, {
|
67
67
|
id: number;
|
68
|
-
state: "cancelled" | "
|
68
|
+
state: "cancelled" | "fulfilled" | "outstanding";
|
69
69
|
document: number;
|
70
70
|
note: string | null;
|
71
71
|
created_date: string;
|
@@ -99,7 +99,7 @@ export declare const referralOrderSchema: z.ZodObject<{
|
|
99
99
|
patient: number;
|
100
100
|
resolution: {
|
101
101
|
id: number;
|
102
|
-
state: "cancelled" | "
|
102
|
+
state: "cancelled" | "fulfilled" | "outstanding";
|
103
103
|
document: number;
|
104
104
|
note: string | null;
|
105
105
|
created_date: string;
|
@@ -127,7 +127,7 @@ export declare const referralOrderSchema: z.ZodObject<{
|
|
127
127
|
patient: number;
|
128
128
|
resolution: {
|
129
129
|
id: number;
|
130
|
-
state: "cancelled" | "
|
130
|
+
state: "cancelled" | "fulfilled" | "outstanding";
|
131
131
|
document: number;
|
132
132
|
note: string | null;
|
133
133
|
created_date: string;
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"changelog": "# Canvas Medical changelog\n\n## 2023-09-01\n\n- Add new actions: `createAppointment`, `createPatient`, `createQuestionnaireResponses`, `createTask`, `updateAppointment`, `updatePatient`, and `updateTask` for enhanced functionality.\n"
|
29
29
|
},
|
30
30
|
"cerner": {
|
31
|
-
"readme": "---\ntitle: Cerner\ndescription: Cerner EMR is an electronic medical records system that helps healthcare organizations improve patient care and increase efficiency.\n---\n\n# Cerner\n\nCerner EMR is an electronic medical records system that helps healthcare organizations improve patient care and increase efficiency.\n\n## The Cerner extension\n\nThe **Cerner Extension** is designed to support **Read** and **Write** integrations via [SMART Backend Services](https://docs.oracle.com/en/industries/health/millennium-platform-apis/fhir-authorization-framework/#requesting-authorization-on-behalf-of-a-system). These integrations are server-to-server (backend) and do not require direct user interaction—whether from patients or practitioners. The extension connects to **Cerner's FHIR R4 API**.\n\nIn addition to REST interfaces, customers using Cerner usually also have healthcare-specific interfaces, like HL7, enabling tasks such as querying patient demographics (ADR A19) or creating documents (ORU messages). **Awell supports these interfaces as well.**\n\n## Setup\n\nTo set up the Cerner Extension in Awell, you’ll need to configure the following:\n\n- **Tenant ID**: the tenant ID associated to the organization you are connecting to ([more info](https://docs.oracle.com/en/industries/health/millennium-platform-apis/fhir-app-provisioning/))\n- **Client ID**: the client ID of the Cerner app used to authenticate. ([more info](https://docs.oracle.com/en/industries/health/millennium-platform-apis/fhir-authorization-framework/#registering-an-application)) \n- **Client secret**: the client secret of the Cerner app used to authenticate ([more info](https://docs.oracle.com/en/industries/health/millennium-platform-apis/fhir-authorization-framework/#registering-a-system-account))\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",
|
31
|
+
"readme": "---\ntitle: Cerner\ndescription: Cerner EMR is an electronic medical records system that helps healthcare organizations improve patient care and increase efficiency.\n---\n\n# Cerner\n\nCerner EMR is an electronic medical records system that helps healthcare organizations improve patient care and increase efficiency.\n\n## The Cerner extension\n\nThe **Cerner Extension** is designed to support **Read** and **Write** integrations via [SMART Backend Services](https://docs.oracle.com/en/industries/health/millennium-platform-apis/fhir-authorization-framework/#requesting-authorization-on-behalf-of-a-system). These integrations are server-to-server (backend) and do not require direct user interaction—whether from patients or practitioners. The extension connects to **Cerner's FHIR R4 API**.\n\nIn addition to REST interfaces, customers using Cerner usually also have healthcare-specific interfaces, like HL7, enabling tasks such as querying patient demographics (ADR A19) or creating documents (ORU messages). **Awell supports these interfaces as well.**\n\n## Setup\n\nTo set up the Cerner Extension in Awell, you’ll need to configure the following:\n\n- **Tenant ID**: the tenant ID associated to the organization you are connecting to ([more info](https://docs.oracle.com/en/industries/health/millennium-platform-apis/fhir-app-provisioning/))\n- **Client ID**: the client ID of the Cerner app used to authenticate. ([more info](https://docs.oracle.com/en/industries/health/millennium-platform-apis/fhir-authorization-framework/#registering-an-application)) \n- **Client secret**: the client secret of the Cerner app used to authenticate ([more info](https://docs.oracle.com/en/industries/health/millennium-platform-apis/fhir-authorization-framework/#registering-a-system-account))\n\n**Important:** The actions below list what scopes are required to be added to the Cerner app. Without the scopes, the actions will not work as the app will not have the necessary permissions to access the data.\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\nRequired application scopes: `system/Patient.read`\n\n### Create patient (R4)\n\nAdd a new patient to Cerner using demographic information. Required fields include: \n\n- Assigning Organization ID\n- Given name\n- Family name\n\nWhile optional, including additional demographic information such as email address, data of birth, etc 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\nRequired application scopes: `system/Patient.write`\n\n### Find patient by MRN (R4)\n\nLeverages the `Patient.search` (R4) operation to find a patient by their MRN. The action will return the FHIR resource ID of the patient.\n\nNote: the default identifier system used to look up the patient based on MRN is `urn:oid:2.16.840.1.113883.6.1000`.\n\nRequired application scopes: `system/Patient.read`\n\n### Get appointment (R4)\n\nRetrieve details of a specific appointment using its FHIR resource ID. The action returns the full FHIR Appointment resource.\n\nRequired application scopes: `system/Appointment.read`\n\n### Get patient encounters (R4)\n\nRetrieve all encounters for a patient using their FHIR resource ID. The action returns all FHIR Encounter resources for the patient.\n\nRequired application scopes: `system/Encounter.read`\n\n### Create document (R4)\n\nCreate a new document reference (clinical note) in Cerner. The action returns the FHIR resource ID of the created document reference.\n\nRequired application scopes: `system/DocumentReference.write`\n\n### Get encounter (R4)\n\nRetrieve details of a specific encounter using its FHIR resource ID. The action returns the full FHIR Encounter resource.\n\nRequired application scopes: `system/Encounter.read`\n",
|
32
32
|
"changelog": "# Cerner changelog"
|
33
33
|
},
|
34
34
|
"cloudinary": {
|
package/package.json
CHANGED
File without changes
|
@@ -1,172 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// import axios, {
|
3
|
-
// type AxiosResponse,
|
4
|
-
// type AxiosInstance,
|
5
|
-
// type InternalAxiosRequestConfig,
|
6
|
-
// AxiosHeaders,
|
7
|
-
// } from 'axios'
|
8
|
-
// import {
|
9
|
-
// type PatientReadInputType,
|
10
|
-
// type PatientReadResponseType,
|
11
|
-
// type PatientCreateInputType,
|
12
|
-
// type PatientCreateResponseType,
|
13
|
-
// type PatientMatchInputType,
|
14
|
-
// type PatientMatchResponseType,
|
15
|
-
// type DocumentReferenceCreateInputType,
|
16
|
-
// type DocumentReferenceCreateResponseType,
|
17
|
-
// type AppointmentReadResponseType,
|
18
|
-
// type AppointmentReadInputType,
|
19
|
-
// type PatientSearchInputType,
|
20
|
-
// type PatientSearchResponseType,
|
21
|
-
// } from './schema'
|
22
|
-
// import { endsWith, isNil } from 'lodash'
|
23
|
-
// /**
|
24
|
-
// * FHIR R4 API Client
|
25
|
-
// */
|
26
|
-
// export class CernerFhirR4Client {
|
27
|
-
// private readonly client: AxiosInstance
|
28
|
-
// private readonly authUrl: string
|
29
|
-
// private readonly clientId: string
|
30
|
-
// private readonly privateKey: string
|
31
|
-
// private accessToken: string | null = null
|
32
|
-
// private tokenExpiry: number | null = null // Store token expiry time in UNIX timestamp
|
33
|
-
// constructor({
|
34
|
-
// baseUrl,
|
35
|
-
// authUrl,
|
36
|
-
// clientId,
|
37
|
-
// privateKey,
|
38
|
-
// }: {
|
39
|
-
// baseUrl: string
|
40
|
-
// authUrl: string
|
41
|
-
// clientId: string
|
42
|
-
// privateKey: string
|
43
|
-
// }) {
|
44
|
-
// this.authUrl = authUrl
|
45
|
-
// this.clientId = clientId
|
46
|
-
// this.privateKey = privateKey
|
47
|
-
// this.client = axios.create({
|
48
|
-
// baseURL: new URL(
|
49
|
-
// 'FHIR/R4/',
|
50
|
-
// endsWith(baseUrl, '/') ? baseUrl : `${baseUrl}/`,
|
51
|
-
// ).toString(),
|
52
|
-
// headers: new AxiosHeaders({
|
53
|
-
// 'Content-Type': 'application/json',
|
54
|
-
// }),
|
55
|
-
// })
|
56
|
-
// this.client.interceptors.request.use(
|
57
|
-
// async (
|
58
|
-
// config: InternalAxiosRequestConfig,
|
59
|
-
// ): Promise<InternalAxiosRequestConfig> => {
|
60
|
-
// if (isNil(this.accessToken) || this.isTokenExpired()) {
|
61
|
-
// await this.refreshAccessToken()
|
62
|
-
// }
|
63
|
-
// // Add the Authorization header to the request
|
64
|
-
// if (!isNil(this.accessToken)) {
|
65
|
-
// config.headers = AxiosHeaders.from(config?.headers ?? {})
|
66
|
-
// config.headers.set('Authorization', `Bearer ${this.accessToken}`)
|
67
|
-
// }
|
68
|
-
// return config
|
69
|
-
// },
|
70
|
-
// )
|
71
|
-
// }
|
72
|
-
// private async refreshAccessToken(): Promise<void> {
|
73
|
-
// try {
|
74
|
-
// const tokenResponse = await axios.post<{
|
75
|
-
// access_token: string
|
76
|
-
// expires_in: number
|
77
|
-
// scope: string
|
78
|
-
// }>(
|
79
|
-
// this.authUrl,
|
80
|
-
// {
|
81
|
-
// grant_type: 'client_credentials',
|
82
|
-
// client_assertion_type:
|
83
|
-
// 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
|
84
|
-
// client_assertion: generateJWT(
|
85
|
-
// this.clientId,
|
86
|
-
// this.authUrl,
|
87
|
-
// this.privateKey,
|
88
|
-
// ),
|
89
|
-
// },
|
90
|
-
// {
|
91
|
-
// headers: {
|
92
|
-
// 'Content-Type': 'application/x-www-form-urlencoded',
|
93
|
-
// },
|
94
|
-
// },
|
95
|
-
// )
|
96
|
-
// this.accessToken = tokenResponse.data.access_token
|
97
|
-
// this.tokenExpiry =
|
98
|
-
// Math.floor(Date.now() / 1000) + tokenResponse.data.expires_in // Current time + expiry
|
99
|
-
// } catch (error) {
|
100
|
-
// console.error('Failed to refresh access token:', error)
|
101
|
-
// throw new Error('Unable to refresh access token')
|
102
|
-
// }
|
103
|
-
// }
|
104
|
-
// private isTokenExpired(): boolean {
|
105
|
-
// const now = Math.floor(Date.now() / 1000) // Current time in seconds
|
106
|
-
// return (
|
107
|
-
// isNil(this.tokenExpiry) || now >= this.tokenExpiry - 60 // Refresh 1 minute before expiry
|
108
|
-
// )
|
109
|
-
// }
|
110
|
-
// async getPatient(
|
111
|
-
// resourceId: PatientReadInputType,
|
112
|
-
// ): Promise<AxiosResponse<PatientReadResponseType>> {
|
113
|
-
// const url = new URL(`Patient/${resourceId}`, this.client.defaults.baseURL)
|
114
|
-
// const response = await this.client.get<PatientReadResponseType>(
|
115
|
-
// url.toString(),
|
116
|
-
// )
|
117
|
-
// return response
|
118
|
-
// }
|
119
|
-
// async createPatient(
|
120
|
-
// data: PatientCreateInputType,
|
121
|
-
// ): Promise<AxiosResponse<PatientCreateResponseType>> {
|
122
|
-
// const url = new URL(`Patient`, this.client.defaults.baseURL)
|
123
|
-
// const response = await this.client.post<PatientReadResponseType>(
|
124
|
-
// url.toString(),
|
125
|
-
// data,
|
126
|
-
// )
|
127
|
-
// return response
|
128
|
-
// }
|
129
|
-
// async matchPatient(
|
130
|
-
// data: PatientMatchInputType,
|
131
|
-
// ): Promise<AxiosResponse<PatientMatchResponseType>> {
|
132
|
-
// const url = new URL(`Patient/$match`, this.client.defaults.baseURL)
|
133
|
-
// const response = await this.client.post<PatientMatchResponseType>(
|
134
|
-
// url.toString(),
|
135
|
-
// data,
|
136
|
-
// )
|
137
|
-
// return response
|
138
|
-
// }
|
139
|
-
// async searchPatient(
|
140
|
-
// data: PatientSearchInputType,
|
141
|
-
// ): Promise<AxiosResponse<PatientSearchResponseType>> {
|
142
|
-
// const url = new URL(`Patient`, this.client.defaults.baseURL)
|
143
|
-
// const response = await this.client.get<PatientSearchResponseType>(
|
144
|
-
// `${url.toString()}?identifier=MRN|${data.MRN}`,
|
145
|
-
// )
|
146
|
-
// return response
|
147
|
-
// }
|
148
|
-
// async createDocumentReference(
|
149
|
-
// data: DocumentReferenceCreateInputType,
|
150
|
-
// ): Promise<AxiosResponse<DocumentReferenceCreateResponseType>> {
|
151
|
-
// const url = new URL(`DocumentReference`, this.client.defaults.baseURL)
|
152
|
-
// const response =
|
153
|
-
// await this.client.post<DocumentReferenceCreateResponseType>(
|
154
|
-
// url.toString(),
|
155
|
-
// data,
|
156
|
-
// )
|
157
|
-
// return response
|
158
|
-
// }
|
159
|
-
// async getAppointment(
|
160
|
-
// resourceId: AppointmentReadInputType,
|
161
|
-
// ): Promise<AxiosResponse<AppointmentReadResponseType>> {
|
162
|
-
// const url = new URL(
|
163
|
-
// `Appointment/${resourceId}`,
|
164
|
-
// this.client.defaults.baseURL,
|
165
|
-
// )
|
166
|
-
// const response = await this.client.get<AppointmentReadResponseType>(
|
167
|
-
// url.toString(),
|
168
|
-
// )
|
169
|
-
// return response
|
170
|
-
// }
|
171
|
-
// }
|
172
|
-
//# sourceMappingURL=FhirR4client-backup.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"FhirR4client-backup.js","sourceRoot":"","sources":["../../../../../../extensions/cerner/lib/api/FhirR4/FhirR4client-backup.ts"],"names":[],"mappings":"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"}
|