Skip to content

Commit 51e924e

Browse files
committed
feat: more levels!
1 parent 34c4ca1 commit 51e924e

File tree

1 file changed

+163
-83
lines changed

1 file changed

+163
-83
lines changed

src/lib/levels.ts

+163-83
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export interface Level {
99
}
1010

1111
export const levels: Level[] = [
12-
// Existing levels (reordered and slightly modified for difficulty progression)
1312
{
1413
title: 'The Template Tavern',
1514
description:
@@ -43,6 +42,22 @@ export const levels: Level[] = [
4342
'Archetypes in OpenEHR are used to define reusable clinical concepts. They provide a way to model clinical information that can be shared across different systems and contexts.',
4443
hint: 'Think about the role of archetypes in standardizing clinical data.',
4544
},
45+
{
46+
title: 'The Reference Model Riddle',
47+
description:
48+
"The Reference Model Riddle challenges your understanding of OpenEHR's foundational structure!",
49+
challenge: 'What is the primary purpose of the OpenEHR Reference Model?',
50+
options: [
51+
'To store patient data directly',
52+
'To define the structure of clinical archetypes',
53+
'To provide a stable set of abstracting building blocks for clinical information',
54+
'To manage user authentication in EHR systems',
55+
],
56+
correctAnswer: 2,
57+
explanation:
58+
'The OpenEHR Reference Model provides a stable set of abstracting building blocks for clinical information. It defines the logical structure of EHRs and the general set of data types used in healthcare, forming the foundation upon which archetypes and templates are built.',
59+
hint: 'Think about the fundamental structure that supports the more specific clinical models in OpenEHR.',
60+
},
4661
{
4762
title: 'The Composition Cauldron',
4863
description:
@@ -59,6 +74,22 @@ export const levels: Level[] = [
5974
"In OpenEHR, a composition is used to represent a clinical document or event. It's the top-level structure that contains all the clinical data for a single record, such as a consultation, a test result, or a discharge summary.",
6075
hint: 'Consider what might represent a complete, standalone clinical record.',
6176
},
77+
{
78+
title: 'The Two-Level Tangle',
79+
description:
80+
"The Two-Level Tangle tests your grasp of OpenEHR's modeling approach!",
81+
challenge: 'What is meant by the "two-level modeling" approach in OpenEHR?',
82+
options: [
83+
'It refers to having separate models for inpatient and outpatient care',
84+
'It separates the technical reference model from the clinical knowledge model',
85+
'It means having two levels of user access in the EHR system',
86+
'It describes a two-step process for creating medical records',
87+
],
88+
correctAnswer: 1,
89+
explanation:
90+
'The two-level modeling approach in OpenEHR separates the technical reference model from the clinical knowledge model. This allows for a stable technical foundation while enabling flexible and evolving clinical content models.',
91+
hint: 'Consider how OpenEHR separates different aspects of its modeling to achieve both stability and flexibility.',
92+
},
6293
{
6394
title: 'The Composition Composer',
6495
description:
@@ -122,6 +153,22 @@ export const levels: Level[] = [
122153
'In OpenEHR archetypes, quantity data types can be constrained in multiple ways. You can set a specific value, define a range of allowed values, or specify a list of allowed units. Often, a combination of these constraints is used to precisely define the acceptable values for a quantity.',
123154
hint: 'Consider the various ways you might want to limit or specify how a quantity can be recorded in a clinical context.',
124155
},
156+
{
157+
title: 'The Flat Format Fable',
158+
description:
159+
'The Flat Format Fable challenges you to understand different data representations in OpenEHR!',
160+
challenge: 'What is the purpose of the "flat" format in OpenEHR?',
161+
options: [
162+
'To compress data for more efficient storage',
163+
'To simplify data entry forms for clinicians',
164+
'To provide a simplified format for API calls and data exchange',
165+
'To flatten the organizational hierarchy in healthcare institutions',
166+
],
167+
correctAnswer: 2,
168+
explanation:
169+
'The flat format in OpenEHR is used to provide a simplified format for API calls and data exchange. It presents complex hierarchical data in a flattened structure, making it easier to work with in many programming contexts and simplifying data interchange.',
170+
hint: 'Think about how complex hierarchical data might be simplified for easier handling in certain contexts.',
171+
},
125172
{
126173
title: 'The Binding Bard',
127174
description:
@@ -174,85 +221,22 @@ export const levels: Level[] = [
174221
hint: 'Think about a storage method that would allow for flexible querying while maintaining the structure defined by archetypes.',
175222
},
176223
{
177-
title: 'The Composition Conjurer',
178-
description:
179-
"You've made it to the Composition Conjurer's lair! Your task is to craft a composition that will impress the Conjurer.",
180-
challenge:
181-
"Create a composition for a patient's body temperature. The archetype ID is 'openEHR-EHR-OBSERVATION.body_temperature.v2'. The temperature is 37.5°C.",
182-
options: [
183-
`{
184-
"composition": {
185-
"content": [
186-
{
187-
"observation": {
188-
"archetype_id": "openEHR-EHR-OBSERVATION.body_temperature.v2",
189-
"data": {
190-
"events": [
191-
{
192-
"data": {
193-
"items": [
194-
{
195-
"value": {
196-
"magnitude": 37.5,
197-
"units": "°C"
198-
}
199-
}
200-
]
201-
}
202-
}
203-
]
204-
}
205-
}
206-
}
207-
]
208-
}
209-
}`,
210-
`{
211-
"patient": {
212-
"vitals": {
213-
"temperature": 37.5,
214-
"unit": "celsius"
215-
}
216-
}
217-
}`,
218-
`{
219-
"openEHR": {
220-
"body_temperature": {
221-
"value": 37.5,
222-
"unit": "C"
223-
}
224-
}
225-
}`,
226-
`{
227-
"composition": {
228-
"archetype": "openEHR-EHR-OBSERVATION.body_temperature.v2",
229-
"temperature": "37.5°C"
230-
}
231-
}`,
232-
],
233-
correctAnswer: 0,
234-
explanation:
235-
'The correct composition follows the OpenEHR structure, including the proper archetype ID, and nests the temperature value within the expected data structure.',
236-
hint: 'Consider the hierarchical structure of OpenEHR compositions and how data is typically represented.',
237-
},
238-
{
239-
title: 'The AQL Alchemist',
224+
title: 'The Querying Quest',
240225
description:
241-
'Enter the laboratory of the AQL Alchemist, where queries are brewed to extract the essence of clinical data!',
226+
'The Querying Quest tests your knowledge of data retrieval in OpenEHR systems!',
242227
challenge:
243-
"Which AQL query will retrieve all blood pressure measurements for a specific patient with EHR ID 'abc123'?",
228+
'Which query language is specifically designed for use with OpenEHR systems?',
244229
options: [
245-
"SELECT o/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude AS systolic, o/data[at0001]/events[at0006]/data[at0003]/items[at0005]/value/magnitude AS diastolic FROM EHR e CONTAINS COMPOSITION c CONTAINS OBSERVATION o[openEHR-EHR-OBSERVATION.blood_pressure.v1] WHERE e/ehr_id/value='abc123'",
246-
"SELECT * FROM EHR WHERE patient_id = 'abc123' AND observation_type = 'blood_pressure'",
247-
"GET blood_pressure FROM patient WHERE id = 'abc123'",
248-
"FIND 'blood pressure' IN EHR 'abc123'",
230+
'SQL (Structured Query Language)',
231+
'AQL (Archetype Query Language)',
232+
'SPARQL (SPARQL Protocol and RDF Query Language)',
233+
'XQuery (XML Query Language)',
249234
],
250-
correctAnswer: 0,
235+
correctAnswer: 1,
251236
explanation:
252-
'This AQL query correctly navigates the openEHR structure to retrieve systolic and diastolic blood pressure values from the specific archetype, filtering for the given EHR ID.',
253-
hint: 'AQL uses a structure similar to SQL, but with paths that navigate the openEHR data model.',
237+
'Archetype Query Language (AQL) is specifically designed for use with OpenEHR systems. It allows for querying of clinical data based on the archetype model, enabling powerful and flexible data retrieval across OpenEHR-based systems.',
238+
hint: 'Consider which query language would be tailored to the unique structure of OpenEHR data.',
254239
},
255-
// New levels (added for increased difficulty and broader coverage)
256240
{
257241
title: 'The Template Transformer',
258242
description:
@@ -321,21 +305,83 @@ export const levels: Level[] = [
321305
hint: 'Consider how separating different aspects of the model might allow for flexibility and shared understanding.',
322306
},
323307
{
324-
title: 'The Query Quandary',
308+
title: 'The Composition Conjurer',
325309
description:
326-
'The Query Quandary tests your ability to construct complex AQL queries for real-world scenarios!',
310+
"You've made it to the Composition Conjurer's lair! Your task is to craft a composition that will impress the Conjurer.",
327311
challenge:
328-
'Which AQL query would correctly retrieve the latest blood pressure readings for all patients diagnosed with hypertension in the last year?',
312+
"Create a composition for a patient's body temperature. The archetype ID is 'openEHR-EHR-OBSERVATION.body_temperature.v2'. The temperature is 37.5°C.",
329313
options: [
330-
'SELECT e/ehr_id/value, o/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude AS systolic, o/data[at0001]/events[at0006]/data[at0003]/items[at0005]/value/magnitude AS diastolic FROM EHR e CONTAINS COMPOSITION c CONTAINS OBSERVATION o[openEHR-EHR-OBSERVATION.blood_pressure.v1] WHERE c/context/start_time > current_date - P1Y ORDER BY c/context/start_time DESC',
331-
"SELECT * FROM EHR WHERE diagnosis = 'hypertension' AND diagnosis_date > current_date - 365 ORDER BY observation_date DESC LIMIT 1",
332-
"GET latest_blood_pressure FROM patients WHERE diagnosis = 'hypertension' AND diagnosis_date > now() - interval '1 year'",
333-
"FIND blood_pressure IN EHR WHERE condition = 'hypertension' AND condition.date > 1 year ago ORDER BY date DESC",
314+
`{
315+
"composition": {
316+
"content": [
317+
{
318+
"observation": {
319+
"archetype_id": "openEHR-EHR-OBSERVATION.body_temperature.v2",
320+
"data": {
321+
"events": [
322+
{
323+
"data": {
324+
"items": [
325+
{
326+
"value": {
327+
"magnitude": 37.5,
328+
"units": "°C"
329+
}
330+
}
331+
]
332+
}
333+
}
334+
]
335+
}
336+
}
337+
}
338+
]
339+
}
340+
}`,
341+
`{
342+
"patient": {
343+
"vitals": {
344+
"temperature": 37.5,
345+
"unit": "celsius"
346+
}
347+
}
348+
}`,
349+
`{
350+
"openEHR": {
351+
"body_temperature": {
352+
"value": 37.5,
353+
"unit": "C"
354+
}
355+
}
356+
}`,
357+
`{
358+
"composition": {
359+
"archetype": "openEHR-EHR-OBSERVATION.body_temperature.v2",
360+
"temperature": "37.5°C"
361+
}
362+
}`,
334363
],
335364
correctAnswer: 0,
336365
explanation:
337-
'This AQL query correctly navigates the openEHR structure to retrieve the latest blood pressure readings. It uses the proper archetype paths, filters for compositions created within the last year, and orders the results to get the latest readings.',
338-
hint: 'Remember that AQL queries need to navigate the openEHR structure and use archetype paths. Also consider how to filter for the time range and order the results.',
366+
'The correct composition follows the OpenEHR structure, including the proper archetype ID, and nests the temperature value within the expected data structure.',
367+
hint: 'Consider the hierarchical structure of OpenEHR compositions and how data is typically represented.',
368+
},
369+
{
370+
title: 'The AQL Alchemist',
371+
description:
372+
'Enter the laboratory of the AQL Alchemist, where queries are brewed to extract the essence of clinical data!',
373+
challenge:
374+
"Which AQL query will retrieve all blood pressure measurements for a specific patient with EHR ID 'abc123'?",
375+
options: [
376+
"SELECT o/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude AS systolic, o/data[at0001]/events[at0006]/data[at0003]/items[at0005]/value/magnitude AS diastolic FROM EHR e CONTAINS COMPOSITION c CONTAINS OBSERVATION o[openEHR-EHR-OBSERVATION.blood_pressure.v1] WHERE e/ehr_id/value='abc123'",
377+
"SELECT * FROM EHR WHERE patient_id = 'abc123' AND observation_type = 'blood_pressure'",
378+
"GET blood_pressure FROM patient WHERE id = 'abc123'",
379+
"FIND 'blood pressure' IN EHR 'abc123'",
380+
],
381+
correctAnswer: 0,
382+
explanation:
383+
'This AQL query correctly navigates the openEHR structure to retrieve systolic and diastolic blood pressure values from the specific archetype, filtering for the given EHR ID.',
384+
hint: 'AQL uses a structure similar to SQL, but with paths that navigate the openEHR data model.',
339385
},
340386
{
341387
title: 'The Template Tactician',
@@ -405,6 +451,23 @@ export const levels: Level[] = [
405451
"The best approach is to use OpenEHR's terminology binding features to map both systems to a common standard terminology. This preserves the local terminologies while ensuring semantic interoperability through a shared standard. It leverages OpenEHR's design for handling diverse terminologies.",
406452
hint: 'Consider how OpenEHR is designed to handle terminology differences while maintaining semantic meaning across systems.',
407453
},
454+
{
455+
title: 'The Standardization Sage',
456+
description:
457+
"The Standardization Sage challenges your understanding of OpenEHR's role in health data standardization!",
458+
challenge:
459+
'How does OpenEHR contribute to the standardization of health data?',
460+
options: [
461+
'By enforcing a single, universal data format for all health records',
462+
'Through its two-level modeling approach and shared archetype definitions',
463+
'By requiring all healthcare providers to use the same software',
464+
'Through government-mandated data structures',
465+
],
466+
correctAnswer: 1,
467+
explanation:
468+
'OpenEHR contributes to health data standardization through its two-level modeling approach and shared archetype definitions. This allows for a common understanding of clinical concepts while maintaining flexibility for local needs, promoting semantic interoperability across different healthcare systems.',
469+
hint: 'Think about how OpenEHR balances standardization with flexibility in its approach to modeling clinical data.',
470+
},
408471
{
409472
title: 'The Governance Guru',
410473
description:
@@ -422,4 +485,21 @@ export const levels: Level[] = [
422485
"The best approach is to use OpenEHR's archetype and template mechanism to create a core dataset, with country-specific extensions to meet local requirements. This allows for a standardized base of data collection while providing the flexibility to adhere to varying local data protection laws. It leverages OpenEHR's design for balancing standardization with localization.",
423486
hint: "Think about how OpenEHR's architecture can allow for both standardization and customization to meet diverse requirements.",
424487
},
488+
{
489+
title: 'The Query Quandary',
490+
description:
491+
'The Query Quandary tests your ability to construct complex AQL queries for real-world scenarios!',
492+
challenge:
493+
'Which AQL query would correctly retrieve the latest blood pressure readings for all patients diagnosed with hypertension in the last year?',
494+
options: [
495+
'SELECT e/ehr_id/value, o/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude AS systolic, o/data[at0001]/events[at0006]/data[at0003]/items[at0005]/value/magnitude AS diastolic FROM EHR e CONTAINS COMPOSITION c CONTAINS OBSERVATION o[openEHR-EHR-OBSERVATION.blood_pressure.v1] WHERE c/context/start_time > current_date - P1Y ORDER BY c/context/start_time DESC',
496+
"SELECT * FROM EHR WHERE diagnosis = 'hypertension' AND diagnosis_date > current_date - 365 ORDER BY observation_date DESC LIMIT 1",
497+
"GET latest_blood_pressure FROM patients WHERE diagnosis = 'hypertension' AND diagnosis_date > now() - interval '1 year'",
498+
"FIND blood_pressure IN EHR WHERE condition = 'hypertension' AND condition.date > 1 year ago ORDER BY date DESC",
499+
],
500+
correctAnswer: 0,
501+
explanation:
502+
'This AQL query correctly navigates the openEHR structure to retrieve the latest blood pressure readings. It uses the proper archetype paths, filters for compositions created within the last year, and orders the results to get the latest readings.',
503+
hint: 'Remember that AQL queries need to navigate the openEHR structure and use archetype paths. Also consider how to filter for the time range and order the results.',
504+
},
425505
];

0 commit comments

Comments
 (0)