@candesk/contracts 6.69.0 → 6.71.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/events/treatment/index.d.ts +2 -0
- package/dist/events/treatment/index.js +2 -0
- package/dist/events/treatment/treatment-request-approved.interface.d.ts +7 -0
- package/dist/events/treatment/treatment-request-approved.interface.js +2 -0
- package/dist/events/treatment/treatment-request-paid.interface.d.ts +1 -0
- package/dist/events/treatment/treatment-request-refunded.interface.d.ts +1 -0
- package/dist/events/treatment/treatment-request-rejected.interface.d.ts +7 -0
- package/dist/events/treatment/treatment-request-rejected.interface.js +2 -0
- package/dist/events/treatment/treatment.events.d.ts +2 -0
- package/dist/events/treatment/treatment.events.js +3 -1
- package/dist/gen/notification.d.ts +2 -0
- package/dist/gen/notification.js +2 -0
- package/dist/gen/treatment.d.ts +99 -0
- package/dist/gen/treatment.js +19 -1
- package/dist/nest/notification.d.ts +2 -0
- package/dist/nest/notification.js +2 -0
- package/dist/nest/treatment.d.ts +107 -0
- package/dist/nest/treatment.js +27 -1
- package/package.json +1 -1
- package/proto/notification.proto +2 -0
- package/proto/treatment.proto +116 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './medication-wish-changed.interface';
|
|
2
2
|
export * from './treatment.events';
|
|
3
|
+
export * from './treatment-request-approved.interface';
|
|
3
4
|
export * from './treatment-request-expired.interface';
|
|
4
5
|
export * from './treatment-request-paid.interface';
|
|
5
6
|
export * from './treatment-request-refunded.interface';
|
|
7
|
+
export * from './treatment-request-rejected.interface';
|
|
6
8
|
export * from './withdrawal-received.interface';
|
|
7
9
|
export * from './withdrawal-rejected.interface';
|
|
@@ -16,8 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./medication-wish-changed.interface"), exports);
|
|
18
18
|
__exportStar(require("./treatment.events"), exports);
|
|
19
|
+
__exportStar(require("./treatment-request-approved.interface"), exports);
|
|
19
20
|
__exportStar(require("./treatment-request-expired.interface"), exports);
|
|
20
21
|
__exportStar(require("./treatment-request-paid.interface"), exports);
|
|
21
22
|
__exportStar(require("./treatment-request-refunded.interface"), exports);
|
|
23
|
+
__exportStar(require("./treatment-request-rejected.interface"), exports);
|
|
22
24
|
__exportStar(require("./withdrawal-received.interface"), exports);
|
|
23
25
|
__exportStar(require("./withdrawal-rejected.interface"), exports);
|
|
@@ -5,4 +5,6 @@ export declare const TREATMENT_EVENTS: {
|
|
|
5
5
|
readonly WITHDRAWAL_RECEIVED: 'treatment.withdrawal.received';
|
|
6
6
|
readonly WITHDRAWAL_REJECTED: 'treatment.withdrawal.rejected';
|
|
7
7
|
readonly REQUEST_REFUNDED: 'treatment.request.refunded';
|
|
8
|
+
readonly REQUEST_APPROVED: 'treatment.request.approved';
|
|
9
|
+
readonly REQUEST_REJECTED: 'treatment.request.rejected';
|
|
8
10
|
};
|
|
@@ -7,5 +7,7 @@ exports.TREATMENT_EVENTS = {
|
|
|
7
7
|
MEDICATION_WISH_CHANGED: 'treatment.medication-wish.changed',
|
|
8
8
|
WITHDRAWAL_RECEIVED: 'treatment.withdrawal.received',
|
|
9
9
|
WITHDRAWAL_REJECTED: 'treatment.withdrawal.rejected',
|
|
10
|
-
REQUEST_REFUNDED: 'treatment.request.refunded'
|
|
10
|
+
REQUEST_REFUNDED: 'treatment.request.refunded',
|
|
11
|
+
REQUEST_APPROVED: 'treatment.request.approved',
|
|
12
|
+
REQUEST_REJECTED: 'treatment.request.rejected'
|
|
11
13
|
};
|
|
@@ -20,6 +20,8 @@ export declare enum NotificationType {
|
|
|
20
20
|
NOTIFICATION_TYPE_COMMENT_REJECTED = 16,
|
|
21
21
|
NOTIFICATION_TYPE_TREATMENT_REQUEST_REFUNDED = 17,
|
|
22
22
|
NOTIFICATION_TYPE_WITHDRAWAL_REJECTED = 18,
|
|
23
|
+
NOTIFICATION_TYPE_TREATMENT_REQUEST_APPROVED = 19,
|
|
24
|
+
NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED = 20,
|
|
23
25
|
UNRECOGNIZED = -1
|
|
24
26
|
}
|
|
25
27
|
export interface Notification {
|
package/dist/gen/notification.js
CHANGED
|
@@ -30,5 +30,7 @@ var NotificationType;
|
|
|
30
30
|
NotificationType[NotificationType["NOTIFICATION_TYPE_COMMENT_REJECTED"] = 16] = "NOTIFICATION_TYPE_COMMENT_REJECTED";
|
|
31
31
|
NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_REFUNDED"] = 17] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_REFUNDED";
|
|
32
32
|
NotificationType[NotificationType["NOTIFICATION_TYPE_WITHDRAWAL_REJECTED"] = 18] = "NOTIFICATION_TYPE_WITHDRAWAL_REJECTED";
|
|
33
|
+
NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_APPROVED"] = 19] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_APPROVED";
|
|
34
|
+
NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED"] = 20] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED";
|
|
33
35
|
NotificationType[NotificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
34
36
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
package/dist/gen/treatment.d.ts
CHANGED
|
@@ -54,6 +54,22 @@ export declare enum TreatmentRequestStatus {
|
|
|
54
54
|
TREATMENT_REQUEST_STATUS_REFUND_PENDING = 5,
|
|
55
55
|
TREATMENT_REQUEST_STATUS_REFUND_FAILED = 6,
|
|
56
56
|
TREATMENT_REQUEST_STATUS_REFUNDED = 7,
|
|
57
|
+
TREATMENT_REQUEST_STATUS_IN_REVIEW = 8,
|
|
58
|
+
TREATMENT_REQUEST_STATUS_APPROVED = 9,
|
|
59
|
+
UNRECOGNIZED = -1
|
|
60
|
+
}
|
|
61
|
+
export declare enum MedicalRejectionReason {
|
|
62
|
+
MEDICAL_REJECTION_REASON_UNSPECIFIED = 0,
|
|
63
|
+
MEDICAL_REJECTION_REASON_EXCLUSION_CRITERIA = 1,
|
|
64
|
+
MEDICAL_REJECTION_REASON_NO_INDICATION = 2,
|
|
65
|
+
MEDICAL_REJECTION_REASON_OTHER = 3,
|
|
66
|
+
UNRECOGNIZED = -1
|
|
67
|
+
}
|
|
68
|
+
export declare enum MedicalReviewScope {
|
|
69
|
+
MEDICAL_REVIEW_SCOPE_UNSPECIFIED = 0,
|
|
70
|
+
MEDICAL_REVIEW_SCOPE_QUEUE = 1,
|
|
71
|
+
MEDICAL_REVIEW_SCOPE_IN_REVIEW = 2,
|
|
72
|
+
MEDICAL_REVIEW_SCOPE_DONE = 3,
|
|
57
73
|
UNRECOGNIZED = -1
|
|
58
74
|
}
|
|
59
75
|
export declare enum WithdrawalStatus {
|
|
@@ -142,6 +158,17 @@ export interface TreatmentRequest {
|
|
|
142
158
|
intakeMethods: IntakeMethod[];
|
|
143
159
|
refundedAt?: string | undefined;
|
|
144
160
|
withdrawal?: Withdrawal | undefined;
|
|
161
|
+
doctorId?: string | undefined;
|
|
162
|
+
doctorName?: string | undefined;
|
|
163
|
+
reviewStartedAt?: string | undefined;
|
|
164
|
+
decidedAt?: string | undefined;
|
|
165
|
+
rejectionReason?: MedicalRejectionReason | undefined;
|
|
166
|
+
rejectionText?: string | undefined;
|
|
167
|
+
}
|
|
168
|
+
export interface PatientSnapshot {
|
|
169
|
+
firstName: string;
|
|
170
|
+
lastName: string;
|
|
171
|
+
birthDate: string;
|
|
145
172
|
}
|
|
146
173
|
export interface GetQuestionnaireRequest {
|
|
147
174
|
userId: string;
|
|
@@ -286,6 +313,70 @@ export interface RejectWithdrawalRequest {
|
|
|
286
313
|
export interface RejectWithdrawalResponse {
|
|
287
314
|
item: WithdrawalItem | undefined;
|
|
288
315
|
}
|
|
316
|
+
export interface ListMedicalReviewsRequest {
|
|
317
|
+
doctorId: string;
|
|
318
|
+
scope: MedicalReviewScope;
|
|
319
|
+
cursor?: string | undefined;
|
|
320
|
+
limit: number;
|
|
321
|
+
}
|
|
322
|
+
export interface ListMedicalReviewsResponse {
|
|
323
|
+
requests: TreatmentRequest[];
|
|
324
|
+
nextCursor?: string | undefined;
|
|
325
|
+
total: number;
|
|
326
|
+
}
|
|
327
|
+
export interface CountMedicalReviewsRequest {
|
|
328
|
+
doctorId: string;
|
|
329
|
+
}
|
|
330
|
+
export interface CountMedicalReviewsResponse {
|
|
331
|
+
queue: number;
|
|
332
|
+
inReview: number;
|
|
333
|
+
}
|
|
334
|
+
export interface GetMedicalReviewRequest {
|
|
335
|
+
id: string;
|
|
336
|
+
doctorId: string;
|
|
337
|
+
}
|
|
338
|
+
export interface GetMedicalReviewResponse {
|
|
339
|
+
request: TreatmentRequest | undefined;
|
|
340
|
+
answers: QuestionnaireAnswers | undefined;
|
|
341
|
+
patientSnapshot?: PatientSnapshot | undefined;
|
|
342
|
+
previous: TreatmentRequest[];
|
|
343
|
+
}
|
|
344
|
+
export interface TakeMedicalReviewRequest {
|
|
345
|
+
id: string;
|
|
346
|
+
doctorId: string;
|
|
347
|
+
doctorName: string;
|
|
348
|
+
}
|
|
349
|
+
export interface TakeMedicalReviewResponse {
|
|
350
|
+
request: TreatmentRequest | undefined;
|
|
351
|
+
}
|
|
352
|
+
export interface ApproveMedicalReviewRequest {
|
|
353
|
+
id: string;
|
|
354
|
+
doctorId: string;
|
|
355
|
+
}
|
|
356
|
+
export interface ApproveMedicalReviewResponse {
|
|
357
|
+
request: TreatmentRequest | undefined;
|
|
358
|
+
}
|
|
359
|
+
export interface RejectMedicalReviewRequest {
|
|
360
|
+
id: string;
|
|
361
|
+
doctorId: string;
|
|
362
|
+
reason: MedicalRejectionReason;
|
|
363
|
+
text?: string | undefined;
|
|
364
|
+
}
|
|
365
|
+
export interface RejectMedicalReviewResponse {
|
|
366
|
+
request: TreatmentRequest | undefined;
|
|
367
|
+
}
|
|
368
|
+
export interface ReleaseMedicalReviewRequest {
|
|
369
|
+
id: string;
|
|
370
|
+
}
|
|
371
|
+
export interface ReleaseMedicalReviewResponse {
|
|
372
|
+
request: TreatmentRequest | undefined;
|
|
373
|
+
}
|
|
374
|
+
export interface RetryRefundRequest {
|
|
375
|
+
id: string;
|
|
376
|
+
}
|
|
377
|
+
export interface RetryRefundResponse {
|
|
378
|
+
request: TreatmentRequest | undefined;
|
|
379
|
+
}
|
|
289
380
|
export interface TreatmentService {
|
|
290
381
|
getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse>;
|
|
291
382
|
saveQuestionnaire(request: SaveQuestionnaireRequest): Promise<SaveQuestionnaireResponse>;
|
|
@@ -305,4 +396,12 @@ export interface TreatmentService {
|
|
|
305
396
|
countPendingWithdrawals(request: CountPendingWithdrawalsRequest): Promise<CountPendingWithdrawalsResponse>;
|
|
306
397
|
refundWithdrawal(request: RefundWithdrawalRequest): Promise<RefundWithdrawalResponse>;
|
|
307
398
|
rejectWithdrawal(request: RejectWithdrawalRequest): Promise<RejectWithdrawalResponse>;
|
|
399
|
+
listMedicalReviews(request: ListMedicalReviewsRequest): Promise<ListMedicalReviewsResponse>;
|
|
400
|
+
countMedicalReviews(request: CountMedicalReviewsRequest): Promise<CountMedicalReviewsResponse>;
|
|
401
|
+
getMedicalReview(request: GetMedicalReviewRequest): Promise<GetMedicalReviewResponse>;
|
|
402
|
+
takeMedicalReview(request: TakeMedicalReviewRequest): Promise<TakeMedicalReviewResponse>;
|
|
403
|
+
approveMedicalReview(request: ApproveMedicalReviewRequest): Promise<ApproveMedicalReviewResponse>;
|
|
404
|
+
rejectMedicalReview(request: RejectMedicalReviewRequest): Promise<RejectMedicalReviewResponse>;
|
|
405
|
+
releaseMedicalReview(request: ReleaseMedicalReviewRequest): Promise<ReleaseMedicalReviewResponse>;
|
|
406
|
+
retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse>;
|
|
308
407
|
}
|
package/dist/gen/treatment.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: treatment.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.WithdrawalRejectionReason = exports.WithdrawalStatus = exports.TreatmentRequestStatus = exports.TreatmentType = exports.ProductType = exports.IntakeMethod = exports.SymptomDuration = exports.Symptom = exports.QuestionnaireStatus = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
8
|
+
exports.WithdrawalRejectionReason = exports.WithdrawalStatus = exports.MedicalReviewScope = exports.MedicalRejectionReason = exports.TreatmentRequestStatus = exports.TreatmentType = exports.ProductType = exports.IntakeMethod = exports.SymptomDuration = exports.Symptom = exports.QuestionnaireStatus = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
exports.protobufPackage = "treatment.v1";
|
|
11
11
|
exports.protobufFileName = "treatment.proto";
|
|
@@ -70,8 +70,26 @@ var TreatmentRequestStatus;
|
|
|
70
70
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_REFUND_PENDING"] = 5] = "TREATMENT_REQUEST_STATUS_REFUND_PENDING";
|
|
71
71
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_REFUND_FAILED"] = 6] = "TREATMENT_REQUEST_STATUS_REFUND_FAILED";
|
|
72
72
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_REFUNDED"] = 7] = "TREATMENT_REQUEST_STATUS_REFUNDED";
|
|
73
|
+
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_IN_REVIEW"] = 8] = "TREATMENT_REQUEST_STATUS_IN_REVIEW";
|
|
74
|
+
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_APPROVED"] = 9] = "TREATMENT_REQUEST_STATUS_APPROVED";
|
|
73
75
|
TreatmentRequestStatus[TreatmentRequestStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
74
76
|
})(TreatmentRequestStatus || (exports.TreatmentRequestStatus = TreatmentRequestStatus = {}));
|
|
77
|
+
var MedicalRejectionReason;
|
|
78
|
+
(function (MedicalRejectionReason) {
|
|
79
|
+
MedicalRejectionReason[MedicalRejectionReason["MEDICAL_REJECTION_REASON_UNSPECIFIED"] = 0] = "MEDICAL_REJECTION_REASON_UNSPECIFIED";
|
|
80
|
+
MedicalRejectionReason[MedicalRejectionReason["MEDICAL_REJECTION_REASON_EXCLUSION_CRITERIA"] = 1] = "MEDICAL_REJECTION_REASON_EXCLUSION_CRITERIA";
|
|
81
|
+
MedicalRejectionReason[MedicalRejectionReason["MEDICAL_REJECTION_REASON_NO_INDICATION"] = 2] = "MEDICAL_REJECTION_REASON_NO_INDICATION";
|
|
82
|
+
MedicalRejectionReason[MedicalRejectionReason["MEDICAL_REJECTION_REASON_OTHER"] = 3] = "MEDICAL_REJECTION_REASON_OTHER";
|
|
83
|
+
MedicalRejectionReason[MedicalRejectionReason["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
84
|
+
})(MedicalRejectionReason || (exports.MedicalRejectionReason = MedicalRejectionReason = {}));
|
|
85
|
+
var MedicalReviewScope;
|
|
86
|
+
(function (MedicalReviewScope) {
|
|
87
|
+
MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_UNSPECIFIED"] = 0] = "MEDICAL_REVIEW_SCOPE_UNSPECIFIED";
|
|
88
|
+
MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_QUEUE"] = 1] = "MEDICAL_REVIEW_SCOPE_QUEUE";
|
|
89
|
+
MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_IN_REVIEW"] = 2] = "MEDICAL_REVIEW_SCOPE_IN_REVIEW";
|
|
90
|
+
MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_DONE"] = 3] = "MEDICAL_REVIEW_SCOPE_DONE";
|
|
91
|
+
MedicalReviewScope[MedicalReviewScope["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
92
|
+
})(MedicalReviewScope || (exports.MedicalReviewScope = MedicalReviewScope = {}));
|
|
75
93
|
var WithdrawalStatus;
|
|
76
94
|
(function (WithdrawalStatus) {
|
|
77
95
|
WithdrawalStatus[WithdrawalStatus["WITHDRAWAL_STATUS_UNSPECIFIED"] = 0] = "WITHDRAWAL_STATUS_UNSPECIFIED";
|
|
@@ -21,6 +21,8 @@ export declare enum NotificationType {
|
|
|
21
21
|
NOTIFICATION_TYPE_COMMENT_REJECTED = 16,
|
|
22
22
|
NOTIFICATION_TYPE_TREATMENT_REQUEST_REFUNDED = 17,
|
|
23
23
|
NOTIFICATION_TYPE_WITHDRAWAL_REJECTED = 18,
|
|
24
|
+
NOTIFICATION_TYPE_TREATMENT_REQUEST_APPROVED = 19,
|
|
25
|
+
NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED = 20,
|
|
24
26
|
UNRECOGNIZED = -1
|
|
25
27
|
}
|
|
26
28
|
export interface Notification {
|
|
@@ -32,6 +32,8 @@ var NotificationType;
|
|
|
32
32
|
NotificationType[NotificationType["NOTIFICATION_TYPE_COMMENT_REJECTED"] = 16] = "NOTIFICATION_TYPE_COMMENT_REJECTED";
|
|
33
33
|
NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_REFUNDED"] = 17] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_REFUNDED";
|
|
34
34
|
NotificationType[NotificationType["NOTIFICATION_TYPE_WITHDRAWAL_REJECTED"] = 18] = "NOTIFICATION_TYPE_WITHDRAWAL_REJECTED";
|
|
35
|
+
NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_APPROVED"] = 19] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_APPROVED";
|
|
36
|
+
NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED"] = 20] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED";
|
|
35
37
|
NotificationType[NotificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
36
38
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
37
39
|
exports.NOTIFICATION_V1_PACKAGE_NAME = "notification.v1";
|
package/dist/nest/treatment.d.ts
CHANGED
|
@@ -55,6 +55,22 @@ export declare enum TreatmentRequestStatus {
|
|
|
55
55
|
TREATMENT_REQUEST_STATUS_REFUND_PENDING = 5,
|
|
56
56
|
TREATMENT_REQUEST_STATUS_REFUND_FAILED = 6,
|
|
57
57
|
TREATMENT_REQUEST_STATUS_REFUNDED = 7,
|
|
58
|
+
TREATMENT_REQUEST_STATUS_IN_REVIEW = 8,
|
|
59
|
+
TREATMENT_REQUEST_STATUS_APPROVED = 9,
|
|
60
|
+
UNRECOGNIZED = -1
|
|
61
|
+
}
|
|
62
|
+
export declare enum MedicalRejectionReason {
|
|
63
|
+
MEDICAL_REJECTION_REASON_UNSPECIFIED = 0,
|
|
64
|
+
MEDICAL_REJECTION_REASON_EXCLUSION_CRITERIA = 1,
|
|
65
|
+
MEDICAL_REJECTION_REASON_NO_INDICATION = 2,
|
|
66
|
+
MEDICAL_REJECTION_REASON_OTHER = 3,
|
|
67
|
+
UNRECOGNIZED = -1
|
|
68
|
+
}
|
|
69
|
+
export declare enum MedicalReviewScope {
|
|
70
|
+
MEDICAL_REVIEW_SCOPE_UNSPECIFIED = 0,
|
|
71
|
+
MEDICAL_REVIEW_SCOPE_QUEUE = 1,
|
|
72
|
+
MEDICAL_REVIEW_SCOPE_IN_REVIEW = 2,
|
|
73
|
+
MEDICAL_REVIEW_SCOPE_DONE = 3,
|
|
58
74
|
UNRECOGNIZED = -1
|
|
59
75
|
}
|
|
60
76
|
export declare enum WithdrawalStatus {
|
|
@@ -143,6 +159,17 @@ export interface TreatmentRequest {
|
|
|
143
159
|
intakeMethods: IntakeMethod[];
|
|
144
160
|
refundedAt?: string | undefined;
|
|
145
161
|
withdrawal?: Withdrawal | undefined;
|
|
162
|
+
doctorId?: string | undefined;
|
|
163
|
+
doctorName?: string | undefined;
|
|
164
|
+
reviewStartedAt?: string | undefined;
|
|
165
|
+
decidedAt?: string | undefined;
|
|
166
|
+
rejectionReason?: MedicalRejectionReason | undefined;
|
|
167
|
+
rejectionText?: string | undefined;
|
|
168
|
+
}
|
|
169
|
+
export interface PatientSnapshot {
|
|
170
|
+
firstName: string;
|
|
171
|
+
lastName: string;
|
|
172
|
+
birthDate: string;
|
|
146
173
|
}
|
|
147
174
|
export interface GetQuestionnaireRequest {
|
|
148
175
|
userId: string;
|
|
@@ -287,6 +314,70 @@ export interface RejectWithdrawalRequest {
|
|
|
287
314
|
export interface RejectWithdrawalResponse {
|
|
288
315
|
item: WithdrawalItem | undefined;
|
|
289
316
|
}
|
|
317
|
+
export interface ListMedicalReviewsRequest {
|
|
318
|
+
doctorId: string;
|
|
319
|
+
scope: MedicalReviewScope;
|
|
320
|
+
cursor?: string | undefined;
|
|
321
|
+
limit: number;
|
|
322
|
+
}
|
|
323
|
+
export interface ListMedicalReviewsResponse {
|
|
324
|
+
requests: TreatmentRequest[];
|
|
325
|
+
nextCursor?: string | undefined;
|
|
326
|
+
total: number;
|
|
327
|
+
}
|
|
328
|
+
export interface CountMedicalReviewsRequest {
|
|
329
|
+
doctorId: string;
|
|
330
|
+
}
|
|
331
|
+
export interface CountMedicalReviewsResponse {
|
|
332
|
+
queue: number;
|
|
333
|
+
inReview: number;
|
|
334
|
+
}
|
|
335
|
+
export interface GetMedicalReviewRequest {
|
|
336
|
+
id: string;
|
|
337
|
+
doctorId: string;
|
|
338
|
+
}
|
|
339
|
+
export interface GetMedicalReviewResponse {
|
|
340
|
+
request: TreatmentRequest | undefined;
|
|
341
|
+
answers: QuestionnaireAnswers | undefined;
|
|
342
|
+
patientSnapshot?: PatientSnapshot | undefined;
|
|
343
|
+
previous: TreatmentRequest[];
|
|
344
|
+
}
|
|
345
|
+
export interface TakeMedicalReviewRequest {
|
|
346
|
+
id: string;
|
|
347
|
+
doctorId: string;
|
|
348
|
+
doctorName: string;
|
|
349
|
+
}
|
|
350
|
+
export interface TakeMedicalReviewResponse {
|
|
351
|
+
request: TreatmentRequest | undefined;
|
|
352
|
+
}
|
|
353
|
+
export interface ApproveMedicalReviewRequest {
|
|
354
|
+
id: string;
|
|
355
|
+
doctorId: string;
|
|
356
|
+
}
|
|
357
|
+
export interface ApproveMedicalReviewResponse {
|
|
358
|
+
request: TreatmentRequest | undefined;
|
|
359
|
+
}
|
|
360
|
+
export interface RejectMedicalReviewRequest {
|
|
361
|
+
id: string;
|
|
362
|
+
doctorId: string;
|
|
363
|
+
reason: MedicalRejectionReason;
|
|
364
|
+
text?: string | undefined;
|
|
365
|
+
}
|
|
366
|
+
export interface RejectMedicalReviewResponse {
|
|
367
|
+
request: TreatmentRequest | undefined;
|
|
368
|
+
}
|
|
369
|
+
export interface ReleaseMedicalReviewRequest {
|
|
370
|
+
id: string;
|
|
371
|
+
}
|
|
372
|
+
export interface ReleaseMedicalReviewResponse {
|
|
373
|
+
request: TreatmentRequest | undefined;
|
|
374
|
+
}
|
|
375
|
+
export interface RetryRefundRequest {
|
|
376
|
+
id: string;
|
|
377
|
+
}
|
|
378
|
+
export interface RetryRefundResponse {
|
|
379
|
+
request: TreatmentRequest | undefined;
|
|
380
|
+
}
|
|
290
381
|
export declare const TREATMENT_V1_PACKAGE_NAME = "treatment.v1";
|
|
291
382
|
export interface TreatmentServiceClient {
|
|
292
383
|
getQuestionnaire(request: GetQuestionnaireRequest): Observable<GetQuestionnaireResponse>;
|
|
@@ -307,6 +398,14 @@ export interface TreatmentServiceClient {
|
|
|
307
398
|
countPendingWithdrawals(request: CountPendingWithdrawalsRequest): Observable<CountPendingWithdrawalsResponse>;
|
|
308
399
|
refundWithdrawal(request: RefundWithdrawalRequest): Observable<RefundWithdrawalResponse>;
|
|
309
400
|
rejectWithdrawal(request: RejectWithdrawalRequest): Observable<RejectWithdrawalResponse>;
|
|
401
|
+
listMedicalReviews(request: ListMedicalReviewsRequest): Observable<ListMedicalReviewsResponse>;
|
|
402
|
+
countMedicalReviews(request: CountMedicalReviewsRequest): Observable<CountMedicalReviewsResponse>;
|
|
403
|
+
getMedicalReview(request: GetMedicalReviewRequest): Observable<GetMedicalReviewResponse>;
|
|
404
|
+
takeMedicalReview(request: TakeMedicalReviewRequest): Observable<TakeMedicalReviewResponse>;
|
|
405
|
+
approveMedicalReview(request: ApproveMedicalReviewRequest): Observable<ApproveMedicalReviewResponse>;
|
|
406
|
+
rejectMedicalReview(request: RejectMedicalReviewRequest): Observable<RejectMedicalReviewResponse>;
|
|
407
|
+
releaseMedicalReview(request: ReleaseMedicalReviewRequest): Observable<ReleaseMedicalReviewResponse>;
|
|
408
|
+
retryRefund(request: RetryRefundRequest): Observable<RetryRefundResponse>;
|
|
310
409
|
}
|
|
311
410
|
export interface TreatmentServiceController {
|
|
312
411
|
getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse> | Observable<GetQuestionnaireResponse> | GetQuestionnaireResponse;
|
|
@@ -327,6 +426,14 @@ export interface TreatmentServiceController {
|
|
|
327
426
|
countPendingWithdrawals(request: CountPendingWithdrawalsRequest): Promise<CountPendingWithdrawalsResponse> | Observable<CountPendingWithdrawalsResponse> | CountPendingWithdrawalsResponse;
|
|
328
427
|
refundWithdrawal(request: RefundWithdrawalRequest): Promise<RefundWithdrawalResponse> | Observable<RefundWithdrawalResponse> | RefundWithdrawalResponse;
|
|
329
428
|
rejectWithdrawal(request: RejectWithdrawalRequest): Promise<RejectWithdrawalResponse> | Observable<RejectWithdrawalResponse> | RejectWithdrawalResponse;
|
|
429
|
+
listMedicalReviews(request: ListMedicalReviewsRequest): Promise<ListMedicalReviewsResponse> | Observable<ListMedicalReviewsResponse> | ListMedicalReviewsResponse;
|
|
430
|
+
countMedicalReviews(request: CountMedicalReviewsRequest): Promise<CountMedicalReviewsResponse> | Observable<CountMedicalReviewsResponse> | CountMedicalReviewsResponse;
|
|
431
|
+
getMedicalReview(request: GetMedicalReviewRequest): Promise<GetMedicalReviewResponse> | Observable<GetMedicalReviewResponse> | GetMedicalReviewResponse;
|
|
432
|
+
takeMedicalReview(request: TakeMedicalReviewRequest): Promise<TakeMedicalReviewResponse> | Observable<TakeMedicalReviewResponse> | TakeMedicalReviewResponse;
|
|
433
|
+
approveMedicalReview(request: ApproveMedicalReviewRequest): Promise<ApproveMedicalReviewResponse> | Observable<ApproveMedicalReviewResponse> | ApproveMedicalReviewResponse;
|
|
434
|
+
rejectMedicalReview(request: RejectMedicalReviewRequest): Promise<RejectMedicalReviewResponse> | Observable<RejectMedicalReviewResponse> | RejectMedicalReviewResponse;
|
|
435
|
+
releaseMedicalReview(request: ReleaseMedicalReviewRequest): Promise<ReleaseMedicalReviewResponse> | Observable<ReleaseMedicalReviewResponse> | ReleaseMedicalReviewResponse;
|
|
436
|
+
retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse> | Observable<RetryRefundResponse> | RetryRefundResponse;
|
|
330
437
|
}
|
|
331
438
|
export declare function TreatmentServiceControllerMethods(): (constructor: Function) => void;
|
|
332
439
|
export declare const TREATMENT_SERVICE_NAME = "TreatmentService";
|
package/dist/nest/treatment.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: treatment.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.TREATMENT_SERVICE_NAME = exports.TREATMENT_V1_PACKAGE_NAME = exports.WithdrawalRejectionReason = exports.WithdrawalStatus = exports.TreatmentRequestStatus = exports.TreatmentType = exports.ProductType = exports.IntakeMethod = exports.SymptomDuration = exports.Symptom = exports.QuestionnaireStatus = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
8
|
+
exports.TREATMENT_SERVICE_NAME = exports.TREATMENT_V1_PACKAGE_NAME = exports.WithdrawalRejectionReason = exports.WithdrawalStatus = exports.MedicalReviewScope = exports.MedicalRejectionReason = exports.TreatmentRequestStatus = exports.TreatmentType = exports.ProductType = exports.IntakeMethod = exports.SymptomDuration = exports.Symptom = exports.QuestionnaireStatus = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
exports.TreatmentServiceControllerMethods = TreatmentServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
@@ -72,8 +72,26 @@ var TreatmentRequestStatus;
|
|
|
72
72
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_REFUND_PENDING"] = 5] = "TREATMENT_REQUEST_STATUS_REFUND_PENDING";
|
|
73
73
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_REFUND_FAILED"] = 6] = "TREATMENT_REQUEST_STATUS_REFUND_FAILED";
|
|
74
74
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_REFUNDED"] = 7] = "TREATMENT_REQUEST_STATUS_REFUNDED";
|
|
75
|
+
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_IN_REVIEW"] = 8] = "TREATMENT_REQUEST_STATUS_IN_REVIEW";
|
|
76
|
+
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_APPROVED"] = 9] = "TREATMENT_REQUEST_STATUS_APPROVED";
|
|
75
77
|
TreatmentRequestStatus[TreatmentRequestStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
76
78
|
})(TreatmentRequestStatus || (exports.TreatmentRequestStatus = TreatmentRequestStatus = {}));
|
|
79
|
+
var MedicalRejectionReason;
|
|
80
|
+
(function (MedicalRejectionReason) {
|
|
81
|
+
MedicalRejectionReason[MedicalRejectionReason["MEDICAL_REJECTION_REASON_UNSPECIFIED"] = 0] = "MEDICAL_REJECTION_REASON_UNSPECIFIED";
|
|
82
|
+
MedicalRejectionReason[MedicalRejectionReason["MEDICAL_REJECTION_REASON_EXCLUSION_CRITERIA"] = 1] = "MEDICAL_REJECTION_REASON_EXCLUSION_CRITERIA";
|
|
83
|
+
MedicalRejectionReason[MedicalRejectionReason["MEDICAL_REJECTION_REASON_NO_INDICATION"] = 2] = "MEDICAL_REJECTION_REASON_NO_INDICATION";
|
|
84
|
+
MedicalRejectionReason[MedicalRejectionReason["MEDICAL_REJECTION_REASON_OTHER"] = 3] = "MEDICAL_REJECTION_REASON_OTHER";
|
|
85
|
+
MedicalRejectionReason[MedicalRejectionReason["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
86
|
+
})(MedicalRejectionReason || (exports.MedicalRejectionReason = MedicalRejectionReason = {}));
|
|
87
|
+
var MedicalReviewScope;
|
|
88
|
+
(function (MedicalReviewScope) {
|
|
89
|
+
MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_UNSPECIFIED"] = 0] = "MEDICAL_REVIEW_SCOPE_UNSPECIFIED";
|
|
90
|
+
MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_QUEUE"] = 1] = "MEDICAL_REVIEW_SCOPE_QUEUE";
|
|
91
|
+
MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_IN_REVIEW"] = 2] = "MEDICAL_REVIEW_SCOPE_IN_REVIEW";
|
|
92
|
+
MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_DONE"] = 3] = "MEDICAL_REVIEW_SCOPE_DONE";
|
|
93
|
+
MedicalReviewScope[MedicalReviewScope["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
94
|
+
})(MedicalReviewScope || (exports.MedicalReviewScope = MedicalReviewScope = {}));
|
|
77
95
|
var WithdrawalStatus;
|
|
78
96
|
(function (WithdrawalStatus) {
|
|
79
97
|
WithdrawalStatus[WithdrawalStatus["WITHDRAWAL_STATUS_UNSPECIFIED"] = 0] = "WITHDRAWAL_STATUS_UNSPECIFIED";
|
|
@@ -112,6 +130,14 @@ function TreatmentServiceControllerMethods() {
|
|
|
112
130
|
"countPendingWithdrawals",
|
|
113
131
|
"refundWithdrawal",
|
|
114
132
|
"rejectWithdrawal",
|
|
133
|
+
"listMedicalReviews",
|
|
134
|
+
"countMedicalReviews",
|
|
135
|
+
"getMedicalReview",
|
|
136
|
+
"takeMedicalReview",
|
|
137
|
+
"approveMedicalReview",
|
|
138
|
+
"rejectMedicalReview",
|
|
139
|
+
"releaseMedicalReview",
|
|
140
|
+
"retryRefund",
|
|
115
141
|
];
|
|
116
142
|
for (const method of grpcMethods) {
|
|
117
143
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
package/proto/notification.proto
CHANGED
|
@@ -28,6 +28,8 @@ enum NotificationType {
|
|
|
28
28
|
NOTIFICATION_TYPE_COMMENT_REJECTED = 16;
|
|
29
29
|
NOTIFICATION_TYPE_TREATMENT_REQUEST_REFUNDED = 17;
|
|
30
30
|
NOTIFICATION_TYPE_WITHDRAWAL_REJECTED = 18;
|
|
31
|
+
NOTIFICATION_TYPE_TREATMENT_REQUEST_APPROVED = 19;
|
|
32
|
+
NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED = 20;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
message Notification {
|
package/proto/treatment.proto
CHANGED
|
@@ -21,6 +21,14 @@ service TreatmentService {
|
|
|
21
21
|
rpc CountPendingWithdrawals (CountPendingWithdrawalsRequest) returns (CountPendingWithdrawalsResponse);
|
|
22
22
|
rpc RefundWithdrawal (RefundWithdrawalRequest) returns (RefundWithdrawalResponse);
|
|
23
23
|
rpc RejectWithdrawal (RejectWithdrawalRequest) returns (RejectWithdrawalResponse);
|
|
24
|
+
rpc ListMedicalReviews (ListMedicalReviewsRequest) returns (ListMedicalReviewsResponse);
|
|
25
|
+
rpc CountMedicalReviews (CountMedicalReviewsRequest) returns (CountMedicalReviewsResponse);
|
|
26
|
+
rpc GetMedicalReview (GetMedicalReviewRequest) returns (GetMedicalReviewResponse);
|
|
27
|
+
rpc TakeMedicalReview (TakeMedicalReviewRequest) returns (TakeMedicalReviewResponse);
|
|
28
|
+
rpc ApproveMedicalReview (ApproveMedicalReviewRequest) returns (ApproveMedicalReviewResponse);
|
|
29
|
+
rpc RejectMedicalReview (RejectMedicalReviewRequest) returns (RejectMedicalReviewResponse);
|
|
30
|
+
rpc ReleaseMedicalReview (ReleaseMedicalReviewRequest) returns (ReleaseMedicalReviewResponse);
|
|
31
|
+
rpc RetryRefund (RetryRefundRequest) returns (RetryRefundResponse);
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
enum QuestionnaireStatus {
|
|
@@ -77,6 +85,22 @@ enum TreatmentRequestStatus {
|
|
|
77
85
|
TREATMENT_REQUEST_STATUS_REFUND_PENDING = 5;
|
|
78
86
|
TREATMENT_REQUEST_STATUS_REFUND_FAILED = 6;
|
|
79
87
|
TREATMENT_REQUEST_STATUS_REFUNDED = 7;
|
|
88
|
+
TREATMENT_REQUEST_STATUS_IN_REVIEW = 8;
|
|
89
|
+
TREATMENT_REQUEST_STATUS_APPROVED = 9;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
enum MedicalRejectionReason {
|
|
93
|
+
MEDICAL_REJECTION_REASON_UNSPECIFIED = 0;
|
|
94
|
+
MEDICAL_REJECTION_REASON_EXCLUSION_CRITERIA = 1;
|
|
95
|
+
MEDICAL_REJECTION_REASON_NO_INDICATION = 2;
|
|
96
|
+
MEDICAL_REJECTION_REASON_OTHER = 3;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
enum MedicalReviewScope {
|
|
100
|
+
MEDICAL_REVIEW_SCOPE_UNSPECIFIED = 0;
|
|
101
|
+
MEDICAL_REVIEW_SCOPE_QUEUE = 1;
|
|
102
|
+
MEDICAL_REVIEW_SCOPE_IN_REVIEW = 2;
|
|
103
|
+
MEDICAL_REVIEW_SCOPE_DONE = 3;
|
|
80
104
|
}
|
|
81
105
|
|
|
82
106
|
enum WithdrawalStatus {
|
|
@@ -170,6 +194,18 @@ message TreatmentRequest {
|
|
|
170
194
|
repeated IntakeMethod intake_methods = 14;
|
|
171
195
|
optional string refunded_at = 15;
|
|
172
196
|
optional Withdrawal withdrawal = 16;
|
|
197
|
+
optional string doctor_id = 17;
|
|
198
|
+
optional string doctor_name = 18;
|
|
199
|
+
optional string review_started_at = 19;
|
|
200
|
+
optional string decided_at = 20;
|
|
201
|
+
optional MedicalRejectionReason rejection_reason = 21;
|
|
202
|
+
optional string rejection_text = 22;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
message PatientSnapshot {
|
|
206
|
+
string first_name = 1;
|
|
207
|
+
string last_name = 2;
|
|
208
|
+
string birth_date = 3;
|
|
173
209
|
}
|
|
174
210
|
|
|
175
211
|
message GetQuestionnaireRequest {
|
|
@@ -350,3 +386,83 @@ message RejectWithdrawalRequest {
|
|
|
350
386
|
message RejectWithdrawalResponse {
|
|
351
387
|
WithdrawalItem item = 1;
|
|
352
388
|
}
|
|
389
|
+
|
|
390
|
+
message ListMedicalReviewsRequest {
|
|
391
|
+
string doctor_id = 1;
|
|
392
|
+
MedicalReviewScope scope = 2;
|
|
393
|
+
optional string cursor = 3;
|
|
394
|
+
int32 limit = 4;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
message ListMedicalReviewsResponse {
|
|
398
|
+
repeated TreatmentRequest requests = 1;
|
|
399
|
+
optional string next_cursor = 2;
|
|
400
|
+
int32 total = 3;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
message CountMedicalReviewsRequest {
|
|
404
|
+
string doctor_id = 1;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
message CountMedicalReviewsResponse {
|
|
408
|
+
int32 queue = 1;
|
|
409
|
+
int32 in_review = 2;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
message GetMedicalReviewRequest {
|
|
413
|
+
string id = 1;
|
|
414
|
+
string doctor_id = 2;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
message GetMedicalReviewResponse {
|
|
418
|
+
TreatmentRequest request = 1;
|
|
419
|
+
QuestionnaireAnswers answers = 2;
|
|
420
|
+
optional PatientSnapshot patient_snapshot = 3;
|
|
421
|
+
repeated TreatmentRequest previous = 4;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
message TakeMedicalReviewRequest {
|
|
425
|
+
string id = 1;
|
|
426
|
+
string doctor_id = 2;
|
|
427
|
+
string doctor_name = 3;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
message TakeMedicalReviewResponse {
|
|
431
|
+
TreatmentRequest request = 1;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
message ApproveMedicalReviewRequest {
|
|
435
|
+
string id = 1;
|
|
436
|
+
string doctor_id = 2;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
message ApproveMedicalReviewResponse {
|
|
440
|
+
TreatmentRequest request = 1;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
message RejectMedicalReviewRequest {
|
|
444
|
+
string id = 1;
|
|
445
|
+
string doctor_id = 2;
|
|
446
|
+
MedicalRejectionReason reason = 3;
|
|
447
|
+
optional string text = 4;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
message RejectMedicalReviewResponse {
|
|
451
|
+
TreatmentRequest request = 1;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
message ReleaseMedicalReviewRequest {
|
|
455
|
+
string id = 1;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
message ReleaseMedicalReviewResponse {
|
|
459
|
+
TreatmentRequest request = 1;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
message RetryRefundRequest {
|
|
463
|
+
string id = 1;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
message RetryRefundResponse {
|
|
467
|
+
TreatmentRequest request = 1;
|
|
468
|
+
}
|