A library for calculating clinical quality measures