oro-sdk 5.3.2 → 5.3.5

Sign up to get free protection for your applications and to get access to all the features.
package/dist/client.d.ts CHANGED
@@ -99,6 +99,17 @@ export declare class OroClient {
99
99
  recoverySecurityQuestions: string[];
100
100
  recoverySecurityAnswers: string[];
101
101
  }, indexSearch?: boolean, onProgress?: (progress: number, descriptionKey: string) => void): Promise<RegisterPatientOutput>;
102
+ /**
103
+ * Creates and stores all relevant refill data
104
+ * - New consultation is created
105
+ * - Stores refill workflow data in the lockbox
106
+ * - Updates the consult to new
107
+ *
108
+ * @param consult
109
+ * @param populatedRefillWorkflow
110
+ * @returns
111
+ */
112
+ createRefill(consult: ConsultRequest, populatedRefillWorkflow: WorkflowData): Promise<void>;
102
113
  /**
103
114
  * Fetches all grants, and consultations that exist in each lockbox
104
115
  * Then updates the index for the current user with the lockbox consult relationship
@@ -153,7 +164,9 @@ export declare class OroClient {
153
164
  * @param withNotification if the insertion of data requires notification
154
165
  * @returns the data uuid
155
166
  */
156
- createConsultationAttachmentData(lockboxUuid: Uuid, data: File, consultationId: string, documentType: DocumentType, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid, withNotification?: boolean): Promise<DataCreateResponse>;
167
+ createConsultationAttachmentData(lockboxUuid: Uuid, data: File, consultationId: string, documentType: DocumentType, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid, options?: {
168
+ withNotification?: boolean;
169
+ }): Promise<DataCreateResponse>;
157
170
  /**
158
171
  * @name createJsonData
159
172
  * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a JSON
@@ -163,12 +176,14 @@ export declare class OroClient {
163
176
  * @param privateMeta the metadata that will be secured in the vault
164
177
  * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
165
178
  * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
166
- * @param withNotification if the insertion of data requires notification
179
+ * @param options if the insertion of data requires email notification
167
180
  * @returns the data uuid
168
181
  */
169
182
  createJsonData<T extends Metadata>(lockboxUuid: Uuid, data: any, meta?: T, privateMeta?: {
170
183
  [val: string]: any;
171
- }, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid, withNotification?: boolean): Promise<DataCreateResponse>;
184
+ }, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid, options?: {
185
+ withNotification?: boolean;
186
+ }): Promise<DataCreateResponse>;
172
187
  /**
173
188
  * Get or upsert a data in lockbox
174
189
  * @param lockboxUuid the lockbox uuid
@@ -176,10 +191,13 @@ export declare class OroClient {
176
191
  * @param publicMetadata the public Metadata
177
192
  * @param privateMetadata the private Metadata
178
193
  * @param forceReplace set true when the insertion of data requires to replace the data when it exists already
179
- * @param withNotification if the insertion of data requires notification
194
+ * @param options if the insertion of data requires email notification
180
195
  * @returns the data uuid
181
196
  */
182
- getOrInsertJsonData<M extends Metadata>(lockboxUuid: Uuid, data: any, publicMetadata: M, privateMetadata: Metadata, forceReplace?: boolean, withNotification?: boolean): Promise<Uuid>;
197
+ getOrInsertJsonData<M extends Metadata>(lockboxUuid: Uuid, data: any, publicMetadata: M, privateMetadata: Metadata, options?: {
198
+ withNotification?: boolean;
199
+ forceReplace?: boolean;
200
+ }): Promise<Uuid>;
183
201
  /**
184
202
  * @name createBytesData
185
203
  * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a Bytes
@@ -194,7 +212,9 @@ export declare class OroClient {
194
212
  */
195
213
  createBytesData<T extends Metadata>(lockboxUuid: Uuid, data: Uint8Array, meta: T, privateMeta: {
196
214
  [val: string]: any;
197
- }, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid, withNotification?: boolean): Promise<DataCreateResponse>;
215
+ }, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid, options?: {
216
+ withNotification?: boolean;
217
+ }): Promise<DataCreateResponse>;
198
218
  /**
199
219
  * @name getJsonData
200
220
  * @description Fetches and decrypts the lockbox data with the cached shared secret.
@@ -251,7 +271,9 @@ export declare class OroClient {
251
271
  * @param forceRefresh force data refresh (default to false)
252
272
  * @returns the personal data
253
273
  */
