> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirobody.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Walkthrough

> 報告をアップロードし、結果を確かめ、質問して、日記を記録します。

対象 mirobody
`1.5.10`
· 元ファイル
[`docs/walkthrough.md`](https://github.com/thetahealth/mirobody/blob/b37cd7b24af5251a4364aab30905a7497fc69dcb/docs/walkthrough.md)

> [!NOTE]
>
> このページの日本語版はまだありません。以下は英語の原文です。

This page walks through five scenes on the demo record: arriving, uploading a
file, reading its coded values, asking across reports, and writing a journal
entry. Parts 2 to 5 are recorded against a running `./deploy.sh` stack with
`SEED_DEMO_DATA` on; part 1 is drawn, with the authorization rules behind the
drawing listed below it.

`SEED_DEMO_DATA` defaults to on, so the ① → ② → ③ chain is walkable the moment
`./deploy.sh` finishes. Signing in and browsing the seeded record need no
model; reading a file and answering a question use the model chosen on the
setup page, a key or [the local models](https://docs.mirobody.ai/ja/local-models.md).

**1 · Arrive.** You sign in as `you@mirobody.ai` and find two records, not one.
Yours: a year of self-tracked vitals and a lab panel from last November.
`mom@mirobody.ai` has the same shape and is a different person, sharing their
record with you view-only, and their weight is climbing, their nights are short
and their HbA1c has crossed out of range. Same question, two answers, and only
one of the two records is yours. Isolation you can see, not just read about.

![Invite a family member; they choose whether you may view or edit their own record; ask about the record they share. A family member who does not sign in can be managed by you until they take over and choose your access](https://mintcdn.com/thetahealth/Y5mqixM7VoWHLVt4/images/oss/docs/images/care-circle-sharing.svg?fit=max\&auto=format\&n=Y5mqixM7VoWHLVt4\&q=85\&s=47f2fe9b5d9992b28783d43d162f731b)

![Invite a family member; they choose whether you may view or edit their own record; ask about the record they share. A family member who does not sign in can be managed by you until they take over and choose your access](https://mintcdn.com/thetahealth/Y5mqixM7VoWHLVt4/images/oss/docs/images/care-circle-sharing-dark.svg?fit=max\&auto=format\&n=Y5mqixM7VoWHLVt4\&q=85\&s=941c6bf66cb0398347abc1da536b8413)

![Invite a family member; they choose whether you may view or edit their own record; ask about the record they share. A family member who does not sign in can be managed by you until they take over and choose your access](https://mintcdn.com/thetahealth/Y5mqixM7VoWHLVt4/images/oss/docs/images/care-circle-sharing-mobile.svg?fit=max\&auto=format\&n=Y5mqixM7VoWHLVt4\&q=85\&s=a52723974b46d44e37efb5fcc9c50bc4)

| The circle promises | Enforced by |
| - | - |
| Acceptance is required to join | `status`, and pending is not accepted |
| Health data stays off until you allow it | `health_access`, `NOT NULL DEFAULT 0` |
| It is **your** switch, on **your own** row | it governs your record, not theirs |
| Each member controls their own | no other party's action can raise yours |

Each of the four is pinned by a test as a security property.

The switch is a column, not a promise:
`care_circle_members.health_access`, `NOT NULL DEFAULT 0`, on **your own** row.
Being invited into a circle shares nothing — the member decides, and no other
person's action can raise it. The check that reads it raises rather than
returning a falsy value, so a route that forgets to look answers 403 instead of
handing over a record.
[`examples/06_care_circle_rules.py`](https://github.com/thetahealth/mirobody/blob/b37cd7b24af5251a4364aab30905a7497fc69dcb/examples/06_care_circle_rules.py) prints
the whole decision table offline.

One member is the exception: someone you add on the Care Circle page, a parent
who will not sign in. Their address is a placeholder nobody can sign in with,
so you hold their switch, read-write. When they want their own login, send them
the invitation link from their card. They prove their real address (a code sent
there, or a password where the deployment sends no mail), the account and
everything in it becomes theirs, and they choose what you keep: edit, view or
nothing. If the address already has an account, the record is merged into it.

**2 · ① Collect.** [`demo/upload/`](https://github.com/thetahealth/mirobody/tree/b37cd7b24af5251a4364aab30905a7497fc69dcb/demo) holds four files the seed
deliberately leaves out, so uploading one is not a no-op — and they are four
different formats, because a health record arrives as whatever the lab, the
clinic and the family actually produce:

| File | Format | What it is | Readings |
| - | - | - | - |
| `you_annual_checkup_2026-05.pdf` | PDF | this year's panel, printed by the clinic | 9 |
| `mom_physical_2026-06.jpg` | JPG | a phone photo of a printed slip | 9 |
| `you_lipid_panel_2026-08.csv` | CSV | a different lab's export, in its own wording | 5 |
| `mom_clinic_visit_2026-07.xlsx` | XLSX | what the clinic typed into a spreadsheet | 4 |

Drop one on the Data page and the file is stored first, verbatim and traceable.
That is all ① Collect does, and the split matters: what a lab said is one fact,
what it means is another.

![Dropping a lab-report PDF on the Data page; its analytes extracted, each linked to its source file](https://mintcdn.com/thetahealth/LaKLJeMUYaSEUxz6/images/oss/docs/images/upload-demo.gif?s=c406ec301769cf8c2d4dee2f84db697f)

**3 · ② Standardize.** Its analytes come out as readings once the model has read
the page (seconds with a cloud model, minutes on a CPU alone), each one
linking back to the file it was read off, and each one carrying a code:

```
Glycated Hemoglobin-HbA1c   5.2 %        loinc 4548-4
Fasting Blood Glucose-FBG   4.9 mmol/L   loinc 14771-0
Total Cholesterol-TC        4.45 mmol/L  loinc 14647-2
Low-Density Lipoprotein-LDL 2.48 mmol/L  loinc 22748-8
```

The model reads the page; it does not get to invent the code. Resolution is a
lookup against the shipped bundle, offline and deterministic, and it abstains
rather than guessing when it has no answer.

That code is what lets different files be read together. The csv comes from a
different lab and names its analytes differently — `Cholesterol, Total` where
the panel prints `Total Cholesterol-TC` — and both are 14647-2, so they are one
series and not two. The unit is part of that identity rather than something
smoothed over: cholesterol is 14647-2 in mmol/L and 2093-3 in mg/dL, and saying
so is what stops a trend built from a mix of the two from being silently wrong.
Reconciling those two codes into one comparable line is 1.5.0's comparability
key; on the device side the conversion already happens, and
[`examples/02_standardize_a_reading.py`](https://github.com/thetahealth/mirobody/blob/b37cd7b24af5251a4364aab30905a7497fc69dcb/examples/02_standardize_a_reading.py)
turns `154.5 lb` into `70.08 kg` offline.

**4 · ③ Agent.** Ask how the cholesterol has moved. While it works, the
answer shows each step it takes ("Looking up your health data", "Reading a
document") beside its reasoning, then folds them away. It finds every file
that carries the test, the csv's other spelling included, and answers from
what it read:

```
Total Cholesterol   4.60 mmol/L   2025-11-12   you_lab_2025-11.md
                    4.45 mmol/L   2026-05-06   2026-05-06_Annual_Physical_Exam_Report.pdf
                    4.38 mmol/L   2026-08-04   you_lipid_panel_2026-08.csv
```

Three files, three vocabularies, one line. Every cited number is underlined
with a dotted line: click it and the reading, its date and range, and the file
it came off open beside it. Ask the same question about the shared record and the answer is
a different person's.

![Asking how your cholesterol has changed: the steps show as the agent works, the three reports become one trend, and an underlined number opens the reading and its file](https://mintcdn.com/thetahealth/INTXOd_l5BfrwWVQ/images/oss/docs/images/ask-own-demo.gif?s=0d0ee1767ed03d3efa38b48ca8aae43f)

![Asking the same question about the shared record; the agent answers from a record you can only view](https://mintcdn.com/thetahealth/INTXOd_l5BfrwWVQ/images/oss/docs/images/ask-circle-demo.gif?s=fbb23d374cc17d4a0bebcbd09d51773c)

**5 · Say how you feel.** Under **Data › Records**, type one sentence:
`headache since last night, BP 150/95, no fever, metformin 500 mg morning and evening`.
The model splits it and types each part; the codes come from the vocabulary.
It becomes a headache coded NS01, blood pressure coded 8480-6 and 8462-4, and
metformin on the medication list. "No fever" is kept out of the record rather
than logged as a fever.

![One typed sentence becomes a headache coded NS01, blood pressure coded 8480-6 and 8462-4, and metformin on the medication list; 'no fever' is not logged](https://mintcdn.com/thetahealth/Y5mqixM7VoWHLVt4/images/oss/docs/images/journal-demo.gif?s=4e75bb266a076517c949da94471a8f46)

That is the whole chain in one sitting: a file goes in, a coded reading comes
out, and an agent answers over it — **C · T · A**, each stage visible on its own
rather than asserted.

Every value is generated; no file here describes a person, and the seed needs no
network and no key. Set `SEED_DEMO_DATA=false` for a deployment that will hold
real data. [`demo/README.md`](https://github.com/thetahealth/mirobody/blob/b37cd7b24af5251a4364aab30905a7497fc69dcb/demo/README.md) says what each file is and how
to rebuild it; what the extraction pass does *not* yet do with those readings is
in [docs/roadmap.md](https://github.com/thetahealth/mirobody/blob/b37cd7b24af5251a4364aab30905a7497fc69dcb/docs/roadmap.md) rather than glossed over here.

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.