oro-sdk-apis 5.14.1 → 5.15.1-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.
@@ -50,9 +50,9 @@ export declare class ConsultService {
50
50
  neverExpires?: boolean;
51
51
  }, uuidPractice?: Uuid, uuidRequester?: Uuid): Promise<Consult>;
52
52
  getConsultFaxStatuses(uuidConsult: string): Promise<ConsultTransmission[]>;
53
- postConsultTransmission(uuidConsult: string, nameDriver?: string, addressOrPhoneToSendTo?: string, file?: File, nameReceiver?: string, txtTransmissionTitle?: string, txtTransmissionNotes?: string): Promise<ConsultTransmission>;
54
- postConsultFax(uuidConsult: string, addressReceiver: string, file: File): Promise<ConsultTransmission>;
55
- postConsultEmail(uuidConsult: string, file: File): Promise<ConsultTransmission>;
53
+ postConsultTransmission(uuidConsult: string, nameDriver?: string, addressOrPhoneToSendTo?: string, file?: File, nameReceiver?: string, txtTransmissionTitle?: string, txtTransmissionNotes?: string, uuidPatient?: string): Promise<ConsultTransmission>;
54
+ postConsultFax(uuidConsult: string, addressReceiver: string, file: File, uuidPatient?: string): Promise<ConsultTransmission>;
55
+ postConsultEmail(uuidConsult: string, file: File, uuidPatient?: string): Promise<ConsultTransmission>;
56
56
  retryConsultFax(uuidConsult: string, transmissionId: string): Promise<ConsultTransmission>;
57
57
  updateConsultTransmissionStatus(transmissionId: string, uuidConsult: string, newStatus: TransmissionStatus): Promise<ConsultTransmission>;
58
58
  }