254
- getPersonalInformationsFromConsultId(consultationId: Uuid, category: MetadataCategory.Personal | MetadataCategory.ChildPersonal | MetadataCategory.OtherPersonal, forceRefresh?: boolean): Promise<LocalizedData<PopulatedWorkflowData>[]>;
274
+ getPersonalInformationsFromConsultId(consultationId: Uuid, category: MetadataCategory.Personal | MetadataCategory.ChildPersonal | MetadataCategory.OtherPersonal, options?: {
275
+ forceRefresh: boolean;
276
+ }): Promise<LocalizedData<PopulatedWorkflowData>[]>;
255
277
  /**
256
278
  * Retrieves the patient medical data associated to the `consultationId`
257
279
  * The `consultationId` only helps to retrieve the patient lockboxes
@@ -260,7 +282,9 @@ export declare class OroClient {
260
282
  * @param forceRefresh force data refresh (default to false)
261
283
  * @returns the medical data
262
284
  */
263
- getMedicalDataFromConsultId(consultationId: Uuid, forceRefresh?: boolean): Promise<LocalizedData<PopulatedWorkflowData>[]>;
285
+ getMedicalDataFromConsultId(consultationId: Uuid, options?: {
286
+ forceRefresh: boolean;
287
+ }): Promise<LocalizedData<PopulatedWorkflowData>[]>;
264
288
  private getMetaCategoryFromConsultId;
265
289
  /**
266
290
  * @description retrieves the personal information stored in the first owned lockbox
@@ -291,7 +315,9 @@ export declare class OroClient {
291
315
  * @param forceRefresh
292
316
  * @returns the lockbox manifest
293
317
  */
294
- getLockboxManifest(lockboxUuid: Uuid, filter: Metadata, expandPrivateMetadata: boolean, lockboxOwnerUuid?: Uuid, forceRefresh?: boolean): Promise<LockboxManifest>;
318
+ getLockboxManifest(lockboxUuid: Uuid, filter: Metadata, expandPrivateMetadata: boolean, lockboxOwnerUuid?: Uuid, options?: {
319
+ forceRefresh: boolean;
320
+ }): Promise<LockboxManifest>;
295
321
  /**
296
322
  * @description Create or update the personal information and store it in the first owned lockbox
297
323
  * @param identity The identity to use
@@ -361,7 +387,9 @@ export declare class OroClient {
361
387
  * @param consultationId
362
388
  * @returns
363
389
  */
364
- getPatientConsultationData(consultationId: Uuid, forceRefresh?: boolean): Promise<PopulatedWorkflowData[]>;
390
+ getPatientConsultationData(consultationId: Uuid, options?: {
391
+ forceRefresh: boolean;
392
+ }): Promise<PopulatedWorkflowData[]>;
365
393
  /**
366
394
  * This function returns the patient prescriptions
367
395
  * @param consultationId
@@ -0,0 +1,9 @@
1
+ import { Consult, ConsultRequest } from 'oro-sdk-apis';
2
+ import { OroClient } from '..';
3
+ /**
4
+ * Creates a consultation if one has not been created and fails to be retrieved by the payment intent
5
+ * @param consult
6
+ * @param oroClient
7
+ * @returns the consult Uuid
8
+ */
9
+ export declare function getOrCreatePatientConsultationUuid(consult: ConsultRequest, oroClient: OroClient): Promise<Consult>;
@@ -2,3 +2,4 @@ export * from './client';
2
2
  export * from './workflow';
3
3
  export * from './patient-registration';
4
4
  export * from './vault-grants';
5
+ export * from './prescription-refill';
@@ -0,0 +1,21 @@
1
+ import { ConsultRequest, PlaceData, WorkflowData } from 'oro-sdk-apis';
2
+ import { OroClient } from '..';
3
+ /**
4
+ * Placeholder while the workflow interpreter for the refill flows is complete
5
+ *
6
+ * Creates a fake workflow in which the workflow data will reside
7
+ *
8
+ * @param isTreatmentWorking the value from the `is treatment working` question
9
+ * @param hasSideEffects the value from the `does the treatment have side effects` question
10
+ * @param deliveryAddress the provided delivery address
11
+ * @param pharmacy
12
+ * @returns a workflow
13
+ */
14
+ export declare function getRefillAnswersAsWorkflow(isTreatmentWorking: string, hasSideEffects: string, deliveryAddress?: string, pharmacy?: PlaceData): WorkflowData;
15
+ /**
16
+ * Complete refill flow, creates a consult, stores refill data and updates consultation status
17
+ * @param consultRequest
18
+ * @param populatedRefillWorkflow the refill workflow data
19
+ * @param oroClient
20
+ */
21
+ export declare function createRefill(consultRequest: ConsultRequest, populatedRefillWorkflow: WorkflowData, oroClient: OroClient): Promise<void>;