Available here in Notion: https://www.notion.so/ucsf-ighs/Angular-vs-REACT-form-engine-f970880f466c46fc86e91c612918ec32
Table below is results from our Gap Analysis where we ran the most common + complex Ampath form against the React Form Engine:
DONE What already exists | NOW MVP: Requirements for Baseline Parity | NEXT Later |
---|
- Validation: Date validators, required field
- Mark as “Unspecified”
- Extensible DatePicker (usage example: Ethiopian calendar)
- Display Text blocks to the user
- Hover to see concept name, explanation of business rule
- Markdown in forms at any level
- Intent (use same json, present info in differently, where logic changes depending on your intent; eg for RDE vs POC, full form vs embedded form)
| - Formik switch (Samuel)
- Helper Functions - required so we can continue to run the same forms - several already supported by React Form Eng
- formatDate
- calcBMI (check they’re calculated the same way between the 2 so old ones don’t get a different BMI)
- calcBSA
- calcBMIforAgeZscore
- calcWeightforHeightZscore
- calcHeightforAgeZscore
- isEmpty
- arrayContains
- arrayContainsAny
- extractRepeatingGroupValues
- Validations: HideWhen, showWhen
- I18n: localisable: Need way of translating every field on form - every label, text, concept, Question, Answer, Section Header, Page Header, Title → Load version in the right locale or provide a sensible default. (e.g. must-have for ICRC, Mekom, PIH)
- Support rendering type “Drug” - https://ampath-forms.vercel.app/docs/field-types-reference#drug
- Custom data sources (eg Expressions; way of adding arbitrary data into the form) - already getting in this week :)
- Reference Mappings instead of Concept UIDs - MVP because we want to get rid of UUIDs wherever we can (PIH would likely not use until this is possible)
- Embedding forms in other forms - a few differences: Angular, you define special mini-forms that are embeddable. Check that switching from and Ang Eng form to an OHRI form doesn’t cause issue.
- Selectable Orders
- Unit Test Coverage - 60% goal
- Schema Documentation - https://ohri.atlassian.net/wiki/spaces/HOME/pages/120684546/OHRI+Forms
| V1 - Custom expression helpers (eg complex calculations like WHO CVD risk score) - can then move ones that are logic driven out of the engine itself
V2 - Offline: compatible - user can pre-load form offline, and have it displayed offline. Assuming form schema is the same, the setup we have for offline mode should just work. (Need to confirm success loading drop-downs that are populated by a concept set.)
- Add custom components (eg complex custom displays)
|