@@ -38,6 +38,7 @@ export declare class DiagnosisService {
38
38
  updateTreatmentPlan(uuidPlan: string, uuidConsult: string, diagnosisRequest: DiagnosisRequest, plan: TreatmentAndDrugPrescriptionUpdateRequest, refill?: boolean): Promise<TreatmentPlan>;
39
39
  setAssociatedConsultsToTreatment(diagnosisUuid: string, treatmentUuid: string, arrAssociatedConsults: TreatmentAssociatedConsultData[]): Promise<TreatmentAssociatedConsultData[]>;
40
40
  updateAssociatedConsultsToTreatment(diagnosisUuid: string, treatmentUuid: string, arrAssociatedConsults: TreatmentAssociatedConsultData[]): Promise<TreatmentAssociatedConsultData[]>;
41
+ getAssociatedConsultsOfTreatment(diagnosisUuid: string, treatmentUuid: string): Promise<TreatmentAssociatedConsultData[]>;
41
42
  acceptTreatmentPlan(uuidPlan: string, uuidConsult: string): Promise<TreatmentPlan>;
42
43
  /**
43
44
  * retrieves all the drugs of the specified practice
@@ -33,6 +33,14 @@ export declare class TellerService {
33
33
  * @returns void
34
34
  */
35
35
  sendOnlineFaxSuccessfulEmail(consult: Consult, patientUuid: Uuid): Promise<void>;
36
+ /**
37
+ * This function will send an email to the patientUuid, saying that the refill has been completed successfully
38
+ * @todo - Make service only exposed route
39
+ * @param consult
40
+ * @param patientUuid
41
+ * @returns void
42
+ */
43
+ sendRefillFaxSucceededEmail(consult: Consult, patientUuid: Uuid): Promise<void>;
36
44
  /**
37
45
  * This function will send an email to patient to allow them to resume the consult.
38
46
  * @param req the body of the resume consult request
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.14.1",
2
+ "version": "5.15.1-dev1",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -188,13 +188,17 @@ export class ConsultService {
188
188
  file?: File,
189
189
  nameReceiver?: string,
190
190
  txtTransmissionTitle?: string,
191
- txtTransmissionNotes?: string
191
+ txtTransmissionNotes?: string,
192
+ uuidPatient?: string
192
193
  // numTry ?: number,
193
194
  // delay ?: number,
194
195
  ): Promise<ConsultTransmission> {
195
196
  let data = new FormData()
196
197
 
197
198
  data.append('nameDriverReceiver', nameDriver)
199
+ if (uuidPatient) {
200
+ data.append('uuidPatient', uuidPatient)
201
+ }
198
202
  if (addressOrPhoneToSendTo) {
199
203
  data.append('addressReceiver', addressOrPhoneToSendTo)
200
204
  }
@@ -211,17 +215,44 @@ export class ConsultService {
211
215
  data.append('txtTransmissionNotes', txtTransmissionNotes)
212
216
  }
213
217
 
214
- return this.api.post<ConsultTransmission>(`${this.baseURL}/v1/consults/${uuidConsult}/transmissions`, data, {
218
+ const res = this.api.post<ConsultTransmission>(`${this.baseURL}/v1/consults/${uuidConsult}/transmissions`, data, {
215
219
  headers: { 'Content-Type': 'multipart/form-data;' },
216
220
  })
221
+
222
+ console.log(res)
223
+
224
+ return res
217
225
  }
218
226
 
219
- public postConsultFax(uuidConsult: string, addressReceiver: string, file: File): Promise<ConsultTransmission> {
220
- return this.postConsultTransmission(uuidConsult, 'Documo', addressReceiver, file)
227
+ public postConsultFax(
228
+ uuidConsult: string,
229
+ addressReceiver: string,
230
+ file: File,
231
+ uuidPatient?: string
232
+ ): Promise<ConsultTransmission> {
233
+ return this.postConsultTransmission(
234
+ uuidConsult,
235
+ 'Documo',
236
+ addressReceiver,
237
+ file,
238
+ undefined,
239
+ undefined,
240
+ undefined,
241
+ uuidPatient
242
+ )
221
243
  }
222
244
 
223
- public postConsultEmail(uuidConsult: string, file: File): Promise<ConsultTransmission> {
224
- return this.postConsultTransmission(uuidConsult, 'Pharmacierge', undefined, file)
245
+ public postConsultEmail(uuidConsult: string, file: File, uuidPatient?: string): Promise<ConsultTransmission> {
246
+ return this.postConsultTransmission(
247
+ uuidConsult,
248
+ 'Pharmacierge',
249
+ undefined,
250
+ file,
251
+ undefined,
252
+ undefined,
253
+ undefined,
254
+ uuidPatient
255
+ )
225
256
  }
226
257
 
227
258
  public retryConsultFax(uuidConsult: string, transmissionId: string): Promise<ConsultTransmission> {
@@ -122,6 +122,15 @@ export class DiagnosisService {
122
122
  )
123
123
  }
124
124
 
125
+ public getAssociatedConsultsOfTreatment(
126
+ diagnosisUuid: string,
127
+ treatmentUuid: string
128
+ ): Promise<TreatmentAssociatedConsultData[]> {
129
+ return this.api.get<TreatmentAssociatedConsultData[]>(
130
+ `${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments/${treatmentUuid}/associated-consults`
131
+ )
132
+ }
133
+
125
134
  public acceptTreatmentPlan(uuidPlan: string, uuidConsult: string): Promise<TreatmentPlan> {
126
135
  return this.api.put<TreatmentPlan>(`${this.baseURL}/v1/treatment-plans/${uuidPlan}/accept`, { uuidConsult })
127
136
  }
@@ -92,6 +92,17 @@ export class TellerService {
92
92
  return this.api.post(`${this.baseURL}/v1/online-fax-notify`, { consult, patientUuid })
93
93
  }
94
94
 
95
+ /**
96
+ * This function will send an email to the patientUuid, saying that the refill has been completed successfully
97
+ * @todo - Make service only exposed route
98
+ * @param consult
99
+ * @param patientUuid
100
+ * @returns void
101
+ */
102
+ public sendRefillFaxSucceededEmail(consult: Consult, patientUuid: Uuid): Promise<void> {
103
+ return this.api.post(`${this.baseURL}/v1/refill-confirm-email`, { consult, patientUuid })
104
+ }
105
+
95
106
  /**
96
107
  * This function will send an email to patient to allow them to resume the consult.
97
108
  * @param req the body of the resume consult request