Skip to content

Refactor reporting tab outputs to match clinical documentation format#11

Closed
Claude wants to merge 2 commits into
mainfrom
claude/tweak-reporting-tab-outputs
Closed

Refactor reporting tab outputs to match clinical documentation format#11
Claude wants to merge 2 commits into
mainfrom
claude/tweak-reporting-tab-outputs

Conversation

@Claude
Copy link
Copy Markdown

@Claude Claude AI commented Feb 22, 2026

Updated all report generators to match Philippine medical school documentation standards: standardized headers to ROOM - LASTNAME, Firstname format, restructured Profile/Census/FRICHMOND/Vitals/Labs/Orders outputs per clinical workflow requirements.

Changes by Report Type

Profile Summary

  • Header: 512A - DELA CRUZ, Juan with uppercase last name
  • Service field split: first line → Main:, subsequent lines → Referrals:
  • Auto-numbered pendings list
  • Conditional Notes: section (only if populated)
  • Removed: Plans, Meds, Labs, Orders (separate reports)

FRICHMOND Summary

  • Header: 512A - DELA CRUZ, Juan — 02-21-2026 (MM-DD-YYYY)
  • VS trends with calculated ranges: VS trends 2/21 7PM–2/22 7AM 110–130/60–80, 68–88, 14–19, 36.5–36.8, 97–99%
  • Removed Orders segment

Vitals Summary

  • Header: 512A - DELA CRUZ, Juan
  • Simplified rows: 6AM 126/78 86 20 37.6 95% (time + values + optional notes)

Labs Summary

  • Header: 512A - DELA CRUZ, Juan
  • Per-lab timestamps: CBC 02-21 7:38 PM extracted from createdAt field
  • Lab type parsing removes facility prefix

Orders Summary

  • Header: 512A - DELA CRUZ, Juan
  • Service/datetime line: Internal Medicine – 02-21 9:34 PM
  • Order text preserves user formatting

Census Report

  • Header: 512A – DELA CRUZ, Juan (em dash)
  • Structured sections: Age/Sex, Diagnosis, Labs:, Medications:, Pendings:
  • Conditional section rendering

Example Output Transform

Before:

PROFILE — Dela Cruz, Juan (512A)
57/M • Internal Medicine
Diagnosis: CAP, moderate-risk; CKD stage V
Pendings: CXR, CBC
Clerk notes: Patient agitated

After:

512A - DELA CRUZ, Juan
57 / M
Main: Internal Medicine
Dx: CAP, moderate-risk; CKD stage V
Pendings:
1. CXR
2. CBC
Notes:
Patient agitated
Original prompt

This section details on the original issue you should resolve

<issue_title>Tweak the outputs - REPORTING tab</issue_title>
<issue_description>1. Profile Summary

  • Include the following data: Room, Name, Age, Sex, Service (main service and referral services are separated by the first line break in the string, where everything before the first line break is the main service and everything else after is a referral), Diagnosis, Pendings, Clerk notes
  • Main service will be reflected as "Main"
  • "Dx" refers to the Diagnosis
  • "Notes" refers to the Clerks notes, this segment is omitted in the output if the field is left blank
  • sample report is as follows (pay attention to the format details):
    512A - DELA CRUZ, Juan
    57 / M
    Main: Internal Medicine
    Referrals: General Surgery
    Dx: Community-acquired pneumonia, moderate-risk; CKD stage V
    Pendings:
  1. CXR

  2. Sputum gram stain and culture

  3. CBC
    Notes:
    Patient is very agitated, difficult to interview, try talking to them at 10 am AFTER they've eaten
    Left arm precautions at all times: he has AVF on left arm

  4. FRICHMOND Summary
    a. Remove the vitals in the summary for FRICHMOND; if choosing to keep it then report it as a "VS trends" where only the ranges are displayed, eg: VS trends 2/21 7PM–2/22 7AM 110–130/60–80, 68–88, 14–19, 36.5–36.8, 97–99%

  • The VS trends above shows in sequence the date and time period that the VS trends were applied; it also provides the range for the BP, HR, RR, Temp, and SpO2 in sequence
    b. Remove the "Orders" segment
    c. Change the header of the report from "DAILY UPDATE – Dela Cruz (512A) – 2026-02-21" --> "512A - DELA CRUZ, Juan — 02-21-2026"
  1. Vitals Summary
    a. Change the header of the report from "VITALS LOG — Dela Cruz (512A)" --> "512A - DELA CRUZ, Juan"
    b. Display only the time, vitals, and additional notes if any: from "Vitals (2026-02-21): 6AM 126/78 86 20 37.6 95" --> "6AM 126/78 86 20 37.6 95"
    c. New output format sample:
    512A - DELA CRUZ, Juan
    6AM 126/78 86 20 37.6 95
    2PM 128/76 84 18 37.3 96
    d. Add the option to allow generation of 1 Vitals Summary for multiple patients: allow the user to select a specific time and date range, as well as specify the specific patients to include in the report
    e. Sample output format for multiple patients where DELA CRUZ and CRUZ were selected as the patients, and the time and date selected was 02/21/2026, 5AM to 2PM
    512A - DELA CRUZ, Juan
    6AM 126/78 86 20 37.6 95%
    2PM 128/76 84 18 37.3 96%

