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(Distribution center) #5860

Merged
merged 6 commits into from
Aug 17, 2021
Merged

Conversation

lomamech
Copy link
Contributor

  • Resolve ER_PARSE_ERROR in SQL Syntax, by the adding ' for label
    of service who have Apostrophe
  • fix error in params for function getDateRangeFromPeriods
  • Correction of the call to the getDateRangeFromPeriods function by
    changing the parameters
  • Prevent processing in case the list of accounts is empty

closes #4939

@jniles
Copy link
Contributor

jniles commented Aug 17, 2021

@lomamech, go ahead and fix these conflicts. LGTM otherwise.

- Resolve ER_PARSE_ERROR in SQL Syntax, by the adding ' for label
  of service who have Apostrophe

closes IMA-WorldHealth#4939
- fix error in params for function getDateRangeFromPeriods
Copy link
Collaborator

@jmcameron jmcameron left a comment

Choose a reason for hiding this comment

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

As long as you're updating this, I suggest changing the English items related to cost centers (since that seems to be the common terminology these days):

  • "Fee Center Management" => "Cost Center Management" (main menu)
  • "Fee Center" => "Cost Center" (under Fee Center Management menu)
  • and other places that "Fee Center" appears.

Perhaps this is for another Issue, but the "Fee Center Report" seems to be restricted to specific months. Do we want the ability to use a more arbitrary period for this analysis, eg, the last 6 months/quarter/year? It seems like that flexibility would be important to make better estimates than ones based on a single month, since data over longer periods would not be as volatile..

BTW, I was not sure how to test this.

@lomamech
Copy link
Contributor Author

As long as you're updating this, I suggest changing the English items related to cost centers (since that seems to be the common terminology these days):

  • "Fee Center Management" => "Cost Center Management" (main menu)
  • "Fee Center" => "Cost Center" (under Fee Center Management menu)
  • and other places that "Fee Center" appears.

Perhaps this is for another Issue, but the "Fee Center Report" seems to be restricted to specific months. Do we want the ability to use a more arbitrary period for this analysis, eg, the last 6 months/quarter/year? It seems like that flexibility would be important to make better estimates than ones based on a single month, since data over longer periods would not be as volatile..

BTW, I was not sure how to test this.

@jmcameron In the French documentation, the notion of Fee Center (Centre des frais) includes the cost center (centre de coût) and the profit center (Centre de profit)

@lomamech
Copy link
Contributor Author

@jmcameron @jniles I would only like to know in English the concept of cost centers (Concerns both the cost center and the profit center)

@jmcameron
Copy link
Collaborator

@jmcameron In the French documentation, the notion of Fee Center (Centre des frais) includes the cost center (centre de coût) and the profit center (Centre de profit)

I have to defer to @jniles on this. But all the English literature I've seen uses "Cost Centers" very prominently for parts of the organization that cost money to operate and does not emphasize "Profit centers" except in the sense that the centers that are potentially generating profit ("Direct") by providing products for the consumers vs those that are "Overhead". I also find it strange that "Frais" (eg, fee) is applied to profit.

@jmcameron
Copy link
Collaborator

As long as you're updating this, I suggest changing the English items related to cost centers (since that seems to be the common terminology these days):

Perhaps this is for another Issue, but the "Fee Center Report" seems to be restricted to specific months. Do we want the ability to use a more arbitrary period for this analysis, eg, the last 6 months/quarter/year? It seems like that flexibility would be important to make better estimates than ones based on a single month, since data over longer periods would not be as volatile..

These issues could be addressed later in a separate Issue/PR.

@lomamech
Copy link
Contributor Author

I have to defer to @jniles on this. But all the English literature I've seen uses "Cost Centers" very prominently for parts of the organization that cost money to operate and does not emphasize "Profit centers" except in the sense that the centers that are potentially generating profit ("Direct") by providing products for the consumers vs those that are "Overhead". I also find it strange that "Frais" (eg, fee) is applied to profit.
For French speakers the concept of Fee center is correct, maybe it will only be necessary to use "Cost Center" for the English translation. @jniles what is your point of view
https://www.beaboss.fr/Definitions-Glossaire/Centre-de-frais-239852.htm

@jniles
Copy link
Contributor

jniles commented Aug 17, 2021

@jmcameron @lomamech the name "Fee Center" was a compromise made a long time ago. @jmcameron is right that we don't have Fee Centers in English. They are all cost centers in English.

Part of this is related to the differences between how OHADA treats costs and the general accepted accounting principles (GAAP) of the USA treats costs. In OHADA/PCGC, the purchase of medications is a cost. In GAAP, it is the consumption of the medications that is the cost. In GAAP, the purchase of fixed assets is not a cost, but the depreciation of them is a cost. I'm not sure how OHADA handles this.

I think Larry is probably looking for the GAAP definition of cost centers, so we'll have to make sure we get his approval on whatever we come up with before getting too far.

I haven't finished reading enough of the Cost Center book to figure out the most appropriate terms. We will probably need to change some of the English around eventually. I think the French terms are probably appropriate.

@jniles
Copy link
Contributor

jniles commented Aug 17, 2021

In any case, this should be more a discussion for an issue, not this PR. This PR fixes a couple of bugs related to APIs that changed without warning and caused the date search to mess up. We will address translation issues as we tackle the whole of cost centers.

@jniles
Copy link
Contributor

jniles commented Aug 17, 2021

I've folded some of this discussion into #5861, please add anything that might be missing @lomamech @jmcameron .

Copy link
Contributor

@jniles jniles left a comment

Choose a reason for hiding this comment

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

Merging as this addresses the bugs reported in the issue and has clean code.

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 17, 2021

Build succeeded:

@bors bors bot merged commit 9e6de5d into IMA-WorldHealth:master Aug 17, 2021
@lomamech lomamech deleted the fixFeeCenterDistr branch November 30, 2021 10:58
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.

Filter on distribution_center may be buggy
3 participants