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

#6289 Insurance fields on Invoice #6503

Merged
merged 8 commits into from
Feb 13, 2025
Merged

Conversation

CarlosNZ
Copy link
Contributor

@CarlosNZ CarlosNZ commented Feb 12, 2025

Fixes #6289

Just making a draft PR real quick so @jmbrunskill can have a look. Will flesh out the details here shortly.

πŸ‘©πŸ»β€πŸ’» What does this PR do?

  • Adds three fields to "invoice" table:
    • name_insurance_join_id
    • insurance_discount_amount
    • insurance_discount_percentage
  • Add sync/translations for those fields

πŸ§ͺ Testing

  • In OG, make sure you have at least one insurance provider and a patient who has a policy with that provider
  • In OG, create a prescription for that patient, and in "Payments" add their insurance policy
  • Sync to OMS
  • You might have to inspect the database for now (there's no UI), but the insurance details for that newly synced invoice should be present.
    (Will write more thorough tests for the UI part of this )

@github-actions github-actions bot added this to the v2.6.0 milestone Feb 12, 2025
@github-actions github-actions bot added Team Piwakawaka James, Carl, John, Zachariah feature: dispensing labels Feb 12, 2025
Copy link
Contributor

@jmbrunskill jmbrunskill left a comment

Choose a reason for hiding this comment

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

@CarlosNZ this fixes the sync tests.
6289-insurance-fields-on-invoice...6289-invoice-sync-fixes

Will do a proper review later on...

ALTER TABLE invoice
ADD COLUMN insurance_discount_amount {DOUBLE};
ALTER TABLE invoice
ADD COLUMN insurance_discount_rate {DOUBLE};
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if it's worth changing but in name_insurance_join I called this discount_percentage
I like to explicitly say it's a percentage vs rate which could be a ratio or 0.1 for 10% for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, agreed: e24245c

Copy link
Contributor

@jmbrunskill jmbrunskill left a comment

Choose a reason for hiding this comment

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

Looks good to go once my branch is merged

@CarlosNZ CarlosNZ marked this pull request as ready for review February 13, 2025 04:36
@CarlosNZ
Copy link
Contributor Author

Thanks @jmbrunskill -- think it's all good now :)

@CarlosNZ CarlosNZ requested a review from jmbrunskill February 13, 2025 04:37
Copy link
Contributor

@jmbrunskill jmbrunskill left a comment

Choose a reason for hiding this comment

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

Thanks Carl, looks good to me!

@CarlosNZ CarlosNZ merged commit 204f1e0 into develop Feb 13, 2025
1 of 2 checks passed
@CarlosNZ CarlosNZ deleted the 6289-insurance-fields-on-invoice branch February 13, 2025 23:44
@alainsussol alainsussol added Built Tested: Tested in Feature Built tested as part of Feature testing and removed Built Tested: Tested in Feature Built tested as part of Feature testing labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: dispensing Team Piwakawaka James, Carl, John, Zachariah
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync and Translate for insurance fields on Invoice
3 participants