Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (sex === 'male') {
- if (grade <= 4) {
- rcads.t.sad = Math.round(((sadRaw - 4.29) * 10) / 3.00 + 50)
- rcads.t.gad = Math.round(((gadRaw - 4.11) * 10) / 3.00 + 50)
- rcads.t.mdd = Math.round(((mddRaw - 3.71) * 10) / 2.93 + 50)
- rcads.t.pd = Math.round(((pdRaw - 1.91) * 10) / 1.90 + 50)
- rcads.t.soc = Math.round(((socRaw - 8.44) * 10) / 3.88 + 50)
- rcads.t.ocd = Math.round(((ocdRaw - 2.04) * 10) / 2.43 + 50)
- rcads.t.anxiety = Math.round(((anxietyRaw - 20.78) * 10) / 10.52 +
- 50)
- rcads.t.total = Math.round(((totalRaw - 24.49) * 10) / 12.39 + 50)
- }
- else if (grade === 5 || grade === 6) {
- rcads.t.sad = Math.round(((sadRaw - 2.85) * 10) / 2.79 + 50)
- rcads.t.gad = Math.round(((gadRaw - 3.74) * 10) / 2.49 + 50)
- rcads.t.mdd = Math.round(((mddRaw - 3.62) * 10) / 2.87 + 50)
- rcads.t.pd = Math.round(((pdRaw - 1.64) * 10) / 1.84 + 50)
- rcads.t.soc = Math.round(((socRaw - 7.71) * 10) / 3.94 + 50)
- rcads.t.ocd = Math.round(((ocdRaw - 2.01) * 10) / 2.31 + 50)
- rcads.t.anxiety = Math.round(((anxietyRaw - 17.95) * 10) / 9.84 +
- 50)
- rcads.t.total = Math.round(((totalRaw - 21.57) * 10) / 11.9 + 50)
- } else if (grade === 7) {
- rcads.t.sad = Math.round(((sadRaw - 1.97) * 10) / 2.21 + 50)
- rcads.t.gad = Math.round(((gadRaw - 3.26) * 10) / 2.60 + 50)
- rcads.t.mdd = Math.round(((mddRaw - 3.54) * 10) / 3.18 + 50)
- rcads.t.pd = Math.round(((pdRaw - 1.61) * 10) / 1.56 + 50)
- rcads.t.soc = Math.round(((socRaw - 7.59) * 10) / 4.31 + 50)
- rcads.t.ocd = Math.round(((ocdRaw - 1.62) * 10) / 1.98 + 50)
- rcads.t.anxiety = Math.round(((anxietyRaw - 16.04) * 10) / 9.74 +
- 50)
- rcads.t.total = Math.round(((totalRaw - 19.58) * 10) / 11.99 + 50)
- }
- } else if (sex === 'female') {
- if (grade <= 4) {
- rcads.t.sad = Math.round(((sadRaw - 4.20) * 10) / 3.00 + 50)
- rcads.t.gad = Math.round(((gadRaw - 4.00) * 10) / 2.87 + 50)
- rcads.t.mdd = Math.round(((mddRaw - 3.25) * 10) / 3.58 + 50)
- rcads.t.pd = Math.round(((pdRaw - 1.87) * 10) / 2.61 + 50)
- rcads.t.soc = Math.round(((socRaw - 8.01) * 10) / 3.87 + 50)
- rcads.t.ocd = Math.round(((ocdRaw - 2.01) * 10) / 2.63 + 50)
- rcads.t.anxiety = Math.round(((anxietyRaw - 20.1) * 10) / 11.96 +
- 50)
- rcads.t.total = Math.round(((totalRaw - 23.35) * 10) / 14.57 + 50)
- }
- else if (grade === 5 || grade === 6) {
- rcads.t.sad = Math.round(((sadRaw - 3.46) * 10) / 2.95 + 50)
- rcads.t.gad = Math.round(((gadRaw - 4.18) * 10) / 3.18 + 50)
- rcads.t.mdd = Math.round(((mddRaw - 3.75) * 10) / 3.63 + 50)
- rcads.t.pd = Math.round(((pdRaw - 1.79) * 10) / 2.30 + 50)
- rcads.t.soc = Math.round(((socRaw - 8.94) * 10) / 5.16 + 50)
- rcads.t.ocd = Math.round(((ocdRaw - 2.03) * 10) / 2.65 + 50)
- rcads.t.anxiety = Math.round(((anxietyRaw - 20.41) * 10) / 9.84 +
- 50)
- rcads.t.total = Math.round(((totalRaw - 24.15) * 10) / 15.82 + 50)
- } else if (grade === 7) {
- rcads.t.sad = Math.round(((sadRaw - 2.08) * 10) / 2.33 + 50)
- rcads.t.gad = Math.round(((gadRaw - 3.23) * 10) / 2.54 + 50)
- rcads.t.mdd = Math.round(((mddRaw - 3.60) * 10) / 3.37 + 50)
- rcads.t.pd = Math.round(((pdRaw - 1.82) * 10) / 1.98 + 50)
- rcads.t.soc = Math.round(((socRaw - 8.62) * 10) / 4.65 + 50)
- rcads.t.ocd = Math.round(((ocdRaw - 1.41) * 10) / 1.94 + 50)
- rcads.t.anxiety = Math.round(((anxietyRaw - 17.17) * 10) / 10.63 +
- 50)
- rcads.t.total = Math.round(((totalRaw - 20.77) * 10) / 13.20 + 50)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement