Refactor/remove patient email; fix patient add modal#33
Merged
Conversation
…e display; centralize vital sign configs - Add MRN, ward, and bed fields to patient forms - Display phone number instead of email in patient overview - Improve DRF error message handling - Centralize vital sign configurations and update placeholders - Remove deprecated vital sign config file
…ts" across documentation and components
zhuzilinaba
reviewed
Oct 14, 2025
Contributor
zhuzilinaba
left a comment
There was a problem hiding this comment.
Very good modify in functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes several important changes to how patient data and vital sign configurations are handled in the application. The most significant updates include removing the
emailfield from patient forms and models, introducing new required fields (mrn,ward,bed) for patient creation and editing, centralizing vital sign configuration usage, and improving error message handling for API responses.Patient Data Model and Forms
emailfield from thePatientandPatientCreateinterfaces insrc/lib/api-client-v2.ts, and updated all patient-related forms and components to no longer display or require an email. Added new required fields:mrn,ward, andbedto patient creation and editing forms. ([[1]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-25d7d235ff75b5aeec13f71e30d6068565cf16d0f18a71331106fe1f76dcd4b9L243),[[2]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-25d7d235ff75b5aeec13f71e30d6068565cf16d0f18a71331106fe1f76dcd4b9L258),[[3]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-9429d77e917e1f5f528a9cffb2612259ac835df9108b11a9d79270f7fefe94faL31-R33),[[4]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-9429d77e917e1f5f528a9cffb2612259ac835df9108b11a9d79270f7fefe94faL53-R57),[[5]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-9429d77e917e1f5f528a9cffb2612259ac835df9108b11a9d79270f7fefe94faL124-R157),[[6]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-77cf31196ada9fc5e7edb45768d1196746105e1fc198d5e7c822552800e2d7c3L33-R35),[[7]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-77cf31196ada9fc5e7edb45768d1196746105e1fc198d5e7c822552800e2d7c3L48-R52),[[8]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-77cf31196ada9fc5e7edb45768d1196746105e1fc198d5e7c822552800e2d7c3L84-R90),[[9]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-77cf31196ada9fc5e7edb45768d1196746105e1fc198d5e7c822552800e2d7c3L144-R179),[[10]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-b1bae156025b415dca5e991c5a74f0709747e860385b249a8a64dd4fdf84ee60L96-L99),[[11]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-6831c5eec7bc17281cf483708a3e3a269c09fa7a00f5ea4a36494679f2b71480L180-L183))Vital Sign Configuration
@/lib/vital-signs, ensuring consistent labels, units, input types, and placeholders. Removed the deprecated local vital sign config file. ([[1]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-3cd706a776e4903bfc7357099b920d8139ff0f2d2e987993022e0ab4f2df7165R7),[[2]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-3cd706a776e4903bfc7357099b920d8139ff0f2d2e987993022e0ab4f2df7165L155-R256),[[3]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-dad755e32f7df8305ad530a5f1f647c5d3dbf8b0ad53a858dfdbd9246551c148L1-L34),[[4]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-122ceb17fe25908bd433fbd1aa66581e83b57474806ac2ca4beec1f3c0bf062bL92-R92),[[5]](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-122ceb17fe25908bd433fbd1aa66581e83b57474806ac2ca4beec1f3c0bf062bL102-R102))Error Handling
getErrorMessagehelper insrc/lib/error-utils.tsto better handle and flatten error messages from Django REST Framework responses, including nested and field-specific errors. ([src/lib/error-utils.tsL6-R46](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-4dbdc7fdb7e39f787fc8c5d1fc5832b4978f323ca16e927d9106f2664f13bd69L6-R46))Minor UI Improvements
src/components/patients/file-management.tsxfor clarity. ([src/components/patients/file-management.tsxL194-R194](https://github.com/UWA-CITS5206-DMR/react-ui/pull/33/files#diff-752fcccf8a53d71c0ff6ab6815d81516305c4b05709cc2b77835c040e98fbbb0L194-R194))