charludo / ycms

Apache License 2.0
0 stars 0 forks source link

Add patient detail view #103

Closed charludo closed 8 months ago

charludo commented 8 months ago

Short description

This adds a patient detail view where we can

Additionally, the intake form post-save behavior has been modified:

If you are reviewing this, please make sure to test all functionality - i.e. you will need to test it with a patient with both a current and a future stay (probbaly need to create one)

Proposed changes

Side effects

Resolved issues

Fixes: #70, partially: #119

charludo commented 8 months ago

Thanks for the review!

  • When using the "Plan new stay" button and getting redirected, maybe we can pre-select the according patient in the "Search for existing patient" input

Yeah, fair. I added the feature. TBH it is a little hacky (and for some reason I could not get the URL parameter to register correctly in TS if I only passed the patient? Very strange), but it should be working.

  • I couldn't figure out what the purpose of the "patient intake form" record type is, especially when the result is "No hospital stay data is associated with this intake". Could you give me a use-case example? 😄

"patient intake form" is the type of record we use to signify a hospital stay. That is largely due to our DB relations: Patient <- MedicalRecord <- BedAssignment

The reason I added the "...no data associated, probably cancelled..." message is that you could plan a hospital stay, but then the patient calls and cancels it (that's one of the roleplaying cards as well). In that case, an intake record exists, but the patient has never been assigned to a bed, of course.

An alternative would be to just hide those records, but tbh I kinda like that it's still included, and I imagine in a real world scenario you would also want to keep a record of the patient planning a hospital stay, but it never coming to that (for whatever reason).

But you of course have a point about showing it in this specific form. I removed the option here, and set the default to show "note"

  • When searching for a diagnosis code, the dropdown menu is not shown below the input but jumps to the right.

Interesting, this only seems to happen on Chrome. I changed the offending form to a flex layout, looks like it's fixed now.

Hey, quick question, are the fonts super bold on Chrome as well, or is this just me?? On Firefox it looks as I would expect. The font weight is set to normal/400 by default, but Chrome renders it way thicker. This only happens for that font weight, so I am unsure if maybe it's just something on my machine.

charludo commented 8 months ago

Regarding the font, I am not sure how it should look like but this is the way I see the page:

OK that looks exactly like it does for me in FF. Guess my Chrome(ium) is broken. Oh well.

One small issue I found: If you check the screenshot, you see the text "14.01.2024 13:50, Administrator Root Root". However, I took the screenshot at 14:50. So I guess we are using the wrong timezone? Same holds for all the other times in this view

Very good catch. Completely unrelated to this PR, so it is probably happening everywhere. Solution: Set the right timezone for Germany in the settings file 🤦🏼‍♀️