@oystehr/sdk 4.1.9 → 4.2.0

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.
Files changed (115) hide show
  1. package/dist/cjs/config.d.ts +1 -0
  2. package/dist/cjs/index.min.cjs +1 -1
  3. package/dist/cjs/index.min.cjs.map +1 -1
  4. package/dist/cjs/resources/classes/fhir-ext.cjs +14 -1
  5. package/dist/cjs/resources/classes/fhir-ext.cjs.map +1 -1
  6. package/dist/cjs/resources/classes/index.cjs +3 -6
  7. package/dist/cjs/resources/classes/index.cjs.map +1 -1
  8. package/dist/cjs/resources/classes/index.d.ts +2 -4
  9. package/dist/cjs/resources/classes/lab.cjs +10 -0
  10. package/dist/cjs/resources/classes/lab.cjs.map +1 -1
  11. package/dist/cjs/resources/classes/lab.d.ts +9 -1
  12. package/dist/cjs/resources/classes/terminology.cjs +34 -0
  13. package/dist/cjs/resources/classes/terminology.cjs.map +1 -0
  14. package/dist/cjs/resources/classes/terminology.d.ts +21 -0
  15. package/dist/cjs/resources/classes/user.cjs +9 -0
  16. package/dist/cjs/resources/classes/user.cjs.map +1 -1
  17. package/dist/cjs/resources/classes/user.d.ts +8 -1
  18. package/dist/cjs/resources/types/LabRouteGetResponse.d.ts +21 -0
  19. package/dist/cjs/resources/types/LabRouteListResponse.d.ts +3 -3
  20. package/dist/cjs/resources/types/TerminologySearchCptParams.d.ts +7 -0
  21. package/dist/cjs/resources/types/TerminologySearchCptResponse.d.ts +27 -0
  22. package/dist/cjs/resources/types/TerminologySearchHcpcsParams.d.ts +7 -0
  23. package/dist/cjs/resources/types/TerminologySearchHcpcsResponse.d.ts +27 -0
  24. package/dist/cjs/resources/types/UserResetPasswordLinkParams.d.ts +7 -0
  25. package/dist/cjs/resources/types/index.d.ts +6 -12
  26. package/dist/esm/config.d.ts +1 -0
  27. package/dist/esm/index.min.js +1 -1
  28. package/dist/esm/index.min.js.map +1 -1
  29. package/dist/esm/resources/classes/fhir-ext.js +14 -1
  30. package/dist/esm/resources/classes/fhir-ext.js.map +1 -1
  31. package/dist/esm/resources/classes/index.d.ts +2 -4
  32. package/dist/esm/resources/classes/index.js +3 -6
  33. package/dist/esm/resources/classes/index.js.map +1 -1
  34. package/dist/esm/resources/classes/lab.d.ts +9 -1
  35. package/dist/esm/resources/classes/lab.js +10 -0
  36. package/dist/esm/resources/classes/lab.js.map +1 -1
  37. package/dist/esm/resources/classes/terminology.d.ts +21 -0
  38. package/dist/esm/resources/classes/terminology.js +32 -0
  39. package/dist/esm/resources/classes/terminology.js.map +1 -0
  40. package/dist/esm/resources/classes/user.d.ts +8 -1
  41. package/dist/esm/resources/classes/user.js +9 -0
  42. package/dist/esm/resources/classes/user.js.map +1 -1
  43. package/dist/esm/resources/types/LabRouteGetResponse.d.ts +21 -0
  44. package/dist/esm/resources/types/LabRouteListResponse.d.ts +3 -3
  45. package/dist/esm/resources/types/TerminologySearchCptParams.d.ts +7 -0
  46. package/dist/esm/resources/types/TerminologySearchCptResponse.d.ts +27 -0
  47. package/dist/esm/resources/types/TerminologySearchHcpcsParams.d.ts +7 -0
  48. package/dist/esm/resources/types/TerminologySearchHcpcsResponse.d.ts +27 -0
  49. package/dist/esm/resources/types/UserResetPasswordLinkParams.d.ts +7 -0
  50. package/dist/esm/resources/types/index.d.ts +6 -12
  51. package/package.json +6 -4
  52. package/src/config.ts +1 -0
  53. package/src/resources/classes/fhir-ext.ts +16 -1
  54. package/src/resources/classes/index.ts +3 -6
  55. package/src/resources/classes/lab.ts +11 -0
  56. package/src/resources/classes/terminology.ts +41 -0
  57. package/src/resources/classes/user.ts +10 -0
  58. package/src/resources/types/LabRouteGetResponse.ts +23 -0
  59. package/src/resources/types/LabRouteListResponse.ts +3 -3
  60. package/src/resources/types/TerminologySearchCptParams.ts +9 -0
  61. package/src/resources/types/TerminologySearchCptResponse.ts +29 -0
  62. package/src/resources/types/TerminologySearchHcpcsParams.ts +9 -0
  63. package/src/resources/types/TerminologySearchHcpcsResponse.ts +29 -0
  64. package/src/resources/types/UserResetPasswordLinkParams.ts +9 -0
  65. package/src/resources/types/index.ts +6 -12
  66. package/dist/cjs/resources/classes/erxV1.cjs +0 -46
  67. package/dist/cjs/resources/classes/erxV1.cjs.map +0 -1
  68. package/dist/cjs/resources/classes/erxV1.d.ts +0 -31
  69. package/dist/cjs/resources/classes/erxV2.cjs +0 -22
  70. package/dist/cjs/resources/classes/erxV2.cjs.map +0 -1
  71. package/dist/cjs/resources/classes/erxV2.d.ts +0 -15
  72. package/dist/cjs/resources/types/ErxV1AllergySearchParams.d.ts +0 -3
  73. package/dist/cjs/resources/types/ErxV1AllergySearchResponse.d.ts +0 -19
  74. package/dist/cjs/resources/types/ErxV1CancelOrderParams.d.ts +0 -6
  75. package/dist/cjs/resources/types/ErxV1CancelOrderResponse.d.ts +0 -6
  76. package/dist/cjs/resources/types/ErxV1CancelPrescriptionParams.d.ts +0 -6
  77. package/dist/cjs/resources/types/ErxV1CancelPrescriptionResponse.d.ts +0 -6
  78. package/dist/cjs/resources/types/ErxV1MedicationSearchParams.d.ts +0 -6
  79. package/dist/cjs/resources/types/ErxV1MedicationSearchResponse.d.ts +0 -38
  80. package/dist/cjs/resources/types/ErxV1SyncPatientParams.d.ts +0 -3
  81. package/dist/cjs/resources/types/ErxV1SyncPatientResponse.d.ts +0 -9
  82. package/dist/cjs/resources/types/ErxV2MedicationSearchParams.d.ts +0 -4
  83. package/dist/cjs/resources/types/ErxV2MedicationSearchResponse.d.ts +0 -38
  84. package/dist/esm/resources/classes/erxV1.d.ts +0 -31
  85. package/dist/esm/resources/classes/erxV1.js +0 -44
  86. package/dist/esm/resources/classes/erxV1.js.map +0 -1
  87. package/dist/esm/resources/classes/erxV2.d.ts +0 -15
  88. package/dist/esm/resources/classes/erxV2.js +0 -20
  89. package/dist/esm/resources/classes/erxV2.js.map +0 -1
  90. package/dist/esm/resources/types/ErxV1AllergySearchParams.d.ts +0 -3
  91. package/dist/esm/resources/types/ErxV1AllergySearchResponse.d.ts +0 -19
  92. package/dist/esm/resources/types/ErxV1CancelOrderParams.d.ts +0 -6
  93. package/dist/esm/resources/types/ErxV1CancelOrderResponse.d.ts +0 -6
  94. package/dist/esm/resources/types/ErxV1CancelPrescriptionParams.d.ts +0 -6
  95. package/dist/esm/resources/types/ErxV1CancelPrescriptionResponse.d.ts +0 -6
  96. package/dist/esm/resources/types/ErxV1MedicationSearchParams.d.ts +0 -6
  97. package/dist/esm/resources/types/ErxV1MedicationSearchResponse.d.ts +0 -38
  98. package/dist/esm/resources/types/ErxV1SyncPatientParams.d.ts +0 -3
  99. package/dist/esm/resources/types/ErxV1SyncPatientResponse.d.ts +0 -9
  100. package/dist/esm/resources/types/ErxV2MedicationSearchParams.d.ts +0 -4
  101. package/dist/esm/resources/types/ErxV2MedicationSearchResponse.d.ts +0 -38
  102. package/src/resources/classes/erxV1.ts +0 -73
  103. package/src/resources/classes/erxV2.ts +0 -34
  104. package/src/resources/types/ErxV1AllergySearchParams.ts +0 -5
  105. package/src/resources/types/ErxV1AllergySearchResponse.ts +0 -21
  106. package/src/resources/types/ErxV1CancelOrderParams.ts +0 -8
  107. package/src/resources/types/ErxV1CancelOrderResponse.ts +0 -8
  108. package/src/resources/types/ErxV1CancelPrescriptionParams.ts +0 -8
  109. package/src/resources/types/ErxV1CancelPrescriptionResponse.ts +0 -8
  110. package/src/resources/types/ErxV1MedicationSearchParams.ts +0 -8
  111. package/src/resources/types/ErxV1MedicationSearchResponse.ts +0 -40
  112. package/src/resources/types/ErxV1SyncPatientParams.ts +0 -5
  113. package/src/resources/types/ErxV1SyncPatientResponse.ts +0 -11
  114. package/src/resources/types/ErxV2MedicationSearchParams.ts +0 -6
  115. package/src/resources/types/ErxV2MedicationSearchResponse.ts +0 -40
