DigitalTWINs on FHIR β
Digital Twins on FHIR (DToF) is a conceptual FHIR based framework to standardise key concepts, tools and data within the context of a workflow. In this sense a workflow comprises one or more steps where certain (software) tools take relevant data (e.g. from EHR) and feed into computational models (of human physiology & anatomy) to generate derived data which may be used to predict disease progression or treatment effects. We are using FHIR to make the data and models FAIR (findable, accessible, interoperable, and reusable).
DigitalTWINs on FHIR enables users to store patients' hospital EHR data and research data (such as clinical descriptions, mathematical models, and medical images). The foundational concept of DigitalTWINs on FHIR version 1 is the use of FHIR R4 resources to build the DigitalTWINs FHIR Specification. This specification is divided into four parts: Primary Measurements, Workflow, Workflow Tools, and Workflow Tool Process.
- Primary Measurements: Raw EHR data from hospitals or research institutes.
- Workflow: Defines the steps, actions, inputs, and outputs of a research study.
- Workflow Tools: Tools used in each step or action of the workflow.
- Workflow Tool Process: Generated by executing a tool or step within a workflow.
The core idea behind DigitalTWINs on FHIR is to develop a digital twin system for patients, clinicians, and researchers.
- Patients can view historical medical reports and predictions of disease progression.
- Clinicians can access patient history report data and review predicted clinical reports generated by researchersβ workflows.
- Researchers can create patient cohorts and use their raw EHR data as input for their studies.
Version 1 β

FHIR version: R4
Search β
- Finding all primary measurements for a patient.
- Find which workflow, tool, and primary data was used to generate a specific derived measurement observation.
- Find all tools and models used by a workflow and their workflow tool processes.
- Find inputs and outputs of a given tool in a workflow.
Tutorials β
Development β
- Packages
- App
- GitHub
- Preview App
Discussion β
- Version control of
Task(Workflow tool process)- If a researcher run a same workflow tool for a same patient's measurements, it is hard to find their relationship
- Scenario 1 ( run different workflow tool): Researcher A run breast workflow tool A for patient A with measurements A. Then run breast workflow tool B for patient A with measurements B.
- This situation is very simple, we can search the
workflow tool processbypatient's id, dataset'id, researcher'id, workflow'id and workflow tool's id, and then usemeasurements Aandmeasurements Bor theirtitleto distinguish theworkflow tool process Aandworkflow tool process B. Because the measurements should be as a reference in workflow tool process input.
- This situation is very simple, we can search the
- Scenario 2 (run same workflow tool for same patient' measurements): Researcher A run breast workflow tool A for patient A with measurements A twice.
- This situation is a little bit tricky, but we still can solve it by execution time. The basic solution is same to above, but this time we will receive two almost same
workflow tool processwith sametitle, input measurements referece, dataset's reference researcher reference, patient reference, workflow reference, workflow tool reference. The differences between them areuuid, output observation reference, execution time. So, once we find these twoworkflow tool processviaforward way(dataset -> patient -> workflow -> workflow tool -> workflow tool process), we cannot distinguish them bytitle or measurements, but needtitle or measurementsto get them first and then we can distinguish them by theirexecution time.
- This situation is a little bit tricky, but we still can solve it by execution time. The basic solution is same to above, but this time we will receive two almost same
- Scenario 3 (run same workflow tool for same patient): Researcher A run breast workflow tool A for patient A without measurements A twice.
- This situation is tricky, because some workflow tool don't have EHR data as their input. So we cannot use
measurementsnow, and when we searchworkflow tool processviaforward waywe will get all workflow tools' processes. At this stage we also can usetitleto get these twoworkflow tool processand then distinguish them by their execution time.
- This situation is tricky, because some workflow tool don't have EHR data as their input. So we cannot use
- Conclusion: As for the
Task (workflow tool process), we can use their execution time for the version control.
- Scenario 1 ( run different workflow tool): Researcher A run breast workflow tool A for patient A with measurements A. Then run breast workflow tool B for patient A with measurements B.
- If a researcher run a same workflow tool for a same patient's measurements, it is hard to find their relationship
- Image format
- Currently, we are using
ImagingStudyto store one patient'sDicom MRIdata. But in some tools (e.g,tumour position and extent report App) they need other image format, such asNRRD. Therefore, when we want to annotate one patient's image viatumour position and extent report App, we cannot sent the MRIs' endpoint directly to the target App, but we need to do below steps:- Send the patient
ImageStudy's endpoint uuidto backend, and get theDicomimages - Convert the
Dicom MRIstoNRRDformat - Send the images to
tumour position and extent report App
- Send the patient
- Time consuming
- Request the images from PACs
- Convert
DicomtoNRRD - Send
NRRDto the target tool
- Currently, we are using
- Patient cohorts
- Missing patients research cohorts
Version 2 β

FHIR version: R5
Search β
- Finding all primary measurements for a patient. - No
- Find which workflow, tool, and primary data was used to generate a specific derived measurement observation. - Conditional Yes, (only if the workflow tool process has input/output EHR data.)
- Find all tools and models used by a workflow and their workflow tool processes. - Yes
- Find inputs and outputs of a given tool in a workflow. - No (there is no links between workflow tool process and workflow.)
Discussion β
- What exactly information that we want to store for
workflow, workflow tool and workflow tool process? - We are using
PlanDefinitionto store theworkflowinformation, thePlanDefinitionhas already fields to storeworkflow title, description, actions/steps, action's input/output, what information we want to store inActivityDefinition? - The
DeviceDefinitionwe are used to store theworkflow toolinformation, so theDeviceis theworkflow tool process? We can save theexecution timein manufactureDate , but here is a issue, consider this scenario if two differentworkflowuse the sameworkflow tooland they run the same patient's measurements and same dataset, how can we distinguishworkflow tool processesbelong to whichworkflowby searchworkflow tool processdirectly? - Under this architecture, we cannot find the relationship between
workflow tool processandpatient- Patient can be in different
ResearchStudy - The patient
primary measurementsmay be used in same workflow actions (workflow tools) as input data - Some
workflow toolmay not have EHR input/output data, so theirworkflow tool processdon't have reference to result observation and primary observation.
- Patient can be in different
- Under this architecture, we cannot find the relationship between
workflow tool processandResearchStudy- This diagram is using
ResearchStudylevel to connect workflow not inPatientlevel- We cannot find a
patient'sworkflow tool process precisely, because its underResearchStudylevel, we only search like this:- From
ResearchStudy- Find the
PlanDefinitionviaprotocol - Find all the patients belong to this
ResearchStudy - Find
workflow toolsbelong to thisPlanDefinition (workflow) - Then choose one
DeviceDefinition (workflow tool)find allDevices (workflow tool processes), Notice: all Devices here means the Device may generate from otherResearchStudy (dataset)andPlanDefinition (workflow), because there is no constraints/reference amongDevice (workflow tool process), ResearchStudy (dataset), PlanDefinition (workflow).- We may find some relationship between
Device (workflow tool process)'s reslut ObservationsandPrimary Measurements, But we cannot guarantee allDevicehas EHR input/output data.
- We may find some relationship between
- Find the
- From
PlanDefinition- We can find a
PlanDefintion (workflow)'s ResearchStudyby searchprotocolinResearchStudy - Then we will meet the same issue.
- We can find a
- From
- We cannot find a
- This diagram is using