Why the scale has its own drawings
The best known seven-level stool scale is a copyrighted work, and its ownership is genuinely disputed: an American gastroenterology guideline reproduces it crediting one foundation, a UK version credits a pharmaceutical company, and a third organisation distributes it under licence. Three plausible owners for the same figure is not a situation to build an app on.
So Tratto has seven drawings of its own and seven labels written from scratch, and the name of no proprietary instrument appears anywhere in the interface. The ordering from most compact to liquid is a physical description, not a work. The original description of transit time and stool form is Lewis SJ, Heaton KW, Scandinavian Journal of Gastroenterology, 1997, cited here as a reference and not reproduced.
The same reasoning kept the IBS severity questionnaire out: it is licensed by the same foundation as the scale, and computing a published clinical score would also push the app across the line drawn by MDCG 2019-11, where recording, storing, searching, exporting and charting stay below the medical-device threshold and calculating a clinical index does not.
Where the coding is asymmetric, and what that forced
The export codes each observation with an array of codings rather than a single one, from the first version of the schema. That is not future-proofing for its own sake; it is the only shape that survives the facts:
- Stool form has a SNOMED CT concept,
443172007, and no LOINC code at all. Expanding the LOINC value set with a "Bristol" filter returns exactly one concept, an answer-list entry that is a brand of cigarettes. It must never be used for stool. - Pain on a 0 to 10 scale has a public LOINC code,
72514-3, and needs no SNOMED. - Bowel movement frequency has both: SNOMED
249521002, and LOINC80261-1, which is ordinal across five buckets and loses information. - SNOMED CT is not free in Italy, which is not a member country. So a local coding is always present and the external ones are optional and off by default.
This turns out to be the recommended shape rather than a workaround. The HL7 implementation guide for personal health records says in as many words that patient-generated data uses a temporary proprietary code system, because LOINC and SNOMED do not cover everything.
What the health platforms will not take
This was the least pleasant thing to find out, and it is worth stating plainly rather than burying in a settings screen.
| What | Apple Health | Health Connect |
|---|---|---|
| Bowel movements and stool form | no type | no type |
| Bloating, abdominal pain | severity only | no type |
| Diarrhea and constipation flags | presence only | no type |
| Sleep, steps, exercise | readable, unused | readable, unused |
| A custom type of our own | not allowed | not allowed |
Apple Health has seven category types for gastrointestinal symptoms, all on a four-level severity enum, so a 0 to 10 score can be projected onto it and never recovered from it. Health Connect is worse: its 42 record types cover activity, body measurements, cycle tracking, nutrition, sleep, vitals and mindfulness, and none of them is a bowel movement, a stool form, a gastrointestinal symptom or a pain score. The set is closed and there is no extension mechanism.
Health Connect does accept FHIR, through its Medical Records API, in R4 and R4B. It also rejects any Observation that does not fall into one of four categories: laboratory, vital signs, social history or pregnancy. Everything this diary records falls outside all four. The API is additionally marked experimental and needs to be compiled against a newer platform SDK, so it is not something to promise a user.
The direction that could work is the opposite one, since both platforms already hold sleep and activity and reading those would fill in the daily context without asking the same question twice. That is where the next version goes, and it is not in this one: today Tratto reads nothing from either platform, and the daily context is typed in. What exists is the file. It is a FHIR R4 bundle alongside three CSVs and the full JSON, plus a one-page PDF on macOS and iOS.
Exporting on Android needed its own road, for a reason worth recording. Capacitor's WebView registers no DownloadListener, which was confirmed by reading the plugin's sixty Java source files rather than by trusting the documentation. A blob URL and an <a download> inside that WebView therefore produce no file and no error. The Android build writes through the filesystem plugin and hands the result to the share sheet. Importing needs none of that, because onShowFileChooser is implemented.
Deliberately not claimed anywhere on this site: that Tratto is interoperable with electronic health record systems. Under the European Health Data Space that specific claim carries obligations, and "it writes files you can hand over" is both accurate and enough.
Why phase two is shaped the way it is
- The three-phase elimination and reintroduction structure, one target at a time with a washout, is described in Whelan et al., Journal of Human Nutrition and Dietetics, 2018 and Lomer, Proceedings of the Nutrition Society, 2023 (CC BY). The 2018 paper is candid that this phase has no randomised trials behind it and describes the practice of one centre.
- The reason a control block exists at all is Van den Houte et al., Gastroenterology 2024;167(2):333-342. In that blinded challenge, glucose, the inert control, triggered symptoms in 26% of patients, more than sorbitol at 23%, and level with lactose and fructose. An open single challenge cannot separate a real trigger from that.
- Block length comes from this diary's own autocorrelation rather than from the clinical three days, and from the same trial: lactose symptoms appeared on day three, so a three-day block ends before they could be seen.
- The exact tests are the sign test and Wilcoxon's signed rank, with the null distribution built by permuting signs over the ranks that were actually observed. With ties that is not the classic table, and the classic table is the one that is wrong.
scipy.stats.wilcoxon(mode="exact")uses it and disagrees on exactly those cases. The oracle for our tests is the enumeration of all 2n sign assignments. - Reporting follows the shape of the n-of-1 checklists: CENT, BMJ 2015;350:h1738 for the report and SPENT, BMJ 2020;368:m122 for the protocol.
What a diary is worth when it cannot find a culprit
Two measured findings, rather than an argument.
The first: paper diaries are largely written afterwards. Stone et al., BMJ 2002 compared a paper diary with an electronic one that timestamped every entry: reported adherence to the paper was 90%, actual adherence was 11%, and the electronic version reached 94%. An app that records the moment is not a nicer notebook; it fixes something that has been measured to be broken.
The second: this limit is where the whole field sits, not a shortcoming of one app. Schroeder et al., CSCW 2017 wrote that determining exactly which foods are causing an individual's symptoms is beyond what food and symptom journals can do, and that they did not want the presentation of an analysis to imply more confidence than was warranted. That is the sentence Tratto is built around.
Things we could not verify, and did not pretend to
- The full text of the 2026 revision of the Rome criteria. Tratto therefore implements no diagnostic subtyping at all, rather than an outdated one.
- Whether the seven-level scale's rights sit with the foundation, the pharmaceutical company or the licensing house. Three sources, three answers. Hence the original drawings.
- Whether there is any usable open model that classifies stool photographs into seven classes. There is not: the best published result uses a camera fixed to a toilet, and the only downloadable model is binary with an empty model card. So the app has a picker and no classifier.
- Whether an open, permissively licensed model exists for extracting foods from free text in Italian. It does not. Hence a closed vocabulary and deterministic matching.