-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathallergy-and-intollerance-lens.json
288 lines (288 loc) · 13.8 KB
/
allergy-and-intollerance-lens.json
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
{
"resourceType": "Library",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lens"
]
},
"extension": [
{
"url": "http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lee-version",
"valueString": "dev"
}
],
"url": "https://gravitate-health.lst.tfo.upm.es/ips/api/fhir/Library/589",
"identifier": [
{
"system": "http://gravitate-health.lst.tfo.upm.es",
"value": "allergyintollerance-lens"
}
],
"version": "0.0.1",
"name": "Allergies and Intollerances Lens",
"_name": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "es"
},
{
"url": "content",
"valueString": "Lente de Alergias e Intolerancias"
}
]
},
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "pt"
},
{
"url": "content",
"valueString": "Lente de Alergias e Intolerâncias"
}
]
},
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "da"
},
{
"url": "content",
"valueString": "Allergi- og Intoleranselinse"
}
]
}
]
},
"date": "2024-06-12T13:15:08.842Z",
"title": "Allergies and Intollerance Lens",
"_title": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "es"
},
{
"url": "content",
"valueString": "Lente de Alergias e Intolerancias"
}
]
},
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "pt"
},
{
"url": "content",
"valueString": "Lente de Alergias e Intolerâncias"
}
]
},
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "da"
},
{
"url": "content",
"valueString": "Allergi- og Intoleranselinse"
}
]
}
]
},
"status": "draft",
"experimental": true,
"type": {
"coding": [
{
"code": "logical-library"
}
]
},
"publisher": "Gravitate Health Project - UPM Team",
"contact": [
{
"name": "Gravitate Health",
"telecom": [
{
"system": "url",
"value": "https://www.gravitatehealth.eu/"
}
]
}
],
"description": "A lens that highlight any information related to allergies or intollerances",
"_description": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "es"
},
{
"url": "content",
"valueString": "Una lente que resalta cualquier información relacionada con alergias o intolerancias."
}
]
},
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "pt"
},
{
"url": "content",
"valueString": " Uma lente que destaca qualquer informação relacionada com alergias ou intolerâncias."
}
]
},
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "da"
},
{
"url": "content",
"valueString": " En linse, der fremhæver al information relateret til allergier eller intolerancer."
}
]
}
]
},
"jurisdiction": [
{
"coding": [
{
"code": "EU",
"system": "urn:iso:std:iso:3166"
}
]
}
],
"purpose": "Clarify the important things related to allergies and intollerances on an ePI",
"_purpose": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "es"
},
{
"url": "content",
"valueString": "Aclarar los aspectos importantes relacionados con alergias e intolerancias en una ePI."
}
]
},
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "pt"
},
{
"url": "content",
"valueString": "Esclarecer os pontos importantes relacionados com alergias e intolerâncias em uma ePI."
}
]
},
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "da"
},
{
"url": "content",
"valueString": "Klargør de vigtige ting vedrørende allergier og intolerancer i en ePI."
}
]
}
]
},
"usage": "This lens requires a preprocessed ePI, and an IPS to work. You can import this lens directly to your FHIR Server which suports Library Resource type.",
"_usage": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "es"
},
{
"url": "content",
"valueString": "Esta lente requiere una ePI preprocesada y un IPS para funcionar. Puedes importar esta lente directamente en tu servidor FHIR que soporte el tipo de recurso Library."
}
]
},
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "pt"
},
{
"url": "content",
"valueString": "Esta lente requer uma ePI pré-processada e um IPS para funcionar. Podes importar esta lente diretamente para o teu servidor FHIR que suporte o tipo de recurso Library."
}
]
},
{
"url": "http://hl7.org/fhir/StructureDefinition/translation",
"extension": [
{
"url": "lang",
"valueCode": "da"
},
{
"url": "content",
"valueString": "Denne linse kræver en forbehandlet ePI og en IPS for at fungere. Du kan importere denne linse direkte til din FHIR-server, som understøtter ressource-typen Library."
}
]
}
]
},
"copyright": "© 2024 Gravitate Health",
"parameter": [
{
"use": "in",
"documentation": "parameter if it exists",
"type": "CodeableConcept"
}
],
"content": [
{
"contentType": "application/javascript",
"data": "bGV0IHB2RGF0YSA9IHB2OwpsZXQgaHRtbERhdGEgPSBodG1sOwoKbGV0IGVwaURhdGEgPSBlcGk7CmxldCBpcHNEYXRhID0gaXBzOwoKbGV0IGdldFNwZWNpZmljYXRpb24gPSAoKSA9PiB7CiAgICByZXR1cm4gIjEuMC4wIjsKfTsKCmxldCBlbmhhbmNlID0gYXN5bmMgKCkgPT4gewogICAgLy8gUHJvdmVzIHRoYXQgSVBTIGV4aXN0cwogICAgaWYgKGlwcyA9PSAiIiB8fCBpcHMgPT0gbnVsbCkgewogICAgICAgIHRocm93IG5ldyBFcnJvcigiRmFpbGVkIHRvIGxvYWQgSVBTOiB0aGUgTEVFIGlzIGdldHRpbmcgYSBlbXB0eSBJUFMiKTsKICAgIH0KCiAgICAvLyBJbnN0YW50aWF0ZXMgdGhlIGFycmF5IG9mIGNvbmRpdGlvbiBjb2RlcwogICAgbGV0IGFycmF5T2ZDb25kaXRpb25Db2RlcyA9IFtdOwoKICAgIC8vIEl0ZXJhdGVzIHRocm91Z2ggdGhlIElQUyBlbnRyeSBzZWFyY2hpbmcgZm9yIGNvbmRpdGlvbnMKICAgIGlwcy5lbnRyeS5mb3JFYWNoKChlbGVtZW50KSA9PiB7CiAgICAgICAgaWYgKGVsZW1lbnQucmVzb3VyY2UucmVzb3VyY2VUeXBlID09ICJBbGxlcmd5SW50b2xlcmFuY2UiKSB7CiAgICAgICAgICAgIGlmIChlbGVtZW50LnJlc291cmNlLmNvZGUgIT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50LnJlc291cmNlLmNvZGUuY29kaW5nLmZvckVhY2goKGNvZGluZykgPT4gewogICAgICAgICAgICAgICAgICAgIGFycmF5T2ZDb25kaXRpb25Db2Rlcy5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgY29kZTogY29kaW5nLmNvZGUsCiAgICAgICAgICAgICAgICAgICAgICAgIHN5c3RlbTogY29kaW5nLnN5c3RlbSwKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSk7CgogICAgLy8gSWYgdGhlcmUgYXJlIG5vIGNvbmRpdGlvbnMsIHJldHVybiB0aGUgZVBJIGFzIGl0IGlzCiAgICBpZiAoYXJyYXlPZkNvbmRpdGlvbkNvZGVzLmxlbmd0aCA9PSAwKSB7CiAgICAgICAgcmV0dXJuIGh0bWxEYXRhOwogICAgfQoKICAgIC8vIGVQSSB0cmFzbGF0aW9uIGZyb20gdGVybWlub2xvZ3kgY29kZXMgdG8gdGhlaXIgaHVtYW4gcmVkYWJsZSB0cmFuc2xhdGlvbnMgaW4gdGhlIHNlY3Rpb25zCiAgICBsZXQgY29tcG9zaXRpb25zID0gMDsKICAgIGxldCBjYXRlZ29yaWVzID0gW107CiAgICBlcGkuZW50cnkuZm9yRWFjaCgoZW50cnkpID0+IHsKICAgICAgICBpZiAoZW50cnkucmVzb3VyY2UucmVzb3VyY2VUeXBlID09ICJDb21wb3NpdGlvbiIpIHsKICAgICAgICAgICAgY29tcG9zaXRpb25zKys7CiAgICAgICAgICAgIC8vSXRlcmF0ZWQgdGhyb3VnaCB0aGUgQ29uZGl0aW9uIGVsZW1lbnQgc2VhcmNoaW5nIGZvciBjb25kaXRpb25zCiAgICAgICAgICAgIGVudHJ5LnJlc291cmNlLmV4dGVuc2lvbi5mb3JFYWNoKChlbGVtZW50KSA9PiB7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBwb3NpdGlvbiBvZiB0aGUgZXh0ZW5zaW9uWzFdIGlzIGNvcnJlY3QKICAgICAgICAgICAgICAgIGlmIChlbGVtZW50LmV4dGVuc2lvblsxXS51cmwgPT0gImNvbmNlcHQiKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gU2VhcmNoIHRocm91Z2ggdGhlIGRpZmZlcmVudCB0ZXJtaW5vbG9naWVzIHRoYXQgbWF5IGJlIGF2YWlibGUgdG8gY2hlY2sgaW4gdGhlIGNvbmRpdGlvbgogICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50LmV4dGVuc2lvblsxXS52YWx1ZUNvZGVhYmxlUmVmZXJlbmNlLmNvbmNlcHQgIT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnQuZXh0ZW5zaW9uWzFdLnZhbHVlQ29kZWFibGVSZWZlcmVuY2UuY29uY2VwdC5jb2RpbmcuZm9yRWFjaCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb2RpbmcpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygiRXh0ZW5zaW9uOiAiICsgZWxlbWVudC5leHRlbnNpb25bMF0udmFsdWVTdHJpbmcgKyAiOiIgKyBjb2RpbmcuY29kZSArICIgLSAiICsgY29kaW5nLnN5c3RlbSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayBpZiB0aGUgY29kZSBpcyBpbiB0aGUgbGlzdCBvZiBjYXRlZ29yaWVzIHRvIHNlYXJjaAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcXVhbHMoYXJyYXlPZkNvbmRpdGlvbkNvZGVzLCB7IGNvZGU6IGNvZGluZy5jb2RlLCBzeXN0ZW06IGNvZGluZy5zeXN0ZW0gfSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlIGNhdGVnb3J5IGlzIGFscmVhZHkgaW4gdGhlIGxpc3Qgb2YgY2F0ZWdvcmllcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlZ29yaWVzLnB1c2goZWxlbWVudC5leHRlbnNpb25bMF0udmFsdWVTdHJpbmcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgIH0pOwoKICAgIGlmIChjb21wb3NpdGlvbnMgPT0gMCkgewogICAgICAgIHRocm93IG5ldyBFcnJvcignQmFkIGVQSTogbm8gY2F0ZWdvcnkgIkNvbXBvc2l0aW9uIiBmb3VuZCcpOwogICAgfQoKICAgIGlmIChjYXRlZ29yaWVzLmxlbmd0aCA9PSAwKSB7CiAgICAgICAgcmV0dXJuIGh0bWxEYXRhOwogICAgfQogICAgCiAgICAvL0ZvY3VzIChhZGRzIGhpZ2hsaWdodCBjbGFzcykgdGhlIGh0bWwgYXBwbHlpbmcgZXZlcnkgY2F0ZWdvcnkgZm91bmQKICAgIHJldHVybiBhd2FpdCBhbm5vdGF0ZUhUTUxzZWN0aW9uKGNhdGVnb3JpZXMsICJoaWdobGlnaHQiKTsKfTsKCmxldCBhbm5vdGF0aW9uUHJvY2VzcyA9IChsaXN0T2ZDYXRlZ29yaWVzLCBlbmhhbmNlVGFnLCBkb2N1bWVudCwgcmVzcG9uc2UpID0+IHsKICAgIGxpc3RPZkNhdGVnb3JpZXMuZm9yRWFjaCgoY2hlY2spID0+IHsKICAgICAgICBpZiAocmVzcG9uc2UuaW5jbHVkZXMoY2hlY2spKSB7CiAgICAgICAgICAgIGxldCBlbGVtZW50cyA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoY2hlY2spOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGVsZW1lbnRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50c1tpXS5jbGFzc0xpc3QuYWRkKGVuaGFuY2VUYWcpOwogICAgICAgICAgICAgICAgZWxlbWVudHNbaV0uY2xhc3NMaXN0LmFkZCgiYWxsZXJneWludG9sbGVyYW5jZS1sZW5zIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJoZWFkIikubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoImhlYWQiKVswXS5yZW1vdmUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoImJvZHkiKS5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICByZXNwb25zZSA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJib2R5IilbMF0uaW5uZXJIVE1MOwogICAgICAgICAgICAgICAgY29uc29sZS5sb2coIlJlc3BvbnNlOiAiICsgcmVzcG9uc2UpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgY29uc29sZS5sb2coIlJlc3BvbnNlOiAiICsgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmlubmVySFRNTCk7CiAgICAgICAgICAgICAgICByZXNwb25zZSA9IGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5pbm5lckhUTUw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9KTsKCiAgICBpZiAocmVzcG9uc2UgPT0gbnVsbCB8fCByZXNwb25zZSA9PSAiIikgewogICAgICAgIHRocm93IG5ldyBFcnJvcigKICAgICAgICAgICAgIkFubm90YXRpb24gcHJvY2Nlc3MgZmFpbGVkOiBSZXR1cm5lZCBlbXB0eSBvciBudWxsIHJlc3BvbnNlIgogICAgICAgICk7CiAgICAgICAgLy9yZXR1cm4gaHRtbERhdGEKICAgIH0gZWxzZSB7CiAgICAgICAgY29uc29sZS5sb2coIlJlc3BvbnNlOiAiICsgcmVzcG9uc2UpOwogICAgICAgIHJldHVybiByZXNwb25zZTsKICAgIH0KfQoKbGV0IGFubm90YXRlSFRNTHNlY3Rpb24gPS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