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

feat: medication enhancements and mar #7238

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

khoi-bes
Copy link
Contributor

@khoi-bes khoi-bes commented Feb 18, 2025

Changes

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

Deploys

  • Deploy to Tamanu Internal

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

@khoi-bes khoi-bes changed the title Epic medication enhancements and mar 2 epic: medication enhancements and mar Feb 18, 2025
@khoi-bes khoi-bes changed the title epic: medication enhancements and mar feat: medication enhancements and mar Feb 18, 2025
@khoi-bes khoi-bes force-pushed the epic-medication-enhancements-and-mar-2 branch from 7d9e610 to 2d196d8 Compare February 18, 2025 20:53
@huytranbes huytranbes force-pushed the epic-medication-enhancements-and-mar-2 branch from fd5ca16 to 5e4ae47 Compare February 19, 2025 04:13
@khoi-bes khoi-bes force-pushed the epic-medication-enhancements-and-mar-2 branch from 5e4ae47 to aa0a9c0 Compare February 19, 2025 04:30
@khoi-bes khoi-bes requested review from a team, edmofro and chris-bes as code owners February 19, 2025 04:33
Copy link

Android builds 📱

@khoi-bes khoi-bes force-pushed the epic-medication-enhancements-and-mar-2 branch 3 times, most recently from 7606272 to 527d1e7 Compare February 19, 2025 05:43
@khoi-bes khoi-bes closed this Feb 19, 2025
@khoi-bes khoi-bes force-pushed the epic-medication-enhancements-and-mar-2 branch from 14a2430 to 07c18bd Compare February 19, 2025 05:46
feat(medication): EPI-1085: Add frequency to settings
@khoi-bes khoi-bes reopened this Feb 19, 2025
@khoi-bes khoi-bes force-pushed the epic-medication-enhancements-and-mar-2 branch from 90ffff2 to f2fd56a Compare February 19, 2025 05:57
khoi-bes and others added 7 commits February 19, 2025 13:06
* feat(medication): EPI-1083: Extend drugs reference data

* refactor(migrations): Remove unused drug reference data insertion logic

* feat(migrations): Add bulk insert for reference drugs from reference data

* feat(migrations): Add conditional check for bulk insert of reference drugs

* fix(migrations): Update conditional check for bulk insert of reference drugs

* add docs for models

* Update packages/database/src/migrations/1736614067055-addReferenceDrugsTable.js

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

* address feedbacks

* address feedback

* fix dbt models

---------

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
* feat: Add frequency logic

* fix incorrect frequency details

* resolve feedback and separate ADMINISTRATION_FREQUENCY_DETAILS constant

* apply translation for frequency synonyms

* fix: Correct ADMINISTRATION_FREQUENCIES constant typo
* update models and associations for prescriptions and encounters

* fix test case for the new medication schema on central

* update medication_info query to use new schema and associations

* refactor: update models and associations for prescriptions and encounters for facility server

* update tests and query for new db schema

* update database schema for medications on mobile

* add missing model and refactor query on mobile

* fix saving prescription not working on mobile

* update Prescription buildSyncFilter method name

* fix test determinism issue for new migration

* fix cannot access 'referenceData' before initialization

* resolve feedback

* use raw query to populate encounter_prescriptions table

* fix test cases after removing is_discharge column

* Add is_discharge column to EncounterPrescription model

* Revert "fix test cases after removing is_discharge column"

* include isDischarge flag in EncounterPrescription model and related tests

* fix test case after moving isDischarge column to EncounterPrescription

* update DBT model docs

* continue updating DBT model docs

* migration: Remove inexistent column from prescriptions table
* feat: Add frequency logic

* fix incorrect frequency details

* resolve feedback and separate ADMINISTRATION_FREQUENCY_DETAILS constant

* feat: enable configuration for administrationWindows and administrationIdealTimes with validation

* feat: Remove unused import in medications.ts
* feat: Add frequency logic

* fix incorrect frequency details

* feat: update new prescription form (FE)

* fix merge error

* finalize New prescription form (fe)

* remove unnecessary util function change

* remove unnecessary HistoryPane changes

* feat: Update prescription model and migration to include new fields and remove obsolete ones

* feat: Remove obsolete 'is_variable_dose' column from prescriptions table migration

* feat: Add startDate, doseAmount, units, and frequency fields to dummy prescription data

* feat: Update prescriptions documentation and schema to include new fields and remove obsolete ones

* feat: Revert adding 'repeats' field to prescriptions model and documentation

* feat: Change data type of 'end_date' field from date to character(19) in prescriptions model

* feat: Add doseAmount, units, frequency, and route fields to Encounter test

---------

Co-authored-by: khoi.nguyen <khoi@bes.au>
…edications constants (#7237)

* tweaks: EPI-1099: Remove config for administrationWindows and update medications constants

* add missing , to mobile migration index file

* fix: failed test case when value is undefined
@khoi-bes khoi-bes requested a review from a team as a code owner February 20, 2025 02:08
@khoi-bes khoi-bes force-pushed the epic-medication-enhancements-and-mar-2 branch from 4f571b4 to 109ab4c Compare February 20, 2025 02:09
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