Full refactor to FHIR entities