{ "format_version": 1, "id": "lab_report", "name": "Lab report", "plural": "Lab reports", "picture": null, "builtin": false, "visibility": "owner", "engine": null, "columns": [ { "key": "key", "name": "Key", "type": "text", "required": true, "hidden": true }, { "key": "person", "name": "Person", "type": "link", "link_to": "person", "required": true, "readonly": true }, { "key": "day", "name": "Collected", "type": "date", "required": true, "readonly": true }, { "key": "lab", "name": "Lab", "type": "text", "readonly": true }, { "key": "order_id", "name": "Order", "type": "text", "readonly": true }, { "key": "printed_name", "name": "Name on the report", "type": "text", "readonly": true }, { "key": "age", "name": "Age on the report", "type": "text", "readonly": true }, { "key": "age_years", "name": "Age in years", "type": "number", "hidden": true, "readonly": true }, { "key": "sex", "name": "Sex", "type": "choice", "choices": [ "female", "male" ], "labels": { "female": "Female", "male": "Male" }, "readonly": true }, { "key": "born_on", "name": "Date of birth", "type": "date", "readonly": true }, { "key": "collected_via", "name": "Collected via", "type": "text", "readonly": true }, { "key": "sample_type", "name": "Sample", "type": "text", "readonly": true }, { "key": "referred_by", "name": "Referred by", "type": "text", "readonly": true }, { "key": "status", "name": "Report", "type": "choice", "choices": [ "partial", "final" ], "labels": { "partial": "Partial", "final": "Final" }, "readonly": true }, { "key": "collected_at", "name": "Collected at", "type": "date", "format": "calendar-datetime", "readonly": true }, { "key": "received_at", "name": "Received", "type": "date", "format": "calendar-datetime", "readonly": true }, { "key": "reported_at", "name": "Reported", "type": "date", "format": "calendar-datetime", "readonly": true }, { "key": "pdf", "name": "Report", "type": "file", "presentation": "file", "readonly": true }, { "key": "pdf_sha256", "name": "File hash", "type": "text", "hidden": true, "readonly": true }, { "key": "versions", "name": "Copies received", "type": "longtext", "hidden": true, "readonly": true }, { "key": "mail_message_id", "name": "Mail", "type": "text", "hidden": true, "readonly": true }, { "key": "file_name", "name": "File name", "type": "text", "hidden": true, "readonly": true }, { "key": "results", "name": "Results", "type": "number", "units": { "one": "{n} result", "other": "{n} results" }, "readonly": true }, { "key": "unmatched", "name": "Not yet known", "type": "number", "units": { "one": "{n} name not yet known", "other": "{n} names not yet known" }, "readonly": true }, { "key": "layout", "name": "Read as", "type": "text", "hidden": true, "readonly": true }, { "key": "added_by", "name": "Added by", "type": "choice", "choices": [ "import", "phone" ], "labels": { "import": "Brought in from mail", "phone": "Added on a phone" }, "readonly": true } ], "seal": { "clear": [ "key", "day" ] }, "title": "lab", "date": "day", "project": null, "order": null, "slip": { "title": "lab", "subtitle": "results", "trailing": "day", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "card": { "face": "health.tag", "fields": [ { "slot": "title", "column": "lab" }, { "slot": "subtitle", "column": "results" }, { "slot": "date", "column": "day", "form": "weekday_date" } ] }, "page": [ { "heading": null, "columns": [ "person", "day", "lab", "status", "results", "pdf" ] }, { "heading": "As printed", "columns": [ "printed_name", "age", "sex", "born_on", "order_id", "sample_type", "collected_via", "referred_by", "collected_at", "received_at", "reported_at", "unmatched", "added_by" ] } ], "sort": { "column": "day", "descending": true }, "empty": { "title": "No lab reports yet", "message": "Reports brought in from mail, or added from a PDF, stand here by date." }, "create": { "label": "Add a report", "doors": [ { "id": "lab_pdf", "label": "Add a lab report", "object": "folder", "files": { "types": [ "com.adobe.pdf" ] } } ] }, "row_key": "key", "instructions": "One lab report: one order at one lab for one person, with the original PDF sealed in `pdf`. A partial and a final of the same order are ONE row: `status` is the most complete copy received and `versions` lists every PDF that came (sha256, status, reported time, mail message id). `person` is the person it is for (the owner or a family member, a `person` row). Its results are `lab_result` rows naming it in `report`. Everything is as the lab printed it: never edit a result to say something else, never add an interpretation. Sealed: only the collected day stays clear on the object." }