Skip to content

Fix orders report to use order service and show patient name once#32

Draft
Claude wants to merge 2 commits intomainfrom
claude/fix-order-report-service-usage
Draft

Fix orders report to use order service and show patient name once#32
Claude wants to merge 2 commits intomainfrom
claude/fix-order-report-service-usage

Conversation

@Claude
Copy link

@Claude Claude AI commented Feb 25, 2026

The orders export in the reporting page was incorrectly using the patient's service instead of each order's individual service attribute. Additionally, the patient name was repeated for every order entry.

Changes

  • Use order-specific service: Modified toOrdersSummary to call parseServiceLines(entry.service) inside the map function instead of using patient.service once for all orders
  • Show patient header once: Restructured output to display patient name at the top followed by the order list, eliminating redundant patient headers

Example

Before:

001 - DELA CRUZ, Juan
Internal Medicine – 12-25 14:00
CBC

001 - DELA CRUZ, Juan
Internal Medicine – 12-26 08:00
Chest X-ray

After:

001 - DELA CRUZ, Juan

Internal Medicine – 12-25 14:00
CBC

Surgery – 12-26 08:00
Chest X-ray

Each order now displays its own service (e.g., Internal Medicine vs Surgery), matching the behavior in the Orders tab UI.

Original prompt

In the reporting page there is a way to export the orders. This has an attribute called "Service". The orders page shows the list of orders with the correct service listed. The report print of the orders however, doesn't use the order's "Service" attribute. It is mistakingly using the Patient profile's service which is not what we want. Use the order service, similar to how the list is shown in the orders tab.

Additionally, the print report of the orders repeats the name of the current patient for each order. Since this will be the same, just mention it once at the top and then a list of the orders without repeating the name.

Co-authored-by: CSfromCS <42040696+CSfromCS@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Fix order report to use order's service attribute Fix orders report to use order service and show patient name once Feb 25, 2026
@Claude Claude AI requested a review from CSfromCS February 25, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants