@candesk/contracts 6.79.0 → 6.80.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,7 @@ export interface MedicalReviewCount {
348
355
  queue: number;
349
356
  inReview: number;
350
357
  done: number;
358
+ overdue: number;
351
359
  }
352
360
  export interface CountMedicalReviewsResponse {
353
361
  counts: MedicalReviewCount[];
@@ -429,6 +437,34 @@ export interface ListAppointmentsResponse {
429
437
  nextCursor?: string | undefined;
430
438
  total: number;
431
439
  }
440
+ export interface GetRequestStatsRequest {
441
+ period: RequestStatsPeriod;
442
+ }
443
+ export interface RequestStatsTotals {
444
+ paid: number;
445
+ paidAmount: number;
446
+ refunded: number;
447
+ refundedAmount: number;
448
+ averageDecisionMinutes?: number | undefined;
449
+ }
450
+ export interface RequestStatsDay {
451
+ day: string;
452
+ paid: number;
453
+ }
454
+ export interface DoctorReviewStats {
455
+ doctorId: string;
456
+ inReview: number;
457
+ decided: number;
458
+ averageReviewMinutes?: number | undefined;
459
+ }
460
+ export interface GetRequestStatsResponse {
461
+ from: string;
462
+ current: RequestStatsTotals | undefined;
463
+ previous: RequestStatsTotals | undefined;
464
+ overdue: number;
465
+ days: RequestStatsDay[];
466
+ doctors: DoctorReviewStats[];
467
+ }
432
468
  export interface TreatmentService {
433
469
  getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse>;
434
470
  saveQuestionnaire(request: SaveQuestionnaireRequest): Promise<SaveQuestionnaireResponse>;
@@ -460,4 +496,5 @@ export interface TreatmentService {
460
496
  retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse>;
461
497
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse>;
462
498
  listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse>;
499
+ getRequestStats(request: GetRequestStatsRequest): Promise<GetRequestStatsResponse>;
463
500
  }
@@ -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,7 @@ export interface MedicalReviewCount {
349
356
  queue: number;
350
357
  inReview: number;
351
358
  done: number;
359
+ overdue: number;
352
360
  }
353
361
  export interface CountMedicalReviewsResponse {
354
362
  counts: MedicalReviewCount[];
@@ -430,6 +438,34 @@ export interface ListAppointmentsResponse {
430
438
  nextCursor?: string | undefined;
431
439
  total: number;
432
440
  }
441
+ export interface GetRequestStatsRequest {
442
+ period: RequestStatsPeriod;
443
+ }
444
+ export interface RequestStatsTotals {
445
+ paid: number;
446
+ paidAmount: number;
447
+ refunded: number;
448
+ refundedAmount: number;
449
+ averageDecisionMinutes?: number | undefined;
450
+ }
451
+ export interface RequestStatsDay {
452
+ day: string;
453
+ paid: number;
454
+ }
455
+ export interface DoctorReviewStats {
456
+ doctorId: string;
457
+ inReview: number;
458
+ decided: number;
459
+ averageReviewMinutes?: number | undefined;
460
+ }
461
+ export interface GetRequestStatsResponse {
462
+ from: string;
463
+ current: RequestStatsTotals | undefined;
464
+ previous: RequestStatsTotals | undefined;
465
+ overdue: number;
466
+ days: RequestStatsDay[];
467
+ doctors: DoctorReviewStats[];
468
+ }
433
469
  export declare const TREATMENT_V1_PACKAGE_NAME = "treatment.v1";
434
470
  export interface TreatmentServiceClient {
435
471
  getQuestionnaire(request: GetQuestionnaireRequest): Observable<GetQuestionnaireResponse>;
@@ -462,6 +498,7 @@ export interface TreatmentServiceClient {
462
498
  retryRefund(request: RetryRefundRequest): Observable<RetryRefundResponse>;
463
499
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Observable<ListAppointmentSlotsResponse>;
464
500
  listAppointments(request: ListAppointmentsRequest): Observable<ListAppointmentsResponse>;
501
+ getRequestStats(request: GetRequestStatsRequest): Observable<GetRequestStatsResponse>;
465
502
  }
466
503
  export interface TreatmentServiceController {
467
504
  getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse> | Observable<GetQuestionnaireResponse> | GetQuestionnaireResponse;
@@ -494,6 +531,7 @@ export interface TreatmentServiceController {
494
531
  retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse> | Observable<RetryRefundResponse> | RetryRefundResponse;
495
532
  listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse> | Observable<ListAppointmentSlotsResponse> | ListAppointmentSlotsResponse;
496
533
  listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse> | Observable<ListAppointmentsResponse> | ListAppointmentsResponse;
534
+ getRequestStats(request: GetRequestStatsRequest): Promise<GetRequestStatsResponse> | Observable<GetRequestStatsResponse> | GetRequestStatsResponse;
497
535
  }
498
536
  export declare function TreatmentServiceControllerMethods(): (constructor: Function) => void;
499
537
  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.80.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,7 @@ message MedicalReviewCount {
431
439
  int32 queue = 2;
432
440
  int32 in_review = 3;
433
441
  int32 done = 4;
442
+ int32 overdue = 5;
434
443
  }
435
444
 
436
445
  message CountMedicalReviewsResponse {
@@ -534,3 +543,36 @@ message ListAppointmentsResponse {
534
543
  optional string next_cursor = 2;
535
544
  int32 total = 3;
536
545
  }
546
+
547
+ message GetRequestStatsRequest {
548
+ RequestStatsPeriod period = 1;
549
+ }
550
+
551
+ message RequestStatsTotals {
552
+ int32 paid = 1;
553
+ int32 paid_amount = 2;
554
+ int32 refunded = 3;
555
+ int32 refunded_amount = 4;
556
+ optional int32 average_decision_minutes = 5;
557
+ }
558
+
559
+ message RequestStatsDay {
560
+ string day = 1;
561
+ int32 paid = 2;
562
+ }
563
+
564
+ message DoctorReviewStats {
565
+ string doctor_id = 1;
566
+ int32 in_review = 2;
567
+ int32 decided = 3;
568
+ optional int32 average_review_minutes = 4;
569
+ }
570
+
571
+ message GetRequestStatsResponse {
572
+ string from = 1;
573
+ RequestStatsTotals current = 2;
574
+ RequestStatsTotals previous = 3;
575
+ int32 overdue = 4;
576
+ repeated RequestStatsDay days = 5;
577
+ repeated DoctorReviewStats doctors = 6;
578
+ }