This study had two aims: Firstly, to describe how prescriptions for proton pump inhibitor (PPI) in primary care were influenced by a change of the hospital drug policy, and secondly, to describe if a large discount on an expensive PPI (esomeprazole) to a hospital would influence prescribing patterns after discharge. This register study was conducted at Odense University Hospital, Denmark, and by use of pharmacy dispensing data and a hospital-based pharmacoepidemiological database, the medication regimens of patients were followed across hospitalisation. The influence of hospital drug policy on prescribings in primary care was measured by the likelihood of having a high-cost PPI prescribed before and after change of drug policy. In total, 9,341 hospital stays in 2009 and 2010 were included. The probability of a patient to be prescribed an expensive PPI after discharge decreased from 33.5 to 9.4 %, corresponding to a risk ratio of 0.28. In primary care after discharge, 13.4 % of esomeprazole use was initiated in the hospital, and this was 8.4 % for PPIs in general. After the change of hospital drug policy, this decreased to 6.5 % for esomeprazole and increased for the recommended PPIs pantoprazole and lansoprazole to 14.6 and 26.1 %, respectively. The effect of a large discount on expensive PPI to hospital was 14.7 %, and this decreased to 2.6 % when coordinating drug policy in hospital and primary care. The likelihood of having an expensive PPI prescribed after hospital stay decreased when coordinating drug policy and the influence of a large discount to hospital could be minimised.