making links when there is data in inpatients reports