Skip to content

tweak(timezone): multi timezone testing fixes#9231

Open
dannash100 wants to merge 242 commits intomainfrom
tweak/multi-timezone-review-changes
Open

tweak(timezone): multi timezone testing fixes#9231
dannash100 wants to merge 242 commits intomainfrom
tweak/multi-timezone-review-changes

Conversation

@dannash100
Copy link
Contributor

@dannash100 dannash100 commented Feb 25, 2026

Changes

Add a brief description of the changes in this PR to help give the reviewer context.

Deploys

  • Deploy to Tamanu Internal

Tests

  • Run E2E Tests

Review Hero

  • Run Review Hero
  • Auto-fix review suggestions Wait for Review Hero to finish, resolve any comments you disagree with or want to fix manually, then check this to auto-fix the rest.
  • Auto-fix CI failures Check this to auto-fix lint errors, test failures, and other CI issues.

Remember to...

  • ...write or update tests
  • ...add UI screenshots and testing notes to the Linear issue
  • ...add any manual upgrade steps to the Linear issue
  • ...update the config reference, settings reference, or any relevant runbook(s)
  • ...call out additions or changes to config files for the deployment team to take note of

dannash100 and others added 30 commits January 6, 2026 11:30
Core infrastructure for timezone-aware date/time formatting across the application.

Changes:
- Add timezone-aware format functions to @tamanu/utils/dateTime
- Create DateTimeContext in ui-components for consistent formatting
- Update DateDisplay component to use context-based formatting
- Add timeZone setting to facility schema
- Expose timezone settings via server APIs for patient portal
- Add reflect-metadata for mobile TypeORM compatibility
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Introduce withDateTimeContext HOC and useDateTimeFormat hook for PDF components
to ensure consistent timezone-aware date formatting across all printouts.

- Add formatInTz utility for explicit format string patterns
- Create self-contained PDF date context to avoid React instance conflicts
- Migrate all printout components from getDisplayDate to context-based formatters
- Update patientAccessors and labRequestAccessors to accept formatters
- Replace time-only formats with formatTime where applicable
Integrate DateTimeContext from ui-components across all web components.

Changes:
- Add DateTimeProvider wrapper in Root.jsx
- Update all date display components to use useDateTimeFormat hook
- Migrate from direct date-fns calls to context-based formatters
- Update forms, views, and tables for consistent timezone handling
…ocationBookingDrawer.jsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
dannash100 and others added 23 commits February 3, 2026 15:24
tweak(dateTime): Fix some errors on multiple timzone epic
…-timezone

tweak: epic merge tweaks timezone
* i like this one

* wikid wikid

* ya

* yayer

* yayer

* yayer

* better comment

* ya

* ya ok

* remove comments

* ya

* ay bay bay

* mo mo mo

* mo mo mo

* momomo

* ya

* dont think we ever need these

* uhuh

* country timezone ya dig

* this thing aint used

* had to do it to em

* ill probably end up renaming to getCurrentDateTimeStringForPersist or sumthing

* funky todo

* oh yeah

* all accounted for

* ya

* oopsie

* edge cases

* sure ting

* last edgecases I think thats it!

* fixed they rekon

* ok

* gottem

* gottem

* gottem

* ya

* this kinda bung ill go bvak over this

* yeah?

* i love it

* try

* move around providers

* ladies and gentlemen eddy on the keys 🎵

* interestingly we want initial value for date only fields to be facility time zone - as we are saving it as is for facility date time

* nasty case

* man thats a nasty case need to think about that if it comes up agian

* ok this is improvemnt i think cud work wit that

* bruh

* couple todos

* ya

* im a genius

* another 1

* ga ga gottem

* these ones shud be date only it seem

* one more

* i shud do the migrations

* found a date that goes nowhere

* tweakin

* that works

* think this broke cd

* roll that back for now too

* gottem

* roll these bak for this pr

* oh ya gottem

* ya

* comments

* ya

* hack for now

* ok

* ya mo

* ya

* ya

* yes son

* use util here

* ta

* ya

* mo

* simplify

* ya?

* sure

* yeh aight

* type gottem

* are u happy bugbot

* gottem

* heck yeah 8-)

* 3am merge challenge (gone wrong)

* ya

* boy oh boy

* yer....

* yeah ok

* yeah rd

* sure

