@oystehr/sdk 4.0.0-alpha.2 → 4.0.0-alpha.4
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/cjs/index.cjs +26 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/cjs/index.min.cjs.map +1 -1
- package/dist/cjs/resources/classes/erx.d.ts +19 -3
- package/dist/cjs/resources/types/ErxCancelPrescriptionParams.d.ts +4 -0
- package/dist/cjs/resources/types/ErxCheckPractitionerEnrollmentParams.d.ts +3 -0
- package/dist/cjs/resources/types/ErxCheckPractitionerEnrollmentResponse.d.ts +17 -0
- package/dist/cjs/resources/types/ErxEnrollPractitionerParams.d.ts +3 -0
- package/dist/cjs/resources/types/ErxUnenrollPractitionerParams.d.ts +3 -0
- package/dist/cjs/resources/types/index.d.ts +5 -0
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/resources/classes/erx.d.ts +19 -3
- package/dist/esm/resources/classes/erx.js +26 -2
- package/dist/esm/resources/classes/erx.js.map +1 -1
- package/dist/esm/resources/types/ErxCancelPrescriptionParams.d.ts +4 -0
- package/dist/esm/resources/types/ErxCheckPractitionerEnrollmentParams.d.ts +3 -0
- package/dist/esm/resources/types/ErxCheckPractitionerEnrollmentResponse.d.ts +17 -0
- package/dist/esm/resources/types/ErxEnrollPractitionerParams.d.ts +3 -0
- package/dist/esm/resources/types/ErxUnenrollPractitionerParams.d.ts +3 -0
- package/dist/esm/resources/types/index.d.ts +5 -0
- package/package.json +1 -1
- package/src/resources/classes/erx.ts +38 -2
- package/src/resources/types/ErxCancelPrescriptionParams.ts +6 -0
- package/src/resources/types/ErxCheckPractitionerEnrollmentParams.ts +5 -0
- package/src/resources/types/ErxCheckPractitionerEnrollmentResponse.ts +19 -0
- package/src/resources/types/ErxEnrollPractitionerParams.ts +5 -0
- package/src/resources/types/ErxUnenrollPractitionerParams.ts +5 -0
- package/src/resources/types/index.ts +5 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ErxCheckAllergyInteractionsParams, ErxCheckAllergyInteractionsResponse, ErxCheckMedicationInteractionsParams, ErxCheckMedicationInteractionsResponse, ErxCheckPrecheckInteractionsParams, ErxCheckPrecheckInteractionsResponse, ErxConnectPractitionerParams, ErxConnectPractitionerResponse, ErxSearchAllergensParams, ErxSearchAllergensResponse, ErxSearchMedicationsParams, ErxSearchMedicationsResponse, ErxSyncPatientParams, OystehrClientRequest } from '../..';
|
|
1
|
+
import { ErxCancelPrescriptionParams, ErxCheckAllergyInteractionsParams, ErxCheckAllergyInteractionsResponse, ErxCheckMedicationInteractionsParams, ErxCheckMedicationInteractionsResponse, ErxCheckPractitionerEnrollmentParams, ErxCheckPractitionerEnrollmentResponse, ErxCheckPrecheckInteractionsParams, ErxCheckPrecheckInteractionsResponse, ErxConnectPractitionerParams, ErxConnectPractitionerResponse, ErxEnrollPractitionerParams, ErxSearchAllergensParams, ErxSearchAllergensResponse, ErxSearchMedicationsParams, ErxSearchMedicationsResponse, ErxSyncPatientParams, ErxUnenrollPractitionerParams, OystehrClientRequest } from '../..';
|
|
2
2
|
import { SDKResource } from '../../client/client';
|
|
3
3
|
import { OystehrConfig } from '../../config';
|
|
4
4
|
export declare class Erx extends SDKResource {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(config: OystehrConfig);
|
|
7
7
|
/**
|
|
8
|
-
* Search for allergens
|
|
8
|
+
* Search for allergens.
|
|
9
9
|
*/
|
|
10
10
|
searchAllergens(params: ErxSearchAllergensParams, request?: OystehrClientRequest): Promise<ErxSearchAllergensResponse>;
|
|
11
11
|
/**
|
|
12
|
-
* Search for medications.
|
|
12
|
+
* Search for medications.
|
|
13
13
|
*/
|
|
14
14
|
searchMedications(params: ErxSearchMedicationsParams, request?: OystehrClientRequest): Promise<ErxSearchMedicationsResponse>;
|
|
15
15
|
/**
|
|
@@ -24,6 +24,10 @@ export declare class Erx extends SDKResource {
|
|
|
24
24
|
* Checks for drug-allergy and drug-drug interactions with a specific drug for a patient. This endpoint requires the patient's allergies and medications to be synced with the upstream eRx provider.
|
|
25
25
|
*/
|
|
26
26
|
checkPrecheckInteractions(params: ErxCheckPrecheckInteractionsParams, request?: OystehrClientRequest): Promise<ErxCheckPrecheckInteractionsResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Cancel prescription for patient.
|
|
29
|
+
*/
|
|
30
|
+
cancelPrescription(params: ErxCancelPrescriptionParams, request?: OystehrClientRequest): Promise<void>;
|
|
27
31
|
/**
|
|
28
32
|
* Syncs demographic, allergy, and medication data for a patient with the upstream eRx provider.
|
|
29
33
|
*/
|
|
@@ -36,4 +40,16 @@ export declare class Erx extends SDKResource {
|
|
|
36
40
|
* Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.
|
|
37
41
|
*/
|
|
38
42
|
connectPractitioner(request?: OystehrClientRequest): Promise<ErxConnectPractitionerResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Check eRx enrollment for a practitioner.
|
|
45
|
+
*/
|
|
46
|
+
checkPractitionerEnrollment(params: ErxCheckPractitionerEnrollmentParams, request?: OystehrClientRequest): Promise<ErxCheckPractitionerEnrollmentResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Enroll a practitioner in the eRx service.
|
|
49
|
+
*/
|
|
50
|
+
enrollPractitioner(params: ErxEnrollPractitionerParams, request?: OystehrClientRequest): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Unenroll a practitioner from the eRx service.
|
|
53
|
+
*/
|
|
54
|
+
unenrollPractitioner(params: ErxUnenrollPractitionerParams, request?: OystehrClientRequest): Promise<void>;
|
|
39
55
|
}
|
|
@@ -9,13 +9,13 @@ class Erx extends SDKResource {
|
|
|
9
9
|
_Erx_instances.add(this);
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Search for allergens
|
|
12
|
+
* Search for allergens.
|
|
13
13
|
*/
|
|
14
14
|
searchAllergens(params, request) {
|
|
15
15
|
return this.request('/allergen', 'get', __classPrivateFieldGet(this, _Erx_instances, "m", _Erx_baseUrlThunk).bind(this))(params, request);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Search for medications.
|
|
18
|
+
* Search for medications.
|
|
19
19
|
*/
|
|
20
20
|
searchMedications(params, request) {
|
|
21
21
|
return this.request('/medication', 'get', __classPrivateFieldGet(this, _Erx_instances, "m", _Erx_baseUrlThunk).bind(this))(params, request);
|
|
@@ -38,6 +38,12 @@ class Erx extends SDKResource {
|
|
|
38
38
|
checkPrecheckInteractions(params, request) {
|
|
39
39
|
return this.request('/patient/{patientId}/interactions/precheck/{drugId}', 'get', __classPrivateFieldGet(this, _Erx_instances, "m", _Erx_baseUrlThunk).bind(this))(params, request);
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Cancel prescription for patient.
|
|
43
|
+
*/
|
|
44
|
+
cancelPrescription(params, request) {
|
|
45
|
+
return this.request('/patient/{patientId}/prescriptions/{medicationRequestId}', 'delete', __classPrivateFieldGet(this, _Erx_instances, "m", _Erx_baseUrlThunk).bind(this))(params, request);
|
|
46
|
+
}
|
|
41
47
|
/**
|
|
42
48
|
* Syncs demographic, allergy, and medication data for a patient with the upstream eRx provider.
|
|
43
49
|
*/
|
|
@@ -50,6 +56,24 @@ class Erx extends SDKResource {
|
|
|
50
56
|
connectPractitioner(params, request) {
|
|
51
57
|
return this.request('/practitioner/connect', 'get', __classPrivateFieldGet(this, _Erx_instances, "m", _Erx_baseUrlThunk).bind(this))(params, request);
|
|
52
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Check eRx enrollment for a practitioner.
|
|
61
|
+
*/
|
|
62
|
+
checkPractitionerEnrollment(params, request) {
|
|
63
|
+
return this.request('/practitioner/{practitionerId}', 'get', __classPrivateFieldGet(this, _Erx_instances, "m", _Erx_baseUrlThunk).bind(this))(params, request);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Enroll a practitioner in the eRx service.
|
|
67
|
+
*/
|
|
68
|
+
enrollPractitioner(params, request) {
|
|
69
|
+
return this.request('/practitioner/{practitionerId}', 'post', __classPrivateFieldGet(this, _Erx_instances, "m", _Erx_baseUrlThunk).bind(this))(params, request);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Unenroll a practitioner from the eRx service.
|
|
73
|
+
*/
|
|
74
|
+
unenrollPractitioner(params, request) {
|
|
75
|
+
return this.request('/practitioner/{practitionerId}', 'delete', __classPrivateFieldGet(this, _Erx_instances, "m", _Erx_baseUrlThunk).bind(this))(params, request);
|
|
76
|
+
}
|
|
53
77
|
}
|
|
54
78
|
_Erx_instances = new WeakSet(), _Erx_baseUrlThunk = function _Erx_baseUrlThunk() {
|
|
55
79
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"erx.js","sources":["../../../../src/resources/classes/erx.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxCheckAllergyInteractionsParams,\n ErxCheckAllergyInteractionsResponse,\n ErxCheckMedicationInteractionsParams,\n ErxCheckMedicationInteractionsResponse,\n ErxCheckPrecheckInteractionsParams,\n ErxCheckPrecheckInteractionsResponse,\n ErxConnectPractitionerParams,\n ErxConnectPractitionerResponse,\n ErxSearchAllergensParams,\n ErxSearchAllergensResponse,\n ErxSearchMedicationsParams,\n ErxSearchMedicationsResponse,\n ErxSyncPatientParams,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Erx extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['erxApiUrl'] ?? 'https://erx-api.zapehr.com/v3';\n }\n /**\n * Search for allergens
|
|
1
|
+
{"version":3,"file":"erx.js","sources":["../../../../src/resources/classes/erx.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxCancelPrescriptionParams,\n ErxCheckAllergyInteractionsParams,\n ErxCheckAllergyInteractionsResponse,\n ErxCheckMedicationInteractionsParams,\n ErxCheckMedicationInteractionsResponse,\n ErxCheckPractitionerEnrollmentParams,\n ErxCheckPractitionerEnrollmentResponse,\n ErxCheckPrecheckInteractionsParams,\n ErxCheckPrecheckInteractionsResponse,\n ErxConnectPractitionerParams,\n ErxConnectPractitionerResponse,\n ErxEnrollPractitionerParams,\n ErxSearchAllergensParams,\n ErxSearchAllergensResponse,\n ErxSearchMedicationsParams,\n ErxSearchMedicationsResponse,\n ErxSyncPatientParams,\n ErxUnenrollPractitionerParams,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Erx extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['erxApiUrl'] ?? 'https://erx-api.zapehr.com/v3';\n }\n /**\n * Search for allergens.\n */\n searchAllergens(\n params: ErxSearchAllergensParams,\n request?: OystehrClientRequest\n ): Promise<ErxSearchAllergensResponse> {\n return this.request('/allergen', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for medications.\n */\n searchMedications(\n params: ErxSearchMedicationsParams,\n request?: OystehrClientRequest\n ): Promise<ErxSearchMedicationsResponse> {\n return this.request('/medication', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Checks for drug-allergy interactions for a patient. This endpoint requires the patient's allergies to be synced with the upstream eRx provider.\n */\n checkAllergyInteractions(\n params: ErxCheckAllergyInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckAllergyInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/allergy',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Checks for drug-drug interactions for a patient. This endpoint requires the patient's medications to be synced with the upstream eRx provider.\n */\n checkMedicationInteractions(\n params: ErxCheckMedicationInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckMedicationInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/medication',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Checks for drug-allergy and drug-drug interactions with a specific drug for a patient. This endpoint requires the patient's allergies and medications to be synced with the upstream eRx provider.\n */\n checkPrecheckInteractions(\n params: ErxCheckPrecheckInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckPrecheckInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/precheck/{drugId}',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Cancel prescription for patient.\n */\n cancelPrescription(params: ErxCancelPrescriptionParams, request?: OystehrClientRequest): Promise<void> {\n return this.request(\n '/patient/{patientId}/prescriptions/{medicationRequestId}',\n 'delete',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Syncs demographic, allergy, and medication data for a patient with the upstream eRx provider.\n */\n syncPatient(params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/patient/{patientId}/sync', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(\n params: ErxConnectPractitionerParams,\n request?: OystehrClientRequest\n ): Promise<ErxConnectPractitionerResponse>;\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(request?: OystehrClientRequest): Promise<ErxConnectPractitionerResponse>;\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(\n params?: ErxConnectPractitionerParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxConnectPractitionerResponse> {\n return this.request('/practitioner/connect', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Check eRx enrollment for a practitioner.\n */\n checkPractitionerEnrollment(\n params: ErxCheckPractitionerEnrollmentParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckPractitionerEnrollmentResponse> {\n return this.request('/practitioner/{practitionerId}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Enroll a practitioner in the eRx service.\n */\n enrollPractitioner(params: ErxEnrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/practitioner/{practitionerId}', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Unenroll a practitioner from the eRx service.\n */\n unenrollPractitioner(params: ErxUnenrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/practitioner/{practitionerId}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;;AAAA;;AA0BM,MAAO,GAAI,SAAQ,WAAW,CAAA;AAClC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;;KACf;AAID;;AAEG;IACH,eAAe,CACb,MAAgC,EAChC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,EAAA,iBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzF;AACD;;AAEG;IACH,iBAAiB,CACf,MAAkC,EAClC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,EAAA,iBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC3F;AACD;;AAEG;IACH,wBAAwB,CACtB,MAAyC,EACzC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,2CAA2C,EAC3C,KAAK,EACL,sBAAA,CAAA,IAAI,E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EAAA,GAAA,+BAA+B,CAAC;AAChF,CAAC;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Success
|
|
3
|
+
*/
|
|
4
|
+
export interface ErxCheckPractitionerEnrollmentResponse {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the practitioner is registered with the upstream eRx provider.
|
|
7
|
+
*/
|
|
8
|
+
registered: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the practitioner has confirmed their enrollment with the upstream eRx provider.
|
|
11
|
+
*/
|
|
12
|
+
confirmed: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the practitioner's account with the upstream eRx provider is active.
|
|
15
|
+
*/
|
|
16
|
+
active: boolean;
|
|
17
|
+
}
|
|
@@ -182,6 +182,11 @@ export * from './ErxCheckMedicationInteractionsParams';
|
|
|
182
182
|
export * from './ErxCheckMedicationInteractionsResponse';
|
|
183
183
|
export * from './ErxCheckPrecheckInteractionsParams';
|
|
184
184
|
export * from './ErxCheckPrecheckInteractionsResponse';
|
|
185
|
+
export * from './ErxCancelPrescriptionParams';
|
|
185
186
|
export * from './ErxSyncPatientParams';
|
|
186
187
|
export * from './ErxConnectPractitionerParams';
|
|
187
188
|
export * from './ErxConnectPractitionerResponse';
|
|
189
|
+
export * from './ErxCheckPractitionerEnrollmentParams';
|
|
190
|
+
export * from './ErxCheckPractitionerEnrollmentResponse';
|
|
191
|
+
export * from './ErxEnrollPractitionerParams';
|
|
192
|
+
export * from './ErxUnenrollPractitionerParams';
|
package/package.json
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
// AUTOGENERATED -- DO NOT EDIT
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
ErxCancelPrescriptionParams,
|
|
4
5
|
ErxCheckAllergyInteractionsParams,
|
|
5
6
|
ErxCheckAllergyInteractionsResponse,
|
|
6
7
|
ErxCheckMedicationInteractionsParams,
|
|
7
8
|
ErxCheckMedicationInteractionsResponse,
|
|
9
|
+
ErxCheckPractitionerEnrollmentParams,
|
|
10
|
+
ErxCheckPractitionerEnrollmentResponse,
|
|
8
11
|
ErxCheckPrecheckInteractionsParams,
|
|
9
12
|
ErxCheckPrecheckInteractionsResponse,
|
|
10
13
|
ErxConnectPractitionerParams,
|
|
11
14
|
ErxConnectPractitionerResponse,
|
|
15
|
+
ErxEnrollPractitionerParams,
|
|
12
16
|
ErxSearchAllergensParams,
|
|
13
17
|
ErxSearchAllergensResponse,
|
|
14
18
|
ErxSearchMedicationsParams,
|
|
15
19
|
ErxSearchMedicationsResponse,
|
|
16
20
|
ErxSyncPatientParams,
|
|
21
|
+
ErxUnenrollPractitionerParams,
|
|
17
22
|
OystehrClientRequest,
|
|
18
23
|
} from '../..';
|
|
19
24
|
import { SDKResource } from '../../client/client';
|
|
@@ -27,7 +32,7 @@ export class Erx extends SDKResource {
|
|
|
27
32
|
return this.config.services?.['erxApiUrl'] ?? 'https://erx-api.zapehr.com/v3';
|
|
28
33
|
}
|
|
29
34
|
/**
|
|
30
|
-
* Search for allergens
|
|
35
|
+
* Search for allergens.
|
|
31
36
|
*/
|
|
32
37
|
searchAllergens(
|
|
33
38
|
params: ErxSearchAllergensParams,
|
|
@@ -36,7 +41,7 @@ export class Erx extends SDKResource {
|
|
|
36
41
|
return this.request('/allergen', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
37
42
|
}
|
|
38
43
|
/**
|
|
39
|
-
* Search for medications.
|
|
44
|
+
* Search for medications.
|
|
40
45
|
*/
|
|
41
46
|
searchMedications(
|
|
42
47
|
params: ErxSearchMedicationsParams,
|
|
@@ -83,6 +88,16 @@ export class Erx extends SDKResource {
|
|
|
83
88
|
this.#baseUrlThunk.bind(this)
|
|
84
89
|
)(params, request);
|
|
85
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Cancel prescription for patient.
|
|
93
|
+
*/
|
|
94
|
+
cancelPrescription(params: ErxCancelPrescriptionParams, request?: OystehrClientRequest): Promise<void> {
|
|
95
|
+
return this.request(
|
|
96
|
+
'/patient/{patientId}/prescriptions/{medicationRequestId}',
|
|
97
|
+
'delete',
|
|
98
|
+
this.#baseUrlThunk.bind(this)
|
|
99
|
+
)(params, request);
|
|
100
|
+
}
|
|
86
101
|
/**
|
|
87
102
|
* Syncs demographic, allergy, and medication data for a patient with the upstream eRx provider.
|
|
88
103
|
*/
|
|
@@ -109,4 +124,25 @@ export class Erx extends SDKResource {
|
|
|
109
124
|
): Promise<ErxConnectPractitionerResponse> {
|
|
110
125
|
return this.request('/practitioner/connect', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
111
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Check eRx enrollment for a practitioner.
|
|
129
|
+
*/
|
|
130
|
+
checkPractitionerEnrollment(
|
|
131
|
+
params: ErxCheckPractitionerEnrollmentParams,
|
|
132
|
+
request?: OystehrClientRequest
|
|
133
|
+
): Promise<ErxCheckPractitionerEnrollmentResponse> {
|
|
134
|
+
return this.request('/practitioner/{practitionerId}', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Enroll a practitioner in the eRx service.
|
|
138
|
+
*/
|
|
139
|
+
enrollPractitioner(params: ErxEnrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {
|
|
140
|
+
return this.request('/practitioner/{practitionerId}', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Unenroll a practitioner from the eRx service.
|
|
144
|
+
*/
|
|
145
|
+
unenrollPractitioner(params: ErxUnenrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {
|
|
146
|
+
return this.request('/practitioner/{practitionerId}', 'delete', this.#baseUrlThunk.bind(this))(params, request);
|
|
147
|
+
}
|
|
112
148
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Success
|
|
5
|
+
*/
|
|
6
|
+
export interface ErxCheckPractitionerEnrollmentResponse {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the practitioner is registered with the upstream eRx provider.
|
|
9
|
+
*/
|
|
10
|
+
registered: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the practitioner has confirmed their enrollment with the upstream eRx provider.
|
|
13
|
+
*/
|
|
14
|
+
confirmed: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the practitioner's account with the upstream eRx provider is active.
|
|
17
|
+
*/
|
|
18
|
+
active: boolean;
|
|
19
|
+
}
|
|
@@ -184,6 +184,11 @@ export * from './ErxCheckMedicationInteractionsParams';
|
|
|
184
184
|
export * from './ErxCheckMedicationInteractionsResponse';
|
|
185
185
|
export * from './ErxCheckPrecheckInteractionsParams';
|
|
186
186
|
export * from './ErxCheckPrecheckInteractionsResponse';
|
|
187
|
+
export * from './ErxCancelPrescriptionParams';
|
|
187
188
|
export * from './ErxSyncPatientParams';
|
|
188
189
|
export * from './ErxConnectPractitionerParams';
|
|
189
190
|
export * from './ErxConnectPractitionerResponse';
|
|
191
|
+
export * from './ErxCheckPractitionerEnrollmentParams';
|
|
192
|
+
export * from './ErxCheckPractitionerEnrollmentResponse';
|
|
193
|
+
export * from './ErxEnrollPractitionerParams';
|
|
194
|
+
export * from './ErxUnenrollPractitionerParams';
|