A pharmacy tray for medications and medical items for patient treatment is placed onto a shelf that carries a grid of optical presence sensors. The location and identification of each item in the tray is recorded on a digital inventory for that tray. At the patient treatment site each item taken is recorded and the remaining inventory is updated without scanning the items.