Fixed query for patient IDs and started work on loading patient measurements.