See https://github.com/inform-health-informatics/emap_documentation and in particular the technical overview