oro-sdk-apis 1.14.0 → 1.16.1

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,7 +1,7 @@
1
1
  import { APIService } from './api'
2
2
  import { Consult, DataCreateResponse, LockboxDataRequest, MedicalStatus, Uuid } from '../models'
3
3
  export class TellerService {
4
- constructor(private api: APIService, private baseURL: string) { }
4
+ constructor(private api: APIService, private baseURL: string) {}
5
5
 
6
6
  public async lockboxDataStore(
7
7
  lockboxUuid: Uuid,
@@ -9,31 +9,46 @@ export class TellerService {
9
9
  lockboxOwnerUuid?: Uuid,
10
10
  previousDataUuid?: Uuid
11
11
  ): Promise<DataCreateResponse> {
12
- return this.api.post<DataCreateResponse>(
13
- `${this.baseURL}/v1/lockboxes/${lockboxUuid}/data`,
14
- req,
15
- {
16
- params: {
17
- lockbox_owner_uuid: lockboxOwnerUuid,
18
- data_uuid: previousDataUuid,
19
- },
20
- }
21
- )
12
+ return this.api.post<DataCreateResponse>(`${this.baseURL}/v1/lockboxes/${lockboxUuid}/data`, req, {
13
+ params: {
14
+ lockbox_owner_uuid: lockboxOwnerUuid,
15
+ data_uuid: previousDataUuid,
16
+ },
17
+ })
22
18
  }
23
19
 
24
20
  public updateConsultByUUID(
25
21
  patientUuid: Uuid,
26
22
  uuidConsult: Uuid,
27
23
  statusMedical: MedicalStatus,
28
- neverExpires?: boolean,
24
+ neverExpires?: boolean
29
25
  ): Promise<Consult> {
30
- return this.api.put<Consult>(
31
- `${this.baseURL}/v1/consults/${uuidConsult}`,
26
+ return this.api.put<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, {
27
+ patientUuid,
28
+ statusMedical,
29
+ neverExpires,
30
+ })
31
+ }
32
+
33
+ /**
34
+ * This function notifies teller that the fax sent for a specific consult did not get through
35
+ * @param practiceUuid the practice uuid linked to the consult
36
+ * @param consultationUuid the consultation uuid
37
+ * @param consultationShortId the consultation short id
38
+ * @param fax the address where to send the fax
39
+ * @returns void
40
+ */
41
+ public notifyFaxFailed(practiceUuid: Uuid, consultationUuid: Uuid, consultationShortId: string, fax: string) {
42
+ return this.api.post<void>(
43
+ `${this.baseURL}/v1/fax-failed`,
32
44
  {
33
- patientUuid,
34
- statusMedical,
35
- neverExpires,
45
+ consultationUuid,
46
+ consultationShortId,
47
+ fax,
36
48
  },
49
+ {
50
+ params: { practice_uuid: practiceUuid },
51
+ }
37
52
  )
38
53
  }
39
54
  }