hvp-shared 7.5.0 → 7.6.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.
|
@@ -15,7 +15,8 @@ export interface CreateExternalStudyRequest {
|
|
|
15
15
|
studyTypeId: string;
|
|
16
16
|
studyTypeDetail?: string;
|
|
17
17
|
qvetSupplierId: number;
|
|
18
|
-
|
|
18
|
+
responsibleDoctorId: string;
|
|
19
|
+
requestedById?: string;
|
|
19
20
|
resultUrl?: string;
|
|
20
21
|
notes?: string;
|
|
21
22
|
}
|
|
@@ -34,7 +35,8 @@ export interface UpdateExternalStudyRequest {
|
|
|
34
35
|
studyTypeId?: string;
|
|
35
36
|
studyTypeDetail?: string;
|
|
36
37
|
qvetSupplierId?: number;
|
|
37
|
-
|
|
38
|
+
responsibleDoctorId?: string;
|
|
39
|
+
requestedById?: string;
|
|
38
40
|
resultUrl?: string;
|
|
39
41
|
notes?: string;
|
|
40
42
|
}
|
|
@@ -71,7 +73,7 @@ export interface PostActionRequest {
|
|
|
71
73
|
*/
|
|
72
74
|
export interface ExternalStudyQueryFilters {
|
|
73
75
|
status?: StudyStatus | StudyStatus[];
|
|
74
|
-
|
|
76
|
+
responsibleDoctorId?: string;
|
|
75
77
|
qvetSupplierId?: number;
|
|
76
78
|
studyTypeId?: string;
|
|
77
79
|
/** ISO date strings */
|
|
@@ -15,13 +15,11 @@ export interface ExternalStudyResponse {
|
|
|
15
15
|
patientName: string;
|
|
16
16
|
clientName?: string;
|
|
17
17
|
studyTypeId: string;
|
|
18
|
-
studyTypeName: string;
|
|
19
18
|
studyTypeCategory: StudyCategory;
|
|
20
19
|
studyTypeDetail?: string;
|
|
21
20
|
qvetSupplierId: number;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
requestingDoctorName: string;
|
|
21
|
+
responsibleDoctorId: string;
|
|
22
|
+
requestedById: string;
|
|
25
23
|
status: StudyStatus;
|
|
26
24
|
requestedAt: string;
|
|
27
25
|
sentAt?: string;
|
|
@@ -42,14 +40,19 @@ export interface ExternalStudyResponse {
|
|
|
42
40
|
}
|
|
43
41
|
/**
|
|
44
42
|
* Pending dashboard summary for an external study (lighter payload for list views).
|
|
43
|
+
*
|
|
44
|
+
* Only IDs — frontend looks up names from local catalogs.
|
|
45
45
|
*/
|
|
46
46
|
export interface ExternalStudyPendingItem {
|
|
47
47
|
id: string;
|
|
48
48
|
patientName: string;
|
|
49
|
-
|
|
49
|
+
clientName?: string;
|
|
50
|
+
studyTypeId: string;
|
|
50
51
|
studyTypeCategory: StudyCategory;
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
studyTypeDetail?: string;
|
|
53
|
+
qvetSupplierId: number;
|
|
54
|
+
responsibleDoctorId: string;
|
|
55
|
+
requestedById: string;
|
|
53
56
|
status: StudyStatus;
|
|
54
57
|
requestedAt: string;
|
|
55
58
|
daysSinceRequested: number;
|
|
@@ -9,23 +9,26 @@
|
|
|
9
9
|
* Workflow state of an external study.
|
|
10
10
|
*
|
|
11
11
|
* Transitions:
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* requested → sent → result_received → closed
|
|
13
|
+
* ↓
|
|
14
|
+
* cancelled (from any active state)
|
|
15
|
+
*
|
|
16
|
+
* Spanish UI labels are in `STUDY_STATUS_LABELS` — code/DB always uses English.
|
|
15
17
|
*
|
|
16
18
|
* Post-received actions (sentToInternalWhatsappAt, uploadedToQvetAt,
|
|
17
19
|
* informedClientAt) are independent timestamps — not states.
|
|
18
20
|
*/
|
|
19
21
|
export declare enum StudyStatus {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
requested = "requested",
|
|
23
|
+
sent = "sent",
|
|
24
|
+
result_received = "result_received",
|
|
25
|
+
closed = "closed",
|
|
26
|
+
cancelled = "cancelled"
|
|
25
27
|
}
|
|
28
|
+
/** UI-only labels (Spanish). Code uses English enum values everywhere else. */
|
|
26
29
|
export declare const STUDY_STATUS_LABELS: Record<StudyStatus, string>;
|
|
27
30
|
/**
|
|
28
|
-
* Active states (not
|
|
31
|
+
* Active states (not closed/cancelled). Used to filter pending dashboards.
|
|
29
32
|
*/
|
|
30
33
|
export declare const ACTIVE_STUDY_STATUSES: ReadonlyArray<StudyStatus>;
|
|
31
34
|
/**
|
|
@@ -12,35 +12,38 @@ exports.OVERDUE_THRESHOLD_DAYS = exports.ACTIVE_STUDY_STATUSES = exports.STUDY_S
|
|
|
12
12
|
* Workflow state of an external study.
|
|
13
13
|
*
|
|
14
14
|
* Transitions:
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* requested → sent → result_received → closed
|
|
16
|
+
* ↓
|
|
17
|
+
* cancelled (from any active state)
|
|
18
|
+
*
|
|
19
|
+
* Spanish UI labels are in `STUDY_STATUS_LABELS` — code/DB always uses English.
|
|
18
20
|
*
|
|
19
21
|
* Post-received actions (sentToInternalWhatsappAt, uploadedToQvetAt,
|
|
20
22
|
* informedClientAt) are independent timestamps — not states.
|
|
21
23
|
*/
|
|
22
24
|
var StudyStatus;
|
|
23
25
|
(function (StudyStatus) {
|
|
24
|
-
StudyStatus["
|
|
25
|
-
StudyStatus["
|
|
26
|
-
StudyStatus["
|
|
27
|
-
StudyStatus["
|
|
28
|
-
StudyStatus["
|
|
26
|
+
StudyStatus["requested"] = "requested";
|
|
27
|
+
StudyStatus["sent"] = "sent";
|
|
28
|
+
StudyStatus["result_received"] = "result_received";
|
|
29
|
+
StudyStatus["closed"] = "closed";
|
|
30
|
+
StudyStatus["cancelled"] = "cancelled";
|
|
29
31
|
})(StudyStatus || (exports.StudyStatus = StudyStatus = {}));
|
|
32
|
+
/** UI-only labels (Spanish). Code uses English enum values everywhere else. */
|
|
30
33
|
exports.STUDY_STATUS_LABELS = {
|
|
31
|
-
[StudyStatus.
|
|
32
|
-
[StudyStatus.
|
|
33
|
-
[StudyStatus.
|
|
34
|
-
[StudyStatus.
|
|
35
|
-
[StudyStatus.
|
|
34
|
+
[StudyStatus.requested]: 'Solicitado',
|
|
35
|
+
[StudyStatus.sent]: 'Enviado',
|
|
36
|
+
[StudyStatus.result_received]: 'Resultado recibido',
|
|
37
|
+
[StudyStatus.closed]: 'Cerrado',
|
|
38
|
+
[StudyStatus.cancelled]: 'Cancelado',
|
|
36
39
|
};
|
|
37
40
|
/**
|
|
38
|
-
* Active states (not
|
|
41
|
+
* Active states (not closed/cancelled). Used to filter pending dashboards.
|
|
39
42
|
*/
|
|
40
43
|
exports.ACTIVE_STUDY_STATUSES = [
|
|
41
|
-
StudyStatus.
|
|
42
|
-
StudyStatus.
|
|
43
|
-
StudyStatus.
|
|
44
|
+
StudyStatus.requested,
|
|
45
|
+
StudyStatus.sent,
|
|
46
|
+
StudyStatus.result_received,
|
|
44
47
|
];
|
|
45
48
|
/**
|
|
46
49
|
* Overdue thresholds in days (per category). Hardcoded for now; can move to
|