Confidence interval for the proportion of side effect per day of treatment Patients during their stay in hospital are conned over given periods to a medical device, some of them contract a rare disease
Example: 
patient 1 is connected from day: 10-20, 55-61 and is not infected.   
.
.
.
patient 115 is connected from day: 2-50, 58-114, 120-155 and contracts the disease.

How would it be possible to determine the confidence interval of the (number of occurences)/(number of days of exposure to the device)?
 A: You could try Poisson regression with (log of) number of days exposure a patient has, as an offset. See Offset in Poisson regression   for details.
Let the respons variable be $y_i$ which is one if patient $i$ is affected, zero elsewhere. Let $E_i$ be the exposure of patient $i$, and let $z_i$ be a vector of other variables influencing effected status, if any.  The Poisson regression postulated above is somewhat unnatural here since the response is zero/one and not a count variable.  Binomial regression looks more natural, but the most used link function, the logistic, giving logistic regression, seems not. But you can try binomial regression with a log link function, for instance available in R.
The model becomes
$$
   p_i=P(Y_i=1 | E_i,z_i) = \exp(\beta_0+\log E_i +\beta' z_i)
$$
and we can see that the estimated probability $\hat{p_i}$ is proportional to $E_i$, so proportional to exposure, as wanted. I have never used such a model myself, so do not know how well it works in practice (specifically, estimated probabilities larger than 1 is possible! but how often that arises in practice, I do not know). For more about this model see http://www.biostat.umn.edu/~will/6470stuff/Class24-12/Handout24.pdf
Some other very relevant posts:  Poisson regression to estimate relative risk for binary outcomes How to calculate the "exact confidence interval" for relative risk? 
A: This seems like a time-to-event situation (assuming you cannot get the disease twice). If the hazard of contracting the disease is about the same on every day, then an exponential time-to-event model is logical (that has a direct "cases per days up to first event or the end of the time at risk" interpretion). You can fit such a model with software for Poisson regression by using a log(days at risk up to the day on which the case occured or the patient stopped being at risk)-offset, if you have the summary information on the total number of cases and the total time until first event or censoring. Alternativel,y if you have the individual patient data, you can also use standard survival analysis software that will almost always include the ability to fit exponential time to event models.
The intercept of such a model can then be interpreted as the log(hazard/day).
If you want to use a binomial model, it would seem like a log(duration of follow-up to first event or censoring) plus a complementary-log-log link function would be the most logical (and really comes down to an exponential time-to-event model).
