Open alarthast opened 3 hours ago
Progress is at aw/sandbox-quiz
quiz
module in #2212, so any updates there ought to be pulled into here. Question
class and a questions
dictionary of question numbers as keys and Question
objects as values. This might not be the most optimal way of storing things.Question
objects have a starting_point
property for the syntax we would like the user to start with. Question
class was created with marimo notebooks in mind - marimo cells auto-update, which means that it is much cleaner to have each question correspond to a unique answer variable, rather than updating a generic dataset
or frame
variable as the user progresses through the quiz. If we do not use marimo notebooks, dictating the answer variable name is less relevant. Implementation in marimo:
See the parent issue for context. Builds on #2212.
There are two essential components to store, a
str
for the question and an ehrQL dataset / frame / series that serves at the model answer.It might be helpful to store an additional component, which is some starting point syntax. (e.g. If we ask for the
clinical_events
table to be filtered, an importedclinical_events
table should serve as a starting point).