oro-sdk-apis 4.3.2 → 5.13.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/models/practice.d.ts +2 -1
- package/dist/oro-sdk-apis.cjs.development.js +12 -17
- 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 +12 -17
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/consult.d.ts +1 -0
- package/dist/services/diagnosis.d.ts +3 -4
- package/package.json +1 -1
- package/src/models/practice.ts +1 -0
- package/src/services/consult.ts +9 -3
- package/src/services/diagnosis.ts +6 -26
@@ -41,6 +41,7 @@ export declare class ConsultService {
|
|
41
41
|
*/
|
42
42
|
getConsults(uuidPractice?: Uuid, uuidRequester?: Uuid, statusesMedical?: MedicalStatus[], statusesExclude?: MedicalStatus[], shortId?: string, columnToSortTo?: string[], orderToSortTo?: string[], perPage?: number, indexPage?: number, filterAssignedDoctor?: string, filterCurrentPractitioner?: string, filterIsoLocality?: string[], filterAssignee?: string[], uuidParent?: Uuid, typesConsult?: ConsultType[]): Promise<Consult[]>;
|
43
43
|
getConsultByUUID(uuidConsult: Uuid, uuidPractice?: Uuid): Promise<Consult>;
|
44
|
+
getConsultByPracticePaymentID(idPracticePayment: Number, uuidPractice?: Uuid): Promise<Consult>;
|
44
45
|
updateConsultByUUID(uuidConsult: Uuid, consult: {
|
45
46
|
statusMedical?: MedicalStatus;
|
46
47
|
closedReasonType?: ClosedReasonType;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { Drug, TreatmentAssociatedConsultData, TreatmentPlan, TreatmentPlans, TreatmentPlansRequest, TreatmentPlansResponse, Uuid } from '..';
|
2
2
|
import { Diagnosis, Treatment, DiagnosisRequest, TreatmentAndDrugPrescriptionUpdateRequest, TreatmentRequest } from '../models/diagnosis';
|
3
3
|
import { APIService } from './api';
|
4
4
|
export declare class DiagnosisService {
|
@@ -35,9 +35,8 @@ export declare class DiagnosisService {
|
|
35
35
|
getTreatmentPlansPopulatedFromConsultUuid(uuidConsult: Uuid): Promise<TreatmentPlans>;
|
36
36
|
postPlans(plans: TreatmentPlansRequest): Promise<TreatmentPlansResponse>;
|
37
37
|
updateTreatmentPlan(uuidPlan: string, uuidConsult: string, diagnosisRequest: DiagnosisRequest, plan: TreatmentAndDrugPrescriptionUpdateRequest, refill?: boolean): Promise<TreatmentPlan>;
|
38
|
-
|
39
|
-
|
40
|
-
updateAssociatedConsultsToTreatment(uuidPlan: string, arrAssociatedConsults: TreatmentAssociatedConsultData[]): Promise<TreatmentAssociatedConsultData[]>;
|
38
|
+
setAssociatedConsultsToTreatment(diagnosisUuid: string, treatmentUuid: string, arrAssociatedConsults: TreatmentAssociatedConsultData[]): Promise<TreatmentAssociatedConsultData[]>;
|
39
|
+
updateAssociatedConsultsToTreatment(diagnosisUuid: string, treatmentUuid: string, arrAssociatedConsults: TreatmentAssociatedConsultData[]): Promise<TreatmentAssociatedConsultData[]>;
|
41
40
|
acceptTreatmentPlan(uuidPlan: string, uuidConsult: string): Promise<TreatmentPlan>;
|
42
41
|
/**
|
43
42
|
* retrieves all the drugs of the specified practice
|
package/package.json
CHANGED
package/src/models/practice.ts
CHANGED
package/src/services/consult.ts
CHANGED
@@ -12,7 +12,7 @@ import {
|
|
12
12
|
} from '../models'
|
13
13
|
|
14
14
|
export class ConsultService {
|
15
|
-
constructor(private api: APIService, private baseURL: string) {
|
15
|
+
constructor(private api: APIService, private baseURL: string) {}
|
16
16
|
|
17
17
|
public consultCreate(c: ConsultRequest): Promise<Consult> {
|
18
18
|
return this.api.post<Consult>(`${this.baseURL}/v1/consults`, c)
|
@@ -71,7 +71,7 @@ export class ConsultService {
|
|
71
71
|
filterIsoLocality,
|
72
72
|
filterAssignee,
|
73
73
|
typesConsult,
|
74
|
-
uuidParent
|
74
|
+
uuidParent,
|
75
75
|
},
|
76
76
|
},
|
77
77
|
'Content-Range'
|
@@ -120,7 +120,7 @@ export class ConsultService {
|
|
120
120
|
filterIsoLocality?: string[],
|
121
121
|
filterAssignee?: string[],
|
122
122
|
uuidParent?: Uuid,
|
123
|
-
typesConsult?: ConsultType[]
|
123
|
+
typesConsult?: ConsultType[]
|
124
124
|
): Promise<Consult[]> {
|
125
125
|
return this.api.get<Consult[]>(`${this.baseURL}/v1/consults`, {
|
126
126
|
params: {
|
@@ -147,6 +147,12 @@ export class ConsultService {
|
|
147
147
|
return this.api.get<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, { params: { uuidPractice } })
|
148
148
|
}
|
149
149
|
|
150
|
+
public getConsultByPracticePaymentID(idPracticePayment: Number, uuidPractice?: Uuid): Promise<Consult> {
|
151
|
+
return this.api.get<Consult>(`${this.baseURL}/v1/consults/payment-${idPracticePayment}`, {
|
152
|
+
params: { uuidPractice },
|
153
|
+
})
|
154
|
+
}
|
155
|
+
|
150
156
|
public updateConsultByUUID(
|
151
157
|
uuidConsult: Uuid,
|
152
158
|
consult: {
|
@@ -96,44 +96,24 @@ export class DiagnosisService {
|
|
96
96
|
})
|
97
97
|
}
|
98
98
|
|
99
|
-
public updateTreatmentPlanAndSetAssociatedConsult(
|
100
|
-
uuidPlan: string,
|
101
|
-
consultAssociated: Consult,
|
102
|
-
diagnosisRequest: DiagnosisRequest,
|
103
|
-
plan: TreatmentAndDrugPrescriptionUpdateRequest,
|
104
|
-
refill?: boolean
|
105
|
-
): Promise<TreatmentPlan> {
|
106
|
-
const associatedConsultData : TreatmentAssociatedConsultData = {
|
107
|
-
uuidConsult: consultAssociated.uuid,
|
108
|
-
consultKind: consultAssociated.consultType,
|
109
|
-
}
|
110
|
-
//this is fire and forget and may fail later
|
111
|
-
try{
|
112
|
-
this.updateAssociatedConsultsToTreatment(uuidPlan, [ associatedConsultData ])
|
113
|
-
}
|
114
|
-
catch{
|
115
|
-
console.error( `[SDK Diagnosis] We failed to updated associated consult to the treatment plan ${uuidPlan}`)
|
116
|
-
}
|
117
|
-
|
118
|
-
return this.updateTreatmentPlan( uuidPlan, consultAssociated.uuid, diagnosisRequest, plan, refill )
|
119
|
-
}
|
120
|
-
|
121
99
|
public setAssociatedConsultsToTreatment(
|
122
|
-
|
100
|
+
diagnosisUuid: string,
|
101
|
+
treatmentUuid: string,
|
123
102
|
arrAssociatedConsults: TreatmentAssociatedConsultData[]
|
124
103
|
): Promise<TreatmentAssociatedConsultData[]> {
|
125
104
|
return this.api.post<TreatmentAssociatedConsultData[]>(
|
126
|
-
`${this.baseURL}/v1/
|
105
|
+
`${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments/${treatmentUuid}/associated-consults`,
|
127
106
|
arrAssociatedConsults
|
128
107
|
)
|
129
108
|
}
|
130
109
|
|
131
110
|
public updateAssociatedConsultsToTreatment(
|
132
|
-
|
111
|
+
diagnosisUuid: string,
|
112
|
+
treatmentUuid: string,
|
133
113
|
arrAssociatedConsults: TreatmentAssociatedConsultData[]
|
134
114
|
): Promise<TreatmentAssociatedConsultData[]> {
|
135
115
|
return this.api.put<TreatmentAssociatedConsultData[]>(
|
136
|
-
`${this.baseURL}/v1/
|
116
|
+
`${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments/${treatmentUuid}/associated-consults`,
|
137
117
|
arrAssociatedConsults
|
138
118
|
)
|
139
119
|
}
|