oro-sdk-apis 1.16.1 → 1.18.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.
@@ -8,6 +8,7 @@ export declare class TellerService {
8
8
  updateConsultByUUID(patientUuid: Uuid, uuidConsult: Uuid, statusMedical: MedicalStatus, 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
+ * @todo - Make service only exposed route
11
12
  * @param practiceUuid the practice uuid linked to the consult
12
13
  * @param consultationUuid the consultation uuid
13
14
  * @param consultationShortId the consultation short id
@@ -15,4 +16,19 @@ export declare class TellerService {
15
16
  * @returns void
16
17
  */
17
18
  notifyFaxFailed(practiceUuid: Uuid, consultationUuid: Uuid, consultationShortId: string, fax: string): Promise<void>;
19
+ /**
20
+ * This function let's you reassign a practictioner to a consult and send a notification email
21
+ * @todo - Make service only exposed route
22
+ * @param uuidConsult the uuid of the consult to reassign
23
+ * @param newPractitionerUuid the uuid of the practitioner that will get reassigned
24
+ */
25
+ reassignmentEmail(uuidConsult: Uuid, newPractitionerUuid: Uuid): Promise<void>;
26
+ /**
27
+ * This function will send an email to the patientUuid, saying that the online practice has been sent a fax successfully
28
+ * @todo - Make service only exposed route
29
+ * @param consult
30
+ * @param patientUuid
31
+ * @returns void
32
+ */
33
+ sendOnlineFaxSuccessfulEmail(consult: Consult, patientUuid: Uuid): Promise<void>;
18
34
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.16.1",
2
+ "version": "1.18.0",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -104,6 +104,12 @@ export enum PracticeEmailKind {
104
104
  FollowedUp = 'FollowedUp',
105
105
  Renewed = 'Renewed',
106
106
  DataRetrieved = 'DataRetrieved',
107
+ Closed = 'Closed',
108
+ PasswordRecovery = 'PasswordRecovery',
109
+ FaxFailed = 'FaxFailed',
110
+ ExamResult = 'ExamResult',
111
+ Reassigned = 'Reassigned',
112
+ OnlinePharmacyFaxSent = 'OnlinePharmacyFaxSent',
107
113
  }
108
114
 
109
115
  export interface PracticeAccount {
@@ -42,6 +42,9 @@ export class ApisPracticeManager {
42
42
  }
43
43
  }
44
44
 
45
+ // Initialize the M2M token
46
+ await authTokenFunc()
47
+
45
48
  // Set the refresh tokens callback
46
49
  newPracticeInstance.apiService.setAuthRefreshFn(authTokenFunc)
47
50
 
@@ -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,
@@ -32,6 +32,7 @@ export class TellerService {
32
32
 
33
33
  /**
34
34
  * This function notifies teller that the fax sent for a specific consult did not get through
35
+ * @todo - Make service only exposed route
35
36
  * @param practiceUuid the practice uuid linked to the consult
36
37
  * @param consultationUuid the consultation uuid
37
38
  * @param consultationShortId the consultation short id
@@ -51,4 +52,32 @@ export class TellerService {
51
52
  }
52
53
  )
53
54
  }
55
+
56
+ /**
57
+ * This function let's you reassign a practictioner to a consult and send a notification email
58
+ * @todo - Make service only exposed route
59
+ * @param uuidConsult the uuid of the consult to reassign
60
+ * @param newPractitionerUuid the uuid of the practitioner that will get reassigned
61
+ */
62
+ public reassignmentEmail(uuidConsult: Uuid, newPractitionerUuid: Uuid) {
63
+ return this.api.post<void>(`${this.baseURL}/v1/consult/${uuidConsult}/reassignment-email`, {
64
+ newPractitionerUuid,
65
+ })
66
+ }
67
+
68
+ /**
69
+ * This function will send an email to the patientUuid, saying that the online practice has been sent a fax successfully
70
+ * @todo - Make service only exposed route
71
+ * @param consult
72
+ * @param patientUuid
73
+ * @returns void
74
+ */
75
+ public sendOnlineFaxSuccessfulEmail(
76
+ consult: Consult,
77
+ patientUuid: Uuid,
78
+ ): Promise<void> {
79
+ return this.api.post(
80
+ `${this.baseURL}/v1/online-fax-notify`, { consult, patient_uuid: patientUuid }
81
+ )
82
+ }
54
83
  }