Duration of Disease #12
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Cost-Benefit-Projection#12
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This needs to be included. In this way it would be applied as follows
Work days lost of Problem = Annual work days lost x duration
Then the user sets the projected reduction in mortality and morbidity as being over the whole period rather than over the year.
I will provide a reference to the code as soon as possible so we can do it.
I need that reference to make the needed changes thanks.
In the sum file change to:
$this->items[$id]->$gender->$age->estimated_burden = ($this->items[$id]->$gender->$age->yld * duration/ $this->company->country_yld)*100;
also
change to:
$this->items[$id]->$gender->$age->mortality_raw = ( _**$this->company->healthData[$id]->{$gender.'death'}[$age]*duration/100000**_ )
Both are now including a "multiplied by duration" operation. This is the duration defined in this line
sorry, theraw mortality line should read
$this->items[$id]->$gender->$age->mortality_raw = ($this->company->healthData[$id]->{$gender.'death'}[$age]*duration/100000)
I didn't mean to add the extra characters
Okay so the duration is a new value in each Cause/Risk? Where in the back-end will this value be added?
No. we can't assign a duration to each cause/risk as it is specific to each intervention.
That means the above solution doesn't work, so forget that.
What would be the possibility of adding a multiplier (_duration) to the following columns in _Intervention Net Benefit* Table?
This would then carry through to the Intervention Cost Benefit Chart
So the duration will be set per intervention or per targeted risk/cause in an intervention?
The calculations for the interventions are done from line1387 to line1535
You will possibly need to added the changes to line1435
Please give me the exact calculation and the line you think it should be added. I tried to name the values in the code so you can understand what is being done and when.
We should multiply the cost of the problem and the annual benefit by " duration" . This will give us the figures we need.
I'm not sure but I think we should edit the following to acheive this:
Line 1481/1482
or line 1435
['cost_of_problem_scaled'] = (cost_of_problem_scaled + subtotal_cost_scaled) * duration
Line 1471/1472
or line 1440
benefit = annual benefit * duration
Similarly for lines 1473 or 1445 and 1473
This leaves a semantic problem in that the values are all called "annual" (annual_cost, annual_benefit etc.) whereas this change makes the totals "cumulative" not annual.
So we will again add the DURATION (years) field back to the intervention table and only allow integers or would a decimal value also be allowed?
Then line 1481 and 1471 is only the sum of the totals and not where the actual change is to be made.
Here is the lines I think should change on account of your proposal:
For the Cost
LINE1435 Must change to
For the Benefit
LINE1440 Must change to
& LINE1445
Then these new values:
Will be used throughout the rest of the calculation. Also all naming of the values as annual will be removed. If I remember correctly this is how it was before... Why did we change it back then?
Anyway does all this look correct to you? Please confirm and I will commit the changes so we can test the results.
Hi,
The calculations look OK (I don't think we had it like this before)
I think let's just allow integers, then put a label next to duration in the intervention edit page saying "in number of years". Put in "1" as a default value
Okay,
I was wondering since I remembered this duration value before we moved over to the YLD's. But you may be right :)
Yes. It was there in the old incidence/prevalence version, but we didn't migrate it until now.
@distantobserver the changes has been made and is now installed on the https://www.staffhealthcbp.com/ please test the duration implementation to insure it works as expected.
Hi.
The change to benefit is OK. (though I don't see it on the github code, line 1140 and 1145)
The cost of problem is not multiplying - rather the cost of the intervention is. I realise I gave you a wrong reference in the code. 1435 should have remained unchanged. Sorry.
We need to multiply the cost of problem referred to in line 1433https://github.com/namibia/CBP-Joomla-3-Component/blob/master/admin/helpers/sum.php#L1433
so that the number in column 6 is cost of problem * duration
To see the changes you need to go to the staging branch since the final commit to the master branch is only made once we are sure it works.
So to get to the updated file change the branch from master to staging and then go to the file as normal.
This is not good news, I think that is why I use the words please give me the exact calculation and the line you think it should be added
I am little unsure what to change now, and what to un-change. Looking back at my detailed/exact calculations I gave as a proposal here is what I did:
For the Cost
LINE1441 was change to
For the Benefit
LINE1447 was change to
& LINE1453
Then these new values:
So what must be changed back to its old state and what must stay the same?
Then if you want to target the cost_of_problem the following may be the implementation. again looking at the file in the staging branch and using its line numbers as reference (they are not the same as the master branch).
For Cost of Problem
LINE1436 must be changed to
The code looks OK and the figures on the site are correct now.
Thanks and sorry for the confusion.