Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

The React Form Engine provides powerful features that allow users to build forms of arbitrary complexity. These include:

  • Ability to reference existing schemas

  • Ability to validate fields using JavaScript expressions

  • Ability to render fields conditionally

  • Ability to perform calculations in fields using calculateExpressions

  • Ability to reuse data submitted in previous encounters using historicalExpressions

  • Ability to request lab orders via forms

  • Ability to define expression helpers for use in calculations and conditional logic

  • Ability to load locale-specific form labels from the backend

  • Ability to inject data from external data sources

  • Ability to provide contextual information or guidance when hovering over or interacting with interface elements.

  • Ability to grey out all options if a particular option is selected.

  • Ability to render default answer sets, if a question concept lacks a provided list of answers and is categorized as "question" type.

  • Ability to create an identifier of a given type for the patient upon encounter submission if a question in the form schema is of type patientIdentifier.

Work is ongoing to achieve feature parity with the Angular form engine, and most existing functionality already works out of the box.

Supported rendering types

  • text

  • select

  • date

  • number

  • checkbox

  • radio

  • encounter-location (??)

  • textarea

  • group

  • repeating

  • drug

  • file

  • problem

  • ui-select-extended

  • content-switcher (??)

  • toggle (??)

  • field-set

Learn more about what each rendering type does in the field types reference.

Supported expression helpers

The React Form Engine defines various expression helpers that can be leveraged to perform arbitrary calculations and support conditional logic. Read more about expression helpers in the expression helpers reference. The expression helpers currently supported include the following:

  • isEmpty

  • today

  • includes

  • isDateBefore

  • useFieldValue

  • calcBMI

  • calcEDD

  • calcBSA

  • calcHeightForAgeZscore

  • calcBMIForAgeZscore

  • calcWeightForHeightZscore

  • arrayContains

  • arrayContainsAny

  • calcMonthsOnART

  • calcAgeBasedOnDate

  • formatDate

  • calcGravida

  • calcTimeDifference

  • No labels