Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6266 todays encounter report #6375

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Conversation

lache-melvin
Copy link
Contributor

@lache-melvin lache-melvin commented Jan 31, 2025

Fixes #6266

👩🏻‍💻 What does this PR do?

This is the schedule for a vaccination today report: https://docs.google.com/spreadsheets/d/13jcRALuMLXlmw13SwrIAO5SFhzIrp5vD94jE00D9wcU/edit?gid=0#gid=0

Screenshot 2025-01-31 at 3 10 00 PM Screenshot 2025-01-31 at 2 25 55 PM

💌 Any notes for the reviewer?

It should work for non-today encounters too, but that report wants some more columns too 😁

"Today to tomorrow" is maybe not the most intuitive input.. would be nice if the "end" filter would use the end of the date, so it was inclusive, but I'm not sure how to configure this in the argument schema....

Hoping this is okay for now, will get feedback on Monday how to prioritise compared to other pieces...

🧪 Testing

  • Have some patients scheduled for an encounter today (ensure still pending)
  • At least some of these patients should have a next of kin, who has a phone number, to test those fields
  • Also set a status on the patient's program enrolment
  • Go to reports - select pending encounters
  • Select your program
  • Set date range for todays encounters (start of today to start of tomorrow)
  • See report - your pending encounters should show

📃 Documentation

  • Part of an epic: documentation will be completed for the feature as a whole
  • No documentation required: no user facing changes or a bug fix which isn't a change in behaviour
  • These areas should be updated or checked:
    1.
    2.

@github-actions github-actions bot added this to the v2.6.0 milestone Jan 31, 2025
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you haven't review reports yet, FYI that u just ignore this one, it's generated based on the other report files 🙏

Copy link

Bundle size difference

Comparing this PR to main

Old size New size Diff
5.26 MB 5.27 MB 3.17 KB (0.06%)

@Chris-Petty Chris-Petty self-assigned this Feb 2, 2025
Copy link
Contributor

@Chris-Petty Chris-Petty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

When you are selecting a date, the OK button makes it look like it will select the currently highlighted date, but it just closes the date picker. You must instead click the date you want. I think it'd be clearer if it was like Expiring Items report's "Clear" button:

image

Going past the scope of this PR I think that most report date pickers should default to today, at least the start date anyway. Maybe best as config because some reports would have other reasonable defaults (OG has a whole mechanism for saving your reporting settings!). Also the spacing between date pickers is a bit rough in the json form renderer:

image

report?.context === ReportContext.Dispensary
report?.context === ReportContext.Dispensary &&
(report?.subContext === 'HIVCareProgram' ||
// TODO: Also check vaccine module enabled?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo another day ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to not show if vaccines aren't on at all... I kinda don't have my head around this part of OMS product though, OG had encounters before vaccines were ever in which, though rarely used, would mean showing encounter context reports regardless of vaccines being used.

Comment on lines +220 to +224
pub async fn next_of_kin(&self, ctx: &Context<'_>) -> Result<Option<PatientNode>> {
let loader = ctx.get_loader::<DataLoader<PatientLoader>>();

if let Some(next_of_kin_id) = &self.patient.next_of_kin_id {
let result = loader
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably copy pasta things but nit:

Suggested change
pub async fn next_of_kin(&self, ctx: &Context<'_>) -> Result<Option<PatientNode>> {
let loader = ctx.get_loader::<DataLoader<PatientLoader>>();
if let Some(next_of_kin_id) = &self.patient.next_of_kin_id {
let result = loader
pub async fn next_of_kin(&self, ctx: &Context<'_>) -> Result<Option<PatientNode>> {
if let Some(next_of_kin_id) = &self.patient.next_of_kin_id {
let loader = ctx.get_loader::<DataLoader<PatientLoader>>();
let result = loader

Don't need to initialise the loader for the other branch?

date(format="%d/%m/%Y") }}{% endif %} {% endmacro input %}

<style>
{% include "encounters.css" %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't checked the other reports' css, but I assume there should be some pretty common css that can be shared amongst reports? That said perhaps there would be some nastiness with doing that with the report versioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Report for patients due for an encounter today
2 participants