โ† Tratto

Notes and sources

Every design decision below was checked against a primary source before it went into code. Where the check failed, that is written down too.

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:

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.

Verified against each platform's own list of types
WhatApple HealthHealth Connect
Bowel movements and stool formno typeno type
Bloating, abdominal painseverity onlyno type
Diarrhea and constipation flagspresence onlyno type
Sleep, steps, exercisereadable, unusedreadable, unused
A custom type of our ownnot allowednot 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

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

c'est Claire? HI GIRL ๐Ÿ‘‹โœจ

๐ŸŽ‰ You found the one part of this website that is not about bowel movements. Congratulations, genuinely.

๐Ÿงช Everything else here is a very long argument about why you cannot work out which food is upsetting you by writing down what you ate. Eugenio checked, at length, and then built an app whose headline feature is refusing to answer the question. ๐Ÿ’…

๐Ÿซถ Anyway. Hope your day is going well. Go outside.