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

O3-2996: Add billing module to openmrs distro pom file and spa config… #802

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

alaboso
Copy link

@alaboso alaboso commented Apr 3, 2024

Description of what I changed

This PR is to introduce the Billing and StockManagement modules to the reference application. Billing requires Stock Management as a dependency.

  • Added stock management backend module
  • Added billing backend module
  • Added stock management frontend module
  • Added billing frontend module

Issue I worked on

see https://openmrs.atlassian.net/browse/O3-2996

Checklist: I completed these to help reviewers :)

  • My IDE is configured to follow the code style of this project.

    No? Unsure? -> configure your IDE, format the code and add the changes with git add . && git commit --amend

  • I have added tests to cover my changes. (If you refactored
    existing code that was well tested you do not have to add tests)

    No? -> write tests and add them to this commit git add . && git commit --amend

  • I ran mvn clean package right before creating this pull request and
    added all formatting changes to my commit.

    No? -> execute above command

  • All new and existing tests passed.

    No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.

  • My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master

@gracepotma
Copy link
Contributor

FYI @dkayiwa please note these backend modules are now coming into the RefApp - so if there are concerns with the backend, now is the time to address ;) :)

@gracepotma
Copy link
Contributor

FYI folks: Amos does have a plan to decouple the billing module from the inventory module in the coming weeks.

@ojwanganto
Copy link

@gracepotma - that will be great. Will the module still be able to bill for services and stock (defined within/outside of the inventory) and how do we plan to keep the references to stock items?

Copy link

@ODORA0 ODORA0 left a comment

Choose a reason for hiding this comment

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

LGTM

@gracepotma
Copy link
Contributor

gracepotma commented Apr 15, 2024

@gracepotma - that will be great. Will the module still be able to bill for services and stock (defined within/outside of the inventory) and how do we plan to keep the references to stock items?

@alaboso can you please kindly respond to @ojwanganto's good question here? We definitely need to know if this would impact the inventory workflows :)

In meantime @dkayiwa can you please review this PR? I want to know if you feel this is appropriate and ready to include in the RefApp release being cut this week on April 18th. :)

CC @ebambo

@ebambo
Copy link

ebambo commented Apr 16, 2024

@gracepotma - that will be great. Will the module still be able to bill for services and stock (defined within/outside of the inventory) and how do we plan to keep the references to stock items?

@alaboso can you please kindly respond to @ojwanganto's good question here? We definitely need to know if this would impact the inventory workflows :)

In meantime @dkayiwa can you please review this PR? I want to know if you feel this is appropriate and ready to include in the RefApp release being cut this week on April 18th. :)

CC @ebambo

@gracepotma thanks for push the review of this PR. Regarding @ojwanganto comment the plan is definitely to continue supporting any existing workflows. The decoupling is in line with the approach that is being discussed by the Interoperability squad. Happy to discuss this more in-depth on the billing squad on slack.

@nravilla
Copy link

nravilla commented May 2, 2024

Attempted the changes in the PR, but encountered errors preventing the start of both the stock management and billing modules. The specific error message observed in the admin is -

Module Stock Management cannot be started because it requires the following module(s): dataexchange,uicommons ${uicommonsModuleVersion},uiframework ${uiframeworkVersion},appframework ${appframeworkVersion},appui ${appuiVersion},coreapps ${coreappsVersion} Please install and start these modules first.

@alaboso
Copy link
Author

alaboso commented May 3, 2024

Attempted the changes in the PR, but encountered errors preventing the start of both the stock management and billing modules. The specific error message observed in the admin is -

Module Stock Management cannot be started because it requires the following module(s): dataexchange,uicommons ${uicommonsModuleVersion},uiframework ${uiframeworkVersion},appframework ${appframeworkVersion},appui ${appuiVersion},coreapps ${coreappsVersion} Please install and start these modules first.

@nravilla - These dependencies have been removed in this PR with only dataexchange and webservices.rest remaining. I realised we can remove dataexchange (which is used to load metadata privileges and roles) in favour of initializer.
@slubwama what do you think? I will update this PR accordingly.

@alaboso alaboso marked this pull request as draft May 3, 2024 06:36
@dkayiwa
Copy link
Member

dkayiwa commented May 14, 2024

@alaboso do we have the stockmanagement and billing modules on https://addons.openmrs.org/?

@dkayiwa
Copy link
Member

dkayiwa commented May 14, 2024

@alaboso the billing module also fails to start with these errors in the logs: https://pastebin.com/tpXB42WL

@ojwanganto
Copy link

@dkayiwa can we try clearing the liquibase first? Try running the following and see if the error clears.

set foreign_key_checks=0;
drop table if exists cashier_bill ;
drop table if exists cashier_bill_line_item ;
drop table if exists cashier_bill_payment ;
drop table if exists cashier_bill_payment_attribute ;
drop table if exists cashier_cash_point ;
drop table if exists cashier_department ;
drop table if exists cashier_item ;
drop table if exists cashier_item_attribute ;
drop table if exists cashier_item_attribute_type ;
drop table if exists cashier_item_code ;
drop table if exists cashier_item_price ;
drop table if exists cashier_payment_mode ;
drop table if exists cashier_payment_mode_attribute_type ;
drop table if exists cashier_seq_group_sequence ;
drop table if exists cashier_seq_receipt_number_generator ;
drop table if exists cashier_timesheet;
set foreign_key_checks=1;
delete from liquibasechangelog where id like 'openhmis.cashier%';

@dkayiwa
Copy link
Member

dkayiwa commented May 15, 2024

@dkayiwa can we try clearing the liquibase first? Try running the following and see if the error clears.

set foreign_key_checks=0; drop table if exists cashier_bill ; drop table if exists cashier_bill_line_item ; drop table if exists cashier_bill_payment ; drop table if exists cashier_bill_payment_attribute ; drop table if exists cashier_cash_point ; drop table if exists cashier_department ; drop table if exists cashier_item ; drop table if exists cashier_item_attribute ; drop table if exists cashier_item_attribute_type ; drop table if exists cashier_item_code ; drop table if exists cashier_item_price ; drop table if exists cashier_payment_mode ; drop table if exists cashier_payment_mode_attribute_type ; drop table if exists cashier_seq_group_sequence ; drop table if exists cashier_seq_receipt_number_generator ; drop table if exists cashier_timesheet; set foreign_key_checks=1; delete from liquibasechangelog where id like 'openhmis.cashier%';

@ojwanganto that will not work because as you clearly see here, that table is referenced https://github.com/openmrs/openmrs-module-billing/blob/main/omod/src/main/resources/liquibase.xml#L118 before it gets created https://github.com/openmrs/openmrs-module-billing/blob/main/omod/src/main/resources/liquibase.xml#L422

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants