Skip to content

v5.0.0

Compare
Choose a tag to compare
@denniskigen denniskigen released this 18 Jul 21:36
· 511 commits to main since this release
5f917b7

Patient Chart v5.0.0 is a major release that introduces a BREAKING change. It migrates all the frontend modules in this monorepo to leverage the new module loading mechanism introduced in Core v5. Additionally, this release includes performance improvements plus a host of new features and bug fixes.

Highlights

Performance improvements

We have migrated all the frontend modules in Patient Chart to leverage the new module loading mechanism introduced in Core v5. Frontend modules now declare their static and dynamic metadata upfront, and the framework uses this information to load only the static bits when the application gets loaded for the first time while loading the dynamic bits is deferred to later when they are needed. This change delivers significant improvements to initial load time. Check out the migration guide to get a closer look at the internals of the new module loading mechanism.

Translation support for the left nav menu

v5.0.0 adds support for internationalising dashboard titles in the left nav. Each dashboard can specify a title string property that represents the dashboard's name. This title then gets passed to the DashboardExtension component which invokes the t function from the useTranslation hook, passing in the title. To round things off, the frontend module's moduleName gets passed as the namespace argument of useTranslation, letting it know where to look for the corresponding translations. This mechanism makes it easy to translate your dashboard names.

Migrating React forms to use RHF and Zod for schema validation

v5.0.0 ushers in React Hook Forms (RHF) for handling forms. RHF is a performant forms solution that reduces the boilerplate code you need to write when constructing forms. RHF is also performant and supports a host of schema validation solutions. Zod is a schema validation library that integrates well with RHF and TypeScript. RHF's simple API and Zod’s declarative schema approach make your code easier to read and maintain. RHF and Zod present a robust approach to handling forms in React. v5.0.0 ports the Conditions and Visit notes forms to use RHF and Zod, with more custom React forms in the pipeline. Ultimately, we plan to migrate away from Formik and Yup to RHF and Zod.

Initial support for patient flags and improved RDE capabilities

This release establishes the groundwork for patient flags and improved RDE capabilities. Patient flags are visual components that enable healthcare providers to see relevant patient information with a glance in the Patient chart. v5.0.0 also adds improved retrospective data entry capabilities to the Patient Chart. Both patient flags and RDE improvements are a work in progress, and we will be adding more features to them in subsequent releases.

Breaking changes

  • (BREAKING) Migrate esm-patient-chart-app to use routes.json by @denniskigen in #1231

Features

  • (feat) Add translations for the left menu in patient chart by @jwnasambu in #1183
  • (feat) Include location provider by @icrc-agomes in #1187
  • (feat) Add ability to pass formEntrySub and patient workspace to exte… by @CynthiaKamau in #1219
  • (feat) Add ability to enroll and discontinue patient from a program for simple use case by @donaldkibet in #1199
  • (feat) Show add buttons on widgets by default by @denniskigen in #1236
  • (feat) Update start visit and visit notes forms to the new tablet design by @Jexsie in #1245
  • (feat) O3-2177: Tweak the patient banner details section to match designs by @Jexsie in #1197
  • (feat) Automatically update translation files for all locales when keys and strings change by @vasharma05 in #1228
  • (feat) KHP3-3708 Add ability to populate form with already existing patient identifiers. by @donaldkibet in #1252
  • (feat) Migrating conditions form to use RHF and Zod by @lumuchris256 in #1248
  • (feat) Migrating Visit notes form to use RHF and Zod by @lumuchris256 in #1253
  • (feat) Add support for patient flags on the patient chart and flags side panel by @jnsereko in #1178
  • (feat) KHP3-3791: Add ability to create an identifier once a form is submitted by @donaldkibet in #1259
  • (feat) O3-2239: Add an extension slot to the visit component by @AlexanderMizgirev in #1260
  • (feat) KHP3-3811 Add validation logic to check if an identifier has already been assigned by @donaldkibet in #1262
  • (feat) Dashboard Extension uses the moduleName as the namespace for translation by @vasharma05 in #1227
  • (feat) KH-241: Add Khmer translations for patient chart by @kdaud in #1263
  • (feat) O3-2258: Put RDE behind a feature flag by @brandones in #1282

Refactors

  • (refactor) Extract patient flags into a frontend module by @denniskigen in #1275
  • (refactor): Remove startVisitLabel and endVisitLabel translation configurations by @donaldkibet in #1266

Bug fixes

Housekeeping

New Contributors

Full Changelog: v4.6.0...v5.0.0