@candesk/contracts 6.83.0 → 6.84.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;
@@ -379,14 +386,6 @@ export interface GetMedicalReviewResponse {
379
386
  patientSnapshot?: PatientSnapshot | undefined;
380
387
  previous: TreatmentRequest[];
381
388
  }
382
- export interface TakeMedicalReviewRequest {
383
- id: string;
384
- doctorId: string;
385
- doctorName: string;
386
- }
387
- export interface TakeMedicalReviewResponse {
388
- request: TreatmentRequest | undefined;
389
- }
390
389
  export interface ApproveMedicalReviewRequest {
391
390
  id: string;
392
391
  doctorId: string;
@@ -403,17 +402,32 @@ export interface RejectMedicalReviewRequest {
403
402
  export interface RejectMedicalReviewResponse {
404
403
  request: TreatmentRequest | undefined;
405
404
  }
406
- export interface ReleaseMedicalReviewRequest {
405
+ export interface ReassignMedicalReviewRequest {
407
406
  id: string;
407
+ staffId: string;
408
+ doctorId?: string | undefined;
408
409
  }
409
- export interface ReleaseMedicalReviewResponse {
410
+ export interface ReassignMedicalReviewResponse {
410
411
  request: TreatmentRequest | undefined;
411
412
  }
412
- export interface ReleaseDoctorReviewsRequest {
413
+ export interface ReassignDoctorReviewsRequest {
414
+ doctorId: string;
415
+ }
416
+ export interface ReassignDoctorReviewsResponse {
417
+ reassigned: number;
418
+ unassigned: number;
419
+ }
420
+ export interface Assignment {
413
421
  doctorId: string;
422
+ reason: AssignmentReason;
423
+ staffId?: string | undefined;
424
+ createdAt: string;
425
+ }
426
+ export interface ListAssignmentsRequest {
427
+ requestId: string;
414
428
  }
415
- export interface ReleaseDoctorReviewsResponse {
416
- released: number;
429
+ export interface ListAssignmentsResponse {
430
+ assignments: Assignment[];
417
431
  }
418
432
  export interface CancelPaymentRequest {
419
433
  userId: string;
@@ -498,11 +512,11 @@ export interface TreatmentService {
498
512
  listMedicalReviews(request: ListMedicalReviewsRequest): Promise<ListMedicalReviewsResponse>;
499
513
  countMedicalReviews(request: CountMedicalReviewsRequest): Promise<CountMedicalReviewsResponse>;
500
514
  getMedicalReview(request: GetMedicalReviewRequest): Promise<GetMedicalReviewResponse>;
501
- takeMedicalReview(request: TakeMedicalReviewRequest): Promise<TakeMedicalReviewResponse>;
502
515
  approveMedicalReview(request: ApproveMedicalReviewRequest): Promise<ApproveMedicalReviewResponse>;
503
516
  rejectMedicalReview(request: RejectMedicalReviewRequest): Promise<RejectMedicalReviewResponse>;
504
- releaseMedicalReview(request: ReleaseMedicalReviewRequest): Promise<ReleaseMedicalReviewResponse>;
505
- releaseDoctorReviews(request: ReleaseDoctorReviewsRequest): Promise<ReleaseDoctorReviewsResponse>;
517
+ reassignMedicalReview(request: ReassignMedicalReviewRequest): Promise<ReassignMedicalReviewResponse>;
518
+ reassignDoctorReviews(request: ReassignDoctorReviewsRequest): Promise<ReassignDoctorReviewsResponse>;
519
+ listAssignments(request: ListAssignmentsRequest): Promise<ListAssignmentsResponse>;
506
520
  retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse>;
507
521
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse>;
508
522
  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;
@@ -380,14 +387,6 @@ export interface GetMedicalReviewResponse {
380
387
  patientSnapshot?: PatientSnapshot | undefined;
381
388
  previous: TreatmentRequest[];
382
389
  }
383
- export interface TakeMedicalReviewRequest {
384
- id: string;
385
- doctorId: string;
386
- doctorName: string;
387
- }
388
- export interface TakeMedicalReviewResponse {
389
- request: TreatmentRequest | undefined;
390
- }
391
390
  export interface ApproveMedicalReviewRequest {
392
391
  id: string;
393
392
  doctorId: string;
@@ -404,17 +403,32 @@ export interface RejectMedicalReviewRequest {
404
403
  export interface RejectMedicalReviewResponse {
405
404
  request: TreatmentRequest | undefined;
406
405
  }
407
- export interface ReleaseMedicalReviewRequest {
406
+ export interface ReassignMedicalReviewRequest {
408
407
  id: string;
408
+ staffId: string;
409
+ doctorId?: string | undefined;
409
410
  }
410
- export interface ReleaseMedicalReviewResponse {
411
+ export interface ReassignMedicalReviewResponse {
411
412
  request: TreatmentRequest | undefined;
412
413
  }
413
- export interface ReleaseDoctorReviewsRequest {
414
+ export interface ReassignDoctorReviewsRequest {
415
+ doctorId: string;
416
+ }
417
+ export interface ReassignDoctorReviewsResponse {
418
+ reassigned: number;
419
+ unassigned: number;
420
+ }
421
+ export interface Assignment {
414
422
  doctorId: string;
423
+ reason: AssignmentReason;
424
+ staffId?: string | undefined;
425
+ createdAt: string;
426
+ }
427
+ export interface ListAssignmentsRequest {
428
+ requestId: string;
415
429
  }
416
- export interface ReleaseDoctorReviewsResponse {
417
- released: number;
430
+ export interface ListAssignmentsResponse {
431
+ assignments: Assignment[];
418
432
  }
419
433
  export interface CancelPaymentRequest {
420
434
  userId: string;
@@ -500,11 +514,11 @@ export interface TreatmentServiceClient {
500
514
  listMedicalReviews(request: ListMedicalReviewsRequest): Observable<ListMedicalReviewsResponse>;
501
515
  countMedicalReviews(request: CountMedicalReviewsRequest): Observable<CountMedicalReviewsResponse>;
502
516
  getMedicalReview(request: GetMedicalReviewRequest): Observable<GetMedicalReviewResponse>;
503
- takeMedicalReview(request: TakeMedicalReviewRequest): Observable<TakeMedicalReviewResponse>;
504
517
  approveMedicalReview(request: ApproveMedicalReviewRequest): Observable<ApproveMedicalReviewResponse>;
505
518
  rejectMedicalReview(request: RejectMedicalReviewRequest): Observable<RejectMedicalReviewResponse>;
506
- releaseMedicalReview(request: ReleaseMedicalReviewRequest): Observable<ReleaseMedicalReviewResponse>;
507
- releaseDoctorReviews(request: ReleaseDoctorReviewsRequest): Observable<ReleaseDoctorReviewsResponse>;
519
+ reassignMedicalReview(request: ReassignMedicalReviewRequest): Observable<ReassignMedicalReviewResponse>;
520
+ reassignDoctorReviews(request: ReassignDoctorReviewsRequest): Observable<ReassignDoctorReviewsResponse>;
521
+ listAssignments(request: ListAssignmentsRequest): Observable<ListAssignmentsResponse>;
508
522
  retryRefund(request: RetryRefundRequest): Observable<RetryRefundResponse>;
509
523
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Observable<ListAppointmentSlotsResponse>;
510
524
  listAppointments(request: ListAppointmentsRequest): Observable<ListAppointmentsResponse>;
@@ -534,11 +548,11 @@ export interface TreatmentServiceController {
534
548
  listMedicalReviews(request: ListMedicalReviewsRequest): Promise<ListMedicalReviewsResponse> | Observable<ListMedicalReviewsResponse> | ListMedicalReviewsResponse;
535
549
  countMedicalReviews(request: CountMedicalReviewsRequest): Promise<CountMedicalReviewsResponse> | Observable<CountMedicalReviewsResponse> | CountMedicalReviewsResponse;
536
550
  getMedicalReview(request: GetMedicalReviewRequest): Promise<GetMedicalReviewResponse> | Observable<GetMedicalReviewResponse> | GetMedicalReviewResponse;
537
- takeMedicalReview(request: TakeMedicalReviewRequest): Promise<TakeMedicalReviewResponse> | Observable<TakeMedicalReviewResponse> | TakeMedicalReviewResponse;
538
551
  approveMedicalReview(request: ApproveMedicalReviewRequest): Promise<ApproveMedicalReviewResponse> | Observable<ApproveMedicalReviewResponse> | ApproveMedicalReviewResponse;
539
552
  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;
553
+ reassignMedicalReview(request: ReassignMedicalReviewRequest): Promise<ReassignMedicalReviewResponse> | Observable<ReassignMedicalReviewResponse> | ReassignMedicalReviewResponse;
554
+ reassignDoctorReviews(request: ReassignDoctorReviewsRequest): Promise<ReassignDoctorReviewsResponse> | Observable<ReassignDoctorReviewsResponse> | ReassignDoctorReviewsResponse;
555
+ listAssignments(request: ListAssignmentsRequest): Promise<ListAssignmentsResponse> | Observable<ListAssignmentsResponse> | ListAssignmentsResponse;
542
556
  retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse> | Observable<RetryRefundResponse> | RetryRefundResponse;
543
557
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse> | Observable<ListAppointmentSlotsResponse> | ListAppointmentSlotsResponse;
544
558
  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.84.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;
@@ -472,16 +482,6 @@ message GetMedicalReviewResponse {
472
482
  repeated TreatmentRequest previous = 4;
473
483
  }
474
484
 
475
- message TakeMedicalReviewRequest {
476
- string id = 1;
477
- string doctor_id = 2;
478
- string doctor_name = 3;
479
- }
480
-
481
- message TakeMedicalReviewResponse {
482
- TreatmentRequest request = 1;
483
- }
484
-
485
485
  message ApproveMedicalReviewRequest {
486
486
  string id = 1;
487
487
  string doctor_id = 2;
@@ -502,20 +502,38 @@ message RejectMedicalReviewResponse {
502
502
  TreatmentRequest request = 1;
503
503
  }
504
504
 
505
- message ReleaseMedicalReviewRequest {
505
+ message ReassignMedicalReviewRequest {
506
506
  string id = 1;
507
+ string staff_id = 2;
508
+ optional string doctor_id = 3;
507
509
  }
508
510
 
509
- message ReleaseMedicalReviewResponse {
511
+ message ReassignMedicalReviewResponse {
510
512
  TreatmentRequest request = 1;
511
513
  }
512
514
 
513
- message ReleaseDoctorReviewsRequest {
515
+ message ReassignDoctorReviewsRequest {
516
+ string doctor_id = 1;
517
+ }
518
+
519
+ message ReassignDoctorReviewsResponse {
520
+ int32 reassigned = 1;
521
+ int32 unassigned = 2;
522
+ }
523
+
524
+ message Assignment {
514
525
  string doctor_id = 1;
526
+ AssignmentReason reason = 2;
527
+ optional string staff_id = 3;
528
+ string created_at = 4;
529
+ }
530
+
531
+ message ListAssignmentsRequest {
532
+ string request_id = 1;
515
533
  }
516
534
 
517
- message ReleaseDoctorReviewsResponse {
518
- int32 released = 1;
535
+ message ListAssignmentsResponse {
536
+ repeated Assignment assignments = 1;
519
537
  }
520
538
 
521
539
  message CancelPaymentRequest {