v5.0.0
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
- (fix) O3-2152: Rtl support, fix styles by @AlexanderMizgirev in #1200
- (fix) O3-2152: Cleaning RTL styles by @AlexanderMizgirev in #1201
- (fix) O3-2150: Translate attachments empty state by @AlexanderMizgirev in #1202
- (fix) O3-2152: Fix patient-banner actions dropdown by @AlexanderMizgirev in #1204
- (fix) Dashboard path should be derived from path not title by @ibacher in #1203
- (fix) O3-2150: Adds missing translation strings to modules by @AlexanderMizgirev in #1206
- (fix) O3-2150: Adds missing translation 'record' strings to modules by @AlexanderMizgirev in #1207
- (fix) Allow modifying the visit date to accommodate the new encounter date on all encounters tab by @icrc-psousa in #1184
- (fix) O3-2181: Vitals & Biometrics forms fails if value is set to "" by @Jexsie in #1209
- (fix) Encounter editing and deleting should be handled through permissions by @Jexsie in #1190
- (fix) O3-2160: Delete this encounter button on visits does not update the table by @vasharma05 in #1211
- (fix) O3-2152: Fix patient-banner margins, new translation strings by @AlexanderMizgirev in #1217
- (fix) Remove deprecated
extensionSlotName
prop by @denniskigen in #1214 - (fix) O3-2176: Actions overflow items should have 3rem height on tablet by @Jexsie in #1212
- (fix) Adapt e2e tests to match naming conventions by @denniskigen in #1220
- (fix) O3-2150: Adds missing translation strings for side menu by @AlexanderMizgirev in #1223
- (fix) Overflow menu items in the visits table should close onClick by @Jexsie in #1224
- (fix) O3-2150: Adds 'Overdue' tag translation by @AlexanderMizgirev in #1226
- (fix) Remove side scrolling in allergies, visit note and start visit forms by @Jexsie in #1222
- (fix) Exports should reference the result of getSync / getAsync by @ibacher in #1233
- (fix) More fixes for routes by @denniskigen in #1235
- (fix) Exports should reference the result of getSync / getAsync by @denniskigen in #1239
- (fix) Fix the named export for the
FormsDetailedOverview
component by @denniskigen in #1240 - (fix) Add
slots
array for theresultsViewer
extension by @denniskigen in #1241 - (fix) Ensure routes.json is part of dist for esm-form-entry-app by @ibacher in #1242
- (fix) Fix program enrollment form extension by @denniskigen in #1244
- (fix) O3-2231: fix typos in openmrs-esm-patient-chart module by @AlexanderMizgirev in #1246
- (fix) Amend routes for the Conditions widget delete modal by @denniskigen in #1249
- (fix) Deleting a condition successfully should update the conditions table by @Jexsie in #1232
- (fix) O3-1783: Fixed order of vitals sign by @Samridhi-98 in #1116
- (fix) fix
usePatientListsForPatient
to return empty array by @donaldkibet in #1261 - (fix) O3-2239: Clean styles by @AlexanderMizgirev in #1265
- (fix) Debounce order basket search by 300ms by @jwnasambu in #1256
- (fix) single-spa should be marked as MF shared by @ibacher in #1272
- (fix) add
form-widget-slot
toroutes.json
to enable openmrs-react forms to launch by @donaldkibet in #1268 - (fix) Commit some orphaned translation keys and strings by @denniskigen in #1270
- (fix) O3-1895 Edit Past Visit button does not work by @brandones in #1269
- (fix) KH-240: Add correct translation for the term allEncounters by @kdaud in #1258
Housekeeping
- (chore) Bump
@openmrs/openmrs-form-engine-lib
by @larslemos in #1221 - (chore) Switch back to
swc-loader
by @denniskigen in #1234 - (chore) Update to newer versions of openmrs and @openmrs/esm-framework by @ibacher in #1243
- (chore) Update
@openmrs/ngx-formentry
lib by @donaldkibet in #1257 - (chore) Installation of the ReactHookForm and Zod dependencies by @lumuchris256 in #1254
- (chore) Cache artefacts from lint checks more reliably by @denniskigen in #1271
- (chore) Append
TIMING=1
flag to lint checks by @denniskigen in #1274 - (chore) Remove unused scripts from flags app by @denniskigen in #1276
- (chore) Updated all the translations in the monorepo by @vasharma05 in #1273
New Contributors
- @AlexanderMizgirev made their first contribution in #1200
- @Samridhi-98 made their first contribution in #1116
Full Changelog: v4.6.0...v5.0.0