oro-sdk-apis 1.17.0 → 1.19.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
@@ -17,8 +18,17 @@ export declare class TellerService {
17
18
  notifyFaxFailed(practiceUuid: Uuid, consultationUuid: Uuid, consultationShortId: string, fax: string): Promise<void>;
18
19
  /**
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
20
22
  * @param uuidConsult the uuid of the consult to reassign
21
23
  * @param newPractitionerUuid the uuid of the practitioner that will get reassigned
22
24
  */
23
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>;
24
34
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.17.0",
2
+ "version": "1.19.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 {
@@ -1,3 +1,41 @@
1
+ /**
2
+ * This type represents all the patient profile kind
3
+ */
4
+ export type ProfileKind = 'myself' | 'child' | 'other'
5
+ /**
6
+ * this type is done as an example on how to add another data kind
7
+ */
8
+ export type OtherKind = 'otherKindOfType'
9
+
10
+ /**
11
+ * This type represents all the kind a data that can define `ChoiceInputData` (`OtherKind` is here only as an example on how to add a new kind)
12
+ */
13
+ export type AllChoiceInputDataKind = ProfileKind | OtherKind
14
+
15
+ /**
16
+ * This interface represents a `StateTrigger` on selected profile kind
17
+ */
18
+ export interface ProfileTrigger {
19
+ kind: 'profileTrigger'
20
+ value: ProfileKind
21
+ }
22
+
23
+ /**
24
+ * This interface is meant as an example of another kind of `StateTrigger`
25
+ */
26
+ export interface OtherTrigger {
27
+ kind: 'otherTrigger'
28
+ field1: number
29
+ field2: string
30
+ }
31
+
32
+ /**
33
+ * This type represents all the state triggers that are defined.
34
+ *
35
+ * A state trigger is triggered onto app states. In other words, it is for triggers that cannot be defined thanks to pure workflow answers.
36
+ */
37
+ export type StateTrigger = ProfileTrigger | OtherTrigger
38
+
1
39
  export interface IndexedData<T> {
2
40
  [key: string]: T
3
41
  }
@@ -9,6 +47,8 @@ export interface ChoiceInputData {
9
47
  text: string
10
48
  className?: string
11
49
  order?: number
50
+ /** If defined, the choice input contains a kind that can be used into app. For instance, to check if a specific `kind` of answer has been selected */
51
+ kind?: AllChoiceInputDataKind
12
52
  }
13
53
 
14
54
  export interface RadioInputIconOptionsData {
@@ -37,7 +77,14 @@ export interface EntryData {
37
77
  summaryLabel?: string
38
78
  summaryHidden?: boolean
39
79
  className?: string
80
+ /**
81
+ * This field represents a list of `selectedAnswers` that must be set for this entry to be displayed.
82
+ */
40
83
  triggers?: string[]
84
+ /**
85
+ * This field represents a list of `StateTrigger` that must be fulfilled for this entry to be displayed.
86
+ */
87
+ stateTriggers?: StateTrigger[]
41
88
  }
42
89
 
43
90
  export interface SlideData {
@@ -80,8 +127,23 @@ export interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>>
80
127
  order?: number
81
128
  }
82
129
 
83
- export declare type QuestionData = GenericQuestionData<'title' | 'paragraph' | 'checkbox', void> | GenericQuestionData<'text' | 'text-area' | 'date' | 'number' | 'images' | 'images-alias' | 'body-parts' | 'pharmacy-picker' | 'place-address'> | GenericQuestionData<'checkbox-group' | 'select' | 'multiple' | 'text-select-group', IndexedData<ChoiceInputData>> | GroupedGenericQuestionData<'radio', IndexedData<RadioInputData>> | GroupedGenericQuestionData<'radio-card', IndexedData<RadioCardInputData>> | GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>>;
84
-
130
+ export declare type QuestionData =
131
+ | GenericQuestionData<'title' | 'paragraph' | 'checkbox', void>
132
+ | GenericQuestionData<
133
+ | 'text'
134
+ | 'text-area'
135
+ | 'date'
136
+ | 'number'
137
+ | 'images'
138
+ | 'images-alias'
139
+ | 'body-parts'
140
+ | 'pharmacy-picker'
141
+ | 'place-address'
142
+ >
143
+ | GenericQuestionData<'checkbox-group' | 'select' | 'multiple' | 'text-select-group', IndexedData<ChoiceInputData>>
144
+ | GroupedGenericQuestionData<'radio', IndexedData<RadioInputData>>
145
+ | GroupedGenericQuestionData<'radio-card', IndexedData<RadioCardInputData>>
146
+ | GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>>
85
147
 
86
148
  export interface FieldData {
87
149
  type: 'field'
@@ -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
@@ -54,6 +55,7 @@ export class TellerService {
54
55
 
55
56
  /**
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
57
59
  * @param uuidConsult the uuid of the consult to reassign
58
60
  * @param newPractitionerUuid the uuid of the practitioner that will get reassigned
59
61
  */
@@ -62,4 +64,20 @@ export class TellerService {
62
64
  newPractitionerUuid,
63
65
  })
64
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
+ }
65
83
  }