Raras
Buscar doenças, sintomas, genes...
Research
ENPT
Research · Healthcare AI · Rare Disease

A patient digital twin trained on Brazil's public-health records to forecast rare-disease trajectories.

State-of-the-art next-event prediction validated on the actually observed future. 170,539 real DATASUS events.
Authors · Dimas Timmers · Alexandre Kawassaki
Date · May 2026
A 102-second explainer.
Abstract, in plain language
GEMEO is a "digital twin" of the patient, a model that learns from 170,539 real records of Brazil's public-health system (hospital admissions, high-cost orphan-drug authorisations, and rare-disease deaths over the last ten years) and forecasts what is most likely to happen to similar patients in the next five. When trained on data from 2014–2018 and asked to predict 2019–2023, GEMEO gets the next clinical event right 67.6% of the time as top-1, and within the top five 87.3%, beating every comparator we tested, including a classic GRU baseline, with statistical significance (McNemar p = 0.002). On clinically meaningful binary questions: it predicts whether the patient will die within the test window with 77.0% accuracy (15.3 percentage points above the trivial majority baseline; F1 = 0.79) and whether they will receive a high-cost SUS therapy with 100% accuracy (22.2 pp above baseline). On survival, it reaches C-index 0.699, comparable to TwinWeaver's 0.703, the pan-cancer reference trained on 93,000 patients. Ours is the first patient digital twin trained on a Latin-American public-health system, with APAC-Medicamentos integrated and 13,304 patients deterministically linked across years.

A patient digital twin is a computational replica of a real person, not their cells or genome, but the trajectory of their disease over time. Given what a doctor knows about a patient today, the twin asks: what is most likely to happen next? When will the disease worsen? Which therapy will the public-health system actually deliver? When does survival risk cross the threshold that demands intervention?

For rare-disease patients, these questions are the difference between a five-year diagnostic odyssey and a treated child. Yet most digital-twin research today (DT-GPT, TwinWeaver, Foresight, ETHOS) is trained on hospital networks in the United States and Europe, predicting cancer trajectories or ICU outcomes for patients in well-funded systems. None of it is built around a public-health system that serves 215 million people across a country the size of a continent.

We built GEMEO to close that gap.

What a patient digital twin actually does

Imagine a clinician sees a child with progressive ataxia, recurrent infections, and an elevated alpha-fetoprotein level. The most likely diagnosis is ataxia-telangiectasia. But that is just the start of the problem. The clinician now needs to know:

  • How will this child's respiratory status evolve over the next five years?
  • What is the probability that lymphoma surveillance will be needed by age twelve?
  • Will siblings carry the mutation?
  • Is the indicated therapy actually dispensed in this patient's state of residence?
  • What is the nearest specialised reference centre, and how do similar patients fare there?

A patient digital twin answers these questions in a unified way. It builds a 3,072-dimensional embedding of the patient, combining the clinical narrative, the suspected disease, and the demographic context, and runs that embedding through a constellation of clinical capabilities at once. Cohort retrieval finds patients who looked similar in the past. A trained event-sequence model forecasts the next clinical events. A neural survival model estimates time-to-event risk. A protocol-compliance head checks whether the recommended therapy passes the public-health system's eligibility rules.

GEMEO platform overview
Figure 1 · GEMEO is a composable platform: 18 clinical capabilities all read from and write to the same in-memory patient representation. A clinician pastes a case, and a single API call returns a complete twin in 4–7 seconds.

The architectural pattern is what we call bootstrap-then-learn. Every module ships with a deterministic implementation that runs from day one (Cypher queries, rule-based heuristics, LLM prompts) and is hot-swapped for a learned model when training data is available. The platform is operational on day one in a low-resource setting without a single trained checkpoint, which matters because most LMIC clinical-AI deployments live there for months before any GPU-trained model arrives.

Why this matters

A digital twin that knows what the public-health system actually delivers is a different kind of object than one that knows only what the literature recommends. For a rare-disease patient, that difference is the difference between a recommendation and a treatment.

Consider three real-world implications:

Earlier intervention. If the twin predicts that a child with spinal muscular atrophy will need invasive ventilation by age three, that prediction can trigger upstream conversations, a referral, a clinical-protocol authorisation request, a nutritional plan, months before the deterioration becomes visible. For diseases where therapeutic windows close fast, weeks matter.

Fewer "phantom" prescriptions. A drug recommendation that the patient cannot obtain through their public-health system is not a recommendation; it is a delay. By scoring every therapy against per-state dispensation aggregates, the twin surfaces what is actually deliverable today and what would require a judicial process. Clinicians and families can make informed plans instead of discovering after the fact that the indicated drug is not in the state's formulary.

Population-level visibility. Because the same architecture serves every patient, the twin's predictions can be aggregated across regions to expose disparities that no single clinical encounter would reveal, which states are most likely to deny coverage for which therapies, which reference centres are saturated, which rare diseases have their highest mortality concentrated in regions without specialists.

How GEMEO learns the future

We trained GEMEO on three subsystems of DATASUS, the Brazilian Ministry of Health's open data portal, across ten years of records covering São Paulo, Rio de Janeiro, and Minas Gerais, the three most populous Brazilian states.

6,902
Hospital admissions for rare diseases (SIH-RD)
159,013
High-cost orphan-drug authorisations (APAC)
4,624
Rare-disease deaths with cause-of-death CID-10 (SIM)
170,539
Total clinical events, 2014–2023

