oro-sdk-apis 1.20.1 → 1.23.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.
@@ -19,9 +19,10 @@ export declare class ConsultService {
19
19
  * @param filterAssignedDoctor the uuid of the doctor for which to filter with
20
20
  * @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with
21
21
  * @param filterIsoLocality the of isoLocality to filter with
22
+ * @param filterAssignee array of practitioner uuids with which you want to filter the consultations
22
23
  * @returns a number of consult
23
24
  */
24
- countConsults(uuidPractice?: Uuid, uuidRequester?: Uuid, statusesMedical?: MedicalStatus[], statusesExclude?: MedicalStatus[], shortId?: string, columnToSortTo?: string[], orderToSortTo?: string[], perPage?: number, indexPage?: number, filterAssignedDoctor?: string, filterCurrentPractitioner?: string, filterIsoLocality?: string[]): Promise<number>;
25
+ countConsults(uuidPractice?: Uuid, uuidRequester?: Uuid, statusesMedical?: MedicalStatus[], statusesExclude?: MedicalStatus[], shortId?: string, columnToSortTo?: string[], orderToSortTo?: string[], perPage?: number, indexPage?: number, filterAssignedDoctor?: string, filterCurrentPractitioner?: string, filterIsoLocality?: string[], filterAssignee?: string[]): Promise<number>;
25
26
  /**
26
27
  * This function get consults using parameters
27
28
  * @param uuidPractice the practice uuid
@@ -38,7 +39,7 @@ export declare class ConsultService {
38
39
  * @param filterIsoLocality the of isoLocality to filter with
39
40
  * @returns a list of consult
40
41
  */
41
- getConsults(uuidPractice?: Uuid, uuidRequester?: Uuid, statusesMedical?: MedicalStatus[], statusesExclude?: MedicalStatus[], shortId?: string, columnToSortTo?: string[], orderToSortTo?: string[], perPage?: number, indexPage?: number, filterAssignedDoctor?: string, filterCurrentPractitioner?: string, filterIsoLocality?: string[]): Promise<Consult[]>;
42
+ getConsults(uuidPractice?: Uuid, uuidRequester?: Uuid, statusesMedical?: MedicalStatus[], statusesExclude?: MedicalStatus[], shortId?: string, columnToSortTo?: string[], orderToSortTo?: string[], perPage?: number, indexPage?: number, filterAssignedDoctor?: string, filterCurrentPractitioner?: string, filterIsoLocality?: string[], filterAssignee?: string[]): Promise<Consult[]>;
42
43
  getConsultByUUID(uuidConsult: Uuid, uuidPractice?: Uuid): Promise<Consult>;
43
44
  updateConsultByUUID(uuidConsult: Uuid, consult: {
44
45
  statusMedical?: MedicalStatus;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.20.1",
2
+ "version": "1.23.0",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -148,6 +148,13 @@ export interface LegalData {
148
148
 
149
149
  export type RoleBasedScopes = AllRoleType
150
150
 
151
- export type PermissionBasedScopes = 'consult.consults.get' | 'consult.consults.post' | 'practice.assignments.post' | 'practice.configs.get' | 'teller.emails.post'
151
+ export type PermissionBasedScopes =
152
+ | 'consult.consults.get'
153
+ | 'consult.consults.post'
154
+ | 'practice.assignments.post'
155
+ | 'practice.configs.get'
156
+ | 'practice.invoices.get'
157
+ | 'practice.payments.get'
158
+ | 'teller.emails.post'
152
159
 
153
160
  export type AllScopes = RoleBasedScopes | PermissionBasedScopes
@@ -448,6 +448,7 @@ export interface PracticeSubscription {
448
448
 
449
449
  export interface PracticeInvoice {
450
450
  id: string //Stripe invoice ID
451
+ customerEmail: string
451
452
  total: number
452
453
  subtotal: number
453
454
  currency: string
@@ -30,6 +30,7 @@ export class ConsultService {
30
30
  * @param filterAssignedDoctor the uuid of the doctor for which to filter with
31
31
  * @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with
32
32
  * @param filterIsoLocality the of isoLocality to filter with
33
+ * @param filterAssignee array of practitioner uuids with which you want to filter the consultations
33
34
  * @returns a number of consult
34
35
  */
35
36
  public countConsults(
@@ -44,7 +45,8 @@ export class ConsultService {
44
45
  indexPage?: number,
45
46
  filterAssignedDoctor?: string,
46
47
  filterCurrentPractitioner?: string,
47
- filterIsoLocality?: string[]
48
+ filterIsoLocality?: string[],
49
+ filterAssignee?: string[]
48
50
  ): Promise<number> {
49
51
  return this.api
50
52
  .head<any>(
@@ -63,16 +65,13 @@ export class ConsultService {
63
65
  filterAssignedDoctor,
64
66
  filterCurrentPractitioner,
65
67
  filterIsoLocality,
68
+ filterAssignee,
66
69
  },
67
70
  },
68
71
  'Content-Range'
69
72
  )
70
73
  .then((resContentRange) => {
71
- if (
72
- !resContentRange ||
73
- (typeof resContentRange !== 'string' &&
74
- typeof resContentRange !== 'number')
75
- ) {
74
+ if (!resContentRange || (typeof resContentRange !== 'string' && typeof resContentRange !== 'number')) {
76
75
  return 0
77
76
  }
78
77
 
@@ -112,7 +111,8 @@ export class ConsultService {
112
111
  indexPage?: number,
113
112
  filterAssignedDoctor?: string,
114
113
  filterCurrentPractitioner?: string,
115
- filterIsoLocality?: string[]
114
+ filterIsoLocality?: string[],
115
+ filterAssignee?: string[]
116
116
  ): Promise<Consult[]> {
117
117
  return this.api.get<Consult[]>(`${this.baseURL}/v1/consults`, {
118
118
  params: {
@@ -128,18 +128,13 @@ export class ConsultService {
128
128
  filterAssignedDoctor,
129
129
  filterCurrentPractitioner,
130
130
  filterIsoLocality,
131
+ filterAssignee,
131
132
  },
132
133
  })
133
134
  }
134
135
 
135
- public getConsultByUUID(
136
- uuidConsult: Uuid,
137
- uuidPractice?: Uuid
138
- ): Promise<Consult> {
139
- return this.api.get<Consult>(
140
- `${this.baseURL}/v1/consults/${uuidConsult}`,
141
- { params: { uuidPractice } }
142
- )
136
+ public getConsultByUUID(uuidConsult: Uuid, uuidPractice?: Uuid): Promise<Consult> {
137
+ return this.api.get<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, { params: { uuidPractice } })
143
138
  }
144
139
 
145
140
  public updateConsultByUUID(
@@ -152,29 +147,20 @@ export class ConsultService {
152
147
  uuidPractice?: Uuid,
153
148
  uuidRequester?: Uuid
154
149
  ): Promise<Consult> {
155
- return this.api.put<Consult>(
156
- `${this.baseURL}/v1/consults/${uuidConsult}`,
157
- consult,
158
- {
159
- params: {
160
- uuidPractice,
161
- uuidRequester,
162
- },
163
- }
164
- )
150
+ return this.api.put<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, consult, {
151
+ params: {
152
+ uuidPractice,
153
+ uuidRequester,
154
+ },
155
+ })
165
156
  }
166
157
 
167
- public getConsultFaxStatuses(
168
- uuidConsult: string
169
- ): Promise<ConsultTransmission[]> {
170
- return this.api.get<ConsultTransmission[]>(
171
- `${this.baseURL}/v1/consults/${uuidConsult}/transmissions`,
172
- {
173
- params: {
174
- kind: TransmissionKind.Fax,
175
- },
176
- }
177
- )
158
+ public getConsultFaxStatuses(uuidConsult: string): Promise<ConsultTransmission[]> {
159
+ return this.api.get<ConsultTransmission[]>(`${this.baseURL}/v1/consults/${uuidConsult}/transmissions`, {
160
+ params: {
161
+ kind: TransmissionKind.Fax,
162
+ },
163
+ })
178
164
  }
179
165
 
180
166
  public postConsultTransmission(
@@ -207,44 +193,20 @@ export class ConsultService {
207
193
  data.append('txtTransmissionNotes', txtTransmissionNotes)
208
194
  }
209
195
 
210
- return this.api.post<ConsultTransmission>(
211
- `${this.baseURL}/v1/consults/${uuidConsult}/transmissions`,
212
- data,
213
- {
214
- headers: { 'Content-Type': 'multipart/form-data;' },
215
- }
216
- )
196
+ return this.api.post<ConsultTransmission>(`${this.baseURL}/v1/consults/${uuidConsult}/transmissions`, data, {
197
+ headers: { 'Content-Type': 'multipart/form-data;' },
198
+ })
217
199
  }
218
200
 
219
- public postConsultFax(
220
- uuidConsult: string,
221
- addressReceiver: string,
222
- file: File
223
- ): Promise<ConsultTransmission> {
224
- return this.postConsultTransmission(
225
- uuidConsult,
226
- 'Documo',
227
- addressReceiver,
228
- file
229
- )
201
+ public postConsultFax(uuidConsult: string, addressReceiver: string, file: File): Promise<ConsultTransmission> {
202
+ return this.postConsultTransmission(uuidConsult, 'Documo', addressReceiver, file)
230
203
  }
231
204
 
232
- public postConsultEmail(
233
- uuidConsult: string,
234
- file: File
235
- ): Promise<ConsultTransmission> {
236
- return this.postConsultTransmission(
237
- uuidConsult,
238
- 'Pharmacierge',
239
- undefined,
240
- file
241
- )
205
+ public postConsultEmail(uuidConsult: string, file: File): Promise<ConsultTransmission> {
206
+ return this.postConsultTransmission(uuidConsult, 'Pharmacierge', undefined, file)
242
207
  }
243
208
 
244
- public retryConsultFax(
245
- uuidConsult: string,
246
- transmissionId: string
247
- ): Promise<ConsultTransmission> {
209
+ public retryConsultFax(uuidConsult: string, transmissionId: string): Promise<ConsultTransmission> {
248
210
  return this.api.put<ConsultTransmission>(
249
211
  `${this.baseURL}/v1/consults/${uuidConsult}/transmissions/${transmissionId}`,
250
212
  { status: TransmissionStatus.Retrying }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 ORO Health Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.