oro-sdk-apis 1.24.1 → 1.27.0-dev1

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.
@@ -1,5 +1,5 @@
1
1
  import { APIService } from './api';
2
- import { Uuid, Consult, ConsultRequest, MedicalStatus, ConsultTransmission, TransmissionStatus } from '../models';
2
+ import { Uuid, Consult, ConsultRequest, MedicalStatus, ConsultTransmission, ReasonWhyClosed, TransmissionStatus } from '../models';
3
3
  export declare class ConsultService {
4
4
  private api;
5
5
  private baseURL;
@@ -22,7 +22,7 @@ export declare class ConsultService {
22
22
  * @param filterAssignee array of practitioner uuids with which you want to filter the consultations
23
23
  * @returns a number of consult
24
24
  */
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
+ countConsults(uuidPractice?: Uuid, uuidRequester?: Uuid, statusesMedical?: MedicalStatus[], statusesExclude?: MedicalStatus[], reasonsWhyClosed?: ReasonWhyClosed[], reasonsWhyOther?: string[], shortId?: string, columnToSortTo?: string[], orderToSortTo?: string[], perPage?: number, indexPage?: number, filterAssignedDoctor?: string, filterCurrentPractitioner?: string, filterIsoLocality?: string[], filterAssignee?: string[]): Promise<number>;
26
26
  /**
27
27
  * This function get consults using parameters
28
28
  * @param uuidPractice the practice uuid
@@ -39,7 +39,7 @@ export declare class ConsultService {
39
39
  * @param filterIsoLocality the of isoLocality to filter with
40
40
  * @returns a list of consult
41
41
  */
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
+ getConsults(uuidPractice?: Uuid, uuidRequester?: Uuid, statusesMedical?: MedicalStatus[], statusesExclude?: MedicalStatus[], reasonsWhyClosed?: ReasonWhyClosed[], reasonsWhyOther?: string[], shortId?: string, columnToSortTo?: string[], orderToSortTo?: string[], perPage?: number, indexPage?: number, filterAssignedDoctor?: string, filterCurrentPractitioner?: string, filterIsoLocality?: string[], filterAssignee?: string[]): Promise<Consult[]>;
43
43
  getConsultByUUID(uuidConsult: Uuid, uuidPractice?: Uuid): Promise<Consult>;
44
44
  updateConsultByUUID(uuidConsult: Uuid, consult: {
45
45
  statusMedical?: MedicalStatus;
@@ -1,11 +1,11 @@
1
1
  import { APIService } from './api';
2
- import { Consult, DataCreateResponse, LockboxDataRequest, MedicalStatus, Uuid, ResumeConsultEmailRequest } from '../models';
2
+ import { Consult, DataCreateResponse, LockboxDataRequest, MedicalStatus, Uuid, ResumeConsultEmailRequest, ReasonWhyClosed } from '../models';
3
3
  export declare class TellerService {
4
4
  private api;
5
5
  private baseURL;
6
6
  constructor(api: APIService, baseURL: string);
7
7
  lockboxDataStore(lockboxUuid: Uuid, req: LockboxDataRequest, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid): Promise<DataCreateResponse>;
8
- updateConsultByUUID(patientUuid: Uuid, uuidConsult: Uuid, statusMedical: MedicalStatus, neverExpires?: boolean): Promise<Consult>;
8
+ updateConsultByUUID(patientUuid: Uuid, uuidConsult: Uuid, statusMedical: MedicalStatus, reasonWhyClosed?: ReasonWhyClosed, reasonWhyOther?: string, neverExpires?: boolean): Promise<Consult>;
9
9
  /**
10
10
  * This function notifies teller that the fax sent for a specific consult did not get through
11
11
  * @todo - Make service only exposed route
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.24.1",
2
+ "version": "1.27.0-dev1",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -82,6 +82,14 @@ export enum TaskStatus {
82
82
  Done = 'Done',
83
83
  }
84
84
 
85
+ export enum ReasonWhyClosed {
86
+ Completed = "Completed",
87
+ NotADisease = "NotADisease",
88
+ NotAppropriateForVirtual = "NotAppropriateForVirtual",
89
+ Other = "Other",
90
+ RequiresInPerson = "RequiresInPerson"
91
+ }
92
+
85
93
  export interface ConsultRequest {
86
94
  uuidPractice: string
87
95
  tagSpecialtyRequired: string
@@ -102,6 +110,8 @@ export interface Consult {
102
110
  uuidAssignedDoctor: string
103
111
  uuidCurrentAssigned: string
104
112
  statusTask?: TaskStatus
113
+ reasonWhyClosed?: ReasonWhyClosed
114
+ reasonWhyOther?: string
105
115
  hasTransmissions?: boolean
106
116
  assignedAssistant?: ConsultAssignedAssistant[]
107
117
  shortId?: string
@@ -110,7 +110,7 @@ export enum PracticeEmailKind {
110
110
  ExamResult = 'ExamResult',
111
111
  Reassigned = 'Reassigned',
112
112
  OnlinePharmacyFaxSent = 'OnlinePharmacyFaxSent',
113
- ResumeConsult = 'ResumeConsult'
113
+ ResumeConsult = 'ResumeConsult',
114
114
  }
115
115
 
116
116
  export interface PracticeAccount {
@@ -125,10 +125,11 @@ export interface PracticeAccount {
125
125
  export enum PracticeConfigKind {
126
126
  PractitionerConsultList = 'PractitionerConsultList',
127
127
  PractitionerChatbox = 'PractitionerChatbox',
128
- PracticeTheme = 'PracticeTheme',
128
+ PracticeConfigExample = 'PracticeConfigExample',
129
129
  PracticeLocaleSwitcher = 'PracticeLocaleSwitcher',
130
130
  PracticeCookieBanner = 'PracticeCookieBanner',
131
131
  PracticePharmacyPicker = 'PracticePharmacyPicker',
132
+ PracticeCssVariables = 'PracticeCssVariables',
132
133
  }
133
134
 
134
135
  export interface PracticeConfig<K, T> {
@@ -143,6 +144,7 @@ export type PracticeConfigPractitionerConsultList = PracticeConfig<
143
144
  hideLocality?: boolean
144
145
  hideFax?: boolean
145
146
  hideExpiresAt?: boolean
147
+ showExpirationInDays?: boolean
146
148
  }
147
149
  >
148
150
 
@@ -179,7 +181,19 @@ export type PracticeConfigPracticeCookieBanner = PracticeConfig<
179
181
  >
180
182
 
181
183
  // This type is for demonstration only for now
182
- export type PracticeConfigPracticeTheme = PracticeConfig<PracticeConfigKind.PracticeTheme, { primaryColor?: string }>
184
+ export type PracticeConfigPracticeConfigExample = PracticeConfig<
185
+ PracticeConfigKind.PracticeConfigExample,
186
+ { primaryColor?: string }
187
+ >
188
+
189
+ /**
190
+ * This interface describes all practice css variables
191
+ * The keys should reflect the exact css name
192
+ */
193
+ export type PracticeConfigPracticeCssVariables = PracticeConfig<
194
+ PracticeConfigKind.PracticeCssVariables,
195
+ Record<string, string>
196
+ >
183
197
 
184
198
  export type PracticeConfigs =
185
199
  | PracticeConfigPractitionerConsultList
@@ -187,7 +201,8 @@ export type PracticeConfigs =
187
201
  | PracticeConfigPracticeLocaleSwitcher
188
202
  | PracticeConfigPracticeCookieBanner
189
203
  | PracticeConfigPracticeOnlinePharmacy
190
- | PracticeConfigPracticeTheme // Here for demonstration only
204
+ | PracticeConfigPracticeCssVariables
205
+ | PracticeConfigPracticeConfigExample // Here for demonstration only
191
206
 
192
207
  export interface PracticeWorkflow {
193
208
  id?: number ///optional for insertion
@@ -312,8 +327,8 @@ export interface AssignmentRequest {
312
327
  status?: AssignmentStatus
313
328
  uuidConsult?: string
314
329
  tagSpecialty?: string
315
- isoLocality?: string,
316
- isoLanguage?: string,
330
+ isoLocality?: string
331
+ isoLanguage?: string
317
332
  }
318
333
 
319
334
  export type Assignment = {
@@ -388,10 +403,11 @@ export interface Practitioner {
388
403
  export interface HydratedPracticeConfigs {
389
404
  [PracticeConfigKind.PractitionerConsultList]?: PracticeConfigPractitionerConsultList
390
405
  [PracticeConfigKind.PractitionerChatbox]?: PracticeConfigPractitionerChatbox
391
- [PracticeConfigKind.PracticeTheme]?: PracticeConfigPracticeTheme
406
+ [PracticeConfigKind.PracticeConfigExample]?: PracticeConfigPracticeConfigExample
392
407
  [PracticeConfigKind.PracticeLocaleSwitcher]?: PracticeConfigPracticeLocaleSwitcher
393
408
  [PracticeConfigKind.PracticeCookieBanner]?: PracticeConfigPracticeCookieBanner
394
409
  [PracticeConfigKind.PracticePharmacyPicker]?: PracticeConfigPracticeOnlinePharmacy
410
+ [PracticeConfigKind.PracticeCssVariables]?: PracticeConfigPracticeCssVariables
395
411
  }
396
412
 
397
413
  export interface Practice {
@@ -111,7 +111,26 @@ export enum MetadataCategory { //these are generic metadata categories
111
111
  Raw = 'Raw',
112
112
  }
113
113
 
114
- export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends EntryData {
114
+ /**
115
+ * This interface describes all images-alias question kind options
116
+ */
117
+ export interface ImagesAliasQuestionOptions {
118
+ /**
119
+ * Comma separated list of accepted formats. Will be given to the input html element.
120
+ * Use same format as described [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#accept)
121
+ */
122
+ accept?: string
123
+ /**
124
+ * Should allow multiple uploads or not
125
+ */
126
+ multiple?: boolean
127
+ /**
128
+ * Should display photo guide instructions or not
129
+ */
130
+ photoGuide?: boolean
131
+ }
132
+
133
+ export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>, O = undefined> extends EntryData {
115
134
  kind: T
116
135
  metaCategory: MetadataCategory
117
136
  answers?: A
@@ -119,6 +138,10 @@ export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>> extend
119
138
  placeholder?: string
120
139
  defaultValue?: any
121
140
  value?: string
141
+ /**
142
+ * Options to forward to the workflow component
143
+ */
144
+ options?: O
122
145
  }
123
146
 
124
147
  export interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends GenericQuestionData<T, A> {
@@ -135,12 +158,12 @@ export declare type QuestionData =
135
158
  | 'date'
136
159
  | 'number'
137
160
  | 'images'
138
- | 'images-alias'
139
161
  | 'body-parts'
140
162
  | 'pharmacy-picker'
141
163
  | 'online-pharmacy-picker'
142
164
  | 'place-address'
143
165
  >
166
+ | GenericQuestionData<'images-alias', IndexedData<ChoiceInputData>, ImagesAliasQuestionOptions>
144
167
  | GenericQuestionData<'checkbox-group' | 'select' | 'multiple' | 'text-select-group', IndexedData<ChoiceInputData>>
145
168
  | GroupedGenericQuestionData<'radio', IndexedData<RadioInputData>>
146
169
  | GroupedGenericQuestionData<'radio-card' | 'profile-selector', IndexedData<RadioCardInputData>>
@@ -187,13 +210,28 @@ export interface WorkflowData {
187
210
  }
188
211
 
189
212
  /**
190
- * This interface describes a workflow prepared and ready to be sent to vault
213
+ * This interface describes an upload of an image (could be a picture, a pdf, a text file, etc.)
191
214
  */
192
215
  export interface WorkflowUploadedImage {
216
+ /**
217
+ * Depending on the driver used by WorkflowInput:
218
+ * - 'indexdb': will fetch the image in IndexDB with this id
219
+ * - 'vault': will fetch the image in the vault with this id
220
+ */
193
221
  idbId?: string
222
+ /**
223
+ * The name of the image
224
+ */
194
225
  name: string
226
+ /**
227
+ * the image data (could be a picture, a pdf, a text file, etc.)
228
+ */
195
229
  imageData?: string
196
230
  }
231
+
232
+ /**
233
+ * This interface describes a workflow prepared and ready to be sent to vault
234
+ */
197
235
  export interface PopulatedWorkflowField {
198
236
  answer: SelectedAnswerData | WorkflowUploadedImage[] // Actual answer from the workflow
199
237
  displayedAnswer?: any // This answer is to be used only when it's impossible to get data from workflow
@@ -5,6 +5,7 @@ import {
5
5
  ConsultRequest,
6
6
  MedicalStatus,
7
7
  ConsultTransmission,
8
+ ReasonWhyClosed,
8
9
  TransmissionKind,
9
10
  TransmissionStatus,
10
11
  } from '../models'
@@ -38,6 +39,8 @@ export class ConsultService {
38
39
  uuidRequester?: Uuid,
39
40
  statusesMedical?: MedicalStatus[],
40
41
  statusesExclude?: MedicalStatus[],
42
+ reasonsWhyClosed?: ReasonWhyClosed[],
43
+ reasonsWhyOther?: string[],
41
44
  shortId?: string,
42
45
  columnToSortTo?: string[],
43
46
  orderToSortTo?: string[],
@@ -57,6 +60,8 @@ export class ConsultService {
57
60
  uuidRequester,
58
61
  statusesMedical,
59
62
  statusesExclude,
63
+ reasonsWhyClosed,
64
+ reasonsWhyOther,
60
65
  shortId,
61
66
  perPage,
62
67
  page: indexPage,
@@ -104,6 +109,8 @@ export class ConsultService {
104
109
  uuidRequester?: Uuid,
105
110
  statusesMedical?: MedicalStatus[],
106
111
  statusesExclude?: MedicalStatus[],
112
+ reasonsWhyClosed?: ReasonWhyClosed[],
113
+ reasonsWhyOther?: string[],
107
114
  shortId?: string,
108
115
  columnToSortTo?: string[],
109
116
  orderToSortTo?: string[],
@@ -120,6 +127,8 @@ export class ConsultService {
120
127
  uuidRequester,
121
128
  statusesMedical,
122
129
  statusesExclude,
130
+ reasonsWhyClosed,
131
+ reasonsWhyOther,
123
132
  shortId,
124
133
  perPage,
125
134
  page: indexPage,
@@ -6,6 +6,7 @@ import {
6
6
  MedicalStatus,
7
7
  Uuid,
8
8
  ResumeConsultEmailRequest,
9
+ ReasonWhyClosed,
9
10
  } from '../models'
10
11
  export class TellerService {
11
12
  constructor(private api: APIService, private baseURL: string) {}
@@ -28,11 +29,15 @@ export class TellerService {
28
29
  patientUuid: Uuid,
29
30
  uuidConsult: Uuid,
30
31
  statusMedical: MedicalStatus,
32
+ reasonWhyClosed?: ReasonWhyClosed,
33
+ reasonWhyOther?: string,
31
34
  neverExpires?: boolean
32
35
  ): Promise<Consult> {
33
36
  return this.api.put<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, {
34
37
  patientUuid,
35
38
  statusMedical,
39
+ reasonWhyClosed,
40
+ reasonWhyOther,
36
41
  neverExpires,
37
42
  })
38
43
  }