@milobedini/shared-types 1.0.84 → 1.0.85
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/types.d.ts +80 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -175,16 +175,19 @@ export type AssignmentRecurrence = {
|
|
|
175
175
|
freq: 'weekly' | 'monthly' | 'none';
|
|
176
176
|
interval?: number;
|
|
177
177
|
};
|
|
178
|
+
export type AssignmentSource = 'therapist' | 'self';
|
|
178
179
|
export type ModuleAssignment = {
|
|
179
180
|
_id: string;
|
|
180
181
|
user: string;
|
|
181
|
-
therapist
|
|
182
|
+
therapist?: string;
|
|
182
183
|
program: string;
|
|
183
184
|
module: string;
|
|
184
185
|
moduleType: ModuleType;
|
|
185
186
|
status: AssignmentStatus;
|
|
187
|
+
source: AssignmentSource;
|
|
186
188
|
dueAt?: string;
|
|
187
189
|
recurrence?: AssignmentRecurrence;
|
|
190
|
+
recurrenceGroupId?: string;
|
|
188
191
|
latestAttempt?: string;
|
|
189
192
|
notes?: string;
|
|
190
193
|
createdAt: string;
|
|
@@ -397,6 +400,82 @@ export type MyAssignmentsResponse = {
|
|
|
397
400
|
success: boolean;
|
|
398
401
|
assignments: MyAssignmentView[];
|
|
399
402
|
};
|
|
403
|
+
export type PracticeItemStatus = 'not_started' | 'in_progress' | 'completed';
|
|
404
|
+
export type PracticeLatestAttempt = {
|
|
405
|
+
attemptId: string;
|
|
406
|
+
status: AttemptStatus;
|
|
407
|
+
totalScore?: number;
|
|
408
|
+
scoreBandLabel?: string;
|
|
409
|
+
completedAt?: string;
|
|
410
|
+
iteration: number;
|
|
411
|
+
};
|
|
412
|
+
export type PracticeItem = {
|
|
413
|
+
assignmentId: string;
|
|
414
|
+
moduleId: string;
|
|
415
|
+
moduleTitle: string;
|
|
416
|
+
moduleType: ModuleType;
|
|
417
|
+
programTitle: string;
|
|
418
|
+
source: AssignmentSource;
|
|
419
|
+
therapistName?: string;
|
|
420
|
+
status: PracticeItemStatus;
|
|
421
|
+
dueAt?: string;
|
|
422
|
+
recurrence?: AssignmentRecurrence;
|
|
423
|
+
notes?: string;
|
|
424
|
+
percentComplete: number;
|
|
425
|
+
attemptCount: number;
|
|
426
|
+
latestAttempt?: PracticeLatestAttempt;
|
|
427
|
+
};
|
|
428
|
+
export type PracticeResponse = {
|
|
429
|
+
success: boolean;
|
|
430
|
+
today: PracticeItem[];
|
|
431
|
+
thisWeek: PracticeItem[];
|
|
432
|
+
upcoming: PracticeItem[];
|
|
433
|
+
recentlyCompleted: PracticeItem[];
|
|
434
|
+
};
|
|
435
|
+
export type PracticeHistoryQuery = {
|
|
436
|
+
moduleId?: string;
|
|
437
|
+
moduleType?: ModuleType;
|
|
438
|
+
cursor?: string;
|
|
439
|
+
limit?: number;
|
|
440
|
+
};
|
|
441
|
+
export type PracticeHistoryResponse = {
|
|
442
|
+
success: boolean;
|
|
443
|
+
items: PracticeItem[];
|
|
444
|
+
nextCursor: string | null;
|
|
445
|
+
};
|
|
446
|
+
export type SparklineMap = Record<string, number[]>;
|
|
447
|
+
export type PatientPracticeResponse = PracticeResponse & {
|
|
448
|
+
sparklines: SparklineMap;
|
|
449
|
+
};
|
|
450
|
+
export type AttentionReason = 'severe_score' | 'score_regression' | 'overdue' | 'first_submission';
|
|
451
|
+
export type AttentionPriority = 'high' | 'medium' | 'low';
|
|
452
|
+
export type ReviewItem = PracticeItem & {
|
|
453
|
+
patientId: string;
|
|
454
|
+
patientName: string;
|
|
455
|
+
attentionReason?: AttentionReason;
|
|
456
|
+
attentionPriority?: AttentionPriority;
|
|
457
|
+
};
|
|
458
|
+
export type ReviewGroupBy = 'date' | 'patient' | 'module';
|
|
459
|
+
export type ReviewFilters = {
|
|
460
|
+
sort?: SortOption;
|
|
461
|
+
groupBy?: ReviewGroupBy;
|
|
462
|
+
patientId?: string;
|
|
463
|
+
moduleId?: string;
|
|
464
|
+
severity?: SeverityOption;
|
|
465
|
+
dateFrom?: string;
|
|
466
|
+
dateTo?: string;
|
|
467
|
+
cursor?: string;
|
|
468
|
+
limit?: number;
|
|
469
|
+
};
|
|
470
|
+
export type ReviewResponse = {
|
|
471
|
+
success: boolean;
|
|
472
|
+
needsAttention: ReviewItem[];
|
|
473
|
+
submissions: {
|
|
474
|
+
items: ReviewItem[];
|
|
475
|
+
nextCursor: string | null;
|
|
476
|
+
total: number;
|
|
477
|
+
};
|
|
478
|
+
};
|
|
400
479
|
export type UpdateAssignmentInput = {
|
|
401
480
|
status?: AssignmentStatus;
|
|
402
481
|
dueAt?: string;
|