Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  if (sex === 'male') {
  2.             if (grade <= 4) {
  3.               rcads.t.sad = Math.round(((sadRaw - 4.29) * 10) / 3.00 + 50)
  4.               rcads.t.gad = Math.round(((gadRaw - 4.11) * 10) / 3.00 + 50)
  5.               rcads.t.mdd = Math.round(((mddRaw - 3.71) * 10) / 2.93 + 50)
  6.               rcads.t.pd = Math.round(((pdRaw - 1.91) * 10) / 1.90 + 50)
  7.               rcads.t.soc = Math.round(((socRaw - 8.44) * 10) / 3.88 + 50)
  8.               rcads.t.ocd = Math.round(((ocdRaw - 2.04) * 10) / 2.43 + 50)
  9.               rcads.t.anxiety = Math.round(((anxietyRaw - 20.78) * 10) / 10.52 +
  10.                 50)
  11.               rcads.t.total = Math.round(((totalRaw - 24.49) * 10) / 12.39 + 50)
  12.             }
  13.             else if (grade === 5 || grade === 6) {
  14.               rcads.t.sad = Math.round(((sadRaw - 2.85) * 10) / 2.79 + 50)
  15.               rcads.t.gad = Math.round(((gadRaw - 3.74) * 10) / 2.49 + 50)
  16.               rcads.t.mdd = Math.round(((mddRaw - 3.62) * 10) / 2.87 + 50)
  17.               rcads.t.pd = Math.round(((pdRaw - 1.64) * 10) / 1.84 + 50)
  18.               rcads.t.soc = Math.round(((socRaw - 7.71) * 10) / 3.94 + 50)
  19.               rcads.t.ocd = Math.round(((ocdRaw - 2.01) * 10) / 2.31 + 50)
  20.               rcads.t.anxiety = Math.round(((anxietyRaw - 17.95) * 10) / 9.84 +
  21.                 50)
  22.               rcads.t.total = Math.round(((totalRaw - 21.57) * 10) / 11.9 + 50)
  23.             } else if (grade === 7) {
  24.               rcads.t.sad = Math.round(((sadRaw - 1.97) * 10) / 2.21 + 50)
  25.               rcads.t.gad = Math.round(((gadRaw - 3.26) * 10) / 2.60 + 50)
  26.               rcads.t.mdd = Math.round(((mddRaw - 3.54) * 10) / 3.18 + 50)
  27.               rcads.t.pd = Math.round(((pdRaw - 1.61) * 10) / 1.56 + 50)
  28.               rcads.t.soc = Math.round(((socRaw - 7.59) * 10) / 4.31 + 50)
  29.               rcads.t.ocd = Math.round(((ocdRaw - 1.62) * 10) / 1.98 + 50)
  30.               rcads.t.anxiety = Math.round(((anxietyRaw - 16.04) * 10) / 9.74 +
  31.                 50)
  32.               rcads.t.total = Math.round(((totalRaw - 19.58) * 10) / 11.99 + 50)
  33.             }
  34.           } else if (sex === 'female') {
  35.             if (grade <= 4) {
  36.               rcads.t.sad = Math.round(((sadRaw - 4.20) * 10) / 3.00 + 50)
  37.               rcads.t.gad = Math.round(((gadRaw - 4.00) * 10) / 2.87 + 50)
  38.               rcads.t.mdd = Math.round(((mddRaw - 3.25) * 10) / 3.58 + 50)
  39.               rcads.t.pd = Math.round(((pdRaw - 1.87) * 10) / 2.61 + 50)
  40.               rcads.t.soc = Math.round(((socRaw - 8.01) * 10) / 3.87 + 50)
  41.               rcads.t.ocd = Math.round(((ocdRaw - 2.01) * 10) / 2.63 + 50)
  42.               rcads.t.anxiety = Math.round(((anxietyRaw - 20.1) * 10) / 11.96 +
  43.                 50)
  44.               rcads.t.total = Math.round(((totalRaw - 23.35) * 10) / 14.57 + 50)
  45.             }
  46.             else if (grade === 5 || grade === 6) {
  47.               rcads.t.sad = Math.round(((sadRaw - 3.46) * 10) / 2.95 + 50)
  48.               rcads.t.gad = Math.round(((gadRaw - 4.18) * 10) / 3.18 + 50)
  49.               rcads.t.mdd = Math.round(((mddRaw - 3.75) * 10) / 3.63 + 50)
  50.               rcads.t.pd = Math.round(((pdRaw - 1.79) * 10) / 2.30 + 50)
  51.               rcads.t.soc = Math.round(((socRaw - 8.94) * 10) / 5.16 + 50)
  52.               rcads.t.ocd = Math.round(((ocdRaw - 2.03) * 10) / 2.65 + 50)
  53.               rcads.t.anxiety = Math.round(((anxietyRaw - 20.41) * 10) / 9.84 +
  54.                 50)
  55.               rcads.t.total = Math.round(((totalRaw - 24.15) * 10) / 15.82 + 50)
  56.             } else if (grade === 7) {
  57.               rcads.t.sad = Math.round(((sadRaw - 2.08) * 10) / 2.33 + 50)
  58.               rcads.t.gad = Math.round(((gadRaw - 3.23) * 10) / 2.54 + 50)
  59.               rcads.t.mdd = Math.round(((mddRaw - 3.60) * 10) / 3.37 + 50)
  60.               rcads.t.pd = Math.round(((pdRaw - 1.82) * 10) / 1.98 + 50)
  61.               rcads.t.soc = Math.round(((socRaw - 8.62) * 10) / 4.65 + 50)
  62.               rcads.t.ocd = Math.round(((ocdRaw - 1.41) * 10) / 1.94 + 50)
  63.               rcads.t.anxiety = Math.round(((anxietyRaw - 17.17) * 10) / 10.63 +
  64.                 50)
  65.               rcads.t.total = Math.round(((totalRaw - 20.77) * 10) / 13.20 + 50)
  66.             }
  67.           }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement