I am estimating the hospital length of stay of a patient based on different independent variables such as age, sex and severity score of the patient in each visit carried out by a nurse. Each patient might be visited several times by the nurse. Therefore, in the data set, the value of hospital length of stay of a particular patient can be repeated for different patient visits. For example, a patient stays in a hospital for 2.25 days but visited 3 times by a nurse and got different severity scores each time. In this case, how I can run the regression, in my case Poisson or negative binomial, when the dependent variable is being repeated more than once for each independent variable.
Prefer survival analysis models for such applications. If regression is to be used, be careful about which independent variables are considered.
Why? there is a trap here that you have guessed: if patient stays for more days, it is likely that the number of visits by nurse will be higher. It is also not clear how these multiple observations are to be handled.
Arrow of Time and Regression Models
If you are modelling the total length of stay (say in number of days), then it is important to consider all the independent variables measured before or at the time of admission to the hospital. You would not want independent variables measured during the stay at hospital into your model. Your regression model has a single point on the time axis and you are trying to predict what happened after the time point using information before the time point.
Survival Models and Handling Time
Applications with inherent concept of time are better handled with survival models. They help in modelling time till an event (example: total stay time till discharge) more naturally. Survival models also allow handling time varying independent variables: every given day, total number of visits by nurse till date for a given patient is a changing quantity. This will be called 'time varying co-variates' in the literature.