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.
- package/dist/helpers/hash.d.ts +6 -0
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/init.d.ts +9 -0
- package/dist/index.d.ts +2 -24
- package/dist/models/guard.d.ts +14 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/init.d.ts +26 -0
- package/dist/models/practice.d.ts +13 -4
- package/dist/oro-sdk-apis.cjs.development.js +370 -124
- package/dist/oro-sdk-apis.cjs.development.js.map +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk-apis.esm.js +368 -125
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/api.d.ts +9 -1
- package/dist/services/apisPracticeManager.d.ts +25 -0
- package/dist/services/guard.d.ts +8 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/practice.d.ts +2 -2
- package/dist/services/teller.d.ts +9 -0
- package/package.json +1 -1
- package/src/helpers/hash.ts +11 -0
- package/src/helpers/index.ts +2 -0
- package/src/helpers/init.ts +47 -0
- package/src/index.ts +2 -52
- package/src/models/guard.ts +19 -4
- package/src/models/index.ts +2 -0
- package/src/models/init.ts +37 -0
- package/src/models/practice.ts +13 -3
- package/src/services/api.ts +51 -34
- package/src/services/apisPracticeManager.ts +52 -0
- package/src/services/guard.ts +46 -4
- package/src/services/index.ts +1 -0
- package/src/services/practice.ts +4 -4
- package/src/services/teller.ts +32 -17
package/src/services/teller.ts
CHANGED
|
@@ -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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
45
|
+
consultationUuid,
|
|
46
|
+
consultationShortId,
|
|
47
|
+
fax,
|
|
36
48
|
},
|
|
49
|
+
{
|
|
50
|
+
params: { practice_uuid: practiceUuid },
|
|
51
|
+
}
|
|
37
52
|
)
|
|
38
53
|
}
|
|
39
54
|
}
|