The Health Quality Measures Format (HQMF) is an HL7 standard for expressing computable queries of clinical data. It is becoming increasingly consequential for both quality measurement and population health research. A variety of national leadership is involved in its development and deployment, including the Meaningful Use incentive program, the Query Health initiative, the Joint Commission, the National Quality Forum (NQF), and the Food and Drug Administration. Here we analyze the structure of HQMF and apply this to computation of HQMF on Informatics for Integrating Biology and the Bedside (i2b2). i2b2 is a widely used, modular, open-source clinical research data repository. We implement a translator to convert between HQMF and i2b2-XML format that covers the subset of HQMF supported in i2b2-XML, which will be expanded in the next release of i2b2. This translator is part of the freely-available reference implementation of the QueryHealth initiative.