306C - CRUZ, Jose
6AM 120/80 78 14 36.5 95%
12PM 140/80 89 15 37.3 99% on 3lpm NC
2PM 130/70 87 16 37 98% on 1lpm NC

  1. Labs Summary
    a. Change the header of the report from "LABS — Dela Cruz (512A)" to "512A - DELA CRUZ, Juan"
    b. Change the header of each lab from "2026-02-21 UST - Urinalysis: " to "Urinalysis 02-21 7:38 PM"; from "2026-02-21 UST - CBC: " to "CBC 02-21"
    c. </issue_description>

Comments on the Issue (you are @claude[agent] in this section)

@HesperKarl # Report generator — consolidated rules & learnings (as of 2026-02-22)

This document integrates Profile Summary, FRICHMOND Summary, Vitals Summary, and Labs Summary rules discussed so far.


1) Profile Summary

1.1 Included data fields

Include the following data in the Profile Summary output:

  • Room
  • Name
  • Age
  • Sex
  • Service
    • Service is a string where the first line (before the first line break) is the main service
    • Everything after the first line break are referral services
  • Diagnosis
  • Pendings
  • Clerk notes

1.2 Labeling / naming rules

  • Main service label: Main:
  • Referral services label: Referrals:
  • Dx: refers to Diagnosis
  • Notes: refers to Clerk notes
    • Omit the entire Notes segment if the Clerk notes field is blank/empty

1.3 Output format (exact structure)

Sample (format-sensitive):

512A - DELA CRUZ, Juan
57 / M
Main: Internal Medicine
Referrals: General Surgery
Dx: Community-acquired pneumonia, moderate-risk; CKD stage V
Pendings:
1. CXR
2. Sputum gram stain and culture
3. CBC
Notes: 
Patient is very agitated, difficult to interview, try talking to them at 10 am AFTER they've eaten
Left arm precautions at all times: he has AVF on left arm

2) FRICHMOND Summary

2.1 Header format

Change header from:

  • DAILY UPDATE – Dela Cruz (512A) – 2026-02-21

To:

  • 512A - DELA CRUZ, Juan — 02-21-2026

2.2 Remove / change segments

  • Remove the Orders segment entirely.
  • Remove vitals from the FRICHMOND summary.
    • If vitals are kept, they must be reported as VS trends (see below).

2.3 VS trends format (if included)

If VS trends are shown, present only ranges and include the applicable time window.

Format example:

  • VS trends 2/21 7PM–2/22 7AM 110–130/60–80, 68–88, 14–19, 36.5–36.8, 97–99%

Meaning / ordering requirements:

  • The VS trends line shows, in order:
    1. date/time period it covers
    2. BP range (systolic range–diastolic range)
    3. H...

…Orders, and Census

Co-authored-by: CSfromCS <42040696+CSfromCS@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Tweak the outputs of reporting tab Refactor reporting tab outputs to match clinical documentation format Feb 22, 2026
@Claude Claude AI requested a review from CSfromCS February 22, 2026 12:20
@CSfromCS CSfromCS closed this Feb 25, 2026
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.

Tweak the outputs - REPORTING tab

2 participants