Replies: 3 comments
-
Rules Constructor (FHIR way)Single rule is a map of {:display-when [{:question :gender
:operator :=
:value {:code "female"
:display "Female"}}]} To refer on multiple fields in logic we need to state several rules. {:display-when [{:question :contact
:operator :=
:value true}
{:question :contact-type
:operator :=
:value "email"}]
:display-when-behaviour :all} This approach is easy to understand to every user, also this kind of rules can be easily created via UI builder But, we can't describe complex rules (cond1 and cond2 or cond3 and cond4) |
Beta Was this translation helpful? Give feedback.
-
FHIR PathRule is fhirpath expression: http://hl7.org/fhirpath/ items.where(id = 'gender').first().value.code = 'female' OR gender.value.code = 'female' We can easily write a rule that relies on multiple fields contact.value = true and contact-type.value.code = 'email' Also, we can write complex rules: contact.value = true and contact-type.value.code = 'phone'
or
contact.value = true and contact-type.value.code = 'fax' |
Beta Was this translation helpful? Give feedback.
-
Aidbox Zen LispThis is current solution in Aidbox SDC Docs link ➕ We control it and can extend it as we want. (= (get-in [:gender :value]) "female") (and
(= (get-in [:contact :value]) true)
(= (get-in [:contact-type :value :code] "email"))) (or
(and (= (get-in [:contact :value]) true)
(= (get-in [:contact-type :value :code]) "phone"))
(and (= (get-in [:contact :value]) true)
(= (get-in [:contact-type :value :code]) "fax"))) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Form is a list of questions grouped together around specific problem.
Form is used to capture data from respondents (patients,practitioners, etc...)
In some forms we want to have a logic that hides or shows particular fields in some cases.
Use cases
Questions
Approaches
To compare these 3 approaches we will describe the same rules:
3 votes ·
Beta Was this translation helpful? Give feedback.
All reactions