@@ -1,38 +0,0 @@
1
- /**
2
- * Medications
3
- */
4
- export interface ErxV1MedicationSearchResponse {
5
- medications?: {
6
- /**
7
- * The Photon identifier for the medication.
8
- */
9
- id: string;
10
- /**
11
- * Human readible name of medication.
12
- */
13
- name: string;
14
- codes: {
15
- /**
16
- * RxNorm Concept Unique (RxCUI) identifier of medication.
17
- */
18
- rxcui?: string | null;
19
- productNDC?: string | null;
20
- packageNDC?: string | null;
21
- SKU?: string | null;
22
- HCPCS?: string | null;
23
- };
24
- /**
25
- * Null implies a medication can not be prescribed
26
- */
27
- type?: ('RX' | 'OTC') | null;
28
- concept: 'DRUG' | 'PRODUCT' | 'PACKAGE';
29
- schedule?: ('I' | 'II' | 'III' | 'IV' | 'V') | null;
30
- controlled: boolean;
31
- brandName?: string | null;
32
- genericName?: string | null;
33
- strength?: string | null;
34
- form?: string | null;
35
- manufacturer?: string | null;
36
- description?: string | null;
37
- }[];
38
- }
@@ -1,3 +0,0 @@
1
- export interface ErxV1SyncPatientParams {
2
- patientId: string;
3
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Photon sync response
3
- */
4
- export interface ErxV1SyncPatientResponse {
5
- /**
6
- * The Photon identifier for the patient.
7
- */
8
- photonPatientId?: string;
9
- }
@@ -1,4 +0,0 @@
1
- export interface ErxV2MedicationSearchParams {
2
- name?: string;
3
- code?: string;
4
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * Medications
3
- */
4
- export interface ErxV2MedicationSearchResponse {
5
- medications?: {
6
- /**
7
- * Internal identifier for the medication.
8
- */
9
- id: string;
10
- /**
11
- * Human readible name of medication.
12
- */
13
- name: string;
14
- codes: {
15
- /**
16
- * RxNorm Concept Unique (RxCUI) identifier of medication.
17
- */
18
- rxcui?: string | null;
19
- productNDC?: string | null;
20
- packageNDC?: string | null;
21
- SKU?: string | null;
22
- HCPCS?: string | null;
23
- };
24
- /**
25
- * Null implies a medication can not be prescribed
26
- */
27
- type?: ('RX' | 'OTC') | null;
28
- concept?: ('DRUG' | 'PRODUCT' | 'PACKAGE') | null;
29
- schedule?: ('I' | 'II' | 'III' | 'IV' | 'V') | null;
30
- controlled?: boolean | null;
31
- brandName?: string | null;
32
- genericName?: string | null;
33
- strength?: string | null;
34
- form?: string | null;
35
- manufacturer?: string | null;
36
- description?: string | null;
37
- }[];
38
- }
@@ -1,31 +0,0 @@
1
- import { ErxV1AllergySearchParams, ErxV1AllergySearchResponse, ErxV1CancelOrderParams, ErxV1CancelOrderResponse, ErxV1CancelPrescriptionParams, ErxV1CancelPrescriptionResponse, ErxV1MedicationSearchParams, ErxV1MedicationSearchResponse, ErxV1SyncPatientParams, ErxV1SyncPatientResponse, OystehrClientRequest } from '../..';
2
- import { SDKResource } from '../../client/client';
3
- import { OystehrConfig } from '../../config';
4
- export declare class ErxV1 extends SDKResource {
5
- #private;
6
- constructor(config: OystehrConfig);
7
- /**
8
- * Retrieve patient properties from FHIR service and sync them with eRx service
9
- */
10
- syncPatient(params: ErxV1SyncPatientParams, request?: OystehrClientRequest): Promise<ErxV1SyncPatientResponse>;
11
- /**
12
- * Search for allergies
13
- */
14
- allergySearch(params: ErxV1AllergySearchParams, request?: OystehrClientRequest): Promise<ErxV1AllergySearchResponse>;
15
- /**
16
- * Cancel photon order
17
- */
18
- cancelOrder(params: ErxV1CancelOrderParams, request?: OystehrClientRequest): Promise<ErxV1CancelOrderResponse>;
19
- /**
20
- * Cancel photon prescription
21
- */
22
- cancelPrescription(params: ErxV1CancelPrescriptionParams, request?: OystehrClientRequest): Promise<ErxV1CancelPrescriptionResponse>;
23
- /**
24
- * Search for medications. Provide at least one of code or name filters
25
- */
26
- medicationSearch(params: ErxV1MedicationSearchParams, request?: OystehrClientRequest): Promise<ErxV1MedicationSearchResponse>;
27
- /**
28
- * Search for medications. Provide at least one of code or name filters
29
- */
30
- medicationSearch(request?: OystehrClientRequest): Promise<ErxV1MedicationSearchResponse>;
31
- }
@@ -1,44 +0,0 @@
1
- import { SDKResource } from '../../client/client.js';
2
-
3
- // AUTOGENERATED -- DO NOT EDIT
4
- class ErxV1 extends SDKResource {
5
- constructor(config) {
6
- super(config);
7
- }
8
- #baseUrlThunk() {
9
- return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
10
- }
11
- /**
12
- * Retrieve patient properties from FHIR service and sync them with eRx service
13
- */
14
- syncPatient(params, request) {
15
- return this.request('/erx/sync-patient/{patientId}', 'post', this.#baseUrlThunk.bind(this))(params, request);
16
- }
17
- /**
18
- * Search for allergies
19
- */
20
- allergySearch(params, request) {
21
- return this.request('/erx/allergy/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
22
- }
23
- /**
24
- * Cancel photon order
25
- */
26
- cancelOrder(params, request) {
27
- return this.request('/erx/cancel-order', 'post', this.#baseUrlThunk.bind(this))(params, request);
28
- }
29
- /**
30
- * Cancel photon prescription
31
- */
32
- cancelPrescription(params, request) {
33
- return this.request('/erx/cancel-prescription', 'post', this.#baseUrlThunk.bind(this))(params, request);
34
- }
35
- /**
36
- * Search for medications. Provide at least one of code or name filters
37
- */
38
- medicationSearch(params, request) {
39
- return this.request('/erx/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
40
- }
41
- }
42
-
43
- export { ErxV1 };
44
- //# sourceMappingURL=erxV1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"erxV1.js","sources":["../../../../src/resources/classes/erxV1.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxV1AllergySearchParams,\n ErxV1AllergySearchResponse,\n ErxV1CancelOrderParams,\n ErxV1CancelOrderResponse,\n ErxV1CancelPrescriptionParams,\n ErxV1CancelPrescriptionResponse,\n ErxV1MedicationSearchParams,\n ErxV1MedicationSearchResponse,\n ErxV1SyncPatientParams,\n ErxV1SyncPatientResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class ErxV1 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Retrieve patient properties from FHIR service and sync them with eRx service\n */\n syncPatient(params: ErxV1SyncPatientParams, request?: OystehrClientRequest): Promise<ErxV1SyncPatientResponse> {\n return this.request('/erx/sync-patient/{patientId}', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for allergies\n */\n allergySearch(params: ErxV1AllergySearchParams, request?: OystehrClientRequest): Promise<ErxV1AllergySearchResponse> {\n return this.request('/erx/allergy/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Cancel photon order\n */\n cancelOrder(params: ErxV1CancelOrderParams, request?: OystehrClientRequest): Promise<ErxV1CancelOrderResponse> {\n return this.request('/erx/cancel-order', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Cancel photon prescription\n */\n cancelPrescription(\n params: ErxV1CancelPrescriptionParams,\n request?: OystehrClientRequest\n ): Promise<ErxV1CancelPrescriptionResponse> {\n return this.request('/erx/cancel-prescription', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params: ErxV1MedicationSearchParams,\n request?: OystehrClientRequest\n ): Promise<ErxV1MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(request?: OystehrClientRequest): Promise<ErxV1MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params?: ErxV1MedicationSearchParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxV1MedicationSearchResponse> {\n return this.request('/erx/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAkBM,MAAO,KAAM,SAAQ,WAAW,CAAA;AACpC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC;IACf;IACA,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC;IACvF;AACA;;AAEG;IACH,WAAW,CAAC,MAA8B,EAAE,OAA8B,EAAA;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9G;AACA;;AAEG;IACH,aAAa,CAAC,MAAgC,EAAE,OAA8B,EAAA;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IACnG;AACA;;AAEG;IACH,WAAW,CAAC,MAA8B,EAAE,OAA8B,EAAA;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IAClG;AACA;;AAEG;IACH,kBAAkB,CAChB,MAAqC,EACrC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IACzG;AAYA;;AAEG;IACH,gBAAgB,CACd,MAA2D,EAC3D,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IACtG;AACD;;;;"}
@@ -1,15 +0,0 @@
1
- import { ErxV2MedicationSearchParams, ErxV2MedicationSearchResponse, OystehrClientRequest } from '../..';
2
- import { SDKResource } from '../../client/client';
3
- import { OystehrConfig } from '../../config';
4
- export declare class ErxV2 extends SDKResource {
5
- #private;
6
- constructor(config: OystehrConfig);
7
- /**
8
- * Search for medications. Provide at least one of code or name filters
9
- */
10
- medicationSearch(params: ErxV2MedicationSearchParams, request?: OystehrClientRequest): Promise<ErxV2MedicationSearchResponse>;
11
- /**
12
- * Search for medications. Provide at least one of code or name filters
13
- */
14
- medicationSearch(request?: OystehrClientRequest): Promise<ErxV2MedicationSearchResponse>;
15
- }
@@ -1,20 +0,0 @@
1
- import { SDKResource } from '../../client/client.js';
2
-
3
- // AUTOGENERATED -- DO NOT EDIT
4
- class ErxV2 extends SDKResource {
5
- constructor(config) {
6
- super(config);
7
- }
8
- #baseUrlThunk() {
9
- return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
10
- }
11
- /**
12
- * Search for medications. Provide at least one of code or name filters
13
- */
14
- medicationSearch(params, request) {
15
- return this.request('/erx/v2/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
16
- }
17
- }
18
-
19
- export { ErxV2 };
20
- //# sourceMappingURL=erxV2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"erxV2.js","sources":["../../../../src/resources/classes/erxV2.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { ErxV2MedicationSearchParams, ErxV2MedicationSearchResponse, OystehrClientRequest } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class ErxV2 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params: ErxV2MedicationSearchParams,\n request?: OystehrClientRequest\n ): Promise<ErxV2MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(request?: OystehrClientRequest): Promise<ErxV2MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params?: ErxV2MedicationSearchParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxV2MedicationSearchResponse> {\n return this.request('/erx/v2/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAMM,MAAO,KAAM,SAAQ,WAAW,CAAA;AACpC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC;IACf;IACA,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC;IACvF;AAYA;;AAEG;IACH,gBAAgB,CACd,MAA2D,EAC3D,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,2BAA2B,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IACzG;AACD;;;;"}
@@ -1,3 +0,0 @@
1
- export interface ErxV1AllergySearchParams {
2
- name: string;
3
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * Allergens
3
- */
4
- export interface ErxV1AllergySearchResponse {
5
- allergens?: {
6
- /**
7
- * The Photon identifier for the allergen.
8
- */
9
- id?: string;
10
- /**
11
- * Human readible name of allergen.
12
- */
13
- name?: string;
14
- /**
15
- * RxNorm Concept Unique (RxCUI) identifier of allergen.
16
- */
17
- rxcui?: string;
18
- }[];
19
- }
@@ -1,6 +0,0 @@
1
- export interface ErxV1CancelOrderParams {
2
- /**
3
- * A photon id of the order to cancel.
4
- */
5
- orderId: string;
6
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * Cancelled order
3
- */
4
- export interface ErxV1CancelOrderResponse {
5
- orderId: string;
6
- }
@@ -1,6 +0,0 @@
1
- export interface ErxV1CancelPrescriptionParams {
2
- /**
3
- * A photon id of the prescription to cancel.
4
- */
5
- prescriptionId: string;
6
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * Cancelled prescription
3
- */
4
- export interface ErxV1CancelPrescriptionResponse {
5
- prescriptionId: string;
6
- }
@@ -1,6 +0,0 @@
1
- export interface ErxV1MedicationSearchParams {
2
- name?: string;
3
- code?: string;
4
- after?: string;
5
- first?: number;
6
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * Medications
3
- */
4
- export interface ErxV1MedicationSearchResponse {
5
- medications?: {
6
- /**
7
- * The Photon identifier for the medication.
8
- */
9
- id: string;
10
- /**
11
- * Human readible name of medication.
12
- */
13
- name: string;
14
- codes: {
15
- /**
16
- * RxNorm Concept Unique (RxCUI) identifier of medication.
17
- */
18
- rxcui?: string | null;
19
- productNDC?: string | null;
20
- packageNDC?: string | null;
21
- SKU?: string | null;
22
- HCPCS?: string | null;
23
- };
24
- /**
25
- * Null implies a medication can not be prescribed
26
- */
27
- type?: ('RX' | 'OTC') | null;
28
- concept: 'DRUG' | 'PRODUCT' | 'PACKAGE';
29
- schedule?: ('I' | 'II' | 'III' | 'IV' | 'V') | null;
30
- controlled: boolean;
31
- brandName?: string | null;
32
- genericName?: string | null;
33
- strength?: string | null;
34
- form?: string | null;
35
- manufacturer?: string | null;
36
- description?: string | null;
37
- }[];
38
- }
@@ -1,3 +0,0 @@
1
- export interface ErxV1SyncPatientParams {
2
- patientId: string;
3
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Photon sync response
3
- */
4
- export interface ErxV1SyncPatientResponse {
5
- /**
6
- * The Photon identifier for the patient.
7
- */
8
- photonPatientId?: string;
9
- }
@@ -1,4 +0,0 @@
1
- export interface ErxV2MedicationSearchParams {
2
- name?: string;
3
- code?: string;
4
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * Medications
3
- */
4
- export interface ErxV2MedicationSearchResponse {
5
- medications?: {
6
- /**
7
- * Internal identifier for the medication.
8
- */
9
- id: string;
10
- /**
11
- * Human readible name of medication.
12
- */
13
- name: string;
14
- codes: {
15
- /**
16
- * RxNorm Concept Unique (RxCUI) identifier of medication.
17
- */
18
- rxcui?: string | null;
19
- productNDC?: string | null;
20
- packageNDC?: string | null;
21
- SKU?: string | null;
22
- HCPCS?: string | null;
23
- };
24
- /**
25
- * Null implies a medication can not be prescribed
26
- */
27
- type?: ('RX' | 'OTC') | null;
28
- concept?: ('DRUG' | 'PRODUCT' | 'PACKAGE') | null;
29
- schedule?: ('I' | 'II' | 'III' | 'IV' | 'V') | null;
30
- controlled?: boolean | null;
31
- brandName?: string | null;
32
- genericName?: string | null;
33
- strength?: string | null;
34
- form?: string | null;
35
- manufacturer?: string | null;
36
- description?: string | null;
37
- }[];
38
- }
@@ -1,73 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- import {
4
- ErxV1AllergySearchParams,
5
- ErxV1AllergySearchResponse,
6
- ErxV1CancelOrderParams,
7
- ErxV1CancelOrderResponse,
8
- ErxV1CancelPrescriptionParams,
9
- ErxV1CancelPrescriptionResponse,
10
- ErxV1MedicationSearchParams,
11
- ErxV1MedicationSearchResponse,
12
- ErxV1SyncPatientParams,
13
- ErxV1SyncPatientResponse,
14
- OystehrClientRequest,
15
- } from '../..';
16
- import { SDKResource } from '../../client/client';
17
- import { OystehrConfig } from '../../config';
18
-
19
- export class ErxV1 extends SDKResource {
20
- constructor(config: OystehrConfig) {
21
- super(config);
22
- }
23
- #baseUrlThunk(): string {
24
- return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
25
- }
26
- /**
27
- * Retrieve patient properties from FHIR service and sync them with eRx service
28
- */
29
- syncPatient(params: ErxV1SyncPatientParams, request?: OystehrClientRequest): Promise<ErxV1SyncPatientResponse> {
30
- return this.request('/erx/sync-patient/{patientId}', 'post', this.#baseUrlThunk.bind(this))(params, request);
31
- }
32
- /**
33
- * Search for allergies
34
- */
35
- allergySearch(params: ErxV1AllergySearchParams, request?: OystehrClientRequest): Promise<ErxV1AllergySearchResponse> {
36
- return this.request('/erx/allergy/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
37
- }
38
- /**
39
- * Cancel photon order
40
- */
41
- cancelOrder(params: ErxV1CancelOrderParams, request?: OystehrClientRequest): Promise<ErxV1CancelOrderResponse> {
42
- return this.request('/erx/cancel-order', 'post', this.#baseUrlThunk.bind(this))(params, request);
43
- }
44
- /**
45
- * Cancel photon prescription
46
- */
47
- cancelPrescription(
48
- params: ErxV1CancelPrescriptionParams,
49
- request?: OystehrClientRequest
50
- ): Promise<ErxV1CancelPrescriptionResponse> {
51
- return this.request('/erx/cancel-prescription', 'post', this.#baseUrlThunk.bind(this))(params, request);
52
- }
53
- /**
54
- * Search for medications. Provide at least one of code or name filters
55
- */
56
- medicationSearch(
57
- params: ErxV1MedicationSearchParams,
58
- request?: OystehrClientRequest
59
- ): Promise<ErxV1MedicationSearchResponse>;
60
- /**
61
- * Search for medications. Provide at least one of code or name filters
62
- */
63
- medicationSearch(request?: OystehrClientRequest): Promise<ErxV1MedicationSearchResponse>;
64
- /**
65
- * Search for medications. Provide at least one of code or name filters
66
- */
67
- medicationSearch(
68
- params?: ErxV1MedicationSearchParams | OystehrClientRequest,
69
- request?: OystehrClientRequest
70
- ): Promise<ErxV1MedicationSearchResponse> {
71
- return this.request('/erx/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
72
- }
73
- }
@@ -1,34 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- import { ErxV2MedicationSearchParams, ErxV2MedicationSearchResponse, OystehrClientRequest } from '../..';
4
- import { SDKResource } from '../../client/client';
5
- import { OystehrConfig } from '../../config';
6
-
7
- export class ErxV2 extends SDKResource {
8
- constructor(config: OystehrConfig) {
9
- super(config);
10
- }
11
- #baseUrlThunk(): string {
12
- return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
13
- }
14
- /**
15
- * Search for medications. Provide at least one of code or name filters
16
- */
17
- medicationSearch(
18
- params: ErxV2MedicationSearchParams,
19
- request?: OystehrClientRequest
20
- ): Promise<ErxV2MedicationSearchResponse>;
21
- /**
22
- * Search for medications. Provide at least one of code or name filters
23
- */
24
- medicationSearch(request?: OystehrClientRequest): Promise<ErxV2MedicationSearchResponse>;
25
- /**
26
- * Search for medications. Provide at least one of code or name filters
27
- */
28
- medicationSearch(
29
- params?: ErxV2MedicationSearchParams | OystehrClientRequest,
30
- request?: OystehrClientRequest
31
- ): Promise<ErxV2MedicationSearchResponse> {
32
- return this.request('/erx/v2/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
33
- }
34
- }
@@ -1,5 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- export interface ErxV1AllergySearchParams {
4
- name: string;
5
- }
@@ -1,21 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- /**
4
- * Allergens
5
- */
6
- export interface ErxV1AllergySearchResponse {
7
- allergens?: {
8
- /**
9
- * The Photon identifier for the allergen.
10
- */
11
- id?: string;
12
- /**
13
- * Human readible name of allergen.
14
- */
15
- name?: string;
16
- /**
17
- * RxNorm Concept Unique (RxCUI) identifier of allergen.
18
- */
19
- rxcui?: string;
20
- }[];
21
- }
@@ -1,8 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- export interface ErxV1CancelOrderParams {
4
- /**
5
- * A photon id of the order to cancel.
6
- */
7
- orderId: string;
8
- }
@@ -1,8 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- /**
4
- * Cancelled order
5
- */
6
- export interface ErxV1CancelOrderResponse {
7
- orderId: string;
8
- }
@@ -1,8 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- export interface ErxV1CancelPrescriptionParams {
4
- /**
5
- * A photon id of the prescription to cancel.
6
- */
7
- prescriptionId: string;
8
- }
@@ -1,8 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- /**
4
- * Cancelled prescription
5
- */
6
- export interface ErxV1CancelPrescriptionResponse {
7
- prescriptionId: string;
8
- }
@@ -1,8 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- export interface ErxV1MedicationSearchParams {
4
- name?: string;
5
- code?: string;
6
- after?: string;
7
- first?: number;
8
- }
@@ -1,40 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- /**
4
- * Medications
5
- */
6
- export interface ErxV1MedicationSearchResponse {
7
- medications?: {
8
- /**
9
- * The Photon identifier for the medication.
10
- */
11
- id: string;
12
- /**
13
- * Human readible name of medication.
14
- */
15
- name: string;
16
- codes: {
17
- /**
18
- * RxNorm Concept Unique (RxCUI) identifier of medication.
19
- */
20
- rxcui?: string | null;
21
- productNDC?: string | null;
22
- packageNDC?: string | null;
23
- SKU?: string | null;
24
- HCPCS?: string | null;
25
- };
26
- /**
27
- * Null implies a medication can not be prescribed
28
- */
29
- type?: ('RX' | 'OTC') | null;
30
- concept: 'DRUG' | 'PRODUCT' | 'PACKAGE';
31
- schedule?: ('I' | 'II' | 'III' | 'IV' | 'V') | null;
32
- controlled: boolean;
33
- brandName?: string | null;
34
- genericName?: string | null;
35
- strength?: string | null;
36
- form?: string | null;
37
- manufacturer?: string | null;
38
- description?: string | null;
39
- }[];
40
- }
@@ -1,5 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- export interface ErxV1SyncPatientParams {
4
- patientId: string;
5
- }
@@ -1,11 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- /**
4
- * Photon sync response
5
- */
6
- export interface ErxV1SyncPatientResponse {
7
- /**
8
- * The Photon identifier for the patient.
9
- */
10
- photonPatientId?: string;
11
- }
@@ -1,6 +0,0 @@
1
- // AUTOGENERATED -- DO NOT EDIT
2
-
3
- export interface ErxV2MedicationSearchParams {
4
- name?: string;
5
- code?: string;
6
- }