oro-sdk-apis 1.36.0 → 1.37.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/models/diagnosis.d.ts +9 -0
- package/dist/models/init.d.ts +3 -1
- package/dist/models/search.d.ts +28 -0
- package/dist/oro-sdk-apis.cjs.development.js +43 -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 +50 -1
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/search.d.ts +18 -0
- package/package.json +1 -1
- package/src/helpers/init.ts +3 -0
- package/src/models/diagnosis.ts +11 -1
- package/src/models/init.ts +3 -0
- package/src/models/search.ts +34 -0
- package/src/services/index.ts +1 -0
- package/src/services/search.ts +39 -0
@@ -56,6 +56,14 @@ export interface Drug extends DrugRequest {
|
|
56
56
|
uuidPractitioner?: string;
|
57
57
|
createdAt: string;
|
58
58
|
}
|
59
|
+
/**
|
60
|
+
* Status of the prescription
|
61
|
+
* Right now, it only serves a soft delete flag
|
62
|
+
*/
|
63
|
+
export declare enum PrescriptionStatus {
|
64
|
+
Existing = "Existing",
|
65
|
+
Deleted = "Deleted"
|
66
|
+
}
|
59
67
|
export interface PrescriptionRequest {
|
60
68
|
uuid?: string;
|
61
69
|
uuidTreatment?: string;
|
@@ -67,6 +75,7 @@ export interface PrescriptionRequest {
|
|
67
75
|
export interface Prescription extends PrescriptionRequest {
|
68
76
|
uuid: string;
|
69
77
|
uuidTreatment: string;
|
78
|
+
status: PrescriptionStatus;
|
70
79
|
createdAt: string;
|
71
80
|
}
|
72
81
|
export declare enum PlanStatus {
|
package/dist/models/init.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { APIService, ConsultService, DiagnosisService, GuardService, PracticeService, TellerService, VaultService, WorkflowService } from '../services';
|
1
|
+
import { APIService, ConsultService, DiagnosisService, GuardService, SearchService, PracticeService, TellerService, VaultService, WorkflowService } from '../services';
|
2
2
|
/**
|
3
3
|
* This interface represents a collection of service urls you need to initialize
|
4
4
|
*/
|
@@ -6,6 +6,7 @@ export interface ServiceCollectionRequest {
|
|
6
6
|
tellerBaseURL?: string;
|
7
7
|
vaultBaseURL?: string;
|
8
8
|
guardBaseURL?: string;
|
9
|
+
searchBaseURL?: string;
|
9
10
|
practiceBaseURL?: string;
|
10
11
|
consultBaseURL?: string;
|
11
12
|
workflowBaseURL?: string;
|
@@ -21,6 +22,7 @@ export interface ServiceCollection {
|
|
21
22
|
consultService?: ConsultService;
|
22
23
|
vaultService?: VaultService;
|
23
24
|
guardService?: GuardService;
|
25
|
+
searchService?: SearchService;
|
24
26
|
workflowService?: WorkflowService;
|
25
27
|
diagnosisService?: DiagnosisService;
|
26
28
|
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
export interface SearchRequest {
|
2
|
+
terms: Terms;
|
3
|
+
}
|
4
|
+
export interface SearchResponse {
|
5
|
+
results: SearchResult[];
|
6
|
+
}
|
7
|
+
export interface SearchResult {
|
8
|
+
consultUUID: string;
|
9
|
+
kind: string;
|
10
|
+
score: number;
|
11
|
+
}
|
12
|
+
export interface IndexRequest {
|
13
|
+
consultUUID: string;
|
14
|
+
terms: Terms;
|
15
|
+
}
|
16
|
+
export declare type Terms = Term[];
|
17
|
+
export interface Term {
|
18
|
+
kind?: string;
|
19
|
+
value: string;
|
20
|
+
}
|
21
|
+
export declare enum IndexKind {
|
22
|
+
consultUuid = 0,
|
23
|
+
consultShortid = 1,
|
24
|
+
firstName = 2,
|
25
|
+
lastName = 3,
|
26
|
+
healthId = 4,
|
27
|
+
dob = 5
|
28
|
+
}
|
@@ -954,6 +954,11 @@ var ApisPracticeManager = /*#__PURE__*/function () {
|
|
954
954
|
DrugType["Instance"] = "Instance";
|
955
955
|
})(exports.DrugType || (exports.DrugType = {}));
|
956
956
|
|
957
|
+
(function (PrescriptionStatus) {
|
958
|
+
PrescriptionStatus["Existing"] = "Existing";
|
959
|
+
PrescriptionStatus["Deleted"] = "Deleted";
|
960
|
+
})(exports.PrescriptionStatus || (exports.PrescriptionStatus = {}));
|
961
|
+
|
957
962
|
(function (PlanStatus) {
|
958
963
|
PlanStatus["Pending"] = "Pending";
|
959
964
|
PlanStatus["Accepted"] = "Accepted";
|
@@ -2164,6 +2169,41 @@ var GuardService = /*#__PURE__*/function () {
|
|
2164
2169
|
return GuardService;
|
2165
2170
|
}();
|
2166
2171
|
|
2172
|
+
var SearchService = /*#__PURE__*/function () {
|
2173
|
+
function SearchService(api, baseURL) {
|
2174
|
+
this.api = api;
|
2175
|
+
this.baseURL = baseURL;
|
2176
|
+
}
|
2177
|
+
/**
|
2178
|
+
* Creates search indexes for the terms passed in order to be able to search for it in the future
|
2179
|
+
* @param consultUUID
|
2180
|
+
* @param terms the search terms to be indexed
|
2181
|
+
*/
|
2182
|
+
|
2183
|
+
|
2184
|
+
var _proto = SearchService.prototype;
|
2185
|
+
|
2186
|
+
_proto.index = function index(consultUUID, terms) {
|
2187
|
+
return this.api.post(this.baseURL + "/v1/search", {
|
2188
|
+
consultUUID: consultUUID,
|
2189
|
+
terms: terms
|
2190
|
+
});
|
2191
|
+
}
|
2192
|
+
/**
|
2193
|
+
* Searches for the consultations corresponding to the search terms entered in the query
|
2194
|
+
* @param terms array of search terms
|
2195
|
+
*/
|
2196
|
+
;
|
2197
|
+
|
2198
|
+
_proto.search = function search(terms) {
|
2199
|
+
return this.api.post(this.baseURL + "/v1/search", {
|
2200
|
+
terms: terms
|
2201
|
+
});
|
2202
|
+
};
|
2203
|
+
|
2204
|
+
return SearchService;
|
2205
|
+
}();
|
2206
|
+
|
2167
2207
|
var PracticeService = /*#__PURE__*/function () {
|
2168
2208
|
function PracticeService(api, baseURL) {
|
2169
2209
|
this.api = api;
|
@@ -3044,6 +3084,7 @@ var init = function init(services, authenticationCallback, useLocalStorage) {
|
|
3044
3084
|
consultBaseURL = services.consultBaseURL,
|
3045
3085
|
vaultBaseURL = services.vaultBaseURL,
|
3046
3086
|
guardBaseURL = services.guardBaseURL,
|
3087
|
+
searchBaseURL = services.searchBaseURL,
|
3047
3088
|
workflowBaseURL = services.workflowBaseURL,
|
3048
3089
|
diagnosisBaseURL = services.diagnosisBaseURL;
|
3049
3090
|
var apiService = new APIService(useLocalStorage, undefined, authenticationCallback);
|
@@ -3054,6 +3095,7 @@ var init = function init(services, authenticationCallback, useLocalStorage) {
|
|
3054
3095
|
consultService: consultBaseURL ? new ConsultService(apiService, consultBaseURL) : undefined,
|
3055
3096
|
vaultService: vaultBaseURL ? new VaultService(apiService, vaultBaseURL) : undefined,
|
3056
3097
|
guardService: guardBaseURL ? new GuardService(apiService, guardBaseURL) : undefined,
|
3098
|
+
searchService: searchBaseURL ? new SearchService(apiService, searchBaseURL) : undefined,
|
3057
3099
|
workflowService: workflowBaseURL ? new WorkflowService(apiService, workflowBaseURL) : undefined,
|
3058
3100
|
diagnosisService: diagnosisBaseURL ? new DiagnosisService(apiService, diagnosisBaseURL) : undefined
|
3059
3101
|
};
|
@@ -3073,6 +3115,7 @@ exports.IdentityCreationBadRequest = IdentityCreationBadRequest;
|
|
3073
3115
|
exports.IdentityCreationConflict = IdentityCreationConflict;
|
3074
3116
|
exports.IdentityCreationFailed = IdentityCreationFailed;
|
3075
3117
|
exports.PracticeService = PracticeService;
|
3118
|
+
exports.SearchService = SearchService;
|
3076
3119
|
exports.TellerService = TellerService;
|
3077
3120
|
exports.VaultService = VaultService;
|
3078
3121
|
exports.WorkflowService = WorkflowService;
|