@candesk/contracts 6.79.0 → 6.81.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.
@@ -65,6 +65,13 @@ export declare enum MedicalRejectionReason {
65
65
  MEDICAL_REJECTION_REASON_OTHER = 3,
66
66
  UNRECOGNIZED = -1
67
67
  }
68
+ export declare enum RequestStatsPeriod {
69
+ REQUEST_STATS_PERIOD_UNSPECIFIED = 0,
70
+ REQUEST_STATS_PERIOD_TODAY = 1,
71
+ REQUEST_STATS_PERIOD_WEEK = 2,
72
+ REQUEST_STATS_PERIOD_MONTH = 3,
73
+ UNRECOGNIZED = -1
74
+ }
68
75
  export declare enum MedicalReviewScope {
69
76
  MEDICAL_REVIEW_SCOPE_UNSPECIFIED = 0,
70
77
  MEDICAL_REVIEW_SCOPE_QUEUE = 1,
@@ -348,6 +355,9 @@ export interface MedicalReviewCount {
348
355
  queue: number;
349
356
  inReview: number;
350
357
  done: number;
358
+ overdue: number;
359
+ decidedToday: number;
360
+ approvedToday: number;
351
361
  }
352
362
  export interface CountMedicalReviewsResponse {
353
363
  counts: MedicalReviewCount[];
@@ -429,6 +439,34 @@ export interface ListAppointmentsResponse {
429
439
  nextCursor?: string | undefined;
430
440
  total: number;
431
441
  }
442
+ export interface GetRequestStatsRequest {
443
+ period: RequestStatsPeriod;
444
+ }
445
+ export interface RequestStatsTotals {
446
+ paid: number;
447
+ paidAmount: number;
448
+ refunded: number;
449
+ refundedAmount: number;
450
+ averageDecisionMinutes?: number | undefined;
451
+ }
452
+ export interface RequestStatsDay {
453
+ day: string;
454
+ paid: number;
455
+ }
456
+ export interface DoctorReviewStats {
457
+ doctorId: string;
458
+ inReview: number;
459
+ decided: number;
460
+ averageReviewMinutes?: number | undefined;
461
+ }
462
+ export interface GetRequestStatsResponse {
463
+ from: string;
464
+ current: RequestStatsTotals | undefined;
465
+ previous: RequestStatsTotals | undefined;
466
+ overdue: number;
467
+ days: RequestStatsDay[];
468
+ doctors: DoctorReviewStats[];
469
+ }
432
470
  export interface TreatmentService {
433
471
  getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse>;
434
472
  saveQuestionnaire(request: SaveQuestionnaireRequest): Promise<SaveQuestionnaireResponse>;
@@ -460,4 +498,5 @@ export interface TreatmentService {
460
498
  retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse>;
461
499
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse>;
462
500
  listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse>;
501
+ getRequestStats(request: GetRequestStatsRequest): Promise<GetRequestStatsResponse>;
463
502
  }
@@ -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.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.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";
@@ -82,6 +82,14 @@ var MedicalRejectionReason;
82
82
  MedicalRejectionReason[MedicalRejectionReason["MEDICAL_REJECTION_REASON_OTHER"] = 3] = "MEDICAL_REJECTION_REASON_OTHER";
83
83
  MedicalRejectionReason[MedicalRejectionReason["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
84
84
  })(MedicalRejectionReason || (exports.MedicalRejectionReason = MedicalRejectionReason = {}));
85
+ var RequestStatsPeriod;
86
+ (function (RequestStatsPeriod) {
87
+ RequestStatsPeriod[RequestStatsPeriod["REQUEST_STATS_PERIOD_UNSPECIFIED"] = 0] = "REQUEST_STATS_PERIOD_UNSPECIFIED";
88
+ RequestStatsPeriod[RequestStatsPeriod["REQUEST_STATS_PERIOD_TODAY"] = 1] = "REQUEST_STATS_PERIOD_TODAY";
89
+ RequestStatsPeriod[RequestStatsPeriod["REQUEST_STATS_PERIOD_WEEK"] = 2] = "REQUEST_STATS_PERIOD_WEEK";
90
+ RequestStatsPeriod[RequestStatsPeriod["REQUEST_STATS_PERIOD_MONTH"] = 3] = "REQUEST_STATS_PERIOD_MONTH";
91
+ RequestStatsPeriod[RequestStatsPeriod["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
92
+ })(RequestStatsPeriod || (exports.RequestStatsPeriod = RequestStatsPeriod = {}));
85
93
  var MedicalReviewScope;
86
94
  (function (MedicalReviewScope) {
87
95
  MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_UNSPECIFIED"] = 0] = "MEDICAL_REVIEW_SCOPE_UNSPECIFIED";
@@ -66,6 +66,13 @@ export declare enum MedicalRejectionReason {
66
66
  MEDICAL_REJECTION_REASON_OTHER = 3,
67
67
  UNRECOGNIZED = -1
68
68
  }
69
+ export declare enum RequestStatsPeriod {
70
+ REQUEST_STATS_PERIOD_UNSPECIFIED = 0,
71
+ REQUEST_STATS_PERIOD_TODAY = 1,
72
+ REQUEST_STATS_PERIOD_WEEK = 2,
73
+ REQUEST_STATS_PERIOD_MONTH = 3,
74
+ UNRECOGNIZED = -1
75
+ }
69
76
  export declare enum MedicalReviewScope {
70
77
  MEDICAL_REVIEW_SCOPE_UNSPECIFIED = 0,
71
78
  MEDICAL_REVIEW_SCOPE_QUEUE = 1,
@@ -349,6 +356,9 @@ export interface MedicalReviewCount {
349
356
  queue: number;
350
357
  inReview: number;
351
358
  done: number;
359
+ overdue: number;
360
+ decidedToday: number;
361
+ approvedToday: number;
352
362
  }
353
363
  export interface CountMedicalReviewsResponse {
354
364
  counts: MedicalReviewCount[];
@@ -430,6 +440,34 @@ export interface ListAppointmentsResponse {
430
440
  nextCursor?: string | undefined;
431
441
  total: number;
432
442
  }
443
+ export interface GetRequestStatsRequest {
444
+ period: RequestStatsPeriod;
445
+ }
446
+ export interface RequestStatsTotals {
447
+ paid: number;
448
+ paidAmount: number;
449
+ refunded: number;
450
+ refundedAmount: number;
451
+ averageDecisionMinutes?: number | undefined;
452
+ }
453
+ export interface RequestStatsDay {
454
+ day: string;
455
+ paid: number;
456
+ }
457
+ export interface DoctorReviewStats {
458
+ doctorId: string;
459
+ inReview: number;
460
+ decided: number;
461
+ averageReviewMinutes?: number | undefined;
462
+ }
463
+ export interface GetRequestStatsResponse {
464
+ from: string;
465
+ current: RequestStatsTotals | undefined;
466
+ previous: RequestStatsTotals | undefined;
467
+ overdue: number;
468
+ days: RequestStatsDay[];
469
+ doctors: DoctorReviewStats[];
470
+ }
433
471
  export declare const TREATMENT_V1_PACKAGE_NAME = "treatment.v1";
434
472
  export interface TreatmentServiceClient {
435
473
  getQuestionnaire(request: GetQuestionnaireRequest): Observable<GetQuestionnaireResponse>;
@@ -462,6 +500,7 @@ export interface TreatmentServiceClient {
462
500
  retryRefund(request: RetryRefundRequest): Observable<RetryRefundResponse>;
463
501
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Observable<ListAppointmentSlotsResponse>;
464
502
  listAppointments(request: ListAppointmentsRequest): Observable<ListAppointmentsResponse>;
503
+ getRequestStats(request: GetRequestStatsRequest): Observable<GetRequestStatsResponse>;
465
504
  }
466
505
  export interface TreatmentServiceController {
467
506
  getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse> | Observable<GetQuestionnaireResponse> | GetQuestionnaireResponse;
@@ -494,6 +533,7 @@ export interface TreatmentServiceController {
494
533
  retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse> | Observable<RetryRefundResponse> | RetryRefundResponse;
495
534
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse> | Observable<ListAppointmentSlotsResponse> | ListAppointmentSlotsResponse;
496
535
  listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse> | Observable<ListAppointmentsResponse> | ListAppointmentsResponse;
536
+ getRequestStats(request: GetRequestStatsRequest): Promise<GetRequestStatsResponse> | Observable<GetRequestStatsResponse> | GetRequestStatsResponse;
497
537
  }
498
538
  export declare function TreatmentServiceControllerMethods(): (constructor: Function) => void;
499
539
  export declare const TREATMENT_SERVICE_NAME = "TreatmentService";
@@ -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.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.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");
@@ -84,6 +84,14 @@ var MedicalRejectionReason;
84
84
  MedicalRejectionReason[MedicalRejectionReason["MEDICAL_REJECTION_REASON_OTHER"] = 3] = "MEDICAL_REJECTION_REASON_OTHER";
85
85
  MedicalRejectionReason[MedicalRejectionReason["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
86
86
  })(MedicalRejectionReason || (exports.MedicalRejectionReason = MedicalRejectionReason = {}));
87
+ var RequestStatsPeriod;
88
+ (function (RequestStatsPeriod) {
89
+ RequestStatsPeriod[RequestStatsPeriod["REQUEST_STATS_PERIOD_UNSPECIFIED"] = 0] = "REQUEST_STATS_PERIOD_UNSPECIFIED";
90
+ RequestStatsPeriod[RequestStatsPeriod["REQUEST_STATS_PERIOD_TODAY"] = 1] = "REQUEST_STATS_PERIOD_TODAY";
91
+ RequestStatsPeriod[RequestStatsPeriod["REQUEST_STATS_PERIOD_WEEK"] = 2] = "REQUEST_STATS_PERIOD_WEEK";
92
+ RequestStatsPeriod[RequestStatsPeriod["REQUEST_STATS_PERIOD_MONTH"] = 3] = "REQUEST_STATS_PERIOD_MONTH";
93
+ RequestStatsPeriod[RequestStatsPeriod["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
94
+ })(RequestStatsPeriod || (exports.RequestStatsPeriod = RequestStatsPeriod = {}));
87
95
  var MedicalReviewScope;
88
96
  (function (MedicalReviewScope) {
89
97
  MedicalReviewScope[MedicalReviewScope["MEDICAL_REVIEW_SCOPE_UNSPECIFIED"] = 0] = "MEDICAL_REVIEW_SCOPE_UNSPECIFIED";
@@ -149,6 +157,7 @@ function TreatmentServiceControllerMethods() {
149
157
  "retryRefund",
150
158
  "listAppointmentSlots",
151
159
  "listAppointments",
160
+ "getRequestStats",
152
161
  ];
153
162
  for (const method of grpcMethods) {
154
163
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.79.0",
3
+ "version": "6.81.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -33,6 +33,7 @@ service TreatmentService {
33
33
  rpc RetryRefund (RetryRefundRequest) returns (RetryRefundResponse);
34
34
  rpc ListAppointmentSlots (ListAppointmentSlotsRequest) returns (ListAppointmentSlotsResponse);
35
35
  rpc ListAppointments (ListAppointmentsRequest) returns (ListAppointmentsResponse);
36
+ rpc GetRequestStats (GetRequestStatsRequest) returns (GetRequestStatsResponse);
36
37
  }
37
38
 
38
39
  enum QuestionnaireStatus {
@@ -100,6 +101,13 @@ enum MedicalRejectionReason {
100
101
  MEDICAL_REJECTION_REASON_OTHER = 3;
101
102
  }
102
103
 
104
+ enum RequestStatsPeriod {
105
+ REQUEST_STATS_PERIOD_UNSPECIFIED = 0;
106
+ REQUEST_STATS_PERIOD_TODAY = 1;
107
+ REQUEST_STATS_PERIOD_WEEK = 2;
108
+ REQUEST_STATS_PERIOD_MONTH = 3;
109
+ }
110
+
103
111
  enum MedicalReviewScope {
104
112
  MEDICAL_REVIEW_SCOPE_UNSPECIFIED = 0;
105
113
  MEDICAL_REVIEW_SCOPE_QUEUE = 1;
@@ -431,6 +439,9 @@ message MedicalReviewCount {
431
439
  int32 queue = 2;
432
440
  int32 in_review = 3;
433
441
  int32 done = 4;
442
+ int32 overdue = 5;
443
+ int32 decided_today = 6;
444
+ int32 approved_today = 7;
434
445
  }
435
446
 
436
447
  message CountMedicalReviewsResponse {
@@ -534,3 +545,36 @@ message ListAppointmentsResponse {
534
545
  optional string next_cursor = 2;
535
546
  int32 total = 3;
536
547
  }
548
+
549
+ message GetRequestStatsRequest {
550
+ RequestStatsPeriod period = 1;
551
+ }
552
+
553
+ message RequestStatsTotals {
554
+ int32 paid = 1;
555
+ int32 paid_amount = 2;
556
+ int32 refunded = 3;
557
+ int32 refunded_amount = 4;
558
+ optional int32 average_decision_minutes = 5;
559
+ }
560
+
561
+ message RequestStatsDay {
562
+ string day = 1;
563
+ int32 paid = 2;
564
+ }
565
+
566
+ message DoctorReviewStats {
567
+ string doctor_id = 1;
568
+ int32 in_review = 2;
569
+ int32 decided = 3;
570
+ optional int32 average_review_minutes = 4;
571
+ }
572
+
573
+ message GetRequestStatsResponse {
574
+ string from = 1;
575
+ RequestStatsTotals current = 2;
576
+ RequestStatsTotals previous = 3;
577
+ int32 overdue = 4;
578
+ repeated RequestStatsDay days = 5;
579
+ repeated DoctorReviewStats doctors = 6;
580
+ }