generated from openmrs/openmrs-esm-template-app
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathconfig-schema.ts
139 lines (134 loc) · 3.4 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import { Type } from '@openmrs/esm-framework';
/**
* This is the config schema.
*
*/
export const configSchema = {
formCategories: {
_type: Type.Array,
_description: 'Organize forms into categories. A form can belong to multiple categories.',
_elements: {
name: {
_type: Type.String,
_description: 'Category name',
},
forms: {
_type: Type.Array,
_description: 'List of forms for this category.',
_elements: {
formUUID: {
_type: Type.UUID,
_description: 'UUID of form',
},
name: {
_type: Type.String,
_description: 'Name of form',
},
},
},
},
_default: [
{
name: 'ICRC Forms',
forms: [
{
formUUID: '0cefb866-110c-4f16-af58-560932a1db1f',
name: 'Adult Triage',
},
],
},
{
name: 'Distress Scales',
forms: [
{
formUUID: '9f26aad4-244a-46ca-be49-1196df1a8c9a',
name: 'POC Sample Form 1',
},
],
},
],
},
formCategoriesToShow: {
_type: Type.Array,
_description: 'Forms to show by default on the forms app home page.',
_elements: {
_type: Type.String,
_description: 'Name of category',
},
_default: ['ICRC Forms', 'Distress Scales'],
},
groupSessionConcepts: {
sessionName: {
_type: Type.UUID,
_description: 'UUID of concept for Session Name',
_default: 'e2559620-900b-4f66-ae41-0b9c4adfb654',
},
sessionDate: {
_type: Type.UUID,
_description: 'UUID of concept for Session Date',
_default: 'ceaca505-6dff-4940-8a43-8c060a0924d7',
},
practitionerName: {
_type: Type.UUID,
_description: 'UUID of concept for Practitioner Name',
_default: 'f1a2d58c-1a0e-4148-931a-aac224649fdc',
},
sessionNotes: {
_type: Type.UUID,
_description: 'UUID of concept for Session Notes',
_default: 'fa8fedc0-c066-4da3-8dc1-2ad8621fc480',
},
cohortTypeId: {
_type: Type.UUID,
_description: 'UUID of cohort type',
_default: 'eee9970e-7ca0-4e8c-a280-c33e9d5f6a04',
},
cohortId: {
_type: Type.UUID,
_description: 'UUID of concept for cohort identifier',
_default: '5461f231-7e59-4be8-93a4-6d49fd13c00a',
},
cohortName: {
_type: Type.UUID,
_description: 'UUID of concept for cohort name',
_default: '6029f289-92a6-4a68-80f1-3078d0152449',
},
sessionUuid: {
_type: Type.UUID,
_description: 'UUID of concept for session identifier',
_default: '6a803908-8a5b-4598-adea-19358c83529a',
},
},
specificQuestions: {
_type: Type.Array,
_description: 'List of specific questions to populate forms.',
_elements: {
forms: {
_type: Type.Array,
_description: 'List of form UUIDs for which the question applies.',
_elements: {
_type: Type.UUID,
},
_default: [],
},
questionId: {
_type: Type.String,
_description: 'ID of the question.',
_default: '',
},
},
_default: [],
},
};
export type Form = {
formUUID: Type.UUID;
name: Type.String;
};
export type Category = {
name: string;
forms: Array<Form>;
};
export type Config = {
formCategories: Array<Category>;
formCategoriesToShow: Array<string>;
};