* ya ok

* ya

* bugbot

* ill come back to this one

* nice catches

* small catch

* another ting

* refactor

* this could be cleaner

* mabye gud?

* ya

* ya wip'

* ya

* wip

* mo

* mo

* mo

* ya

* ya

* mo"

* mo"

* closer'

* closer'

* major cleanup

* major cleanup

* missed two

* actuly no need this in some case

* thatl do

* gud catch

* gud catch

* gud catch

* thatl do

* safe guard

* safe guard

* safe guard

* safe guard

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya
* ya

* oopsie

* edge cases

* sure ting

* last edgecases I think thats it!

* fixed they rekon

* ok

* gottem

* gottem

* gottem

* ya

* this kinda bung ill go bvak over this

* yeah?

* i love it

* try

* move around providers

* ladies and gentlemen eddy on the keys 🎵

* interestingly we want initial value for date only fields to be facility time zone - as we are saving it as is for facility date time

* nasty case

* man thats a nasty case need to think about that if it comes up agian

* ok this is improvemnt i think cud work wit that

* bruh

* couple todos

* ya

* im a genius

* another 1

* ga ga gottem

* these ones shud be date only it seem

* one more

* i shud do the migrations

* found a date that goes nowhere

* tweakin

* that works

* think this broke cd

* roll that back for now too

* gottem

* roll these bak for this pr

* oh ya gottem

* ya

* comments

* ya

* hack for now

* ok

* ya mo

* ya

* ya

* yes son

* use util here

* ta

* ya

* mo

* simplify

* ya?

* sure

* yeh aight

* type gottem

* are u happy bugbot

* gottem

* heck yeah 8-)

* 3am merge challenge (gone wrong)

* ya

* boy oh boy

* yer....

* yeah ok

* yeah rd

* sure

* fix concept of today in date selector

* is that right or am i tripping

* ladies and gentlemen we gottem

* YES

* looking fine as heck

* ya ok

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* wee tweak

* bugbot

* ill come back to this one

* nice catches

* nice catches

* small catch

* another ting

* fix this

* another spot

* another edge case shiet

* Mar edge cases

* cleaner

* works now

* missed spot

* missed spot

* another one

* another 1

* cleanups

* ya

* cleanup

* ya

* ya

* ya

* nice 1

* lint and more cleanups

* twak

* refactor

* this could be cleaner

* mabye gud?

* ok

* ok

* ya

* ya

* ya wip'

* ya

* wip

* mo

* mo

* mo

* ya

* ya

* mo"

* mo"

* closer'

* closer'

* major cleanup

* major cleanup

* ya

* ya

* missed two

* actuly no need this in some case

* thatl do

* gud catch

* gud catch

* gud catch

* thatl do

* safe guard

* safe guard

* safe guard

* safe guard

* safe guard

* safe guard

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* rename

* rename

* rename

* rename

* rename

* remove changing listing endpoints too much

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* works

* works

* works

* Mar all working by looks of it

* make countryTimeZone non optional

* fix to local

* fix to local

* QA fixes

* QA fixes

* clean up

* more cleanup

* ok is that it?

* last tweak i rekon

* last tweak i rekon

* last tweak i rekon

* ok is that it?

* qa

* ya

* unused stuff

* last tweak i rekon

* yaya

* remove log

* add da T

* sneaky gottem

* when the gottems come out sizlin

* when the gottems come out sizlin

* when the gottems come out sizlin

* sneaky gottem
…9153)

* move around providers

* ladies and gentlemen eddy on the keys 🎵

* interestingly we want initial value for date only fields to be facility time zone - as we are saving it as is for facility date time

* nasty case

* man thats a nasty case need to think about that if it comes up agian

* ok this is improvemnt i think cud work wit that

* bruh

* couple todos

* ya

* im a genius

* another 1

* ga ga gottem

* these ones shud be date only it seem

* one more

* i shud do the migrations

* found a date that goes nowhere

* tweakin

* that works

* think this broke cd

* roll that back for now too

* gottem

* roll these bak for this pr

* oh ya gottem

* ya

* comments

* ya

* hack for now

* ok

* ya mo

* ya

* ya

* yes son

* use util here

* ta

* ya

* mo

* simplify

* ya?

* sure

* yeh aight

* type gottem

* are u happy bugbot

* gottem

