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

(fix) O3-4101: Configure service types and billables to be used in billing app #853

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions distro/configuration/concepts/billingconcepts.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Uuid,Void/Retire,Same as mappings,Fully specified name:en,Fully specified name:fr,Fully specified name:es,Short name:en,Short name:fr,Short name:es,Description:en,Description:fr,Description:es,Data class,Data type,Members,_version:1,_order:500
3f6f6c92-8d5c-4a9e-bb1c-d3e00e4f8b71,,,Orthopedic Services,,,OPS,,,,,,Misc,Text,,,
550e8400-e29b-41d4-a716-446655440000,,,Nutrition Services,,,NTS,,,,,,Misc,Text,,,
0dfe7d9f-1dc9-4e68-b4cb-d19e1a006c54,,,Service Types,,,,,,,,,ConvSet,N/A,Antenatal Services;Orthopedic Services;Nutrition Services,,
16 changes: 16 additions & 0 deletions distro/configuration/liquibase/liquibase.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<!-- Temporary work around to add prices via liquibase, as we wait for for the billable service edit feature -->
<changeSet id="add_item_prices" author="wodpachua">
<sql>SET foreign_key_checks = 0;</sql>
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

@dkayiwa Thanks Daniel, have made the change.

Copy link
Member

Choose a reason for hiding this comment

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

I thought you would change your sql insertions into some sort of csv files. Just like you have done for the rest.

Copy link
Author

@WodPachua WodPachua Oct 21, 2024

Choose a reason for hiding this comment

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

@dkayiwa Yes, but prices are not a supported domain currently in initializer... because its data that changes, so it has to be added by the user via the UI or via such SQL instructions as I had done previously.

Thats why I had used the SQL insertations, since we don't have an edit mode to edit the services added via initializer and add prices to them. And we needed to demo here... so this was a temporary work around until the edit mode could be introduced, or a way to add support for prices

Copy link
Author

Choose a reason for hiding this comment

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

<sqlFile path="sql/item_prices.sql" relativeToChangelogFile="true" stripComments="true" />
<sql>SET foreign_key_checks = 1;</sql>
</changeSet>
</databaseChangeLog>
15 changes: 15 additions & 0 deletions distro/configuration/liquibase/sql/item_prices.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
insert into cashier_item_price (`service_id`, `price`, `payment_mode`, `name`, `creator`, `date_created`, `uuid`)
values
('1', '50.00', '1', 'Cash', '1', NOW(), uuid()),
('1', '55.00', '2', 'Bank transfer', '1', NOW(), uuid()),
('1', '55.00', '3', 'Paypal', '1', NOW(), uuid()),

('2', '80.00', '1', 'Cash', '1', NOW(), uuid()),
('2', '90.00', '2', 'Bank transfer', '1', NOW(), uuid()),
('2', '90.00', '3', 'Paypal', '1', NOW(), uuid()),

('3', '27.00', '1', 'Cash', '1', NOW(), uuid()),
('3', '32.00', '2', 'Bank transfer', '1', NOW(), uuid()),
('3', '32.00', '3', 'Paypal', '1', NOW(), uuid()),

('4', '15.00', '1', 'Cash', '1', NOW(), uuid());
6 changes: 6 additions & 0 deletions frontend/config-core_demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,11 @@
},
"@openmrs/esm-styleguide": {
"Brand color #1": "#005d5d"
},
"@openmrs/esm-billing-app": {
"serviceTypes": {
"billableService": "0dfe7d9f-1dc9-4e68-b4cb-d19e1a006c54"
},
"defaultCurrency": "USD"
}
}
Loading