Adding a queryable enum type to a Task
# support
t
Hi, we're adding Tasks to our EHR and had a couple of questions around these requirements and if our assumptions are correct. Requirements: 1. Show the task
code
in the front-end as the task title 2. Query a set of tasks by an enum (such as
TASK_A
or
TASK_B
) to report upon task completion rates, tasks in-progress, etc. I'm assuming we can achieve this by adding an additional
Identifier
to the Task with `use=secondary`and
value=TASK_A
. This would allow us to use the
code
as the UI display text and a secondary identifier as a queryable enum, right?
Normally, I think we would query by the
code
but keeping that editable to change the view would be nice -- assuming we can add a queryable type to tasks.
I'm now thinking `code`can be used for the enum and `reasonCode`can be used for the UI text.
r
Hi @taylorqj I think i don't quite understand the use case of the enum. Would they be an alternate name for the task type, or more like a status for the task?
t
We're looking for a way to query a group of tasks by an identifier -- if this was outside of FHIR we would probably add a
type
with a value of
SOME_TASK_TYPE
. We'd like to keep the "name" of the task ephemeral if possible.
I believe using the
code
as the bucket for
SOME_TASK_TYPE
and
reasonCode
for the ephemeral value would work fine, I didn't see
reasonCode
until after I asked. What do you think?
r
I'd actually probably recommend using
code
for the
SOME_TASK_TYPE
, and then use
description
for the editable text.
The
reasonCode
will have value later when you start tying tasks to specific Clinical
Conditions
or
Observations
t
Awesome, we'll update our tasks to use description for the editable text! Thank you for the help @rahul1
158 Views