Cotton code
217 lines · 4.6 KB · JSONRaw
{  "format_version": 1,  "id": "health_measurement",  "name": "Measurement",  "plural": "Measurements",  "picture": null,  "builtin": false,  "visibility": "owner",  "engine": null,  "columns": [    {      "key": "key",      "name": "Key",      "type": "text",      "required": true,      "hidden": true    },    {      "key": "kind",      "name": "Measure",      "type": "choice",      "choices": [        "weight",        "blood_pressure",        "glucose",        "temperature",        "body_fat",        "body_mass_index",        "lean_body_mass",        "height",        "waist",        "vo2_max",        "six_minute_walk"      ],      "labels": {        "weight": "Weight",        "blood_pressure": "Blood pressure",        "glucose": "Blood glucose",        "temperature": "Temperature",        "body_fat": "Body fat",        "body_mass_index": "Body mass index",        "lean_body_mass": "Lean body mass",        "height": "Height",        "waist": "Waist",        "vo2_max": "Cardio fitness",        "six_minute_walk": "Six-minute walk"      },      "readonly": true,      "required": true    },    {      "key": "day",      "name": "Day",      "type": "date",      "required": true,      "readonly": true    },    {      "key": "measured_at",      "name": "Taken",      "type": "date",      "readonly": true,      "format": "calendar-datetime"    },    {      "key": "value",      "name": "Reading",      "type": "number",      "readonly": true    },    {      "key": "second",      "name": "Lower reading",      "type": "number",      "readonly": true    },    {      "key": "unit",      "name": "Unit",      "type": "text",      "readonly": true    },    {      "key": "context",      "name": "Taken",      "type": "choice",      "choices": [        "before_meal",        "after_meal"      ],      "labels": {        "before_meal": "Before a meal",        "after_meal": "After a meal"      },      "readonly": true    },    {      "key": "device",      "name": "Recorded by",      "type": "text",      "readonly": true    },    {      "key": "sample",      "name": "Sample",      "type": "text",      "readonly": true,      "hidden": true    },    {      "key": "source",      "name": "From",      "type": "choice",      "choices": [        "healthkit",        "health_connect",        "export"      ],      "labels": {        "healthkit": "Apple Health",        "health_connect": "Health Connect",        "export": "Apple Health export"      },      "readonly": true    }  ],  "seal": {    "clear": [      "key",      "day"    ]  },  "title": "kind",  "date": "day",  "project": null,  "order": null,  "slip": {    "title": "kind",    "subtitle": "value",    "trailing": "measured_at",    "photo": null,    "toggle": null  },  "tile": {    "face": "slip-list"  },  "card": {    "face": "health.tag",    "fields": [      {        "slot": "title",        "column": "kind"      },      {        "slot": "subtitle",        "column": "value"      },      {        "slot": "date",        "column": "day",        "form": "weekday_date"      }    ]  },  "page": [    {      "heading": null,      "columns": [        "kind",        "measured_at",        "value",        "second",        "unit"      ]    },    {      "heading": "The reading",      "columns": [        "context",        "device",        "source"      ]    }  ],  "sort": {    "column": "day",    "descending": true  },  "empty": {    "title": "No measurements yet",    "message": "Weighings, blood pressures, glucose and temperatures from Apple Health stand here."  },  "create": {    "label": "Bring in",    "doors": [      {        "id": "apple_health",        "label": "Read Apple Health",        "object": "device",        "reads": "apple_health"      },      {        "id": "export",        "label": "Bring in a Health export",        "object": "folder",        "files": {          "types": [            "public.zip-archive",            "public.xml"          ]        }      }    ]  },  "row_key": "key",  "instructions": "One reading taken at a moment: a weighing (kg), a blood pressure (value the upper, systolic, second the lower, diastolic, mmHg), a blood glucose (mg/dL, with before or after a meal when the meter said) or a temperature (°C). Also each body fat (%), BMI, lean mass (kg), height and waist (m), cardio fitness (VO2 max) and six-minute walk (m) reading. Read from Apple Health, never written back: a person never edits a reading here, and Cotton never writes one to Health. Sealed: only the day stays clear on the object."}