Replies: 4 comments 1 reply
-
Explicit data type + no widget type. In this case widget type is deduced from data type VitalsDocument
{:fields [{:name "super"
:type "string"}]} Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Data and widget types can be inferred from context for complex values
VitalsForm
{:fields [{:title "choice"
:options [{:display "HHH" :code "yes"}]}]}
VitalsForm
{:fields [{:title "weight"
:unit "kg"}]}
VitalsForm
{:fields [{:title "weight"
:min 100
:max 200}]} Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Explicit widget type + no data type. In this case data type is deduced from widget type VitalsForm
{:fields [{:label "reason"
:type "dropdown"
:options []}
{:name "large-text"
:type "text"}
{:label "large text"
:type "textarea"}
{:name "number"
:type "number"}
{:name "answer"
:type "checkbox"}
{:name "range"
:type "range"
:step 1}
{:type "radiobutton"
:options ["apple" "banana"]}
]} Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Explicit data type + widget type (optional) VitalsForm
{:fields [{:label "reason"
:type "boolean"}
{:name "boolean 2"
:type "boolean"
:widget "switch"}]} Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe (write it douwn):
Form DSL describes in one place both the form controls, the data to be stored, and some validation rules.
There is a relationship between data type and the type of controls to input and render this data:
Default control may be used to handle specific data types. For example, datepicker for dates.
Sometimes, both types could be deduced from other elements: CodeableConcept & concept from enum or valueset.
Sometimes, there are multiple controls for the same data type - basic input, textarea for the string elements.
There are items without visual, and there are items just for visual. That's probably why FHIR SDC calls it an item.
What are examples?
Questions:
Use cases
Diagnose: How to define a data type, control type and other elements relationships?
Approaches:
Aspects:
Decision matrix
Design:
Name for control is control or input?
Beta Was this translation helpful? Give feedback.
All reactions