-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Edit patient details #1765
Comments
I can work on this. |
@MatthewDorner all yours! I would wait until #1738 gets merged to start implementing the database stuff, since this should provide a nice function to update fields with. However, this shouldn't block doing some of the UI part of this work. |
@MatthewDorner nice! |
@jackcmeyer #1738 merged |
Still working on this. Trying to see if I can just use the I found the code for loading Patients is also currently bugged. The Also if you view one Patient with all the fields filled in and then go view a Patient where those fields are supposed to be blank, you will still see the values from the first Patient in those fields, but I think this is a separate bug. |
I'm digging into why the component is not updating when the new patient gets loaded. The store is getting updated, but the component is not reflecting those changes. |
It must be something to do with empty strings. |
After further investigation, This seems like an issue with The TextInput and TextField components in the hospitalrun/components library. I verified and all of components are getting passed the proper data, however, I verified this by swapping out I've opened an issue here to track the work: HospitalRun/components#259 |
I really want to avoid passing empty strings for "signaling" that is a new patient. Do you have any alternative ideas, @MatthewDorner ?
Good findings @jackcmeyer! |
I've written a draft that I think will work. It uses MatthewDorner/hospitalrun-frontend@MatthewDorner:master...MatthewDorner:edit-patient-draft-3 I have to fix all the tests now, so while I do that, any comments or suggestions are welcome. EDIT: Also kind of changed Approximate Age and DOB stuff in merging the two forms. Now it only shows either Date of Birth OR Approximate Age, based on whether the "Unknown" is checked, I can make it different if desired. Also the checkbox has no way to set its value, no |
If you want, feel free to open a PR so we can discuss it there. |
Scenario
AS
A user with write access to patients
I WANT
The ability to edit patient details
SO THAT
I can have more accurate patient information or change the patient information when needed.
Acceptance Criteria
GIVEN
An existing patient and a user with write access to the patient
WHEN
I click the edit button the on patients page
THEN
The fields become editable
AND
a save and cancel button toolbar appear at the bottom of the screen
AND
when I click the button, then the updated patient details are persisted
AND
I get a success message saying I have successfully updated the patient details.
Related Issues
HospitalRun/hospitalrun-frontend#1671
Technical Notes
The text was updated successfully, but these errors were encountered: