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