fixed query for adding to family_doctor table