oro-sdk-apis 1.15.0 → 1.17.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.
- package/dist/models/guard.d.ts +4 -0
- package/dist/models/practice.d.ts +13 -4
- package/dist/oro-sdk-apis.cjs.development.js +33 -0
- 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 +33 -0
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/practice.d.ts +2 -2
- package/dist/services/teller.d.ts +15 -0
- package/package.json +1 -1
- package/src/models/guard.ts +7 -1
- package/src/models/practice.ts +13 -3
- package/src/services/practice.ts +2 -1
- package/src/services/teller.ts +43 -17
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConsultRequestMetadata, PracticeAccount, Uuid } from '../models';
|
|
2
|
-
import { Assignment, PlanType, Practice, PracticeConfigKind, PracticeConfigs, PracticeInvoice, PracticePayment, PracticePaymentIntent, PracticePlan, PracticePlanPrices, PracticeWorkflow, PracticeWorkflowWithTagSpecialty, Practitioner, PractitionerLicense, PractitionerPreference, PractitionerQuota, PractitionerRole, WorkflowType } from '../models/practice';
|
|
2
|
+
import { Assignment, AssignmentRequest, PlanType, Practice, PracticeConfigKind, PracticeConfigs, PracticeInvoice, PracticePayment, PracticePaymentIntent, PracticePlan, PracticePlanPrices, PracticeWorkflow, PracticeWorkflowWithTagSpecialty, Practitioner, PractitionerLicense, PractitionerPreference, PractitionerQuota, PractitionerRole, WorkflowType } from '../models/practice';
|
|
3
3
|
import { APIService } from './api';
|
|
4
4
|
export declare class PracticeService {
|
|
5
5
|
private api;
|
|
@@ -107,7 +107,7 @@ export declare class PracticeService {
|
|
|
107
107
|
*/
|
|
108
108
|
practiceGetPractitionerSignature(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<Blob>;
|
|
109
109
|
practiceGetAssignments(practiceUuid: Uuid): Promise<Assignment[]>;
|
|
110
|
-
practiceCreateAssignment(practiceUuid: Uuid, requestBody:
|
|
110
|
+
practiceCreateAssignment(practiceUuid: Uuid, requestBody: AssignmentRequest): Promise<Assignment>;
|
|
111
111
|
practiceUpdateAssignment(practiceUuid: Uuid, assignmentId: number, requestBody: Assignment): Promise<Assignment>;
|
|
112
112
|
practiceGetAssignment(practiceUuid: Uuid, assignmentId: number): Promise<Assignment>;
|
|
113
113
|
practiceGetQuotas(practiceUuid: Uuid): Promise<PractitionerQuota[]>;
|
|
@@ -6,4 +6,19 @@ export declare class TellerService {
|
|
|
6
6
|
constructor(api: APIService, baseURL: string);
|
|
7
7
|
lockboxDataStore(lockboxUuid: Uuid, req: LockboxDataRequest, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid): Promise<DataCreateResponse>;
|
|
8
8
|
updateConsultByUUID(patientUuid: Uuid, uuidConsult: Uuid, statusMedical: MedicalStatus, neverExpires?: boolean): Promise<Consult>;
|
|
9
|
+
/**
|
|
10
|
+
* This function notifies teller that the fax sent for a specific consult did not get through
|
|
11
|
+
* @param practiceUuid the practice uuid linked to the consult
|
|
12
|
+
* @param consultationUuid the consultation uuid
|
|
13
|
+
* @param consultationShortId the consultation short id
|
|
14
|
+
* @param fax the address where to send the fax
|
|
15
|
+
* @returns void
|
|
16
|
+
*/
|
|
17
|
+
notifyFaxFailed(practiceUuid: Uuid, consultationUuid: Uuid, consultationShortId: string, fax: string): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* This function let's you reassign a practictioner to a consult and send a notification email
|
|
20
|
+
* @param uuidConsult the uuid of the consult to reassign
|
|
21
|
+
* @param newPractitionerUuid the uuid of the practitioner that will get reassigned
|
|
22
|
+
*/
|
|
23
|
+
reassignmentEmail(uuidConsult: Uuid, newPractitionerUuid: Uuid): Promise<void>;
|
|
9
24
|
}
|
package/package.json
CHANGED
package/src/models/guard.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Uuid, Base64String, TokenData, RFC3339Date, Url } from './'
|
|
2
|
+
import { AllRoleType } from './practice'
|
|
2
3
|
|
|
3
4
|
export type AuthRefreshFunc = (refreshToken?: string) => Promise<AuthTokenResponse>
|
|
4
5
|
export interface Tokens {
|
|
@@ -29,7 +30,6 @@ export interface M2MTokenRequest {
|
|
|
29
30
|
practiceUuid: string
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
|
|
33
33
|
export interface AuthRecoverRequest {
|
|
34
34
|
practiceUuid: string
|
|
35
35
|
email: string
|
|
@@ -145,3 +145,9 @@ export interface LegalData {
|
|
|
145
145
|
rpAcceptedVersion: Url
|
|
146
146
|
rpAcceptedAtIP?: string
|
|
147
147
|
}
|
|
148
|
+
|
|
149
|
+
export type RoleBasedScopes = AllRoleType
|
|
150
|
+
|
|
151
|
+
export type PermissionBasedScopes = 'consult.consults.get' | 'consult.consults.post' | 'practice.assignments.post'
|
|
152
|
+
|
|
153
|
+
export type AllScopes = RoleBasedScopes | PermissionBasedScopes
|
package/src/models/practice.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlaceData } from
|
|
1
|
+
import { PlaceData } from '.'
|
|
2
2
|
|
|
3
3
|
export enum WorkflowType {
|
|
4
4
|
Onboard = 'Onboard',
|
|
@@ -299,8 +299,18 @@ export interface ConsultRequestMetadata {
|
|
|
299
299
|
isoLanguageRequired: string
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
export interface
|
|
303
|
-
|
|
302
|
+
export interface AssignmentRequest {
|
|
303
|
+
uuidAssignor: string //defaulting for insertion to the default practice admin
|
|
304
|
+
uuidPractitioner?: string
|
|
305
|
+
status?: AssignmentStatus
|
|
306
|
+
uuidConsult?: string
|
|
307
|
+
tagSpecialty?: string
|
|
308
|
+
isoLocality?: string,
|
|
309
|
+
isoLanguage?: string,
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export type Assignment = {
|
|
313
|
+
id: number ///optional for insertion
|
|
304
314
|
uuidPractice: string
|
|
305
315
|
uuidAssignor: string //defaulting for insertion to the default practice admin
|
|
306
316
|
uuidPractitioner?: string
|
package/src/services/practice.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { hashToBase64String } from '../helpers'
|
|
|
2
2
|
import { ConsultRequestMetadata, PracticeAccount, Uuid } from '../models'
|
|
3
3
|
import {
|
|
4
4
|
Assignment,
|
|
5
|
+
AssignmentRequest,
|
|
5
6
|
PlanType,
|
|
6
7
|
Practice,
|
|
7
8
|
PracticeConfigKind,
|
|
@@ -424,7 +425,7 @@ export class PracticeService {
|
|
|
424
425
|
return this.api.get<Assignment[]>(`${this.baseURL}/v1/practices/${practiceUuid}/assignments`)
|
|
425
426
|
}
|
|
426
427
|
|
|
427
|
-
public practiceCreateAssignment(practiceUuid: Uuid, requestBody:
|
|
428
|
+
public practiceCreateAssignment(practiceUuid: Uuid, requestBody: AssignmentRequest): Promise<Assignment> {
|
|
428
429
|
return this.api.post<Assignment>(`${this.baseURL}/v1/practices/${practiceUuid}/assignments`, requestBody)
|
|
429
430
|
}
|
|
430
431
|
|
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,57 @@ 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
|
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* This function let's you reassign a practictioner to a consult and send a notification email
|
|
57
|
+
* @param uuidConsult the uuid of the consult to reassign
|
|
58
|
+
* @param newPractitionerUuid the uuid of the practitioner that will get reassigned
|
|
59
|
+
*/
|
|
60
|
+
public reassignmentEmail(uuidConsult: Uuid, newPractitionerUuid: Uuid) {
|
|
61
|
+
return this.api.post<void>(`${this.baseURL}/v1/consult/${uuidConsult}/reassignment-email`, {
|
|
62
|
+
newPractitionerUuid,
|
|
63
|
+
})
|
|
64
|
+
}
|
|
39
65
|
}
|