openmrs-esm-patient-chart

@openmrs/esm-form-entry-app

esm-form-entry-app is an O3 patient chart widget that loads clinical forms defined using the O3 form schema, renders and processes them with the Angular Form Engine (@openmrs/ngx-formentry), and submits the resulting data to OpenMRS.

Status and availability

The O3 Reference Application ships the React Form Engine (@openmrs/esm-form-engine-lib) by default through @openmrs/esm-form-engine-app.

This Angular-based form entry app is retained for implementations that still depend on the Angular Form Engine and have not yet migrated to the React Form Engine. It is not included in the default Reference Application SPA assembly.

Implementations using this app must include @openmrs/esm-form-entry-app in their SPA assembly configuration. The Angular and React integrations both register a form renderer in form-widget-slot and should not be enabled together.

In a Reference Application-based distribution, use the Angular integration by replacing the React integration in spa-assemble-config.json:

- "@openmrs/esm-form-engine-app": "next",
+ "@openmrs/esm-form-entry-app": "next",

Use a version or release tag compatible with the rest of the implementation’s O3 frontend dependencies.

To migrate to the React Form Engine, replace @openmrs/esm-form-entry-app with @openmrs/esm-form-engine-app. See the React Form Engine migration guidance.

Responsibilities

The widget:

The fields displayed and payloads produced depend on the form definition.

How it fits into O3

This package is the O3 integration layer for the Angular Form Engine. It connects the engine to the patient chart, OpenMRS REST APIs, patient and visit context, workspace lifecycle, configuration, and localization.

It registers the form-widget extension in form-widget-slot. The surrounding patient form workspace supplies the patient, form UUID, visit, and optional encounter context.

This widget handles forms that conform to the O3 form schema. Legacy HTML Form Entry forms are handled separately by the patient forms application.

Form definitions

O3 form definitions are JSON documents that conform to the O3 form schema.

This package renders and processes those definitions. It does not provide form authoring functionality. Forms can be authored using the O3 Form Builder.

Backend requirements

The widget requires:

Development

From this package directory, start the development server with:

yarn start

Other useful commands:

yarn build
yarn test
yarn lint

Angular version policy

This app is the Angular part of an otherwise React codebase. It moves together with openmrs-ngx-formentry and openmrs-ngx-file-uploader. All three must use the same Angular major version, and that version must remain supported by Angular through the next Reference Application release.

Before proposing or reviewing an Angular major version bump, read the Angular version support policy. It explains when to migrate, how to select the target version, and which toolchain packages must be ready first.