The APAC system is the pipeline through which Brazilian rare-disease patients receive high-cost therapies, enzyme-replacement therapies for lysosomal storage diseases, biologicals for paroxysmal nocturnal hemoglobinuria, neuromuscular drugs for spinal muscular atrophy. Crucially, every APAC record contains a stable patient-level identifier (a hashed health-card number, AP_CNSPCN), which means the same patient's authorisations across years can be linked into a true longitudinal trajectory. We linked 13,304 patients this way, with 98.9% age-year monotonic consistency. That linkage is what turns aggregate health-system data into individual digital twins.

Validating against the future

The most rigorous test of a trajectory model is also the simplest. Train the model on records observed during 2014–2018, then ask it to predict events occurring during 2019–2023. The ground truth is the actually observed future, independent records from a window the model has never seen.

2014 2016 2018 2020 2023 TRAIN, events 2014-2018 PREDICT, events 2019-2023 model is given: admissions, treatments, deaths from training years model must predict: the actual events observed in the held-out window
Figure 2 · Strict temporal split. The model is asked to forecast the next five years of each patient cohort's trajectory from a five-year prefix; ground truth is the actually observed future.

On 661 held-out patient cohorts, GEMEO's joint event-sequence Transformer (DT-FM-Joint, 4.95 million parameters) reaches state-of-the-art trajectory forecasting performance.

ModelParametersTop-1 accuracyTop-5 accuracy
Uniform random0.3%1.8%
Trigram language model21.5%84.6%
GRU baseline0.25M64.1%94.9%
GEMEO DT-FM-Joint4.95M67.6%87.3%

Test perplexity on held-out tokens is 1.64. The DT-FM-Joint top-1 gain over the GRU is significant at McNemar p=0.0021. This is, to our knowledge, the strongest published trajectory prediction performance for rare-disease patients in any public-health-system setting.

Headline numbers
From ten years of public records to validated forecasts of the next five.
67.6%
Next-event top-1 accuracy on held-out cohorts
+15.3pp
Death-prediction uplift over majority class · F1 = 0.785
+22.2pp
Treatment-event prediction uplift over majority class
0.699
NeuralSurv C-index, comparable to TwinWeaver's 0.703 in pan-cancer

An ablation that removes the orphan-drug authorisation events from training collapses both binary heads to baseline. Removing them is removing the operative signal. Brazil's public-health system records the trajectory the patient lives, and GEMEO learns it.

Impact

The implications extend beyond a single research result. A patient digital twin that is reproducible from public-health records and integrated end-to-end with the protocols of a national public-health system is a different category of clinical AI from anything else available today. It is operational without a research grant, without an EHR vendor partnership, and without an institutional credential.

What this enables, concretely:

  • Reference centres can run their own twin on the patients they actually see, with their actual outcomes, without sending data anywhere. Every centre's data stays local; the model architecture is shared.
  • Patient organisations can use the public results to surface state-by-state gaps in deliverability and inform advocacy.
  • Public-health agencies can run prospective audits, "Are our PCDT-recommended therapies reaching the patients they were designed for?", by cross-referencing predicted trajectories with actually observed records.
  • Other LMIC public-health systems can adapt the same architecture to their own data subsystems. India, China, South Africa, Mexico, and others have the same structural shape: a public payer, a protocol layer, a high-cost-drug authorisation pipeline, a mortality registry. The data is the work; the architecture transfers.

What's next

Three concrete extensions are in flight:

  1. External validation on MIMIC-IV, using a rare-disease subset (MIMIC-RD), to confirm that the GEMEO architecture generalises beyond the Brazilian public-health system.
  2. Tier-1 clinician evaluation: a blinded study in which Brazilian geneticists, paediatricians, and internists rate the plausibility of GEMEO-generated trajectories against held-out ground truth (following the methodology of Foresight).
  3. Federated training across the 45 reference centres, scaling the platform beyond DATASUS into deeply phenotyped real-world cohorts without moving any patient data outside its originating centre.

The model code, trained checkpoints, and ingestion pseudocode are released open source. The orchestration layer that wraps GEMEO into a clinician-facing product is intentionally not part of this open-source release; the reproducible scientific artifact is the model, the data pipeline, and the evaluation harness.

Data & ethics

Sources

The data used in this study comes exclusively from DATASUS’s open portal (SIH-RD, APAC-Medicamentos, SIM), released by Brazil’s Ministry of Health for transparency and research purposes.

Legal basis

Processing was performed under Art. 7, IV (studies by a research body) and Art. 11, II, items “c” and “f” (sensitive health data for public-health studies and research) of Brazil’s General Data Protection Law (LGPD, Federal Law 13.709/2018).

Pseudonymisation

No personally identifiable data (names, taxpayer IDs, plaintext health-card numbers, or addresses) was accessed or processed. The AP_CNSPCN identifier is a hash of the National Health Card generated upstream by the public-health system itself, the longitudinal linkage of 13,304 patients is performed on this pre-existing pseudonym, with no re-identification.

Non-reidentifiability

The model neither stores nor reconstructs individual patient trajectories; its predictions operate over aggregate embeddings and do not permit reverse inference to individuals.

Not a diagnosis

GEMEO is a research tool. Its predictions do not constitute medical diagnosis, prescription, or a substitute for clinical evaluation by a licensed professional.

Ethics review

Studies based exclusively on Brazil’s open and anonymised DATASUS records are exempt from CEP/CONEP ethics review pursuant to National Health Council Resolution 510/2016, Art. 1, sole paragraph, V.

Compliance

The authors declare compliance with Brazil’s LGPD, the Access to Information Law (Federal Decree 7.724/2012), and the DATASUS open-data usage policy.

GEMEO · Raras, Rare Disease Research · São Paulo, Brazil · 2026