Skip to content

Commit 2ceb7de

Browse files
committed
v1.3.16 - feat: Update patient checklist display to show created/completed dates in short format
1 parent 4124ebe commit 2ceb7de

4 files changed

Lines changed: 21 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Each open patient has eight focused tabs:
6565

6666
- Date picker shows checklist state for the chosen date across all patients.
6767
- Incomplete items carry forward to future dates; completed items stay on their original completion date.
68-
- Each row shows patient identifier, date, created date, and completed date (if completed).
68+
- Each row shows patient identifier plus created/completed dates (if present), displayed in short format (e.g., `Feb 10`).
6969
- Checklist entries can be marked done/pending, edited, removed, and reordered from either FRICHMOND or Master Checklist view.
7070

7171
### Reporting & Export

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "app",
33
"private": true,
4-
"version": "1.3.15",
4+
"version": "1.3.16",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src/App.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { cn } from '@/lib/utils'
3535
import {
3636
formatClock,
3737
formatDateMMDD,
38+
formatDateShortMonthDay,
3839
formatCalculatedNumber,
3940
parseNumericInput,
4041
toLocalISODate,
@@ -1875,9 +1876,9 @@ function App() {
18751876
<div className='flex-1'>
18761877
<p className={`whitespace-pre-wrap text-sm ${item.completed ? 'text-clay line-through' : 'text-espresso'}`}>{item.text}</p>
18771878
<p className='text-[11px] text-clay'>
1878-
{item.patientIdentifier} • Date: {item.viewDate}
1879-
{item.createdDate ? ` • Created: ${item.createdDate}` : ''}
1880-
{item.completedDate ? ` • Completed: ${item.completedDate}` : ''}
1879+
{item.patientIdentifier}
1880+
{item.createdDate ? ` • Created: ${formatDateShortMonthDay(item.createdDate)}` : ''}
1881+
{item.completedDate ? ` • Completed: ${formatDateShortMonthDay(item.completedDate)}` : ''}
18811882
</p>
18821883
</div>
18831884
<Button type='button' variant='ghost' className='h-6 px-2 text-xs' onClick={() => moveMasterChecklistItem(item.patientId, item.index, 'up')} aria-label='Move checklist item up'>
@@ -3533,7 +3534,7 @@ function App() {
35333534
/>
35343535
</div>
35353536
<p className='text-xs text-clay'>
3536-
Viewing checklist state for {masterChecklistDate}. Pending items carry forward to future dates; completed items stay on their original completion date.
3537+
Viewing checklist state for {formatDateShortMonthDay(masterChecklistDate)}. Pending items carry forward to future dates; completed items stay on their original completion date.
35373538
</p>
35383539
<div className='space-y-2'>
35393540
{masterChecklistSections.pending.map((item) => renderMasterChecklistItem(item, `master-pending-${item.patientId}-${item.viewDate}-${item.index}`))}
@@ -5141,7 +5142,7 @@ function App() {
51415142
['Navigate on mobile', 'The bottom bar shows all 8 patient sections in a 2-row grid — tap any to switch. Use ← Back to return to the patient list.'],
51425143
['Switch patients', 'Tap the patient name at the top of any tab to jump to a different patient while staying on the same section.'],
51435144
['Write daily notes', 'Open FRICH, pick today\'s date, fill F-R-I-C-H-M-O-N-D fields, plan, and checklist. Use Edit to revise or remove checklist items, and use the drag handle to reorder priorities (on mobile, press and hold the handle then drag). Tap Copy latest entry to carry forward yesterday\'s note with pending checklist items only.'],
5144-
['Review all checklist items', 'Open Checklist from the main navigation to see all patient checklist items for one date, including pending and completed entries with created/completed dates. Edit, reorder, and update status there when needed.'],
5145+
['Review all checklist items', 'Open Checklist from the main navigation to see all patient checklist items for one date, including pending and completed entries with Created/Completed dates shown in short format (e.g., Feb 10). Edit, reorder, and update status there when needed.'],
51455146
['Generate reports', 'Open Report, configure filters, tap any export button to preview, then Copy full text to paste into a handoff or chart.'],
51465147
['Back up your data', 'Go to Settings → Export backup regularly, especially before switching devices or browsers.'],
51475148
] as [string, string][]).map(([title, detail], i) => (

src/lib/dateTime.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@ export const formatDateMMDD = (isoDate: string) => {
3535
return `${month}-${day}`
3636
}
3737

38+
export const formatDateShortMonthDay = (isoDate: string) => {
39+
const [yearText, monthText, dayText] = isoDate.split('-')
40+
const year = Number.parseInt(yearText ?? '', 10)
41+
const month = Number.parseInt(monthText ?? '', 10)
42+
const day = Number.parseInt(dayText ?? '', 10)
43+
if (!Number.isInteger(year) || !Number.isInteger(month) || !Number.isInteger(day)) return isoDate
44+
45+
const date = new Date(year, month - 1, day)
46+
if (Number.isNaN(date.getTime())) return isoDate
47+
48+
return new Intl.DateTimeFormat(undefined, { month: 'short', day: 'numeric' }).format(date)
49+
}
50+
3851
export const formatClock = (time: string) => {
3952
const [hourText, minuteText = '00'] = time.split(':')
4053
const hour = Number.parseInt(hourText, 10)

0 commit comments

Comments
 (0)