Skip to content

Commit

Permalink
Merge pull request #16 from dukehealth/mid-parental-height
Browse files Browse the repository at this point in the history
Adjust potential height based on mid-parental height based on gender
  • Loading branch information
nschwertner committed May 19, 2016
2 parents 8a2b113 + f192a23 commit 7be6e77
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/gc-smart-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ window.GC = window.GC || {};
this.familyHistory.mother.height &&
this.familyHistory.father.isBio &&
this.familyHistory.mother.isBio) {
this.midParentalHeight = GC.Util.round((this.familyHistory.father.height + this.familyHistory.mother.height) / 2);
this.midParentalHeight = this.getMidParentalHeight().height;
} else {
this.midParentalHeight = null;
}
Expand Down Expand Up @@ -842,7 +842,11 @@ window.GC = window.GC || {};
!this.familyHistory.mother.isBio) {
return null;
}
var midHeight = GC.Util.round((this.familyHistory.father.height + this.familyHistory.mother.height) / 2);
var midHeight
if (this.gender === "male")
midHeight = GC.Util.round((this.familyHistory.father.height + this.familyHistory.mother.height + 13) / 2);
else
midHeight = GC.Util.round((this.familyHistory.father.height + this.familyHistory.mother.height - 13) / 2);

var dataSet = GC.DATA_SETS.CDC_STATURE;
var data = dataSet.data[this.gender];
Expand Down

0 comments on commit 7be6e77

Please sign in to comment.