oro-sdk 2.1.4 → 2.2.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/oro-sdk.cjs.development.js +10 -0
- package/dist/oro-sdk.cjs.development.js.map +1 -1
- package/dist/oro-sdk.cjs.production.min.js +1 -1
- package/dist/oro-sdk.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk.esm.js +10 -0
- package/dist/oro-sdk.esm.js.map +1 -1
- package/dist/services/diagnosis.d.ts +7 -1
- package/package.json +1 -1
- package/src/services/diagnosis.ts +13 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Drug, TreatmentPlan, TreatmentPlans, TreatmentPlansRequest, TreatmentPlansResponse, Uuid } from '..';
|
2
|
-
import { Diagnosis, Treatment, DiagnosisRequest, TreatmentAndDrugPrescriptionUpdateRequest } from '../models/diagnosis';
|
2
|
+
import { Diagnosis, Treatment, DiagnosisRequest, TreatmentRequest, TreatmentAndDrugPrescriptionUpdateRequest } from '../models/diagnosis';
|
3
3
|
import { APIService } from './api';
|
4
4
|
export declare class DiagnosisService {
|
5
5
|
private api;
|
@@ -21,6 +21,12 @@ export declare class DiagnosisService {
|
|
21
21
|
* @returns an array of TreatmentPlan
|
22
22
|
*/
|
23
23
|
getTreatmentPlansFromConsultUuid(uuidConsult: Uuid): Promise<TreatmentPlan[]>;
|
24
|
+
/**
|
25
|
+
* creates a new treatment for the specified diagnosis
|
26
|
+
* @param diagnosisUuid uuid of the diagnosis that the treatment is linked to
|
27
|
+
* @param treatmentRequest the treatment to be inserted
|
28
|
+
*/
|
29
|
+
createTreatment(diagnosisUuid: string, treatmentRequest: TreatmentRequest): Promise<Treatment>;
|
24
30
|
/**
|
25
31
|
* This function returns populated treatment plans associated to a consult
|
26
32
|
* @param uuidConsult the consult uuid to fetch
|
package/package.json
CHANGED
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
TreatmentPlansResponse,
|
7
7
|
Uuid,
|
8
8
|
} from '..'
|
9
|
-
import { Diagnosis, Treatment, DiagnosisRequest, TreatmentAndDrugPrescriptionUpdateRequest } from '../models/diagnosis'
|
9
|
+
import { Diagnosis, Treatment, DiagnosisRequest, TreatmentRequest, TreatmentAndDrugPrescriptionUpdateRequest } from '../models/diagnosis'
|
10
10
|
import { APIService } from './api'
|
11
11
|
|
12
12
|
export class DiagnosisService {
|
@@ -66,6 +66,18 @@ export class DiagnosisService {
|
|
66
66
|
)
|
67
67
|
}
|
68
68
|
|
69
|
+
/**
|
70
|
+
* creates a new treatment for the specified diagnosis
|
71
|
+
* @param diagnosisUuid uuid of the diagnosis that the treatment is linked to
|
72
|
+
* @param treatmentRequest the treatment to be inserted
|
73
|
+
*/
|
74
|
+
public createTreatment(diagnosisUuid: string, treatmentRequest: TreatmentRequest) {
|
75
|
+
return this.api.post<Treatment>(
|
76
|
+
`${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments`,
|
77
|
+
treatmentRequest
|
78
|
+
)
|
79
|
+
}
|
80
|
+
|
69
81
|
/**
|
70
82
|
* This function returns populated treatment plans associated to a consult
|
71
83
|
* @param uuidConsult the consult uuid to fetch
|