As work on the O3 Form Builder and its schema progress, is there any chance we could start to loosen the tight coupling between forms and encounters?
It would be great to be able to use O3 Forms in other contexts. For example:
- Order entry forms (eventually we’ll want to allow orderables to define additional orderable-specific details to be gathered when ordering)
- Managing attributes (implementation-specific details on resources)
- Custom fields in registration
The idea would be to move any patient- or encounter-specific references under a “model” property, so they could be provided by an EncounterFormModel. Calls like
form.getEncounter() would become
Does this direction make sense? I’m happy to elaborate, but thought I’d get the general idea out here and see what others thought of this direction.
Part of the reason for this suggestion is my having witnessed Paul & my mentor, Dr. Clem McDonald, building one of the first order entry systems in the 1980s from a generic forms engine that we used for nearly every aspect of the application. The forms engine focused on translating a form definition into data collection, but abstracted the data model and pre- & post-form processing so it could be plugged into many contexts, which turned out to be extremely powerful.
/cc @dennis @mogoodrich @grace