Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Fork and clone the React Form Engine repository.

  • cd into your clone.

  • pwd to get the path of the React Form Engine , which you will use later. You should see something like

    Code Block
    languagetext
      /Users/johndoe/code/openmrs-form-engine-lib
  • The engine is a library and not an O3 MF module. It can be consumed by bundling it within an ESM or custom frontend app that incorporates it within a UI workflow.

  • You can make changes to the library and test them on forms in the O3 patient chart.

  • Open your local openmrs-esm-patient-chart clone. Install dependencies using:

    Code Block
    languagesh
    yarn
  • We'll then link the openmrs-form-engine-lib from the previous step inside of packages/esm-form-engine-app. To do so, run:

    Code Block
    languagesh
    cd packages/esm-form-engine-app
    yarn link ...
     
    # where ... is the path to your `openmrs-form-engine-lib` directory from the previous step. It could look like: /Users/johndoe/code/openmrs-form-engine-lib.

...

(info) If you're using Windows, you might need to wrap your path in double quotes.

It is very important that this step works correctly to establish the link between the formengine library and the frontend.

Open the package.json file in the esm-patient-chart-app and confirm that in the resolutions section, you have something like

Code Block
languagetext
"resolutions": {
  "@openmrs/openmrs-form-engine-lib": "portal:/Users/johndoe/code/openmrs-form-engine-lib"
}

...