-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from rcpch:eatyourpeas/issue98
nondisjunction-lines
- Loading branch information
Showing
5 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { Domains } from '../interfaces/Domains'; | ||
|
||
export const nondisjunctionThresholds = { | ||
male: [ | ||
{ | ||
x: 0.038, | ||
label: 'Transition point from UK-WHO to UK90 reference', | ||
}, | ||
{ | ||
x: 2, | ||
label: "Measure length until 2y. Measure height from 2y. A child's height is usually slightly less than their length.", | ||
}, | ||
{ | ||
x: 4, | ||
label: 'Transition point from UK-WHO to UK90 reference', | ||
}, | ||
], | ||
female: [ | ||
{ | ||
x: 0.038, | ||
label: 'Transition point from UK-WHO to UK90 reference', | ||
}, | ||
{ | ||
x: 2, | ||
label: "Measure length until 2y. Measure height from 2y. A child's height is usually slightly less than their length.", | ||
}, | ||
{ | ||
x: 4, | ||
label: 'Transition point from UK-WHO to UK90 reference', | ||
}, | ||
], | ||
}; | ||
|
||
export function makeNonDisjunctionThresholds(domains: Domains | null, sex: 'male' | 'female') { | ||
if (!domains) { | ||
return []; | ||
} | ||
const newNonDisjunctionThresholds: any[] = []; | ||
for (const element of nondisjunctionThresholds[sex]) { | ||
const dataSubArray = []; | ||
dataSubArray.push({ x: element.x, y: domains.y[0], label: element.label }); | ||
dataSubArray.push({ x: element.x, y: domains.y[1], label: element.label }); | ||
newNonDisjunctionThresholds.push(dataSubArray); | ||
} | ||
return newNonDisjunctionThresholds; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters