1234567891011121314151617181920212223242526272829303132 |
- # pregriskeval
- !! this function returns value, which represents risk factor of conception
- !! -4 when PC is pregnant
- !! -3 when PC has got her period
- !! -2 when the used contraception is birth control shot
- !! -1 when PC is on the pills or if PC has used hormonal contraception at least two weeks
- !! 0 when they do not use protection or the condom fails
- !! 1 when they do not use protection or the condom fails and PC do not want to use a contraception
- !! 2 when the condom is sabotaged by the PC or when she pretends to be on pills
- eff_contra = iif(arrsize('ARGS') > 0,ARGS[0],sexcontra)
- if knowpreg = 1 or thinkpreg = 1:
- RESULT = -4
- elseif eff_contra = 2 or pilldays > 14:
- RESULT = -1
- elseif tabletkishot ! 0:
- RESULT = -2
- elseif mesec > 0:
- RESULT = -3
- elseif eff_contra = 0 or eff_contra = 4 or eff_contra = 5:
- if ((preziktype = 1 and ((mc_inventory['sabotaged_condoms'] + mc_inventory['normal_condoms']) > 0)) or preziktype = 2) and tabletkicheck = 0 and mc_inventory['contraceptive_pill'] > 0:
- RESULT = 1
- else
- RESULT = 0
- end
- elseif eff_contra = 1 or eff_contra = 7:
- !{Definitely delibarately trying to get pregnant.}
- RESULT = 2
- end
- --- pregriskeval ---------------------------------
|