{
    "schema": "opescare.flows/1",
    "locale": "en",
    "source": "App\\Support\\Diagrams\\Specs",
    "palette": {
        "kinds": {
            "actor": {
                "fill": "#FFFFFF",
                "stroke": "#475569",
                "text": "#0F172A",
                "sub": "#475569",
                "border": "solid",
                "icon": "user-round",
                "text_contrast": 17.85,
                "sub_contrast": 7.58
            },
            "external": {
                "fill": "#94A3B8",
                "stroke": "#334155",
                "text": "#0F172A",
                "sub": "#1E293B",
                "border": "dashed",
                "icon": "globe",
                "text_contrast": 6.96,
                "sub_contrast": 5.71
            },
            "service": {
                "fill": "#0F4C81",
                "stroke": "#0F4C81",
                "text": "#FFFFFF",
                "sub": "#DCE8F4",
                "border": "solid",
                "icon": "server",
                "text_contrast": 8.86,
                "sub_contrast": 7.12
            },
            "store": {
                "fill": "#1E293B",
                "stroke": "#0F172A",
                "text": "#FFFFFF",
                "sub": "#CBD5E1",
                "border": "solid",
                "icon": "database",
                "text_contrast": 14.63,
                "sub_contrast": 9.85
            },
            "gate": {
                "fill": "#FDE68A",
                "stroke": "#B45309",
                "text": "#451A03",
                "sub": "#78350F",
                "border": "double",
                "icon": "shield-check",
                "text_contrast": 12.03,
                "sub_contrast": 7.28
            },
            "decision": {
                "fill": "#A5F3FC",
                "stroke": "#0E7490",
                "text": "#083344",
                "sub": "#164E63",
                "border": "dotted",
                "icon": "git-branch",
                "text_contrast": 10.74,
                "sub_contrast": 7.3
            },
            "outcome-ok": {
                "fill": "#BBF7D0",
                "stroke": "#15803D",
                "text": "#052E16",
                "sub": "#14532D",
                "border": "pill",
                "icon": "circle-check",
                "text_contrast": 12.3,
                "sub_contrast": 7.52
            },
            "outcome-refused": {
                "fill": "#FECACA",
                "stroke": "#B91C1C",
                "text": "#450A0A",
                "sub": "#7F1D1D",
                "border": "pill",
                "icon": "circle-x",
                "text_contrast": 11.16,
                "sub_contrast": 6.93
            }
        },
        "pairs": {
            "actor|external": 24.5,
            "actor|service": 59.2,
            "actor|store": 76.14,
            "actor|gate": 23.58,
            "actor|decision": 19.86,
            "actor|outcome-ok": 21.46,
            "actor|outcome-refused": 19.28,
            "external|service": 36.22,
            "external|store": 45.03,
            "external|gate": 40.99,
            "external|decision": 24.21,
            "external|outcome-ok": 31.52,
            "external|outcome-refused": 27.92,
            "service|store": 15.31,
            "service|gate": 73.09,
            "service|decision": 55.09,
            "service|outcome-ok": 62.39,
            "service|outcome-refused": 57,
            "store|gate": 81.54,
            "store|decision": 74.62,
            "store|outcome-ok": 77.43,
            "store|outcome-refused": 72.59,
            "gate|decision": 34.27,
            "gate|outcome-ok": 23.14,
            "gate|outcome-refused": 30.79,
            "decision|outcome-ok": 17.48,
            "decision|outcome-refused": 47.16,
            "outcome-ok|outcome-refused": 41.35
        },
        "edges": {
            "request": {
                "colour": "#0F4C81",
                "dash": null,
                "contrast": 8.86
            },
            "response": {
                "colour": "#475569",
                "dash": "2 4",
                "contrast": 7.58
            },
            "async": {
                "colour": "#0E7490",
                "dash": "8 5",
                "contrast": 5.36
            },
            "refusal": {
                "colour": "#B91C1C",
                "dash": "6 3 2 3",
                "contrast": 6.47
            }
        }
    },
    "diagrams": {
        "overview": {
            "title": "OpesCare platform architecture",
            "summary": "Clients connect to opescare.com. Web routes, the REST API and the FHIR R4 endpoint pass authentication, consent and ingest gates before reaching the Health ID, clinical records, finders, documents, payments and webhook services, which store data in PostgreSQL, use queue workers and write an access log.",
            "nodes": [
                {
                    "id": "clients",
                    "kind": "actor",
                    "icon": "users",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Clients",
                    "sublabel": "website, app, partners, Bridge",
                    "evidence": [
                        {
                            "ref": "route:docs.index",
                            "resolves": true
                        },
                        {
                            "ref": "route:docs.widget",
                            "resolves": true
                        },
                        {
                            "ref": "route:docs.bridge",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "r_web",
                    "kind": "service",
                    "icon": "monitor",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "Web routes",
                    "sublabel": "server-rendered pages",
                    "evidence": [
                        {
                            "ref": "route:login",
                            "resolves": true
                        },
                        {
                            "ref": "route:public.network.medicine-finder",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "r_api",
                    "kind": "service",
                    "icon": "braces",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "REST API",
                    "sublabel": "/api/v1/connect, /api/mobile",
                    "evidence": [
                        {
                            "ref": "uri:POST api/v1/connect/auth/token",
                            "resolves": true
                        },
                        {
                            "ref": "uri:GET api/mobile/consents",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "r_fhir",
                    "kind": "service",
                    "icon": "server",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "FHIR R4 ingest",
                    "sublabel": "/api/fhir/R4",
                    "evidence": [
                        {
                            "ref": "uri:POST api/fhir/R4",
                            "resolves": true
                        },
                        {
                            "ref": "uri:GET api/fhir/R4/metadata",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "g_auth",
                    "kind": "gate",
                    "icon": "key-round",
                    "cell": [
                        0,
                        2
                    ],
                    "label": "Authentication",
                    "sublabel": "session, JWT, scopes",
                    "evidence": [
                        {
                            "ref": "route:login.submit",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\V1\\Connect\\AuthController::introspect",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "g_consent",
                    "kind": "gate",
                    "icon": "shield-check",
                    "cell": [
                        1,
                        2
                    ],
                    "label": "Consent gate",
                    "sublabel": "relationship or grant",
                    "evidence": [
                        {
                            "ref": "method:App\\Support\\ClinicalRelationshipGate::evaluate",
                            "resolves": true
                        },
                        {
                            "ref": "config:staff_capabilities.capabilities.clinical_chart",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "g_fhir",
                    "kind": "gate",
                    "icon": "shield",
                    "cell": [
                        2,
                        2
                    ],
                    "label": "Ingest guard",
                    "sublabel": "facility, Health ID, grant",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Fhir\\FhirIngestGuard::requireConsent",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "refused",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        3,
                        2
                    ],
                    "label": "Refused",
                    "sublabel": "401 or 403, nothing read",
                    "evidence": [
                        {
                            "ref": "route:docs.errors",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "services",
                    "kind": "service",
                    "icon": "heart-pulse",
                    "cell": [
                        1,
                        3
                    ],
                    "label": "OpesCare services",
                    "sublabel": "Health ID, records, finders",
                    "evidence": [
                        {
                            "ref": "class:App\\Modules\\PatientIdentity\\Services\\PatientIdentityService",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Services\\WebhookService",
                            "resolves": true
                        },
                        {
                            "ref": "route:public.care-map",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "pg",
                    "kind": "store",
                    "icon": "database",
                    "cell": [
                        1,
                        4
                    ],
                    "label": "PostgreSQL",
                    "sublabel": "records, register, ledger",
                    "evidence": [
                        {
                            "ref": "config:database.connections.pgsql",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "audit",
                    "kind": "store",
                    "icon": "scroll-text",
                    "cell": [
                        2,
                        4
                    ],
                    "label": "Access and audit log",
                    "sublabel": "who read what, when",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\AccessLog",
                            "resolves": true
                        },
                        {
                            "ref": "uri:GET api/mobile/access-logs",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "ok",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        2,
                        5
                    ],
                    "label": "Response",
                    "sublabel": "every read logged",
                    "evidence": [
                        {
                            "ref": "route:docs.api",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "clients",
                    "to": "r_web",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "clients",
                    "to": "r_api",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "clients",
                    "to": "r_fhir",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "r_web",
                    "to": "g_auth",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "r_api",
                    "to": "g_auth",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "r_fhir",
                    "to": "g_fhir",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "g_auth",
                    "to": "g_consent",
                    "kind": "request",
                    "label": "signed in",
                    "loop": false
                },
                {
                    "from": "g_auth",
                    "to": "refused",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "g_consent",
                    "to": "refused",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "g_fhir",
                    "to": "refused",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "g_consent",
                    "to": "services",
                    "kind": "request",
                    "label": "basis held",
                    "loop": false
                },
                {
                    "from": "g_fhir",
                    "to": "services",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "services",
                    "to": "pg",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "pg",
                    "to": "audit",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "audit",
                    "to": "ok",
                    "kind": "response",
                    "label": null,
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "clients",
                        "r_api"
                    ],
                    "title": "A client calls opescare.com",
                    "text": "The website, the app, partner systems and the Bridge Agent reach one of three entry points: web routes, the REST API or the FHIR R4 endpoint."
                },
                {
                    "path": [
                        "r_api",
                        "g_auth"
                    ],
                    "title": "Authentication",
                    "text": "Web routes use a session; the API checks a signed JWT and its scopes."
                },
                {
                    "path": [
                        "g_auth",
                        "g_consent",
                        "services"
                    ],
                    "title": "Consent gate",
                    "text": "A clinician read passes the clinical relationship gate before any service answers."
                },
                {
                    "path": [
                        "r_fhir",
                        "g_fhir",
                        "services"
                    ],
                    "title": "FHIR ingest guard",
                    "text": "Partner writes pass the three ingest gates: facility from the token, an existing Health ID, an active grant."
                },
                {
                    "path": [
                        "services",
                        "pg",
                        "audit",
                        "ok"
                    ],
                    "title": "Stored and logged",
                    "text": "Services read and write PostgreSQL, and every read of a record is written to the access log."
                },
                {
                    "path": [
                        "g_auth",
                        "refused"
                    ],
                    "title": "Refused",
                    "text": "A failed check answers 401 or 403 and nothing is read or written."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": "https://opescare.com/docs/architecture"
        },
        "consent": {
            "title": "Consent and scoped access",
            "summary": "A clinician asks, the patient approves in the app, access is scoped and time-limited, every read is logged, and the patient can revoke.",
            "nodes": [
                {
                    "id": "clinician",
                    "kind": "actor",
                    "icon": "stethoscope",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Clinician",
                    "sublabel": "web or app",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.identify_patient",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.chart.consent_request",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "lookup",
                    "kind": "service",
                    "icon": "id-card",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Look up Health ID (scan or type)",
                    "sublabel": "OpesCare API",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/doctor/patients/scan",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileProviderScanController::scan",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "basis",
                    "kind": "decision",
                    "icon": "git-branch",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Basis for reading?",
                    "sublabel": "relationship or grant",
                    "evidence": [
                        {
                            "ref": "method:App\\Support\\ClinicalRelationshipGate::evaluate",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Support\\ClinicalRelationshipGate::holds",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "request",
                    "kind": "service",
                    "icon": "send",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Request consent: scope + reason",
                    "sublabel": "OpesCare API",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/doctor/consent-requests",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileConsentRequestController::store",
                            "resolves": true
                        },
                        {
                            "ref": "config:staff_capabilities.capabilities.request_access",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "ok",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "Scoped data returned",
                    "sublabel": "Clinician",
                    "evidence": [
                        {
                            "ref": "uri:GET api/mobile/doctor/patients/{patient}",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileDoctorChartController::show",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "log",
                    "kind": "store",
                    "icon": "scroll-text",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Access logged",
                    "sublabel": "Clinical record",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\AccessLog",
                            "resolves": true
                        },
                        {
                            "ref": "uri:GET api/mobile/access-logs",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "gate",
                    "kind": "gate",
                    "icon": "shield-check",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Gate checks basis, scoped read",
                    "sublabel": "OpesCare API",
                    "evidence": [
                        {
                            "ref": "method:App\\Support\\ClinicalRelationshipGate::hasActiveConsentGrant",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Support\\ClinicalRelationshipGate::coversFullRecord",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "notify",
                    "kind": "service",
                    "icon": "bell",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Notify patient",
                    "sublabel": "Patient",
                    "evidence": [
                        {
                            "ref": "uri:GET api/mobile/consent-requests",
                            "resolves": true
                        },
                        {
                            "ref": "uri:GET api/mobile/consent-requests/pending-count",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "revoked",
                    "kind": "outcome-refused",
                    "icon": "ban",
                    "cell": [
                        1,
                        2
                    ],
                    "label": "Further reads refused",
                    "sublabel": "revoked or expired",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/consents/{id}/revoke",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileGovernanceController::revokeConsent",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "grant",
                    "kind": "store",
                    "icon": "database",
                    "cell": [
                        2,
                        2
                    ],
                    "label": "Grant: scoped, expires_at set",
                    "sublabel": "Clinical record",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\ConsentGrant",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileGovernanceController::approveConsent",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "patient",
                    "kind": "decision",
                    "icon": "users",
                    "cell": [
                        3,
                        2
                    ],
                    "label": "Approve (or deny)",
                    "sublabel": "Patient",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/consent-requests/{id}/approve",
                            "resolves": true
                        },
                        {
                            "ref": "uri:POST api/mobile/consent-requests/{id}/deny",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "denied",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        3,
                        3
                    ],
                    "label": "Request denied",
                    "sublabel": "the chart stays closed",
                    "evidence": [
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileGovernanceController::denyConsent",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "clinician",
                    "to": "lookup",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "lookup",
                    "to": "basis",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "basis",
                    "to": "request",
                    "kind": "request",
                    "label": "no basis",
                    "loop": false
                },
                {
                    "from": "basis",
                    "to": "gate",
                    "kind": "request",
                    "label": "basis held",
                    "loop": false
                },
                {
                    "from": "request",
                    "to": "notify",
                    "kind": "async",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "notify",
                    "to": "patient",
                    "kind": "async",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "grant",
                    "kind": "response",
                    "label": "approve",
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "denied",
                    "kind": "refusal",
                    "label": "deny",
                    "loop": false
                },
                {
                    "from": "grant",
                    "to": "gate",
                    "kind": "request",
                    "label": "open chart",
                    "loop": false
                },
                {
                    "from": "gate",
                    "to": "log",
                    "kind": "request",
                    "label": "admitted",
                    "loop": false
                },
                {
                    "from": "log",
                    "to": "ok",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "gate",
                    "to": "revoked",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "clinician",
                        "lookup"
                    ],
                    "title": "Look up Health ID (scan or type)",
                    "text": "The clinician scans the patient QR or enters the Health ID."
                },
                {
                    "path": [
                        "lookup",
                        "basis"
                    ],
                    "title": "Identity only, no chart",
                    "text": "Without an appointment, care-team link or grant, the record stays closed."
                },
                {
                    "path": [
                        "basis",
                        "request"
                    ],
                    "title": "Request consent: scope + reason",
                    "text": "The request names what will be read and why."
                },
                {
                    "path": [
                        "request",
                        "notify"
                    ],
                    "title": "Notify patient",
                    "text": "The request appears in the patient app with a push notification."
                },
                {
                    "path": [
                        "notify",
                        "patient"
                    ],
                    "title": "Approve (or deny)",
                    "text": "The patient decides. A denial ends the flow here."
                },
                {
                    "path": [
                        "patient",
                        "grant"
                    ],
                    "title": "Grant: scoped, expires_at set",
                    "text": "A consent grant is stored with its scope and expiry time."
                },
                {
                    "path": [
                        "grant",
                        "gate"
                    ],
                    "title": "Open the chart",
                    "text": "The clinician reads the record."
                },
                {
                    "path": [
                        "basis",
                        "gate"
                    ],
                    "title": "Gate checks basis, scoped read",
                    "text": "The clinical relationship gate admits only what the grant covers."
                },
                {
                    "path": [
                        "gate",
                        "log"
                    ],
                    "title": "Access logged",
                    "text": "Who read what, when and on which basis is written to the access log the patient can see."
                },
                {
                    "path": [
                        "log",
                        "ok"
                    ],
                    "title": "Scoped data returned",
                    "text": "Only the granted part of the record comes back."
                },
                {
                    "path": [
                        "gate",
                        "revoked"
                    ],
                    "title": "Revoke, or grant expires",
                    "text": "The patient can revoke at any time; otherwise the grant lapses at its expiry."
                },
                {
                    "path": [
                        "patient",
                        "denied"
                    ],
                    "title": "Request denied",
                    "text": "If the patient denies the request, no grant is created and the chart stays closed."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": "https://opescare.com/docs/flows/consent"
        },
        "fhir": {
            "title": "FHIR R4 ingest",
            "summary": "A partner posts a transaction Bundle with a bearer token; three gates check facility, Health ID and consent; the Bundle is stored all-or-nothing.",
            "nodes": [
                {
                    "id": "partner",
                    "kind": "external",
                    "icon": "building-2",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Partner system",
                    "sublabel": "HIS, lab, EMR",
                    "evidence": [
                        {
                            "ref": "uri:POST api/fhir/R4",
                            "resolves": true
                        },
                        {
                            "ref": "uri:GET api/fhir/R4/metadata",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "jwt",
                    "kind": "gate",
                    "icon": "key-round",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Verify JWT and scope",
                    "sublabel": "Bearer auth",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Fhir\\FhirIngestGuard::scopes",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Services\\Fhir\\FhirIngestGuard::requireScope",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "g1",
                    "kind": "gate",
                    "icon": "shield-check",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Gate 1: facility from token",
                    "sublabel": "FhirIngestGuard",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Fhir\\FhirIngestGuard::facilityId",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "g2",
                    "kind": "gate",
                    "icon": "user-check",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Gate 2: existing Health ID",
                    "sublabel": "FhirIngestGuard",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Fhir\\FhirIngestGuard::resolveSubject",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "refused",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "Refusal: OperationOutcome",
                    "sublabel": "nothing stored",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Fhir\\FhirIngestGuard::recordRefusal",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "ok",
                    "kind": "outcome-ok",
                    "icon": "file-check",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "200 transaction-response",
                    "sublabel": "every entry 201 Created",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Fhir\\FhirIngestGuard::recordAccepted",
                            "resolves": true
                        },
                        {
                            "ref": "uri:POST api/fhir/R4/Observation",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "store",
                    "kind": "store",
                    "icon": "database",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Store every entry, or none",
                    "sublabel": "Clinical record",
                    "evidence": [
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Fhir\\FhirIngestController::transaction",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Services\\Fhir\\FhirIngestService",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "g3",
                    "kind": "gate",
                    "icon": "lock",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Gate 3: active consent grant",
                    "sublabel": "FhirIngestGuard",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Fhir\\FhirIngestGuard::requireConsent",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Models\\ConsentGrant",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "partner",
                    "to": "jwt",
                    "kind": "request",
                    "label": "Bundle",
                    "loop": false
                },
                {
                    "from": "jwt",
                    "to": "g1",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "g1",
                    "to": "g2",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "g2",
                    "to": "g3",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "g3",
                    "to": "store",
                    "kind": "request",
                    "label": "all pass",
                    "loop": false
                },
                {
                    "from": "store",
                    "to": "ok",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "jwt",
                    "to": "refused",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "g1",
                    "to": "refused",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "g2",
                    "to": "refused",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "g3",
                    "to": "refused",
                    "kind": "refusal",
                    "label": "any gate fails",
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "partner",
                        "jwt"
                    ],
                    "title": "POST /api/fhir/R4 Bundle",
                    "text": "A Bundle of type transaction with a bearer token. Single resources post to /Observation, /DiagnosticReport or /Immunization."
                },
                {
                    "path": [
                        "jwt",
                        "g1"
                    ],
                    "title": "Verify JWT and scope",
                    "text": "The token signature and scopes are checked; each entry needs the scope for its resource type."
                },
                {
                    "path": [
                        "g1",
                        "g2"
                    ],
                    "title": "Gate 1: facility from token",
                    "text": "The writing facility is taken from the verified token only, never from the payload."
                },
                {
                    "path": [
                        "g2",
                        "g3"
                    ],
                    "title": "Gate 2: existing Health ID",
                    "text": "The patient must resolve exactly to an existing Health ID. A partner never creates one."
                },
                {
                    "path": [
                        "g3",
                        "store"
                    ],
                    "title": "Gate 3: active consent grant",
                    "text": "The patient must hold an active grant to that facility. No grant, no write."
                },
                {
                    "path": [
                        "g3",
                        "store",
                        "ok"
                    ],
                    "title": "Store every entry, or none",
                    "text": "All entries are written in one database transaction; any refusal rolls back the lot."
                },
                {
                    "path": [
                        "store",
                        "ok"
                    ],
                    "title": "200 transaction-response",
                    "text": "Each entry reports 201 Created. A single-resource POST returns 201."
                },
                {
                    "path": [
                        "g3",
                        "refused"
                    ],
                    "title": "Refusal: OperationOutcome",
                    "text": "Any failed gate returns a FHIR OperationOutcome and nothing is stored."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": "https://opescare.com/docs/flows/fhir"
        },
        "mpi": {
            "title": "Duplicate detection and reversible merge",
            "summary": "Scheduled scans propose likely duplicate Health IDs, a person reviews each pair, and a merge keeps a survivor, turns the other into an alias and can be undone.",
            "nodes": [
                {
                    "id": "scheduler",
                    "kind": "actor",
                    "icon": "calendar-clock",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Scheduler",
                    "sublabel": "nightly and weekly",
                    "evidence": [
                        {
                            "ref": "command:mpi:detect",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Console\\Commands\\DetectDuplicatePatients",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "scan",
                    "kind": "service",
                    "icon": "search",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Score candidate pairs",
                    "sublabel": "Duplicate scan",
                    "evidence": [
                        {
                            "ref": "method:App\\Modules\\MasterPatientIndex\\Services\\MasterPatientIndexService::detectDuplicates",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Modules\\MasterPatientIndex\\Services\\MasterPatientIndexService::scoreMatch",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "queue",
                    "kind": "store",
                    "icon": "list-ordered",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Queue pairs for review",
                    "sublabel": "Review desk",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\MpiCandidate",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.admin.mpi.index",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.admin.mpi.candidates.raise",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "review",
                    "kind": "decision",
                    "icon": "users",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Compare side by side",
                    "sublabel": "Review desk",
                    "evidence": [
                        {
                            "ref": "route:portals.admin.mpi.candidates.show",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "done",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "One Health ID",
                    "sublabel": "old ID kept as an alias",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\PatientMergeAlias",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "alias",
                    "kind": "store",
                    "icon": "database",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Lookups follow the merge",
                    "sublabel": "Patient register",
                    "evidence": [
                        {
                            "ref": "method:App\\Models\\Patient::findExistingIdentity",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Models\\PatientMerge",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "merge",
                    "kind": "service",
                    "icon": "git-merge",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Merge: survivor + alias",
                    "sublabel": "Review desk",
                    "evidence": [
                        {
                            "ref": "route:portals.admin.mpi.candidates.merge",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Modules\\MasterPatientIndex\\Services\\PatientMergeService::merge",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "reject",
                    "kind": "outcome-refused",
                    "icon": "ban",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Or reject the pair",
                    "sublabel": "Review desk",
                    "evidence": [
                        {
                            "ref": "route:portals.admin.mpi.candidates.reject",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Modules\\MasterPatientIndex\\Services\\MasterPatientIndexService::rejectMatch",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "restored",
                    "kind": "outcome-ok",
                    "icon": "undo-2",
                    "cell": [
                        0,
                        2
                    ],
                    "label": "Records separated",
                    "sublabel": "merge undone",
                    "evidence": [
                        {
                            "ref": "method:App\\Modules\\MasterPatientIndex\\Services\\PatientMergeService::unmerge",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "unmerge",
                    "kind": "service",
                    "icon": "undo-2",
                    "cell": [
                        1,
                        2
                    ],
                    "label": "Unmerge if needed",
                    "sublabel": "Review desk",
                    "evidence": [
                        {
                            "ref": "route:portals.admin.mpi.merges.unmerge",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "scheduler",
                    "to": "scan",
                    "kind": "async",
                    "label": "scheduled",
                    "loop": false
                },
                {
                    "from": "scan",
                    "to": "queue",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "queue",
                    "to": "review",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "review",
                    "to": "merge",
                    "kind": "request",
                    "label": "same person",
                    "loop": false
                },
                {
                    "from": "review",
                    "to": "reject",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "merge",
                    "to": "alias",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "alias",
                    "to": "done",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "alias",
                    "to": "unmerge",
                    "kind": "request",
                    "label": "undo",
                    "loop": false
                },
                {
                    "from": "unmerge",
                    "to": "restored",
                    "kind": "response",
                    "label": null,
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "scheduler",
                        "scan"
                    ],
                    "title": "Run duplicate scan",
                    "text": "Scans run nightly and weekly on the schedule."
                },
                {
                    "path": [
                        "scan"
                    ],
                    "title": "Score candidate pairs",
                    "text": "Records are compared within blocks so the scan stays fast on a national register."
                },
                {
                    "path": [
                        "scan",
                        "queue"
                    ],
                    "title": "Queue pairs for review",
                    "text": "Likely duplicates are raised as candidates. Nothing merges automatically."
                },
                {
                    "path": [
                        "queue",
                        "review"
                    ],
                    "title": "Compare side by side",
                    "text": "An administrator reviews both records. A pair can also be raised by hand."
                },
                {
                    "path": [
                        "review",
                        "merge"
                    ],
                    "title": "Merge: survivor + alias",
                    "text": "One Health ID survives; the other becomes an alias that still resolves."
                },
                {
                    "path": [
                        "merge",
                        "alias",
                        "done"
                    ],
                    "title": "Lookups follow the merge",
                    "text": "Searches, scans and links on the old ID land on the survivor."
                },
                {
                    "path": [
                        "review",
                        "reject"
                    ],
                    "title": "Or reject the pair",
                    "text": "A rejected pair is dismissed and both records stay as they are."
                },
                {
                    "path": [
                        "alias",
                        "unmerge",
                        "restored"
                    ],
                    "title": "Unmerge if needed",
                    "text": "Merges are reversible, last in first out, from the Merged tab."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": "https://opescare.com/docs/flows/mpi"
        },
        "webhooks": {
            "title": "Webhook delivery",
            "summary": "Events are queued, signed with HMAC-SHA256, sent only to public addresses, retried on failure and can be replayed.",
            "nodes": [
                {
                    "id": "event",
                    "kind": "actor",
                    "icon": "zap",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Event recorded, delivery queued",
                    "sublabel": "OpesCare",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\WebhookService::dispatch",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Models\\WebhookSubscription",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "sign",
                    "kind": "service",
                    "icon": "key-round",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Sign: HMAC-SHA256(t.payload)",
                    "sublabel": "Queue worker",
                    "evidence": [
                        {
                            "ref": "method:App\\Jobs\\SendWebhookJob::handle",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Models\\WebhookSecret",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "public",
                    "kind": "gate",
                    "icon": "shield-check",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Public address check",
                    "sublabel": "Queue worker",
                    "evidence": [
                        {
                            "ref": "method:App\\Support\\PublicUrlGuard::isAllowed",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Support\\PublicUrlGuard::isPublicIp",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "post",
                    "kind": "service",
                    "icon": "send",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "POST JSON + signature headers",
                    "sublabel": "Queue worker",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\WebhookDeliveryLog",
                            "resolves": true
                        },
                        {
                            "ref": "route:docs.webhooks",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "blocked",
                    "kind": "outcome-refused",
                    "icon": "ban",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Address refused",
                    "sublabel": "private or local host",
                    "evidence": [
                        {
                            "ref": "method:App\\Support\\PublicUrlGuard::resolve",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "delivered",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "2xx: delivered",
                    "sublabel": "Your endpoint",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\WebhookDeliveryLog",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "endpoint",
                    "kind": "external",
                    "icon": "webhook",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Verify signature, dedupe",
                    "sublabel": "Your endpoint",
                    "evidence": [
                        {
                            "ref": "route:docs.webhooks",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.developer.webhooks",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "failed",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        2,
                        2
                    ],
                    "label": "Marked failed, replayable",
                    "sublabel": "replay from the portal",
                    "evidence": [
                        {
                            "ref": "method:App\\Jobs\\SendWebhookJob::failed",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.developer.webhooks.replay",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Services\\WebhookService::replay",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "retry",
                    "kind": "service",
                    "icon": "refresh-cw",
                    "cell": [
                        3,
                        2
                    ],
                    "label": "Retry after 1 min, then 5 min",
                    "sublabel": "Queue worker",
                    "evidence": [
                        {
                            "ref": "property:App\\Jobs\\SendWebhookJob::tries",
                            "resolves": true
                        },
                        {
                            "ref": "property:App\\Jobs\\SendWebhookJob::backoff",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "event",
                    "to": "sign",
                    "kind": "async",
                    "label": "queued",
                    "loop": false
                },
                {
                    "from": "sign",
                    "to": "public",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "public",
                    "to": "post",
                    "kind": "request",
                    "label": "public",
                    "loop": false
                },
                {
                    "from": "public",
                    "to": "blocked",
                    "kind": "refusal",
                    "label": "private",
                    "loop": false
                },
                {
                    "from": "post",
                    "to": "endpoint",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "endpoint",
                    "to": "delivered",
                    "kind": "response",
                    "label": "2xx",
                    "loop": false
                },
                {
                    "from": "endpoint",
                    "to": "retry",
                    "kind": "refusal",
                    "label": "non-2xx",
                    "loop": false
                },
                {
                    "from": "retry",
                    "to": "post",
                    "kind": "request",
                    "label": "retry",
                    "loop": true
                },
                {
                    "from": "retry",
                    "to": "failed",
                    "kind": "refusal",
                    "label": "3 attempts",
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "event",
                        "sign"
                    ],
                    "title": "Event recorded, delivery queued",
                    "text": "Each active subscription for the event type gets a queued delivery."
                },
                {
                    "path": [
                        "sign",
                        "public"
                    ],
                    "title": "Sign: HMAC-SHA256(t.payload)",
                    "text": "The timestamp and JSON body are signed with your subscription secret."
                },
                {
                    "path": [
                        "public",
                        "post"
                    ],
                    "title": "Public address check",
                    "text": "Callbacks that resolve to private or local addresses are refused; redirects are not followed."
                },
                {
                    "path": [
                        "post",
                        "endpoint"
                    ],
                    "title": "POST JSON + signature headers",
                    "text": "Headers: X-OpesCare-Signature (t=..., v1=...), X-OpesCare-Timestamp, X-OpesCare-Event-Id."
                },
                {
                    "path": [
                        "endpoint"
                    ],
                    "title": "Verify signature, dedupe",
                    "text": "Recompute the HMAC, reject old timestamps, and ignore an Event-Id you already processed."
                },
                {
                    "path": [
                        "endpoint",
                        "delivered"
                    ],
                    "title": "2xx: delivered",
                    "text": "Any 2xx within 10 seconds marks the delivery as delivered."
                },
                {
                    "path": [
                        "endpoint",
                        "retry",
                        "post"
                    ],
                    "title": "Retry after 1 min, then 5 min",
                    "text": "A non-2xx answer or a timeout is retried, up to three attempts in all."
                },
                {
                    "path": [
                        "retry",
                        "failed"
                    ],
                    "title": "Marked failed, replayable",
                    "text": "After the last attempt the delivery is failed; replay it from the developer portal."
                },
                {
                    "path": [
                        "public",
                        "blocked"
                    ],
                    "title": "Address refused",
                    "text": "A callback URL that resolves to a private, loopback or link-local address is never called."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": "https://opescare.com/docs/flows/webhooks"
        },
        "qr": {
            "title": "Health ID QR verification",
            "summary": "A verifier scans the patient Health ID QR and opescare.com answers with one of four states; a successful scan is recorded.",
            "nodes": [
                {
                    "id": "patient",
                    "kind": "actor",
                    "icon": "qr-code",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Show Health ID QR",
                    "sublabel": "Patient",
                    "evidence": [
                        {
                            "ref": "route:portals.patient.health-id-card",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Services\\Identity\\QrTokenService::generateToken",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "verifier",
                    "kind": "actor",
                    "icon": "scan-line",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Scan, open /verify/qr/{token}",
                    "sublabel": "Verifier",
                    "evidence": [
                        {
                            "ref": "route:verify.qr",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "check",
                    "kind": "decision",
                    "icon": "git-branch",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Check token state",
                    "sublabel": "opescare.com",
                    "evidence": [
                        {
                            "ref": "method:App\\Http\\Controllers\\MedicalId\\VerifyController::qr",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Services\\Identity\\QrTokenService::verifyToken",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Services\\Identity\\QrTokenService::failureState",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "log",
                    "kind": "store",
                    "icon": "scroll-text",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Record successful scan",
                    "sublabel": "Verification log",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\HealthIdVerificationEvent",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "invalid",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "Invalid",
                    "sublabel": "unknown token",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Identity\\QrTokenService::failureState",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "revoked",
                    "kind": "outcome-refused",
                    "icon": "ban",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Revoked",
                    "sublabel": "the card was replaced",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Identity\\QrTokenService::revokeToken",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "expired",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Expired",
                    "sublabel": "show a fresh code",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\HealthIdQrToken",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "verified",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Verified",
                    "sublabel": "genuine and current",
                    "evidence": [
                        {
                            "ref": "route:verify.qr",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "patient",
                    "to": "verifier",
                    "kind": "request",
                    "label": "shows",
                    "loop": false
                },
                {
                    "from": "verifier",
                    "to": "check",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "check",
                    "to": "log",
                    "kind": "request",
                    "label": "valid",
                    "loop": false
                },
                {
                    "from": "log",
                    "to": "verified",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "check",
                    "to": "expired",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "check",
                    "to": "revoked",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "check",
                    "to": "invalid",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "patient"
                    ],
                    "title": "Show Health ID QR",
                    "text": "The patient opens the Health ID card in Presentation Mode."
                },
                {
                    "path": [
                        "patient",
                        "verifier"
                    ],
                    "title": "Scan, open /verify/qr/{token}",
                    "text": "Any camera opens the verification page on opescare.com."
                },
                {
                    "path": [
                        "verifier",
                        "check"
                    ],
                    "title": "Check token state",
                    "text": "The token is looked up and checked for expiry and revocation."
                },
                {
                    "path": [
                        "check",
                        "expired"
                    ],
                    "title": "Verified, expired, revoked or invalid",
                    "text": "The page shows exactly one of the four states."
                },
                {
                    "path": [
                        "check",
                        "log",
                        "verified"
                    ],
                    "title": "Record successful scan",
                    "text": "A successful verification is stored as a verification event."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": "https://opescare.com/docs/flows/qr"
        },
        "record-is-the-product": {
            "title": "The record is the product",
            "summary": "The patient's record sits at the centre. Four layers work on it: the marketplace (medicine, blood and care finders), governance (consent ledger, access log, break-glass), family (guardian, act-as, invitations) and the clinic workstation (doctor, front desk, pharmacy and lab).",
            "nodes": [
                {
                    "id": "patient",
                    "kind": "actor",
                    "icon": "user-round",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Patient",
                    "sublabel": "holds the Health ID",
                    "evidence": [
                        {
                            "ref": "route:portals.patient.access-logs",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Modules\\PatientIdentity\\Services\\PatientIdentityService",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "medicine",
                    "kind": "service",
                    "icon": "pill",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Medicine finder",
                    "sublabel": "reported stock",
                    "evidence": [
                        {
                            "ref": "route:public.network.medicine-finder",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "blood",
                    "kind": "service",
                    "icon": "droplet",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Blood finder",
                    "sublabel": "group · urgent · donors",
                    "evidence": [
                        {
                            "ref": "route:public.network.blood-finder",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "care",
                    "kind": "service",
                    "icon": "map-pin",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Care finder",
                    "sublabel": "map · book a slot",
                    "evidence": [
                        {
                            "ref": "route:public.care-map",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "invites",
                    "kind": "service",
                    "icon": "mail",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "Invitations",
                    "sublabel": "accept or decline",
                    "evidence": [
                        {
                            "ref": "route:portals.patient.family.invite.send",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "pharmlab",
                    "kind": "actor",
                    "icon": "flask-conical",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Pharmacy and lab",
                    "sublabel": "dispense · release results",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.dispense",
                            "resolves": true
                        },
                        {
                            "ref": "config:staff_capabilities.capabilities.lab_results",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "desk",
                    "kind": "actor",
                    "icon": "monitor",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Front desk",
                    "sublabel": "check-in · walk-ins",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.front_desk",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "doctor",
                    "kind": "actor",
                    "icon": "stethoscope",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Doctor",
                    "sublabel": "chart · prescribe · order",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.clinical_chart",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "guardian",
                    "kind": "actor",
                    "icon": "users",
                    "cell": [
                        0,
                        2
                    ],
                    "label": "Guardian",
                    "sublabel": "acts for dependents",
                    "evidence": [
                        {
                            "ref": "route:portals.patient.family",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "breakglass",
                    "kind": "gate",
                    "icon": "shield-alert",
                    "cell": [
                        3,
                        2
                    ],
                    "label": "Break-glass",
                    "sublabel": "reason · alert · review",
                    "evidence": [
                        {
                            "ref": "method:App\\Modules\\Governance\\Services\\EmergencyAccessService::openBreakGlass",
                            "resolves": true
                        },
                        {
                            "ref": "config:staff_capabilities.capabilities.emergency_access",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "actas",
                    "kind": "service",
                    "icon": "link",
                    "cell": [
                        0,
                        3
                    ],
                    "label": "Act-as context",
                    "sublabel": "whose record is open",
                    "evidence": [
                        {
                            "ref": "method:App\\Http\\Middleware\\ActAsDependent::handle",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "ledger",
                    "kind": "gate",
                    "icon": "shield-check",
                    "cell": [
                        1,
                        3
                    ],
                    "label": "Consent ledger",
                    "sublabel": "request · grant · revoke",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\ConsentGrant",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Support\\ClinicalRelationshipGate::evaluate",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "record",
                    "kind": "store",
                    "icon": "heart-pulse",
                    "cell": [
                        2,
                        3
                    ],
                    "label": "The patient's record",
                    "sublabel": "Health ID · history · medicines",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\Patient",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Modules\\PatientIdentity\\Services\\PatientIdentityService",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "accesslog",
                    "kind": "store",
                    "icon": "scroll-text",
                    "cell": [
                        3,
                        3
                    ],
                    "label": "Access log",
                    "sublabel": "the patient reads it",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\AccessLog",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.patient.access-logs",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "refused",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        1,
                        4
                    ],
                    "label": "Refused",
                    "sublabel": "no basis, no read",
                    "evidence": [
                        {
                            "ref": "method:App\\Support\\ClinicalRelationshipGate::none",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "ok",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        3,
                        4
                    ],
                    "label": "Scoped read",
                    "sublabel": "written to the access log",
                    "evidence": [
                        {
                            "ref": "uri:GET api/mobile/access-logs",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "patient",
                    "to": "medicine",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "blood",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "care",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "invites",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "medicine",
                    "to": "pharmlab",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "blood",
                    "to": "desk",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "care",
                    "to": "doctor",
                    "kind": "request",
                    "label": "book",
                    "loop": false
                },
                {
                    "from": "desk",
                    "to": "doctor",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "invites",
                    "to": "guardian",
                    "kind": "request",
                    "label": "accept",
                    "loop": false
                },
                {
                    "from": "guardian",
                    "to": "actas",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "actas",
                    "to": "ledger",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "pharmlab",
                    "to": "ledger",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "doctor",
                    "to": "breakglass",
                    "kind": "request",
                    "label": "emergency",
                    "loop": false
                },
                {
                    "from": "doctor",
                    "to": "ledger",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "breakglass",
                    "to": "record",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "ledger",
                    "to": "record",
                    "kind": "request",
                    "label": "basis held",
                    "loop": false
                },
                {
                    "from": "ledger",
                    "to": "refused",
                    "kind": "refusal",
                    "label": "no basis",
                    "loop": false
                },
                {
                    "from": "record",
                    "to": "accesslog",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "accesslog",
                    "to": "ok",
                    "kind": "response",
                    "label": null,
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "ledger",
                        "record",
                        "accesslog",
                        "ok"
                    ],
                    "title": "The patient's record",
                    "text": "Identity, history, medicines, allergies, results, consent settings and the access trail. Everything else works on this one record."
                },
                {
                    "path": [
                        "patient",
                        "care",
                        "doctor"
                    ],
                    "title": "Marketplace layer",
                    "text": "Finds care in the real world: medicine stock reported by pharmacies, blood availability and clinicians on a map."
                },
                {
                    "path": [
                        "doctor",
                        "breakglass",
                        "record",
                        "accesslog"
                    ],
                    "title": "Governance layer",
                    "text": "Decides who may read the record: consent requests and grants, a patient-visible access log and an audited emergency path."
                },
                {
                    "path": [
                        "patient",
                        "invites",
                        "guardian",
                        "actas",
                        "ledger"
                    ],
                    "title": "Family layer",
                    "text": "Lets a guardian act for a child or dependent in an explicit act-as context; adults join only by accepting an invitation."
                },
                {
                    "path": [
                        "desk",
                        "doctor",
                        "ledger"
                    ],
                    "title": "Clinic workstation",
                    "text": "The same app gives doctors, the front desk, pharmacists and lab technicians their own tools on the same record."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": null
        },
        "one-app-five-roles": {
            "title": "One app, five clinics",
            "summary": "Patient, doctor, front desk, pharmacist and lab technician each get their own experience in the same app. Every request passes the role capability and care-relationship checks before it reaches the one patient record.",
            "nodes": [
                {
                    "id": "app",
                    "kind": "actor",
                    "icon": "smartphone",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "One OpesCare app",
                    "sublabel": "sign in; role from the account",
                    "evidence": [
                        {
                            "ref": "route:login.submit",
                            "resolves": true
                        },
                        {
                            "ref": "config:staff_capabilities.capabilities",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "patient",
                    "kind": "actor",
                    "icon": "user-round",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "Patient",
                    "sublabel": "Health ID · consent",
                    "evidence": [
                        {
                            "ref": "route:portals.patient.access-logs",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "doctor",
                    "kind": "actor",
                    "icon": "stethoscope",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Doctor",
                    "sublabel": "chart · prescribe · labs",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.clinical_chart",
                            "resolves": true
                        },
                        {
                            "ref": "config:staff_capabilities.capabilities.prescribe",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "desk",
                    "kind": "actor",
                    "icon": "monitor",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Front desk",
                    "sublabel": "check-in · routing",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.front_desk",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "pharmacist",
                    "kind": "actor",
                    "icon": "pill",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Pharmacist",
                    "sublabel": "dispense · stock",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.dispense",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "lab",
                    "kind": "actor",
                    "icon": "flask-conical",
                    "cell": [
                        4,
                        1
                    ],
                    "label": "Lab technician",
                    "sublabel": "samples · release",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.lab_results",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.lab.release",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "gate",
                    "kind": "gate",
                    "icon": "shield-check",
                    "cell": [
                        2,
                        2
                    ],
                    "label": "Capability check",
                    "sublabel": "role · care link or consent",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Support\\ClinicalRelationshipGate::evaluate",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "refused",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        4,
                        2
                    ],
                    "label": "Refused",
                    "sublabel": "no capability or basis",
                    "evidence": [
                        {
                            "ref": "method:App\\Support\\ClinicalRelationshipGate::none",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "record",
                    "kind": "store",
                    "icon": "heart-pulse",
                    "cell": [
                        2,
                        3
                    ],
                    "label": "One patient record",
                    "sublabel": "the same record for all five",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\Patient",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Models\\AccessLog",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "ok",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        2,
                        4
                    ],
                    "label": "Read, logged",
                    "sublabel": "written to the access log",
                    "evidence": [
                        {
                            "ref": "uri:GET api/mobile/access-logs",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "app",
                    "to": "patient",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "app",
                    "to": "doctor",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "app",
                    "to": "desk",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "app",
                    "to": "pharmacist",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "app",
                    "to": "lab",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "gate",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "doctor",
                    "to": "gate",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "desk",
                    "to": "gate",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "pharmacist",
                    "to": "gate",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "lab",
                    "to": "gate",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "gate",
                    "to": "refused",
                    "kind": "refusal",
                    "label": "no basis",
                    "loop": false
                },
                {
                    "from": "gate",
                    "to": "record",
                    "kind": "request",
                    "label": "allowed",
                    "loop": false
                },
                {
                    "from": "record",
                    "to": "ok",
                    "kind": "response",
                    "label": null,
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "app",
                        "patient",
                        "gate"
                    ],
                    "title": "Patient",
                    "text": "Holds the Health ID, answers consent requests and reads the access log."
                },
                {
                    "path": [
                        "app",
                        "doctor",
                        "gate"
                    ],
                    "title": "Doctor",
                    "text": "Schedule, appointment requests, patient list, sectioned chart, prescribing, lab orders, follow-ups and a results inbox."
                },
                {
                    "path": [
                        "app",
                        "desk",
                        "gate"
                    ],
                    "title": "Front desk",
                    "text": "The facility's appointment book: check-in, walk-in registration and routing to a clinician."
                },
                {
                    "path": [
                        "app",
                        "pharmacist",
                        "gate"
                    ],
                    "title": "Pharmacist",
                    "text": "Prescriptions in, dispensing out, reservations, and stock adjustments with an audit trail."
                },
                {
                    "path": [
                        "app",
                        "lab",
                        "gate"
                    ],
                    "title": "Lab technician",
                    "text": "Sample collection, result entry and release; releasing a result notifies the patient and the ordering clinician."
                },
                {
                    "path": [
                        "gate",
                        "refused"
                    ],
                    "title": "Capabilities and relationship check",
                    "text": "The server decides what each role may do, and checks for a care relationship or consent before any clinician reads a patient's record."
                },
                {
                    "path": [
                        "gate",
                        "record",
                        "ok"
                    ],
                    "title": "One record",
                    "text": "All five work on the same record, so nothing has to be carried around the clinic."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": null
        },
        "family-act-as": {
            "title": "Acting for a dependent",
            "summary": "A signed-in guardian chooses a dependent; the app sends an act-as context with each request; the server checks the family link before returning the dependent's record. Adults are invited and can accept or decline; a pending or declined invitation grants nothing.",
            "nodes": [
                {
                    "id": "guardian",
                    "kind": "actor",
                    "icon": "user-round",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Guardian",
                    "sublabel": "signed in as themself",
                    "evidence": [
                        {
                            "ref": "route:portals.patient.family",
                            "resolves": true
                        },
                        {
                            "ref": "uri:GET api/mobile/family",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "header",
                    "kind": "service",
                    "icon": "link",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Act-as context",
                    "sublabel": "sent with each request",
                    "evidence": [
                        {
                            "ref": "route:portals.patient.family.switch",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Http\\Middleware\\ActAsDependent",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "check",
                    "kind": "gate",
                    "icon": "shield-check",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Family-link check",
                    "sublabel": "verified on the server",
                    "evidence": [
                        {
                            "ref": "method:App\\Http\\Middleware\\ActAsDependent::handle",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Models\\FamilyLink",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "record",
                    "kind": "store",
                    "icon": "heart-pulse",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Dependent's record",
                    "sublabel": "same endpoints, full access",
                    "evidence": [
                        {
                            "ref": "uri:GET api/mobile/family/members/{linkId}",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "refused",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Refused",
                    "sublabel": "no family link",
                    "evidence": [
                        {
                            "ref": "method:App\\Http\\Middleware\\ActAsDependent::handle",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "banner",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Record shown",
                    "sublabel": "the screen names whose it is",
                    "evidence": [
                        {
                            "ref": "route:portals.patient.family.switch.back",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "invite",
                    "kind": "service",
                    "icon": "mail",
                    "cell": [
                        0,
                        2
                    ],
                    "label": "Invite an adult",
                    "sublabel": "sent from the family screen",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/family/invitations",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.patient.family.invite.send",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "pending",
                    "kind": "decision",
                    "icon": "git-branch",
                    "cell": [
                        1,
                        2
                    ],
                    "label": "Pending",
                    "sublabel": "grants nothing yet",
                    "evidence": [
                        {
                            "ref": "uri:GET api/mobile/family/invitations/incoming",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.patient.family.invitations",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "accepted",
                    "kind": "gate",
                    "icon": "user-check",
                    "cell": [
                        2,
                        2
                    ],
                    "label": "Accepted",
                    "sublabel": "by the invited person",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/family/invitations/{id}/accept",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileFamilyController::acceptInvitation",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "active",
                    "kind": "outcome-ok",
                    "icon": "user-check",
                    "cell": [
                        3,
                        2
                    ],
                    "label": "Can help with care",
                    "sublabel": "link active · revocable",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\FamilyLink",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.patient.family.revoke",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "declined",
                    "kind": "outcome-refused",
                    "icon": "ban",
                    "cell": [
                        1,
                        3
                    ],
                    "label": "Declined",
                    "sublabel": "nothing is granted",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/family/invitations/{id}/decline",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileFamilyController::declineInvitation",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "guardian",
                    "to": "header",
                    "kind": "request",
                    "label": "act as",
                    "loop": false
                },
                {
                    "from": "header",
                    "to": "check",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "check",
                    "to": "record",
                    "kind": "request",
                    "label": "linked",
                    "loop": false
                },
                {
                    "from": "check",
                    "to": "refused",
                    "kind": "refusal",
                    "label": "no link",
                    "loop": false
                },
                {
                    "from": "record",
                    "to": "banner",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "guardian",
                    "to": "invite",
                    "kind": "request",
                    "label": "invite",
                    "loop": false
                },
                {
                    "from": "invite",
                    "to": "pending",
                    "kind": "async",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "pending",
                    "to": "accepted",
                    "kind": "response",
                    "label": "accept",
                    "loop": false
                },
                {
                    "from": "accepted",
                    "to": "active",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "pending",
                    "to": "declined",
                    "kind": "refusal",
                    "label": "decline",
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "guardian"
                    ],
                    "title": "Guardian signs in",
                    "text": "The guardian uses their own account; there is no shared password."
                },
                {
                    "path": [
                        "guardian",
                        "header"
                    ],
                    "title": "Act-as context",
                    "text": "Choosing a dependent attaches an act-as context to every request the app makes."
                },
                {
                    "path": [
                        "header",
                        "check"
                    ],
                    "title": "Family-link check",
                    "text": "The server verifies the guardian really holds a family link to that dependent before answering."
                },
                {
                    "path": [
                        "check",
                        "record",
                        "banner"
                    ],
                    "title": "Dependent's record",
                    "text": "The dependent's record is read through the same endpoints as the guardian's own, and the screen names whose record is open."
                },
                {
                    "path": [
                        "guardian",
                        "invite"
                    ],
                    "title": "Invite an adult",
                    "text": "An adult cannot be added as a dependent; they are invited instead."
                },
                {
                    "path": [
                        "invite",
                        "pending"
                    ],
                    "title": "Pending",
                    "text": "Until the invited person answers, the invitation gives nobody any access."
                },
                {
                    "path": [
                        "pending",
                        "accepted",
                        "active"
                    ],
                    "title": "Accepted",
                    "text": "Once accepted, the link is active and can still be removed later."
                },
                {
                    "path": [
                        "pending",
                        "declined"
                    ],
                    "title": "Declined",
                    "text": "A declined invitation grants nothing."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": null
        },
        "offline-outbox": {
            "title": "Offline access and the outbox",
            "summary": "The server issues a revocable per-device policy that scopes an encrypted local cache. Writes that fail for lack of a network go to an outbox, then settle into an encrypted server queue that is de-duplicated, opens a reconciliation job and is audited. Signing out wipes the cache, the outbox and the policy.",
            "nodes": [
                {
                    "id": "optin",
                    "kind": "actor",
                    "icon": "smartphone",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Patient opts in",
                    "sublabel": "on this phone",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/offline/policies",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "policy",
                    "kind": "gate",
                    "icon": "key-round",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Offline policy",
                    "sublabel": "issued per device · scoped · revocable",
                    "evidence": [
                        {
                            "ref": "method:App\\Modules\\Offline\\Services\\SyncService::createLocalCachePolicy",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Models\\LocalCachePolicy",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "wipe",
                    "kind": "outcome-refused",
                    "icon": "trash-2",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Sign-out or revoke",
                    "sublabel": "wipes cache, outbox, policy",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/offline/policies/{policy}/revoke",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Modules\\Offline\\Services\\SyncService::revokeLocalCachePolicy",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "write",
                    "kind": "actor",
                    "icon": "cloud-off",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "A change while offline",
                    "sublabel": "the request gets no reply",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\OfflineQueue",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "cache",
                    "kind": "store",
                    "icon": "hard-drive",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Encrypted cache",
                    "sublabel": "only the granted scopes",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\LocalCachePolicy",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "outbox",
                    "kind": "store",
                    "icon": "inbox",
                    "cell": [
                        0,
                        2
                    ],
                    "label": "Outbox",
                    "sublabel": "sign-in requests never kept",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\OfflineQueue",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "settle",
                    "kind": "service",
                    "icon": "refresh-cw",
                    "cell": [
                        1,
                        2
                    ],
                    "label": "Back online",
                    "sublabel": "outbox is settled",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/offline/policies/{policy}/queue",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "queue",
                    "kind": "store",
                    "icon": "database",
                    "cell": [
                        2,
                        2
                    ],
                    "label": "Encrypted server queue",
                    "sublabel": "encrypted · de-duplicated",
                    "evidence": [
                        {
                            "ref": "method:App\\Modules\\Offline\\Services\\SyncService::queueEncryptedPayload",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Models\\OfflineQueue",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "job",
                    "kind": "service",
                    "icon": "git-merge",
                    "cell": [
                        3,
                        2
                    ],
                    "label": "Reconciliation job",
                    "sublabel": "one per queued change",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\ReconciliationCase",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Modules\\Offline\\Services\\SyncService::detectConflict",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "synced",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        2,
                        3
                    ],
                    "label": "Change applied",
                    "sublabel": "reconciled and audited",
                    "evidence": [
                        {
                            "ref": "method:App\\Modules\\Offline\\Services\\SyncService::resolveConflict",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "audit",
                    "kind": "store",
                    "icon": "scroll-text",
                    "cell": [
                        3,
                        3
                    ],
                    "label": "Audit trail",
                    "sublabel": "every step recorded",
                    "evidence": [
                        {
                            "ref": "class:App\\Models\\AuditEvent",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "optin",
                    "to": "policy",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "policy",
                    "to": "cache",
                    "kind": "response",
                    "label": "scopes",
                    "loop": false
                },
                {
                    "from": "policy",
                    "to": "wipe",
                    "kind": "refusal",
                    "label": "revoke",
                    "loop": false
                },
                {
                    "from": "cache",
                    "to": "write",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "write",
                    "to": "outbox",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "outbox",
                    "to": "settle",
                    "kind": "async",
                    "label": "online",
                    "loop": false
                },
                {
                    "from": "settle",
                    "to": "outbox",
                    "kind": "async",
                    "label": "still offline",
                    "loop": true
                },
                {
                    "from": "settle",
                    "to": "queue",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "queue",
                    "to": "job",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "job",
                    "to": "audit",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "audit",
                    "to": "synced",
                    "kind": "response",
                    "label": null,
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "optin",
                        "policy"
                    ],
                    "title": "Offline policy",
                    "text": "The patient opts in. The server issues a policy for this device naming which parts of the record may be kept, and can revoke it."
                },
                {
                    "path": [
                        "policy",
                        "cache"
                    ],
                    "title": "Encrypted cache",
                    "text": "Only the scopes the policy grants are stored on the phone, encrypted."
                },
                {
                    "path": [
                        "cache",
                        "write"
                    ],
                    "title": "A change while offline",
                    "text": "A change made with no network fails to reach the server."
                },
                {
                    "path": [
                        "write",
                        "outbox"
                    ],
                    "title": "Outbox",
                    "text": "The failed write is captured in an outbox. Sign-in requests are never written to the device."
                },
                {
                    "path": [
                        "outbox",
                        "settle"
                    ],
                    "title": "Back online",
                    "text": "When the phone reconnects, the outbox is sent to the server."
                },
                {
                    "path": [
                        "settle",
                        "queue"
                    ],
                    "title": "Encrypted server queue",
                    "text": "Each change is stored encrypted and de-duplicated, so sending twice does not apply twice."
                },
                {
                    "path": [
                        "queue",
                        "job"
                    ],
                    "title": "Reconciliation job",
                    "text": "Each queued change opens a reconciliation job on the server."
                },
                {
                    "path": [
                        "job",
                        "audit",
                        "synced"
                    ],
                    "title": "Audit trail",
                    "text": "Policy creation, every queued change and revocation are written to the audit trail."
                },
                {
                    "path": [
                        "policy",
                        "wipe"
                    ],
                    "title": "Sign-out or revoke",
                    "text": "Signing out, or the policy being revoked, wipes the cache, the outbox and the stored policy from the phone."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": null
        },
        "pharmacy-dispense": {
            "title": "From prescription to dispensed medicine",
            "summary": "A clinician issues a prescription after an interaction check. The patient can share it or simply be looked up at the counter; the pharmacy accepts, prepares and dispenses it, decrementing stock and printing labels. Separately, a patient can reserve a medicine in the app; the pharmacy accepts it, marks it ready, and it is collected or delivered, or cancelled while still open.",
            "nodes": [
                {
                    "id": "clinician",
                    "kind": "actor",
                    "icon": "stethoscope",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Clinician",
                    "sublabel": "prescriber desk",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.prescribe",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "issued",
                    "kind": "service",
                    "icon": "file-check",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Prescription issued",
                    "sublabel": "after an interaction check",
                    "evidence": [
                        {
                            "ref": "route:portals.prescriber.store",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.prescriber.interaction_check",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\MedicalId\\PrescriberController::store",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "patient",
                    "kind": "actor",
                    "icon": "user-round",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Patient",
                    "sublabel": "holds the prescription",
                    "evidence": [
                        {
                            "ref": "uri:GET api/mobile/prescriptions",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "reserved",
                    "kind": "service",
                    "icon": "pill",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Medicine reserved",
                    "sublabel": "from the app",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/pharmacy/reservations",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobilePharmacyController::reserve",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "list",
                    "kind": "service",
                    "icon": "search",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "Pharmacy list",
                    "sublabel": "or looked up by Health ID",
                    "evidence": [
                        {
                            "ref": "route:portals.pharmacy.prescriptions",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.pharmacy.prescriptions.lookup",
                            "resolves": true
                        },
                        {
                            "ref": "uri:GET api/mobile/pharmacy-desk/prescriptions/lookup",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "share",
                    "kind": "service",
                    "icon": "send",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Shared with a pharmacy",
                    "sublabel": "optional, from the app",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/prescriptions/{id}/share",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobilePrescriptionController::share",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "cancelled",
                    "kind": "outcome-refused",
                    "icon": "ban",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Cancelled",
                    "sublabel": "from any open state",
                    "evidence": [
                        {
                            "ref": "route:portals.pharmacy.orders.cancel",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobilePharmacyController::cancelReservation",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "oaccept",
                    "kind": "service",
                    "icon": "inbox",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Order accepted",
                    "sublabel": "by the pharmacy",
                    "evidence": [
                        {
                            "ref": "route:portals.pharmacy.orders.accept",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\Pharmacy\\PharmacyReservationController::accept",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "accepted",
                    "kind": "service",
                    "icon": "inbox",
                    "cell": [
                        0,
                        2
                    ],
                    "label": "Accepted",
                    "sublabel": "by the pharmacist",
                    "evidence": [
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\Pharmacy\\PharmacyDeskController::accept",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "ready",
                    "kind": "service",
                    "icon": "bell",
                    "cell": [
                        1,
                        2
                    ],
                    "label": "Ready",
                    "sublabel": "patient notified",
                    "evidence": [
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\Pharmacy\\PharmacyDeskController::ready",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "dispatched",
                    "kind": "service",
                    "icon": "send",
                    "cell": [
                        2,
                        2
                    ],
                    "label": "Dispatched",
                    "sublabel": "out for delivery",
                    "evidence": [
                        {
                            "ref": "route:portals.pharmacy.orders.dispatch",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "oready",
                    "kind": "service",
                    "icon": "bell",
                    "cell": [
                        3,
                        2
                    ],
                    "label": "Order ready",
                    "sublabel": "to collect or deliver",
                    "evidence": [
                        {
                            "ref": "route:portals.pharmacy.orders.ready",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "dispensed",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        1,
                        3
                    ],
                    "label": "Dispensed",
                    "sublabel": "stock down · labels printed",
                    "evidence": [
                        {
                            "ref": "route:portals.pharmacy.dispense",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\Pharmacy\\PharmacyDeskController::dispense",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Services\\Clinical\\PrescriptionService",
                            "resolves": true
                        },
                        {
                            "ref": "route:documents.new.labels",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "delivered",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        2,
                        3
                    ],
                    "label": "Delivered",
                    "sublabel": "to the patient",
                    "evidence": [
                        {
                            "ref": "route:portals.pharmacy.orders.delivered",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "collected",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        3,
                        3
                    ],
                    "label": "Collected",
                    "sublabel": "at the counter",
                    "evidence": [
                        {
                            "ref": "route:portals.pharmacy.orders.collected",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "clinician",
                    "to": "issued",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "issued",
                    "to": "patient",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "share",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "list",
                    "kind": "request",
                    "label": "look up",
                    "loop": false
                },
                {
                    "from": "share",
                    "to": "list",
                    "kind": "async",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "list",
                    "to": "accepted",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "accepted",
                    "to": "ready",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "ready",
                    "to": "dispensed",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "reserved",
                    "kind": "request",
                    "label": "reserve",
                    "loop": false
                },
                {
                    "from": "reserved",
                    "to": "oaccept",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "oaccept",
                    "to": "oready",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "oready",
                    "to": "collected",
                    "kind": "response",
                    "label": "pick up",
                    "loop": false
                },
                {
                    "from": "oready",
                    "to": "dispatched",
                    "kind": "request",
                    "label": "deliver",
                    "loop": false
                },
                {
                    "from": "dispatched",
                    "to": "delivered",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "reserved",
                    "to": "cancelled",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "oaccept",
                    "to": "cancelled",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "oready",
                    "to": "cancelled",
                    "kind": "refusal",
                    "label": null,
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "clinician",
                        "issued"
                    ],
                    "title": "Prescription issued",
                    "text": "The clinician writes the prescription; an interaction check runs before it is saved."
                },
                {
                    "path": [
                        "issued",
                        "patient",
                        "share",
                        "list"
                    ],
                    "title": "Shared with a pharmacy",
                    "text": "The patient may share the prescription from the app so it appears in that pharmacy's list."
                },
                {
                    "path": [
                        "patient",
                        "list"
                    ],
                    "title": "Looked up at the counter",
                    "text": "Without sharing, the pharmacist finds it by the patient's Health ID. It can be written at one facility and filled at another."
                },
                {
                    "path": [
                        "list",
                        "accepted",
                        "ready"
                    ],
                    "title": "Accepted and prepared",
                    "text": "The pharmacist accepts the prescription and marks it ready."
                },
                {
                    "path": [
                        "ready",
                        "dispensed"
                    ],
                    "title": "Dispensed",
                    "text": "Dispensing records what was given, decrements stock and prints the medicine labels."
                },
                {
                    "path": [
                        "patient",
                        "reserved",
                        "oaccept",
                        "oready"
                    ],
                    "title": "Medicine reserved",
                    "text": "A patient reserves a medicine in the app; the pharmacy accepts the order and prepares it."
                },
                {
                    "path": [
                        "oready",
                        "collected"
                    ],
                    "title": "Collected",
                    "text": "The patient collects the order at the counter."
                },
                {
                    "path": [
                        "oready",
                        "dispatched",
                        "delivered"
                    ],
                    "title": "Delivered",
                    "text": "Or the pharmacy dispatches it and marks it delivered."
                },
                {
                    "path": [
                        "oaccept",
                        "cancelled"
                    ],
                    "title": "Cancelled",
                    "text": "An order can be cancelled by the patient or the pharmacy while it is still open."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": null
        },
        "lab-release": {
            "title": "From sample to released result",
            "summary": "A test is ordered by a clinician, or requested by the patient and approved by the lab. The sample is collected, results are entered and validated, and release is refused if there are no results. One release notifies the patient and the ordering clinician together; guardians are told once, critical values get a recorded call-back, and later corrections are recorded rather than overwritten.",
            "nodes": [
                {
                    "id": "patient",
                    "kind": "actor",
                    "icon": "user-round",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Patient",
                    "sublabel": "needs a test",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/labs/requests",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "clinician",
                    "kind": "actor",
                    "icon": "stethoscope",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Clinician",
                    "sublabel": "orders from the chart",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.clinical_chart",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "order",
                    "kind": "service",
                    "icon": "flask-conical",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Test ordered",
                    "sublabel": "lab order created",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/doctor/patients/{patient}/lab-orders",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileDoctorLabOrderController::store",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "collect",
                    "kind": "service",
                    "icon": "flask-conical",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Sample collected",
                    "sublabel": "at the lab bench",
                    "evidence": [
                        {
                            "ref": "route:portals.lab.collect",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\MedicalId\\LabDeskWebController::collect",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "request",
                    "kind": "service",
                    "icon": "send",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "Test requested",
                    "sublabel": "by the patient, in the app",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/labs/requests",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "decide",
                    "kind": "decision",
                    "icon": "users",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Lab manager decides",
                    "sublabel": "approve or decline",
                    "evidence": [
                        {
                            "ref": "route:portals.lab_manager.requests.approve",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.lab_manager.requests.decline",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "refused",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Release refused",
                    "sublabel": "no results yet",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Lab\\LabDeskService::release",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "results",
                    "kind": "store",
                    "icon": "database",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Results entered",
                    "sublabel": "value by value",
                    "evidence": [
                        {
                            "ref": "route:portals.lab.results.store",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "declined",
                    "kind": "outcome-refused",
                    "icon": "ban",
                    "cell": [
                        0,
                        2
                    ],
                    "label": "Declined",
                    "sublabel": "no order is created",
                    "evidence": [
                        {
                            "ref": "route:portals.lab_manager.requests.decline",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "correct",
                    "kind": "outcome-ok",
                    "icon": "file-check",
                    "cell": [
                        1,
                        2
                    ],
                    "label": "Correction recorded",
                    "sublabel": "never overwritten",
                    "evidence": [
                        {
                            "ref": "route:portals.lab.results.correct",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "release",
                    "kind": "gate",
                    "icon": "shield-check",
                    "cell": [
                        2,
                        2
                    ],
                    "label": "Release",
                    "sublabel": "one locked step",
                    "evidence": [
                        {
                            "ref": "route:portals.lab.release",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Services\\Lab\\LabDeskService::release",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "validate",
                    "kind": "gate",
                    "icon": "user-check",
                    "cell": [
                        3,
                        2
                    ],
                    "label": "Validated",
                    "sublabel": "second check",
                    "evidence": [
                        {
                            "ref": "route:portals.lab.validate",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "guardians",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        0,
                        3
                    ],
                    "label": "Guardians told",
                    "sublabel": "once",
                    "evidence": [
                        {
                            "ref": "method:App\\Listeners\\NotifyGuardiansOfPatientEvent::handleLabResult",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "notify",
                    "kind": "service",
                    "icon": "bell",
                    "cell": [
                        1,
                        3
                    ],
                    "label": "Patient notified",
                    "sublabel": "bell + push",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Lab\\LabDeskService::notifyReleased",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Services\\Lab\\LabDeskService::bellPatient",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Services\\Lab\\LabDeskService::pushPatient",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "clinnote",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        2,
                        3
                    ],
                    "label": "Clinician notified",
                    "sublabel": "in the same step",
                    "evidence": [
                        {
                            "ref": "method:App\\Services\\Lab\\LabDeskService::notifyReleased",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "callback",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        3,
                        3
                    ],
                    "label": "Call-back recorded",
                    "sublabel": "for critical values",
                    "evidence": [
                        {
                            "ref": "route:portals.lab_manager.critical_callback",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\MedicalId\\LabManagerDeskController::criticalCallback",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "patient",
                    "to": "clinician",
                    "kind": "request",
                    "label": "consults",
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "request",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "request",
                    "to": "decide",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "decide",
                    "to": "order",
                    "kind": "response",
                    "label": "approve",
                    "loop": false
                },
                {
                    "from": "decide",
                    "to": "declined",
                    "kind": "refusal",
                    "label": "decline",
                    "loop": false
                },
                {
                    "from": "clinician",
                    "to": "order",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "order",
                    "to": "collect",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "collect",
                    "to": "results",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "results",
                    "to": "validate",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "validate",
                    "to": "release",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "release",
                    "to": "refused",
                    "kind": "refusal",
                    "label": "no results",
                    "loop": false
                },
                {
                    "from": "release",
                    "to": "correct",
                    "kind": "request",
                    "label": "later",
                    "loop": false
                },
                {
                    "from": "release",
                    "to": "notify",
                    "kind": "async",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "release",
                    "to": "clinnote",
                    "kind": "async",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "release",
                    "to": "callback",
                    "kind": "async",
                    "label": "critical",
                    "loop": false
                },
                {
                    "from": "notify",
                    "to": "guardians",
                    "kind": "async",
                    "label": null,
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "patient",
                        "clinician",
                        "order"
                    ],
                    "title": "Clinician orders a test",
                    "text": "The clinician orders the test from the patient's chart."
                },
                {
                    "path": [
                        "patient",
                        "request",
                        "decide",
                        "order"
                    ],
                    "title": "Or the patient asks",
                    "text": "A patient can request a test in the app; the lab manager approves it into an order or declines it."
                },
                {
                    "path": [
                        "order",
                        "collect"
                    ],
                    "title": "Sample collected",
                    "text": "The lab records the sample collection."
                },
                {
                    "path": [
                        "collect",
                        "results"
                    ],
                    "title": "Results entered",
                    "text": "Results are entered against the order."
                },
                {
                    "path": [
                        "results",
                        "validate"
                    ],
                    "title": "Validated",
                    "text": "Results are validated before they can be released."
                },
                {
                    "path": [
                        "validate",
                        "release"
                    ],
                    "title": "Released",
                    "text": "Release runs as one locked step."
                },
                {
                    "path": [
                        "release",
                        "notify"
                    ],
                    "title": "Patient notified",
                    "text": "The patient gets a bell notification and a push, marked high priority when a value is critical."
                },
                {
                    "path": [
                        "release",
                        "clinnote"
                    ],
                    "title": "Clinician notified",
                    "text": "The ordering clinician is notified in the same step."
                },
                {
                    "path": [
                        "notify",
                        "guardians"
                    ],
                    "title": "Guardians told once",
                    "text": "Guardians linked to the patient are told once."
                },
                {
                    "path": [
                        "release",
                        "callback"
                    ],
                    "title": "Critical call-back",
                    "text": "For a critical value, the lab records the phone call-back it made."
                },
                {
                    "path": [
                        "release",
                        "correct"
                    ],
                    "title": "Correction after release",
                    "text": "A later correction is recorded beside the original value, never written over it."
                },
                {
                    "path": [
                        "release",
                        "refused"
                    ],
                    "title": "Refused without results",
                    "text": "Release is refused when there are no results to release."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": null
        },
        "blood-request-queue": {
            "title": "A blood request, from ask to fulfilled",
            "summary": "A blood request comes from the patient app or from a clinician at a facility. The blood bank decides against its inventory: an accepted request is made ready and fulfilled, with a request slip; a declined one ends there, and a patient can cancel their own request. The same inventory feeds the public blood finder.",
            "nodes": [
                {
                    "id": "clinician",
                    "kind": "actor",
                    "icon": "stethoscope",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Clinician",
                    "sublabel": "at a facility",
                    "evidence": [
                        {
                            "ref": "config:staff_capabilities.capabilities.blood_inventory",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "desk",
                    "kind": "service",
                    "icon": "monitor",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Request from the desk",
                    "sublabel": "facility staff",
                    "evidence": [
                        {
                            "ref": "route:portals.staff.blood_requests.store",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\MedicalId\\BloodRequestDeskController::store",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "decide",
                    "kind": "decision",
                    "icon": "git-branch",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Blood bank decides",
                    "sublabel": "accept or decline",
                    "evidence": [
                        {
                            "ref": "route:portals.staff.blood_requests.decide",
                            "resolves": true
                        },
                        {
                            "ref": "uri:POST api/mobile/blood-desk/requests/{id}/decide",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\V1\\BloodRequestQueueController::decide",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "inventory",
                    "kind": "store",
                    "icon": "database",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Blood inventory",
                    "sublabel": "desk entries · partner sync",
                    "evidence": [
                        {
                            "ref": "route:portals.staff.inventory.blood",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.staff.inventory.blood.adjust",
                            "resolves": true
                        },
                        {
                            "ref": "uri:POST api/v1/connect/inventory/blood-stock/sync",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "patient",
                    "kind": "actor",
                    "icon": "user-round",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "Patient",
                    "sublabel": "or a relative",
                    "evidence": [
                        {
                            "ref": "uri:GET api/mobile/blood/requests",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "app",
                    "kind": "service",
                    "icon": "droplet",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Request from the app",
                    "sublabel": "group · units · urgency",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/blood/requests",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileBloodController::store",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "ready",
                    "kind": "service",
                    "icon": "bell",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Ready",
                    "sublabel": "units set aside",
                    "evidence": [
                        {
                            "ref": "route:portals.staff.blood_requests.ready",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileBloodDeskController::ready",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "finder",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        3,
                        1
                    ],
                    "label": "Shown in the finder",
                    "sublabel": "availability by group",
                    "evidence": [
                        {
                            "ref": "route:public.network.blood-finder",
                            "resolves": true
                        },
                        {
                            "ref": "uri:GET api/mobile/blood/search",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "cancelled",
                    "kind": "outcome-refused",
                    "icon": "ban",
                    "cell": [
                        1,
                        2
                    ],
                    "label": "Cancelled",
                    "sublabel": "by the requester",
                    "evidence": [
                        {
                            "ref": "uri:POST api/mobile/blood/requests/{id}/cancel",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "fulfilled",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        2,
                        2
                    ],
                    "label": "Fulfilled",
                    "sublabel": "request slip PDF",
                    "evidence": [
                        {
                            "ref": "route:portals.staff.blood_requests.fulfil",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\Api\\Mobile\\MobileBloodDeskController::fulfil",
                            "resolves": true
                        },
                        {
                            "ref": "route:documents.new.blood_request",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "declined",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        3,
                        2
                    ],
                    "label": "Declined",
                    "sublabel": "requester told",
                    "evidence": [
                        {
                            "ref": "route:portals.staff.blood_requests.decide",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "patient",
                    "to": "clinician",
                    "kind": "request",
                    "label": "at a facility",
                    "loop": false
                },
                {
                    "from": "patient",
                    "to": "app",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "clinician",
                    "to": "desk",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "desk",
                    "to": "decide",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "app",
                    "to": "decide",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "app",
                    "to": "cancelled",
                    "kind": "refusal",
                    "label": "cancel",
                    "loop": false
                },
                {
                    "from": "decide",
                    "to": "inventory",
                    "kind": "async",
                    "label": "checked",
                    "loop": false
                },
                {
                    "from": "inventory",
                    "to": "finder",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "decide",
                    "to": "ready",
                    "kind": "request",
                    "label": "accept",
                    "loop": false
                },
                {
                    "from": "ready",
                    "to": "fulfilled",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "decide",
                    "to": "declined",
                    "kind": "refusal",
                    "label": "decline",
                    "loop": false
                }
            ],
            "steps": [
                {
                    "path": [
                        "patient",
                        "app",
                        "decide"
                    ],
                    "title": "Request from the app",
                    "text": "A patient asks for blood from the app, giving the group, the number of units and the urgency."
                },
                {
                    "path": [
                        "patient",
                        "clinician",
                        "desk",
                        "decide"
                    ],
                    "title": "Request from a facility",
                    "text": "A clinician or facility desk raises the request on the patient's behalf."
                },
                {
                    "path": [
                        "decide",
                        "inventory"
                    ],
                    "title": "Checked against inventory",
                    "text": "The blood bank decides with its own inventory in view."
                },
                {
                    "path": [
                        "decide",
                        "ready",
                        "fulfilled"
                    ],
                    "title": "Ready, then fulfilled",
                    "text": "An accepted request is set aside as ready and then fulfilled; the request slip prints as a PDF."
                },
                {
                    "path": [
                        "decide",
                        "declined"
                    ],
                    "title": "Declined",
                    "text": "A declined request ends there and the requester is told."
                },
                {
                    "path": [
                        "app",
                        "cancelled"
                    ],
                    "title": "Cancelled",
                    "text": "A patient can cancel their own request."
                },
                {
                    "path": [
                        "inventory",
                        "finder"
                    ],
                    "title": "The finder reads the inventory",
                    "text": "The public blood finder shows availability from the same inventory."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": null
        },
        "facility-go-live": {
            "title": "A facility, from listing to live desks",
            "summary": "Two separate paths start from the facility's owner. Claiming the directory listing is reviewed by an administrator and, once approved, the listing is joined to the facility. Onboarding is its own path: checklist items are marked, readiness is scored, and an administrator approves go-live or sends the facility back to the checklist. After go-live the team joins and the desks open.",
            "nodes": [
                {
                    "id": "owner",
                    "kind": "actor",
                    "icon": "user-round",
                    "cell": [
                        0,
                        0
                    ],
                    "label": "Facility owner",
                    "sublabel": "or manager",
                    "evidence": [
                        {
                            "ref": "route:public.care-map",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "claim",
                    "kind": "service",
                    "icon": "map-pin",
                    "cell": [
                        1,
                        0
                    ],
                    "label": "Listing claimed",
                    "sublabel": "in the care map",
                    "evidence": [
                        {
                            "ref": "route:public.care-map.claim",
                            "resolves": true
                        },
                        {
                            "ref": "route:public.care-map.claim.store",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Http\\Controllers\\CareMap\\FacilityClaimController",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "review",
                    "kind": "decision",
                    "icon": "users",
                    "cell": [
                        2,
                        0
                    ],
                    "label": "Claim reviewed",
                    "sublabel": "by an administrator",
                    "evidence": [
                        {
                            "ref": "route:admin.care-map.review",
                            "resolves": true
                        },
                        {
                            "ref": "route:admin.care-map.review.claims.approve",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "listed",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        3,
                        0
                    ],
                    "label": "Listing verified",
                    "sublabel": "joined to the facility",
                    "evidence": [
                        {
                            "ref": "route:admin.care-map.review.listings.link",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "checklist",
                    "kind": "service",
                    "icon": "list-ordered",
                    "cell": [
                        0,
                        1
                    ],
                    "label": "Onboarding checklist",
                    "sublabel": "items marked done",
                    "evidence": [
                        {
                            "ref": "route:portals.admin.onboarding.show",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.admin.onboarding.mark",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\MedicalId\\OnboardingPortalController::markItem",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "readiness",
                    "kind": "gate",
                    "icon": "shield-check",
                    "cell": [
                        1,
                        1
                    ],
                    "label": "Readiness scored",
                    "sublabel": "go-live check",
                    "evidence": [
                        {
                            "ref": "route:portals.admin.facilities.readiness",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.admin.facilities.readiness.score",
                            "resolves": true
                        },
                        {
                            "ref": "class:App\\Http\\Controllers\\MedicalId\\FacilityGoLiveReadinessController",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "rejected",
                    "kind": "outcome-refused",
                    "icon": "circle-x",
                    "cell": [
                        2,
                        1
                    ],
                    "label": "Claim rejected",
                    "sublabel": "listing unchanged",
                    "evidence": [
                        {
                            "ref": "route:admin.care-map.review.claims.reject",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "approve",
                    "kind": "decision",
                    "icon": "git-branch",
                    "cell": [
                        1,
                        2
                    ],
                    "label": "Go-live decision",
                    "sublabel": "by an administrator",
                    "evidence": [
                        {
                            "ref": "route:portals.admin.onboarding.approve",
                            "resolves": true
                        },
                        {
                            "ref": "method:App\\Http\\Controllers\\MedicalId\\OnboardingPortalController::approve",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "team",
                    "kind": "service",
                    "icon": "user-plus",
                    "cell": [
                        2,
                        2
                    ],
                    "label": "Team joins",
                    "sublabel": "invites · join requests",
                    "evidence": [
                        {
                            "ref": "route:portals.facility.team.join.approve",
                            "resolves": true
                        },
                        {
                            "ref": "route:professional.join.store",
                            "resolves": true
                        }
                    ]
                },
                {
                    "id": "desks",
                    "kind": "outcome-ok",
                    "icon": "circle-check",
                    "cell": [
                        3,
                        2
                    ],
                    "label": "Desks live",
                    "sublabel": "pharmacy · lab · queue",
                    "evidence": [
                        {
                            "ref": "route:portals.pharmacy.stock",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.lab.index",
                            "resolves": true
                        },
                        {
                            "ref": "route:portals.queue.index",
                            "resolves": true
                        }
                    ]
                }
            ],
            "edges": [
                {
                    "from": "owner",
                    "to": "claim",
                    "kind": "request",
                    "label": "claim",
                    "loop": false
                },
                {
                    "from": "claim",
                    "to": "review",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "review",
                    "to": "listed",
                    "kind": "response",
                    "label": "approve",
                    "loop": false
                },
                {
                    "from": "review",
                    "to": "rejected",
                    "kind": "refusal",
                    "label": "reject",
                    "loop": false
                },
                {
                    "from": "owner",
                    "to": "checklist",
                    "kind": "request",
                    "label": "onboard",
                    "loop": false
                },
                {
                    "from": "checklist",
                    "to": "readiness",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "readiness",
                    "to": "approve",
                    "kind": "request",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "approve",
                    "to": "team",
                    "kind": "request",
                    "label": "go live",
                    "loop": false
                },
                {
                    "from": "team",
                    "to": "desks",
                    "kind": "response",
                    "label": null,
                    "loop": false
                },
                {
                    "from": "approve",
                    "to": "checklist",
                    "kind": "refusal",
                    "label": "not ready",
                    "loop": true
                }
            ],
            "steps": [
                {
                    "path": [
                        "owner",
                        "claim",
                        "review"
                    ],
                    "title": "Listing claimed",
                    "text": "The owner claims the facility's listing in the public care map; an administrator reviews the claim."
                },
                {
                    "path": [
                        "review",
                        "listed"
                    ],
                    "title": "Listing verified",
                    "text": "An approved claim lets the listing be joined to the facility. Approving a claim does not start onboarding."
                },
                {
                    "path": [
                        "owner",
                        "checklist"
                    ],
                    "title": "Onboarding begins",
                    "text": "Onboarding is a separate path, worked through a checklist."
                },
                {
                    "path": [
                        "checklist",
                        "readiness"
                    ],
                    "title": "Readiness scored",
                    "text": "The facility's readiness for go-live is scored."
                },
                {
                    "path": [
                        "readiness",
                        "approve"
                    ],
                    "title": "Go-live decision",
                    "text": "An administrator approves go-live."
                },
                {
                    "path": [
                        "approve",
                        "team",
                        "desks"
                    ],
                    "title": "Team and desks",
                    "text": "Staff join by invitation or approved join request, and the pharmacy, lab and queue desks open."
                },
                {
                    "path": [
                        "approve",
                        "checklist"
                    ],
                    "title": "Not ready yet",
                    "text": "A facility that is not ready goes back to the checklist."
                }
            ],
            "proof": {
                "passed": 21,
                "total": 21,
                "checks": {
                    "unique_ids": {
                        "ok": true,
                        "violations": []
                    },
                    "known_kinds": {
                        "ok": true,
                        "violations": []
                    },
                    "edge_endpoints": {
                        "ok": true,
                        "violations": []
                    },
                    "one_start": {
                        "ok": true,
                        "violations": []
                    },
                    "reachable": {
                        "ok": true,
                        "violations": []
                    },
                    "reaches_outcome": {
                        "ok": true,
                        "violations": []
                    },
                    "acyclic_except_loops": {
                        "ok": true,
                        "violations": []
                    },
                    "steps_are_paths": {
                        "ok": true,
                        "violations": []
                    },
                    "outcomes_terminal": {
                        "ok": true,
                        "violations": []
                    },
                    "grid_cells_unique": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_present": {
                        "ok": true,
                        "violations": []
                    },
                    "evidence_resolves": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_exist": {
                        "ok": true,
                        "violations": []
                    },
                    "icons_match_kind": {
                        "ok": true,
                        "violations": []
                    },
                    "i18n_en_fr": {
                        "ok": true,
                        "violations": []
                    },
                    "cards_text_fits": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_clear_cards": {
                        "ok": true,
                        "violations": []
                    },
                    "edges_not_collinear": {
                        "ok": true,
                        "violations": []
                    },
                    "labels_clear": {
                        "ok": true,
                        "violations": []
                    },
                    "arrowheads_visible": {
                        "ok": true,
                        "violations": []
                    },
                    "adjacent_fills_differ": {
                        "ok": true,
                        "violations": []
                    }
                }
            },
            "page": null
        }
    }
}