Question about setting initial values of forms using the form engine

I am currently using the form builder app to make a custom form to use in the patient chart. I was wondering if there is a way to set the initial form values to custom values in a simple way – essentially I want to pre-fill some form values based on known information. I noticed that the FormEngine component uses initialValues as react state inputed into the Formik component, but I couldn’t find an easy way to set these values without modifying the form engine module directly. I was hoping someone may know of a way for me to set these values when FormEngine component is used in the patient chart or if the only way to do this is to either modify the form engine or make the form without the form engine. Thank you!

3 Likes

Just confirming that you are asking to populate the form with patient-specific information rather than a “default” value…

Yes patient-specific information. For example there is a consultation form that I created to be filled out at the end of a visit. However, if the provider already added a new “allergy” via the allergy app, I’d like to pre-fill the “allergy” field of the consultation form. My team has figured out how to retrieve the observations from a given visit, we are just looking for a simple way to populate the custom form given this data using the form engine.

1 Like