For extendability Ampath forms need to provide ability to use custom components. There will be 2 types of supported components.
- informational components
- custom controls.
The custom components will be standard web components implementing standard behaviors so the engine can communicate with them.
For informational components The engine will pass down the raw json schema to allow implementers to pass down configuration via the json schema. The engine will not make assumptions about the configuration that is need by an informational components and the developers of the informational components will be at liberty to determine that. It will however be important that this components adhere to the OpenMRS ui style guide.
Custom controls are functional extensions to the engine meaning the engine expects them to behave similar to the existing controls in terms of the inputs the take and the outputs. The custom controls should also conform to the defined rendering type so the engine's value adapters will be able to populate and extract values from the controls.
multiple value controls
These controls receive and output values as objects
single value control
These receive and output values as concept strings
See https://github.com/AMPATH/ngx-openmrs-formentry/blob/master/projects/ngx-formentry/src/form-entry/value-adapters/obs.adapter.ts for the supported control types.