1
0

pregriskeval.qsrc 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. # pregriskeval
  2. !! this function returns value, which represents risk factor of conception
  3. !! -4 when PC is pregnant
  4. !! -3 when PC has got her period
  5. !! -2 when the used contraception is birth control shot
  6. !! -1 when PC is on the pills or if PC has used hormonal contraception at least two weeks
  7. !! 0 when they do not use protection or the condom fails
  8. !! 1 when they do not use protection or the condom fails and PC do not want to use a contraception
  9. !! 2 when the condom is sabotaged by the PC or when she pretends to be on pills
  10. eff_contra = iif(arrsize('ARGS') > 0,ARGS[0],sexcontra)
  11. if knowpreg = 1 or thinkpreg = 1:
  12. RESULT = -4
  13. elseif eff_contra = 2 or pilldays > 14:
  14. RESULT = -1
  15. elseif tabletkishot ! 0:
  16. RESULT = -2
  17. elseif mesec > 0:
  18. RESULT = -3
  19. elseif eff_contra = 0 or eff_contra = 4 or eff_contra = 5:
  20. if ((preziktype = 1 and ((preziksabo + prezikcount) > 0)) or preziktype = 2) and tabletkicheck = 0 and tabletki > 0:
  21. RESULT = 1
  22. else
  23. RESULT = 0
  24. end
  25. elseif eff_contra = 1 or eff_contra = 7:
  26. !{Definitely delibarately trying to get pregnant.}
  27. RESULT = 2
  28. end
  29. --- pregriskeval ---------------------------------