We study deterministic and stochastic versions of a birth and death process for a two-type population with immigration for both types. For the stochastic model we consider the case where the rates are time dependent, and also when they are constant, as is the case in our AIDS application. We derive the probability generating function of the bivariate process and the expectations of the marginal processes. We also study the marginal behaviour of the bivariate process in a particular case where we suppose that the first event is an immigration, and examine the behaviour of the marginal processes divided by their expectations. Finally, we apply some of these results to a sexual-partner notification system, as in the Cuban national programme on HIV/AIDS.