 
chi square test  using R
Confidence intervals of odds ratio

Gives something like this (results edited for clarity): $data
Outcome
Predictor Disease1 Disease2 Total
Exposed1 800 3 803
Exposed2 17 1 18
Total 817 4 821
oddsratio.wald(tabodds)
$measure
odds ratio with 95% C.I.
Predictor estimate lower upper
Exposed1 1.00000 NA NA
Exposed2 15.68627 1.551454 158.5991
oddsratio.fisher(tabodds)
$measure
odds ratio with 95% C.I.
Predictor estimate lower upper
Exposed1 1.00000 NA NA
Exposed2 15.48370 0.2823527 204.6715
oddsratio.midp(tabodds)
$measure
odds ratio with 95% C.I.
Predictor estimate lower upper
Exposed1 1.00000 NA NA
Exposed2 16.77320 0.5638613 153.095