* heck yeah 8-)

* 3am merge challenge (gone wrong)

* ya

* boy oh boy

* yer....

* yeah ok

* yeah rd

* sure

* fix concept of today in date selector

* is that right or am i tripping

* ladies and gentlemen we gottem

* YES

* looking fine as heck

* ya ok

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* wee tweak

* bugbot

* ill come back to this one

* nice catches

* nice catches

* small catch

* another ting

* fix this

* another spot

* another edge case shiet

* Mar edge cases

* cleaner

* works now

* missed spot

* missed spot

* another one

* another 1

* cleanups

* ya

* cleanup

* ya

* ya

* ya

* nice 1

* lint and more cleanups

* twak

* refactor

* this could be cleaner

* mabye gud?

* ok

* ok

* ya

* ya

* ya wip'

* ya

* wip

* mo

* mo

* mo

* ya

* ya

* mo"

* mo"

* closer'

* closer'

* major cleanup

* major cleanup

* ya

* ya

* missed two

* actuly no need this in some case

* thatl do

* gud catch

* gud catch

* gud catch

* thatl do

* safe guard

* safe guard

* safe guard

* safe guard

* safe guard

* safe guard

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* thatl do

* rename

* rename

* rename

* rename

* rename

* remove changing listing endpoints too much

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* rename

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* ya

* works

* works

* works

* Mar all working by looks of it

* make countryTimeZone non optional

* to primary

* fix to local

* fix to local

* QA fixes

* QA fixes

* clean up

* more cleanup

* ok is that it?

* last tweak i rekon

* last tweak i rekon

* last tweak i rekon

* ok is that it?

* ok is that it?

* qa

* ya

* unused stuff

* last tweak i rekon

* yaya

* ya

* ya

* Mo

