-
Notifications
You must be signed in to change notification settings - Fork 206
/
config-schema.ts
106 lines (104 loc) · 3.29 KB
/
config-schema.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import { Type } from '@openmrs/esm-framework';
export const configSchema = {
resultsViewerConcepts: {
_type: Type.Array,
_elements: {
conceptUuid: {
_type: Type.UUID,
_description: `UUID of a test or a concept set containing tests as members, members' members, and so on. Test results will be loaded by querying the REST /obstree endpoint with this concept.`,
},
defaultOpen: {
_type: Type.Boolean,
_description:
'Each concept set displays the test results it contains in an accordion. Should the accordion be open by default?',
},
},
_default: [
{
// Hematology
conceptUuid: 'ae485e65-2e3f-4297-b35e-c818bbefe894',
defaultOpen: false,
},
{
// Bloodwork (contains Hematology, above)
conceptUuid: '8904fa2b-6a8f-437d-89ec-6fce3cd99093',
defaultOpen: false,
},
{
// HIV viral load
conceptUuid: '856AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
defaultOpen: false,
},
],
},
showPrintButton: {
_type: Type.Boolean,
_default: true,
_description:
'Whether or not to display the print button in the Test Results dashboard. When set to `true`, a print button is shown alongside the panel and tree view content switcher. When clicked, a modal pops up showing a datatable with the available test results. Once the user selects an appropriate date range, they can click on the print button in the modal to print the data',
},
orders: {
labOrderTypeUuid: {
_type: Type.UUID,
_description: "UUID for the 'Lab' order type",
_default: '52a447d3-a64a-11e3-9aeb-50e549534c5e',
},
labOrderableConcepts: {
_type: Type.Array,
_description:
'UUIDs of concepts that represent orderable lab tests or lab sets. If an empty array `[]` is provided, every concept with class `Test` will be considered orderable.',
_elements: {
_type: Type.UUID,
},
_default: ['1748a953-d12e-4be1-914c-f6b096c6cdef'],
},
},
labTestsWithOrderReasons: {
_type: Type.Array,
_elements: {
labTestUuid: {
_type: Type.UUID,
_description: 'UUID of the lab test that requires a reason for ordering',
_default: '',
},
required: {
_type: Type.Boolean,
_description: 'Whether the order reason is required or not',
_default: false,
},
orderReasons: {
_type: Type.Array,
_elements: {
_type: Type.ConceptUuid,
_description: 'Array of coded concepts that represent reasons for ordering a lab test',
},
_default: [],
_description: 'Coded Lab test order reason options',
},
},
_default: [],
_description: 'Whether to allow for provision of coded order reason',
},
};
export interface ObsTreeEntry {
conceptUuid: string;
defaultOpen: boolean;
}
export interface LabTestReason {
uuid: string;
label?: string;
}
export interface OrderReason {
labTestUuid: string;
required: boolean;
orderReasons: Array<string>;
}
export interface ConfigObject {
resultsViewerConcepts: Array<ObsTreeEntry>;
showPrintButton: boolean;
orders: {
labOrderTypeUuid: string;
labOrderableConcepts: Array<string>;
};
labTestsWithOrderReasons: Array<OrderReason>;
}