mirroring https://github.com/monarch-initiative/phenogrid/commit/c3df88531f6f1af932c6842733e460d3b49d37f2