* ya ok
…ntl available options (#9185)

* make facilityTimeZone an autocomplete

* nice

* ya good call
* cleanups

* cleanups

* feat(web): SAV-1091: Display Id QR code scanner (#9163)

* mvp

* styles

* improve validation

* Update QRCodeSearchField.jsx

* @zxing/browser

* Update package-lock.json

* merge: 2.49 into main (#9192)

* release: Cut-off for release/2.49

* fix(notes): HOTFIX-2.49: Filter out system notes (#9146)

refactor: Extract NON_EDITABLE_NOTE_TYPES constant and filter system/mobile notes

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Thomas Codling <tcodling@users.noreply.github.com>

* fix(translations): PHX-303: Update medication label translations 2.49 hotfix (#9151)

fix(translations): PHX-303: Update medication label translations (and more) (#9125)

* Simplify

* Include type information for reference data so it can be properly translated in frontend

* Properly include variable in styled component

* Add missing dependencies

* Properly retrieve string ID for enums

* Wrap functions in callbacks and memo to get a stable reference

* Update order to group returns



---------

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* fix: Release 2.49: Remove Invoice Price Lists Error (#9154)

* Update InvoicePriceList.ts

* Update invoicePriceListMatching.test.ts

* fix(mobile): Release fix 2.49 :AutocompleteModalField empty on selection (#9157)

fix(mobile): TAMOC-389 AutocompleteModalField empty on selection (#9131)

* fix(mobile): TAMOC-389: 2.47 hotfix: AutocompleteModalField empty on selection (#9114)

* fix

* fix

* ya

* ya

* ya

* Ya

* comment bak

Co-authored-by: Daniel Nash <38335330+dannash100@users.noreply.github.com>

* fix: Release 2.49: Update lab invoicing setting (#9158)

* add SAMPLE_NOT_COLLECTED to lab invoicing

* Update EncounterInvoice.test.js

* Update EncounterInvoice.test.js

* Update EncounterInvoice.test.js

* fix: Hotfix v2.49: Medication logic changes (#9141)

* Merge pull request #9127 from beyondessential/fix-release-2-48-medication-timezone-issues

fix: Release 2.48: Medication timezone issues

* fix(mobile): TAMOC-389: 2.48 fix: AutocompleteModalField empty on selection (#9130)

* fix(mobile): TAMOC-389: 2.47 hotfix: AutocompleteModalField empty on selection (#9114)

* fix

* fix

* ya

* ya

* ya

* Ya

* comment bak

* decrement ongoing repeats on send to pharmacy

* mark as completed on dispense

* show remaining repeats

* quantity label

* Update PharmacyOrderMedicationTable.jsx

* show correct remiainging number

* Update PharmacyOrderMedicationTable.jsx

* active encounter copy

* Update medication.js

* Update medication.js

* tooltip

* Update PharmacyOrderMedicationTable.jsx

* Update MedicationForm.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update MedicationDetails.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderModal.jsx

* Update Medication.test.js

* dispense testing

* import ongoing tests

* Update Medication.test.js

* Update Medication.test.js

* Update Medication.test.js

* Update Medication.test.js

* Update fake.ts

* Update PharmacyOrderMedicationTable.jsx

* swap checkbox for note

* Update PharmacyOrderMedicationTable.jsx

* checkbox styling

* Update MedicationForm.jsx

* Update DischargeForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update medication.js

* Update medication.js

* Update medication.js

* dry up hacky funciton

* fix permissions

* Update medication.js

* Update PharmacyOrderModal.jsx

* Update patient.js

* Update medication.js

* better function name

* fix

* Update medication.js

* invalidated test

* dead code

* use source prescription id

* remove unused args

* Revert "remove unused args"

This reverts commit 15e6fd4.

* Revert "use source prescription id"

This reverts commit ec45043.

* Update packages/web/app/components/Medication/PharmacyOrderMedicationTable.jsx

Co-authored-by: Tom Caiger <caigertom@gmail.com>

* simplifications from tom c

---------

Co-authored-by: Daniel Nash <38335330+dannash100@users.noreply.github.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>

* fix: v2.49: Directly link PharmacyOrderPrescriptions to its original ongoing prescription (#9160)

* Merge pull request #9127 from beyondessential/fix-release-2-48-medication-timezone-issues

fix: Release 2.48: Medication timezone issues

* fix(mobile): TAMOC-389: 2.48 fix: AutocompleteModalField empty on selection (#9130)

* fix(mobile): TAMOC-389: 2.47 hotfix: AutocompleteModalField empty on selection (#9114)

* fix

* fix

* ya

* ya

* ya

* Ya

* comment bak

* decrement ongoing repeats on send to pharmacy

* mark as completed on dispense

* show remaining repeats

* quantity label

* Update PharmacyOrderMedicationTable.jsx

* show correct remiainging number

* Update PharmacyOrderMedicationTable.jsx

* active encounter copy

* Update medication.js

* Update medication.js

* tooltip

* Update PharmacyOrderMedicationTable.jsx

* Update MedicationForm.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update MedicationDetails.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderModal.jsx

* Update Medication.test.js

* dispense testing

* import ongoing tests

* Update Medication.test.js

* Update Medication.test.js

* Update Medication.test.js

* Update Medication.test.js

* Update fake.ts

* Update PharmacyOrderMedicationTable.jsx

* swap checkbox for note

* Update PharmacyOrderMedicationTable.jsx

* checkbox styling

* Update MedicationForm.jsx

* Update DischargeForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update medication.js

* Update medication.js

* Update medication.js

* dry up hacky funciton

* fix permissions

* Update medication.js

* Update PharmacyOrderModal.jsx

* Update patient.js

* Update medication.js

* better function name

* fix

* Update medication.js

* invalidated test

* dead code

* use source prescription id

* remove unused args

* Revert "remove unused args"

This reverts commit 15e6fd4.

* Revert "use source prescription id"

This reverts commit ec45043.

* lik pop to ongoing

This reverts commit 7ce73ee.

* Delete 1769850000001-backfillSourcePrescriptionIdOnPharmacyOrderPrescriptions.ts

* Update medication.js

* Update packages/web/app/components/Medication/PharmacyOrderMedicationTable.jsx

Co-authored-by: Tom Caiger <caigertom@gmail.com>

* simplifications from tom c

* better name

* Update pharmacy_order_prescriptions.md

---------

Co-authored-by: Daniel Nash <38335330+dannash100@users.noreply.github.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>

* fix(medications): no-issue: Disabled checkbox bug (#9164)

* Update DispenseMedicationWorkflowModal.jsx

* Update DispenseMedicationWorkflowModal.jsx

* fix(encounters): Release v2.49: Missing modal declaration (#9162)

* Update EncounterActions.jsx

* lost discharge check

* fix(medication): v2.49: Use frequency value for comparison instead of translated label (#9167)

* correct frequency submission

* Update MedicationForm.jsx

* simplify util and move single use into component

* Update FrequencySearchField.tsx

* Update medications.jsx

* fix(translation): PHX-303: Translate medication name (#9171)

* Pass translated name for the medication

* Create helper function to encapsulate logic

Co-authored-by: Gemini Code Assist <gemini-code-assist@google.com>

* Remove unused import

* Add medication du ration units to be translatable enums

Co-authored-by: Cursor Bugbot <bugbot@cursor.com>'

---------

Co-authored-by: Gemini Code Assist <gemini-code-assist@google.com>

* feat(invoicing): SAV-1129: Invoice UI updates (#9178)

* ui tweaks

* Update InvoicesTable.jsx

* sort

* Update InvoiceItem.jsx

* Update InvoiceDetails.jsx

* feat(invoicing): SAV-1129: Invoice UI Tweaks (#9183)

* refactor utils

* invoice summary

* Update InvoicesTable.jsx

* js doc

* Update patientInvoice.js

* fix(medication): no-issue: Design fixes (#9173)

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderMedicationTable.jsx

* correct quantity label

* show proper validation

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderModal.jsx

* Update PharmacyOrderModal.jsx

* Update PharmacyOrderModal.jsx

* Update PharmacyOrderModal.jsx

* Update PharmacyOrderModal.jsx

* Update MedicationForm.jsx

* fix(medications): release 2.49: Use correct submit handler (#9187)

Update PharmacyOrderModal.jsx

* fix: Release 2.49: Show correct repeats on pharmacy orders (#9190)

show correct repeats

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Thomas Codling <tcodling@users.noreply.github.com>
Co-authored-by: Luis Emilio Navarro <60558370+NavarroEmilioLuis@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Daniel Nash <38335330+dannash100@users.noreply.github.com>
Co-authored-by: Gemini Code Assist <gemini-code-assist@google.com>

* remove headers

* test(e2e): Fixes for release 2.49 E2E tests (into main) (#9196)

* release: Cut-off for release/2.49

* fix(notes): HOTFIX-2.49: Filter out system notes (#9146)

refactor: Extract NON_EDITABLE_NOTE_TYPES constant and filter system/mobile notes

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Thomas Codling <tcodling@users.noreply.github.com>

* fix(translations): PHX-303: Update medication label translations 2.49 hotfix (#9151)

fix(translations): PHX-303: Update medication label translations (and more) (#9125)

* Simplify

* Include type information for reference data so it can be properly translated in frontend

* Properly include variable in styled component

* Add missing dependencies

* Properly retrieve string ID for enums

* Wrap functions in callbacks and memo to get a stable reference

* Update order to group returns



---------

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* fix: Release 2.49: Remove Invoice Price Lists Error (#9154)

* Update InvoicePriceList.ts

* Update invoicePriceListMatching.test.ts

* fix(mobile): Release fix 2.49 :AutocompleteModalField empty on selection (#9157)

fix(mobile): TAMOC-389 AutocompleteModalField empty on selection (#9131)

* fix(mobile): TAMOC-389: 2.47 hotfix: AutocompleteModalField empty on selection (#9114)

* fix

* fix

* ya

* ya

* ya

* Ya

* comment bak

Co-authored-by: Daniel Nash <38335330+dannash100@users.noreply.github.com>

* fix: Release 2.49: Update lab invoicing setting (#9158)

* add SAMPLE_NOT_COLLECTED to lab invoicing

* Update EncounterInvoice.test.js

* Update EncounterInvoice.test.js

* Update EncounterInvoice.test.js

* fix: Hotfix v2.49: Medication logic changes (#9141)

* Merge pull request #9127 from beyondessential/fix-release-2-48-medication-timezone-issues

fix: Release 2.48: Medication timezone issues

* fix(mobile): TAMOC-389: 2.48 fix: AutocompleteModalField empty on selection (#9130)

* fix(mobile): TAMOC-389: 2.47 hotfix: AutocompleteModalField empty on selection (#9114)

* fix

* fix

* ya

* ya

* ya

* Ya

* comment bak

* decrement ongoing repeats on send to pharmacy

* mark as completed on dispense

* show remaining repeats

* quantity label

* Update PharmacyOrderMedicationTable.jsx

* show correct remiainging number

* Update PharmacyOrderMedicationTable.jsx

* active encounter copy

* Update medication.js

* Update medication.js

* tooltip

* Update PharmacyOrderMedicationTable.jsx

* Update MedicationForm.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update MedicationDetails.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderModal.jsx

* Update Medication.test.js

* dispense testing

* import ongoing tests

* Update Medication.test.js

* Update Medication.test.js

* Update Medication.test.js

* Update Medication.test.js

* Update fake.ts

* Update PharmacyOrderMedicationTable.jsx

* swap checkbox for note

* Update PharmacyOrderMedicationTable.jsx

* checkbox styling

* Update MedicationForm.jsx

* Update DischargeForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update medication.js

* Update medication.js

* Update medication.js

* dry up hacky funciton

* fix permissions

* Update medication.js

* Update PharmacyOrderModal.jsx

* Update patient.js

* Update medication.js

* better function name

* fix

* Update medication.js

* invalidated test

* dead code

* use source prescription id

* remove unused args

* Revert "remove unused args"

This reverts commit 15e6fd4.

* Revert "use source prescription id"

This reverts commit ec45043.

* Update packages/web/app/components/Medication/PharmacyOrderMedicationTable.jsx

Co-authored-by: Tom Caiger <caigertom@gmail.com>

* simplifications from tom c

---------

Co-authored-by: Daniel Nash <38335330+dannash100@users.noreply.github.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>

* fix: v2.49: Directly link PharmacyOrderPrescriptions to its original ongoing prescription (#9160)

* Merge pull request #9127 from beyondessential/fix-release-2-48-medication-timezone-issues

fix: Release 2.48: Medication timezone issues

* fix(mobile): TAMOC-389: 2.48 fix: AutocompleteModalField empty on selection (#9130)

* fix(mobile): TAMOC-389: 2.47 hotfix: AutocompleteModalField empty on selection (#9114)

* fix

* fix

* ya

* ya

* ya

* Ya

* comment bak

* decrement ongoing repeats on send to pharmacy

* mark as completed on dispense

* show remaining repeats

* quantity label

* Update PharmacyOrderMedicationTable.jsx

* show correct remiainging number

* Update PharmacyOrderMedicationTable.jsx

* active encounter copy

* Update medication.js

* Update medication.js

* tooltip

* Update PharmacyOrderMedicationTable.jsx

* Update MedicationForm.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update MedicationDetails.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderModal.jsx

* Update Medication.test.js

* dispense testing

* import ongoing tests

* Update Medication.test.js

* Update Medication.test.js

* Update Medication.test.js

* Update Medication.test.js

* Update fake.ts

* Update PharmacyOrderMedicationTable.jsx

* swap checkbox for note

* Update PharmacyOrderMedicationTable.jsx

* checkbox styling

* Update MedicationForm.jsx

* Update DischargeForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update MedicationForm.jsx

* Update medication.js

* Update medication.js

* Update medication.js

* dry up hacky funciton

* fix permissions

* Update medication.js

* Update PharmacyOrderModal.jsx

* Update patient.js

* Update medication.js

* better function name

* fix

* Update medication.js

* invalidated test

* dead code

* use source prescription id

* remove unused args

* Revert "remove unused args"

This reverts commit 15e6fd4.

* Revert "use source prescription id"

This reverts commit ec45043.

* lik pop to ongoing

This reverts commit 7ce73ee.

* Delete 1769850000001-backfillSourcePrescriptionIdOnPharmacyOrderPrescriptions.ts

* Update medication.js

* Update packages/web/app/components/Medication/PharmacyOrderMedicationTable.jsx

Co-authored-by: Tom Caiger <caigertom@gmail.com>

* simplifications from tom c

* better name

* Update pharmacy_order_prescriptions.md

---------

Co-authored-by: Daniel Nash <38335330+dannash100@users.noreply.github.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>

* fix(medications): no-issue: Disabled checkbox bug (#9164)

* Update DispenseMedicationWorkflowModal.jsx

* Update DispenseMedicationWorkflowModal.jsx

* fix(encounters): Release v2.49: Missing modal declaration (#9162)

* Update EncounterActions.jsx

* lost discharge check

* fix(medication): v2.49: Use frequency value for comparison instead of translated label (#9167)

* correct frequency submission

* Update MedicationForm.jsx

* simplify util and move single use into component

* Update FrequencySearchField.tsx

* Update medications.jsx

* fix(translation): PHX-303: Translate medication name (#9171)

* Pass translated name for the medication

* Create helper function to encapsulate logic

Co-authored-by: Gemini Code Assist <gemini-code-assist@google.com>

* Remove unused import

* Add medication du ration units to be translatable enums

Co-authored-by: Cursor Bugbot <bugbot@cursor.com>'

---------

Co-authored-by: Gemini Code Assist <gemini-code-assist@google.com>

* feat(invoicing): SAV-1129: Invoice UI updates (#9178)

* ui tweaks

* Update InvoicesTable.jsx

* sort

* Update InvoiceItem.jsx

* Update InvoiceDetails.jsx

* feat(invoicing): SAV-1129: Invoice UI Tweaks (#9183)

* refactor utils

* invoice summary

* Update InvoicesTable.jsx

* js doc

* Update patientInvoice.js

* fix(medication): no-issue: Design fixes (#9173)

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderMedicationTable.jsx

* correct quantity label

* show proper validation

* Update PharmacyOrderMedicationTable.jsx

* Update PharmacyOrderModal.jsx

* Update PharmacyOrderModal.jsx

* Update PharmacyOrderModal.jsx

* Update PharmacyOrderModal.jsx

* Update PharmacyOrderModal.jsx

* Update MedicationForm.jsx

* fix(medications): release 2.49: Use correct submit handler (#9187)

Update PharmacyOrderModal.jsx

* fix: Release 2.49: Show correct repeats on pharmacy orders (#9190)

show correct repeats

* test(e2e): Release 2.49 E2E tests (#9142)

* Add E2E.md for PR against release branch

adding random new file so I can make PR against release branch

* Fixing test failures for 2.49

* Removing unused imports from test files

* Skipping change diet test

* Delete E2E.md before merging

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Thomas Codling <tcodling@users.noreply.github.com>
Co-authored-by: Luis Emilio Navarro <60558370+NavarroEmilioLuis@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Daniel Nash <38335330+dannash100@users.noreply.github.com>
Co-authored-by: Gemini Code Assist <gemini-code-assist@google.com>
Co-authored-by: sepidehdehghani992 <sepideh@bes.au>

* release: Bump version to 2.51.0

* merge conflicts

* updates

* last tweaks

---------

Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Thomas Codling <58054247+tcodling@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Thomas Codling <tcodling@users.noreply.github.com>
Co-authored-by: Luis Emilio Navarro <60558370+NavarroEmilioLuis@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Gemini Code Assist <gemini-code-assist@google.com>
Co-authored-by: sepidehdehghani992 <sepideh@bes.au>
g
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @dannash100, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines date handling within the application, specifically targeting the VaccineForm. It introduces a utility function to process date values, ensuring they are consistently represented and mitigating potential issues related to timezone differences. This change aims to improve data integrity and user experience when dealing with date inputs.

Highlights

  • Date Handling Utility: Imported the trimToDate utility function from @tamanu/utils/dateTime to standardize date processing.
  • Vaccine Form Date Normalization: Applied the trimToDate function to the date field within the VaccineForm's initial values, ensuring consistent date representation.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • packages/web/app/forms/VaccineForm.jsx
    • Imported the trimToDate utility from @tamanu/utils/dateTime.
    • Applied trimToDate to the date field when initializing form values.
Activity
  • No specific activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the VaccineForm to handle timezone differences for vaccine dates in edit mode. It applies trimToDate to the existing date value to ensure only the date portion is used, which helps prevent issues when converting between timezones. The changes are confined to VaccineForm.jsx and appear to correctly address the issue.

@dannash100 dannash100 changed the title tweak(timezone): multi timezone review changes tweak(timezone): multi timezone testing fixes Feb 25, 2026
@review-hero
Copy link

review-hero bot commented Feb 25, 2026

🦸 Review Hero Summary
3 agents reviewed this PR | 2 failed | 0 critical | 2 suggestions | 0 nitpicks

Base automatically changed from epic-multiple-timezones to main March 5, 2026 05:57
@rohan-bes rohan-bes requested a review from a team as a code owner March 5, 2026 05:57
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.

1 participant