Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
repp_backend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julieta Dubra Raimunde
repp_backend
Commits
609804a9
Commit
609804a9
authored
3 years ago
by
Agustin Ruiz Diaz Cambon
Browse files
Options
Downloads
Patches
Plain Diff
ParameterService (1 to 5 years)
parent
b9cc7ced
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Services/ParameterService.ts
+26
-0
26 additions, 0 deletions
src/Services/ParameterService.ts
with
26 additions
and
0 deletions
src/Services/ParameterService.ts
0 → 100644
+
26
−
0
View file @
609804a9
import
AgeBracket
from
'
../Enum/AgeBracket
'
;
import
Sex
from
'
../Enum/Sex
'
;
// import Parameter from '../Models/Parameter';
const
getEquationValues
=
(
ageBracket
:
AgeBracket
,
sex
:
Sex
):
number
[]
=>
{
let
res
:
number
[]
=
[];
switch
(
ageBracket
)
{
// Para personas de entre 1 y 5 años
case
(
AgeBracket
[
'
1 año
'
]
||
AgeBracket
[
'
2 años
'
]
||
AgeBracket
[
'
3 años
'
]
||
AgeBracket
[
'
4 años
'
]
||
AgeBracket
[
'
5 años
'
]):
{
if
(
sex
===
Sex
.
Masculino
)
{
// 310.2 + (63.3*MP) - 0.263*MP^2
res
=
[
310.2
,
63.3
,
-
0.263
];
}
else
if
(
sex
===
Sex
.
Femenino
)
{
// 263.4 + (65.3*MP) - 0.454*MP^2
res
=
[
263.4
,
65.3
,
-
0.454
];
}
break
;
}
default
:
{
res
=
[];
}
}
return
res
;
};
export
default
{
getEquationValues
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment