@candesk/contracts 6.83.0 → 6.85.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.
@@ -74,11 +74,19 @@ export declare enum RequestStatsPeriod {
74
74
  }
75
75
  export declare enum MedicalReviewScope {
76
76
  MEDICAL_REVIEW_SCOPE_UNSPECIFIED = 0,
77
- MEDICAL_REVIEW_SCOPE_QUEUE = 1,
78
77
  MEDICAL_REVIEW_SCOPE_IN_REVIEW = 2,
79
78
  MEDICAL_REVIEW_SCOPE_DONE = 3,
80
79
  UNRECOGNIZED = -1
81
80
  }
81
+ export declare enum AssignmentReason {
82
+ ASSIGNMENT_REASON_UNSPECIFIED = 0,
83
+ ASSIGNMENT_REASON_PAYMENT = 1,
84
+ ASSIGNMENT_REASON_OVERDUE = 2,
85
+ ASSIGNMENT_REASON_ABSENCE = 3,
86
+ ASSIGNMENT_REASON_DEACTIVATION = 4,
87
+ ASSIGNMENT_REASON_STAFF = 5,
88
+ UNRECOGNIZED = -1
89
+ }
82
90
  export declare enum MedicalReviewDecision {
83
91
  MEDICAL_REVIEW_DECISION_UNSPECIFIED = 0,
84
92
  MEDICAL_REVIEW_DECISION_APPROVED = 1,
@@ -359,7 +367,6 @@ export interface CountMedicalReviewsRequest {
359
367
  }
360
368
  export interface MedicalReviewCount {
361
369
  type: TreatmentType;
362
- queue: number;
363
370
  inReview: number;
364
371
  done: number;
365
372
  overdue: number;
@@ -373,19 +380,16 @@ export interface GetMedicalReviewRequest {
373
380
  id: string;
374
381
  doctorId: string;
375
382
  }
383
+ export interface LastRejection {
384
+ request: TreatmentRequest | undefined;
385
+ answers: QuestionnaireAnswers | undefined;
386
+ }
376
387
  export interface GetMedicalReviewResponse {
377
388
  request: TreatmentRequest | undefined;
378
389
  answers: QuestionnaireAnswers | undefined;
379
390
  patientSnapshot?: PatientSnapshot | undefined;
380
391
  previous: TreatmentRequest[];
381
- }
382
- export interface TakeMedicalReviewRequest {
383
- id: string;
384
- doctorId: string;
385
- doctorName: string;
386
- }
387
- export interface TakeMedicalReviewResponse {
388
- request: TreatmentRequest | undefined;
392
+ lastRejection?: LastRejection | undefined;
389
393
  }
390
394
  export interface ApproveMedicalReviewRequest {
391
395
  id: string;
@@ -403,17 +407,32 @@ export interface RejectMedicalReviewRequest {
403
407
  export interface RejectMedicalReviewResponse {
404
408
  request: TreatmentRequest | undefined;
405
409
  }
406
- export interface ReleaseMedicalReviewRequest {
410
+ export interface ReassignMedicalReviewRequest {
407
411
  id: string;
412
+ staffId: string;
413
+ doctorId?: string | undefined;
408
414
  }
409
- export interface ReleaseMedicalReviewResponse {
415
+ export interface ReassignMedicalReviewResponse {
410
416
  request: TreatmentRequest | undefined;
411
417
  }
412
- export interface ReleaseDoctorReviewsRequest {
418
+ export interface ReassignDoctorReviewsRequest {
419
+ doctorId: string;
420
+ }
421
+ export interface ReassignDoctorReviewsResponse {
422
+ reassigned: number;
423
+ unassigned: number;
424
+ }
425
+ export interface Assignment {
413
426
  doctorId: string;
427
+ reason: AssignmentReason;
428
+ staffId?: string | undefined;
429
+ createdAt: string;
430
+ }
431
+ export interface ListAssignmentsRequest {
432
+ requestId: string;
414
433
  }
415
- export interface ReleaseDoctorReviewsResponse {
416
- released: number;
434
+ export interface ListAssignmentsResponse {
435
+ assignments: Assignment[];
417
436
  }
418
437
  export interface CancelPaymentRequest {
419
438
  userId: string;
@@ -498,11 +517,11 @@ export interface TreatmentService {
498
517
  listMedicalReviews(request: ListMedicalReviewsRequest): Promise<ListMedicalReviewsResponse>;
499
518
  countMedicalReviews(request: CountMedicalReviewsRequest): Promise<CountMedicalReviewsResponse>;
500
519
  getMedicalReview(request: GetMedicalReviewRequest): Promise<GetMedicalReviewResponse>;
501
- takeMedicalReview(request: TakeMedicalReviewRequest): Promise<TakeMedicalReviewResponse>;
502
520
  approveMedicalReview(request: ApproveMedicalReviewRequest): Promise<ApproveMedicalReviewResponse>;
503
521
  rejectMedicalReview(request: RejectMedicalReviewRequest): Promise<RejectMedicalReviewResponse>;
504
- releaseMedicalReview(request: ReleaseMedicalReviewRequest): Promise<ReleaseMedicalReviewResponse>;
505
- releaseDoctorReviews(request: ReleaseDoctorReviewsRequest): Promise<ReleaseDoctorReviewsResponse>;
522
+ reassignMedicalReview(request: ReassignMedicalReviewRequest): Promise<ReassignMedicalReviewResponse>;
523
+ reassignDoctorReviews(request: ReassignDoctorReviewsRequest): Promise<ReassignDoctorReviewsResponse>;
524
+ listAssignments(request: ListAssignmentsRequest): Promise<ListAssignmentsResponse>;
506
525
  retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse>;
507
526
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse>;
508
527
  listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse>;
@@ -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.MedicalReviewDecision = exports.MedicalReviewScope = exports.RequestStatsPeriod = exports.MedicalRejectionReason = 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.MedicalReviewDecision = exports.AssignmentReason = exports.MedicalReviewScope = exports.RequestStatsPeriod = 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";
@@ -93,11 +93,20 @@ var RequestStatsPeriod;
93
93
  var MedicalReviewScope;
94
94
  (function (MedicalReviewScope) {
95
95
  MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_UNSPECIFIED"] = 0] = "MEDICAL_REVIEW_SCOPE_UNSPECIFIED";
96
- MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_QUEUE"] = 1] = "MEDICAL_REVIEW_SCOPE_QUEUE";
97
96
  MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_IN_REVIEW"] = 2] = "MEDICAL_REVIEW_SCOPE_IN_REVIEW";
98
97
  MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_DONE"] = 3] = "MEDICAL_REVIEW_SCOPE_DONE";
99
98
  MedicalReviewScope[MedicalReviewScope["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
100
99
  })(MedicalReviewScope || (exports.MedicalReviewScope = MedicalReviewScope = {}));
100
+ var AssignmentReason;
101
+ (function (AssignmentReason) {
102
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_UNSPECIFIED"] = 0] = "ASSIGNMENT_REASON_UNSPECIFIED";
103
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_PAYMENT"] = 1] = "ASSIGNMENT_REASON_PAYMENT";
104
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_OVERDUE"] = 2] = "ASSIGNMENT_REASON_OVERDUE";
105
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_ABSENCE"] = 3] = "ASSIGNMENT_REASON_ABSENCE";
106
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_DEACTIVATION"] = 4] = "ASSIGNMENT_REASON_DEACTIVATION";
107
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_STAFF"] = 5] = "ASSIGNMENT_REASON_STAFF";
108
+ AssignmentReason[AssignmentReason["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
109
+ })(AssignmentReason || (exports.AssignmentReason = AssignmentReason = {}));
101
110
  var MedicalReviewDecision;
102
111
  (function (MedicalReviewDecision) {
103
112
  MedicalReviewDecision[MedicalReviewDecision["MEDICAL_REVIEW_DECISION_UNSPECIFIED"] = 0] = "MEDICAL_REVIEW_DECISION_UNSPECIFIED";
@@ -75,11 +75,19 @@ export declare enum RequestStatsPeriod {
75
75
  }
76
76
  export declare enum MedicalReviewScope {
77
77
  MEDICAL_REVIEW_SCOPE_UNSPECIFIED = 0,
78
- MEDICAL_REVIEW_SCOPE_QUEUE = 1,
79
78
  MEDICAL_REVIEW_SCOPE_IN_REVIEW = 2,
80
79
  MEDICAL_REVIEW_SCOPE_DONE = 3,
81
80
  UNRECOGNIZED = -1
82
81
  }
82
+ export declare enum AssignmentReason {
83
+ ASSIGNMENT_REASON_UNSPECIFIED = 0,
84
+ ASSIGNMENT_REASON_PAYMENT = 1,
85
+ ASSIGNMENT_REASON_OVERDUE = 2,
86
+ ASSIGNMENT_REASON_ABSENCE = 3,
87
+ ASSIGNMENT_REASON_DEACTIVATION = 4,
88
+ ASSIGNMENT_REASON_STAFF = 5,
89
+ UNRECOGNIZED = -1
90
+ }
83
91
  export declare enum MedicalReviewDecision {
84
92
  MEDICAL_REVIEW_DECISION_UNSPECIFIED = 0,
85
93
  MEDICAL_REVIEW_DECISION_APPROVED = 1,
@@ -360,7 +368,6 @@ export interface CountMedicalReviewsRequest {
360
368
  }
361
369
  export interface MedicalReviewCount {
362
370
  type: TreatmentType;
363
- queue: number;
364
371
  inReview: number;
365
372
  done: number;
366
373
  overdue: number;
@@ -374,19 +381,16 @@ export interface GetMedicalReviewRequest {
374
381
  id: string;
375
382
  doctorId: string;
376
383
  }
384
+ export interface LastRejection {
385
+ request: TreatmentRequest | undefined;
386
+ answers: QuestionnaireAnswers | undefined;
387
+ }
377
388
  export interface GetMedicalReviewResponse {
378
389
  request: TreatmentRequest | undefined;
379
390
  answers: QuestionnaireAnswers | undefined;
380
391
  patientSnapshot?: PatientSnapshot | undefined;
381
392
  previous: TreatmentRequest[];
382
- }
383
- export interface TakeMedicalReviewRequest {
384
- id: string;
385
- doctorId: string;
386
- doctorName: string;
387
- }
388
- export interface TakeMedicalReviewResponse {
389
- request: TreatmentRequest | undefined;
393
+ lastRejection?: LastRejection | undefined;
390
394
  }
391
395
  export interface ApproveMedicalReviewRequest {
392
396
  id: string;
@@ -404,17 +408,32 @@ export interface RejectMedicalReviewRequest {
404
408
  export interface RejectMedicalReviewResponse {
405
409
  request: TreatmentRequest | undefined;
406
410
  }
407
- export interface ReleaseMedicalReviewRequest {
411
+ export interface ReassignMedicalReviewRequest {
408
412
  id: string;
413
+ staffId: string;
414
+ doctorId?: string | undefined;
409
415
  }
410
- export interface ReleaseMedicalReviewResponse {
416
+ export interface ReassignMedicalReviewResponse {
411
417
  request: TreatmentRequest | undefined;
412
418
  }
413
- export interface ReleaseDoctorReviewsRequest {
419
+ export interface ReassignDoctorReviewsRequest {
420
+ doctorId: string;
421
+ }
422
+ export interface ReassignDoctorReviewsResponse {
423
+ reassigned: number;
424
+ unassigned: number;
425
+ }
426
+ export interface Assignment {
414
427
  doctorId: string;
428
+ reason: AssignmentReason;
429
+ staffId?: string | undefined;
430
+ createdAt: string;
431
+ }
432
+ export interface ListAssignmentsRequest {
433
+ requestId: string;
415
434
  }
416
- export interface ReleaseDoctorReviewsResponse {
417
- released: number;
435
+ export interface ListAssignmentsResponse {
436
+ assignments: Assignment[];
418
437
  }
419
438
  export interface CancelPaymentRequest {
420
439
  userId: string;
@@ -500,11 +519,11 @@ export interface TreatmentServiceClient {
500
519
  listMedicalReviews(request: ListMedicalReviewsRequest): Observable<ListMedicalReviewsResponse>;
501
520
  countMedicalReviews(request: CountMedicalReviewsRequest): Observable<CountMedicalReviewsResponse>;
502
521
  getMedicalReview(request: GetMedicalReviewRequest): Observable<GetMedicalReviewResponse>;
503
- takeMedicalReview(request: TakeMedicalReviewRequest): Observable<TakeMedicalReviewResponse>;
504
522
  approveMedicalReview(request: ApproveMedicalReviewRequest): Observable<ApproveMedicalReviewResponse>;
505
523
  rejectMedicalReview(request: RejectMedicalReviewRequest): Observable<RejectMedicalReviewResponse>;
506
- releaseMedicalReview(request: ReleaseMedicalReviewRequest): Observable<ReleaseMedicalReviewResponse>;
507
- releaseDoctorReviews(request: ReleaseDoctorReviewsRequest): Observable<ReleaseDoctorReviewsResponse>;
524
+ reassignMedicalReview(request: ReassignMedicalReviewRequest): Observable<ReassignMedicalReviewResponse>;
525
+ reassignDoctorReviews(request: ReassignDoctorReviewsRequest): Observable<ReassignDoctorReviewsResponse>;
526
+ listAssignments(request: ListAssignmentsRequest): Observable<ListAssignmentsResponse>;
508
527
  retryRefund(request: RetryRefundRequest): Observable<RetryRefundResponse>;
509
528
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Observable<ListAppointmentSlotsResponse>;
510
529
  listAppointments(request: ListAppointmentsRequest): Observable<ListAppointmentsResponse>;
@@ -534,11 +553,11 @@ export interface TreatmentServiceController {
534
553
  listMedicalReviews(request: ListMedicalReviewsRequest): Promise<ListMedicalReviewsResponse> | Observable<ListMedicalReviewsResponse> | ListMedicalReviewsResponse;
535
554
  countMedicalReviews(request: CountMedicalReviewsRequest): Promise<CountMedicalReviewsResponse> | Observable<CountMedicalReviewsResponse> | CountMedicalReviewsResponse;
536
555
  getMedicalReview(request: GetMedicalReviewRequest): Promise<GetMedicalReviewResponse> | Observable<GetMedicalReviewResponse> | GetMedicalReviewResponse;
537
- takeMedicalReview(request: TakeMedicalReviewRequest): Promise<TakeMedicalReviewResponse> | Observable<TakeMedicalReviewResponse> | TakeMedicalReviewResponse;
538
556
  approveMedicalReview(request: ApproveMedicalReviewRequest): Promise<ApproveMedicalReviewResponse> | Observable<ApproveMedicalReviewResponse> | ApproveMedicalReviewResponse;
539
557
  rejectMedicalReview(request: RejectMedicalReviewRequest): Promise<RejectMedicalReviewResponse> | Observable<RejectMedicalReviewResponse> | RejectMedicalReviewResponse;
540
- releaseMedicalReview(request: ReleaseMedicalReviewRequest): Promise<ReleaseMedicalReviewResponse> | Observable<ReleaseMedicalReviewResponse> | ReleaseMedicalReviewResponse;
541
- releaseDoctorReviews(request: ReleaseDoctorReviewsRequest): Promise<ReleaseDoctorReviewsResponse> | Observable<ReleaseDoctorReviewsResponse> | ReleaseDoctorReviewsResponse;
558
+ reassignMedicalReview(request: ReassignMedicalReviewRequest): Promise<ReassignMedicalReviewResponse> | Observable<ReassignMedicalReviewResponse> | ReassignMedicalReviewResponse;
559
+ reassignDoctorReviews(request: ReassignDoctorReviewsRequest): Promise<ReassignDoctorReviewsResponse> | Observable<ReassignDoctorReviewsResponse> | ReassignDoctorReviewsResponse;
560
+ listAssignments(request: ListAssignmentsRequest): Promise<ListAssignmentsResponse> | Observable<ListAssignmentsResponse> | ListAssignmentsResponse;
542
561
  retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse> | Observable<RetryRefundResponse> | RetryRefundResponse;
543
562
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse> | Observable<ListAppointmentSlotsResponse> | ListAppointmentSlotsResponse;
544
563
  listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse> | Observable<ListAppointmentsResponse> | ListAppointmentsResponse;
@@ -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.MedicalReviewDecision = exports.MedicalReviewScope = exports.RequestStatsPeriod = exports.MedicalRejectionReason = 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.MedicalReviewDecision = exports.AssignmentReason = exports.MedicalReviewScope = exports.RequestStatsPeriod = 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");
@@ -95,11 +95,20 @@ var RequestStatsPeriod;
95
95
  var MedicalReviewScope;
96
96
  (function (MedicalReviewScope) {
97
97
  MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_UNSPECIFIED"] = 0] = "MEDICAL_REVIEW_SCOPE_UNSPECIFIED";
98
- MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_QUEUE"] = 1] = "MEDICAL_REVIEW_SCOPE_QUEUE";
99
98
  MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_IN_REVIEW"] = 2] = "MEDICAL_REVIEW_SCOPE_IN_REVIEW";
100
99
  MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_DONE"] = 3] = "MEDICAL_REVIEW_SCOPE_DONE";
101
100
  MedicalReviewScope[MedicalReviewScope["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
102
101
  })(MedicalReviewScope || (exports.MedicalReviewScope = MedicalReviewScope = {}));
102
+ var AssignmentReason;
103
+ (function (AssignmentReason) {
104
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_UNSPECIFIED"] = 0] = "ASSIGNMENT_REASON_UNSPECIFIED";
105
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_PAYMENT"] = 1] = "ASSIGNMENT_REASON_PAYMENT";
106
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_OVERDUE"] = 2] = "ASSIGNMENT_REASON_OVERDUE";
107
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_ABSENCE"] = 3] = "ASSIGNMENT_REASON_ABSENCE";
108
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_DEACTIVATION"] = 4] = "ASSIGNMENT_REASON_DEACTIVATION";
109
+ AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_STAFF"] = 5] = "ASSIGNMENT_REASON_STAFF";
110
+ AssignmentReason[AssignmentReason["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
111
+ })(AssignmentReason || (exports.AssignmentReason = AssignmentReason = {}));
103
112
  var MedicalReviewDecision;
104
113
  (function (MedicalReviewDecision) {
105
114
  MedicalReviewDecision[MedicalReviewDecision["MEDICAL_REVIEW_DECISION_UNSPECIFIED"] = 0] = "MEDICAL_REVIEW_DECISION_UNSPECIFIED";
@@ -150,11 +159,11 @@ function TreatmentServiceControllerMethods() {
150
159
  "listMedicalReviews",
151
160
  "countMedicalReviews",
152
161
  "getMedicalReview",
153
- "takeMedicalReview",
154
162
  "approveMedicalReview",
155
163
  "rejectMedicalReview",
156
- "releaseMedicalReview",
157
- "releaseDoctorReviews",
164
+ "reassignMedicalReview",
165
+ "reassignDoctorReviews",
166
+ "listAssignments",
158
167
  "retryRefund",
159
168
  "listAppointmentSlots",
160
169
  "listAppointments",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.83.0",
3
+ "version": "6.85.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -26,11 +26,11 @@ service TreatmentService {
26
26
  rpc ListMedicalReviews (ListMedicalReviewsRequest) returns (ListMedicalReviewsResponse);
27
27
  rpc CountMedicalReviews (CountMedicalReviewsRequest) returns (CountMedicalReviewsResponse);
28
28
  rpc GetMedicalReview (GetMedicalReviewRequest) returns (GetMedicalReviewResponse);
29
- rpc TakeMedicalReview (TakeMedicalReviewRequest) returns (TakeMedicalReviewResponse);
30
29
  rpc ApproveMedicalReview (ApproveMedicalReviewRequest) returns (ApproveMedicalReviewResponse);
31
30
  rpc RejectMedicalReview (RejectMedicalReviewRequest) returns (RejectMedicalReviewResponse);
32
- rpc ReleaseMedicalReview (ReleaseMedicalReviewRequest) returns (ReleaseMedicalReviewResponse);
33
- rpc ReleaseDoctorReviews (ReleaseDoctorReviewsRequest) returns (ReleaseDoctorReviewsResponse);
31
+ rpc ReassignMedicalReview (ReassignMedicalReviewRequest) returns (ReassignMedicalReviewResponse);
32
+ rpc ReassignDoctorReviews (ReassignDoctorReviewsRequest) returns (ReassignDoctorReviewsResponse);
33
+ rpc ListAssignments (ListAssignmentsRequest) returns (ListAssignmentsResponse);
34
34
  rpc RetryRefund (RetryRefundRequest) returns (RetryRefundResponse);
35
35
  rpc ListAppointmentSlots (ListAppointmentSlotsRequest) returns (ListAppointmentSlotsResponse);
36
36
  rpc ListAppointments (ListAppointmentsRequest) returns (ListAppointmentsResponse);
@@ -110,12 +110,22 @@ enum RequestStatsPeriod {
110
110
  }
111
111
 
112
112
  enum MedicalReviewScope {
113
+ reserved 1;
114
+ reserved "MEDICAL_REVIEW_SCOPE_QUEUE";
113
115
  MEDICAL_REVIEW_SCOPE_UNSPECIFIED = 0;
114
- MEDICAL_REVIEW_SCOPE_QUEUE = 1;
115
116
  MEDICAL_REVIEW_SCOPE_IN_REVIEW = 2;
116
117
  MEDICAL_REVIEW_SCOPE_DONE = 3;
117
118
  }
118
119
 
120
+ enum AssignmentReason {
121
+ ASSIGNMENT_REASON_UNSPECIFIED = 0;
122
+ ASSIGNMENT_REASON_PAYMENT = 1;
123
+ ASSIGNMENT_REASON_OVERDUE = 2;
124
+ ASSIGNMENT_REASON_ABSENCE = 3;
125
+ ASSIGNMENT_REASON_DEACTIVATION = 4;
126
+ ASSIGNMENT_REASON_STAFF = 5;
127
+ }
128
+
119
129
  enum MedicalReviewDecision {
120
130
  MEDICAL_REVIEW_DECISION_UNSPECIFIED = 0;
121
131
  MEDICAL_REVIEW_DECISION_APPROVED = 1;
@@ -445,8 +455,8 @@ message CountMedicalReviewsRequest {
445
455
  }
446
456
 
447
457
  message MedicalReviewCount {
458
+ reserved 2;
448
459
  TreatmentType type = 1;
449
- int32 queue = 2;
450
460
  int32 in_review = 3;
451
461
  int32 done = 4;
452
462
  int32 overdue = 5;
@@ -465,21 +475,17 @@ message GetMedicalReviewRequest {
465
475
  string doctor_id = 2;
466
476
  }
467
477
 
468
- message GetMedicalReviewResponse {
478
+ message LastRejection {
469
479
  TreatmentRequest request = 1;
470
480
  QuestionnaireAnswers answers = 2;
471
- optional PatientSnapshot patient_snapshot = 3;
472
- repeated TreatmentRequest previous = 4;
473
481
  }
474
482
 
475
- message TakeMedicalReviewRequest {
476
- string id = 1;
477
- string doctor_id = 2;
478
- string doctor_name = 3;
479
- }
480
-
481
- message TakeMedicalReviewResponse {
483
+ message GetMedicalReviewResponse {
482
484
  TreatmentRequest request = 1;
485
+ QuestionnaireAnswers answers = 2;
486
+ optional PatientSnapshot patient_snapshot = 3;
487
+ repeated TreatmentRequest previous = 4;
488
+ optional LastRejection last_rejection = 5;
483
489
  }
484
490
 
485
491
  message ApproveMedicalReviewRequest {
@@ -502,20 +508,38 @@ message RejectMedicalReviewResponse {
502
508
  TreatmentRequest request = 1;
503
509
  }
504
510
 
505
- message ReleaseMedicalReviewRequest {
511
+ message ReassignMedicalReviewRequest {
506
512
  string id = 1;
513
+ string staff_id = 2;
514
+ optional string doctor_id = 3;
507
515
  }
508
516
 
509
- message ReleaseMedicalReviewResponse {
517
+ message ReassignMedicalReviewResponse {
510
518
  TreatmentRequest request = 1;
511
519
  }
512
520
 
513
- message ReleaseDoctorReviewsRequest {
521
+ message ReassignDoctorReviewsRequest {
522
+ string doctor_id = 1;
523
+ }
524
+
525
+ message ReassignDoctorReviewsResponse {
526
+ int32 reassigned = 1;
527
+ int32 unassigned = 2;
528
+ }
529
+
530
+ message Assignment {
514
531
  string doctor_id = 1;
532
+ AssignmentReason reason = 2;
533
+ optional string staff_id = 3;
534
+ string created_at = 4;
535
+ }
536
+
537
+ message ListAssignmentsRequest {
538
+ string request_id = 1;
515
539
  }
516
540
 
517
- message ReleaseDoctorReviewsResponse {
518
- int32 released = 1;
541
+ message ListAssignmentsResponse {
542
+ repeated Assignment assignments = 1;
519
543
  }
520
544
 
521
545
  message CancelPaymentRequest {