Skip to content

Commit

Permalink
Default Ratio Observations values to null instead of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dczulada committed Jun 28, 2024
1 parent 080c510 commit 7b2dbaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/helpers/calculator_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ module.exports = class CalculatorHelpers {
if ('observation_values' in populationResults) {
// DENOM observation will be the first of 2 observations
populationResultsHandled.observation_values[1] = populationResultsHandled.observation_values[0];
populationResultsHandled.observation_values[0] = 0;
populationResultsHandled.observation_values[0] = null;
}
}
if (populationResults.DENEX != null && !this.isValueZero('DENEX', populationResults) && populationResults.DENEX >= populationResults.DENOM) {
if ('observation_values' in populationResults) {
populationResultsHandled.observation_values[0] = 0;
populationResultsHandled.observation_values[0] = null;
}
}
if (this.isValueZero('NUMER', populationResults)) {
Expand All @@ -131,13 +131,13 @@ module.exports = class CalculatorHelpers {
}
if ('observation_values' in populationResults) {
// NUMER observation will be the second of 2 observations
populationResultsHandled.observation_values[1] = 0;
populationResultsHandled.observation_values[1] = null;
}
}
if (populationResults.NUMER != null && !this.isValueZero('NUMEX', populationResults) && populationResults.NUMEX >= populationResults.NUMER) {
if ('observation_values' in populationResults) {
// NUMER observation will be the second of 2 observations
populationResultsHandled.observation_values[1] = 0;
populationResultsHandled.observation_values[1] = null;
}
}
return populationResultsHandled;
Expand Down

0 comments on commit 7b2dbaf

Please sign in to comment.