Files
HealthAppRepositoryB/ArchitectureProposal/diagrams/03-domain-model.drawio
T

144 lines
16 KiB
XML

<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" type="device" compressed="false">
<diagram id="page1" name="Domain — identity and access">
<mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1080" pageHeight="960" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="title" value="Domain — identity and access" style="text;html=0;align=left;fontSize=24;fontStyle=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="60" y="25" width="920" height="45" />
</mxCell>
<mxCell id="account" value="Account&#10;Stable account ID&#10;Trusted Patient / Professional role&#10;Pre-created credential hash" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#e8f0fe;strokeColor=#355070;fontSize=14;align=left;verticalAlign=middle;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="80" y="120" width="340" height="225" />
</mxCell>
<mxCell id="grant" value="Authentication grant&#10;Account identity / role&#10;Issued / expires instants&#10;No health data or assignments" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="540" y="120" width="340" height="225" />
</mxCell>
<mxCell id="patient" value="Patient profile&#10;Generated patient ID&#10;Name / birth date / contact&#10;Durable immutable account association" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#e8f0fe;strokeColor=#355070;fontSize=14;align=left;verticalAlign=middle;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="80" y="440" width="340" height="225" />
</mxCell>
<mxCell id="assignment" value="Professional assignment&#10;One professional account&#10;One patient identifier&#10;Predefined read-only entitlement" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#e8f0fe;strokeColor=#355070;fontSize=14;align=left;verticalAlign=middle;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="540" y="440" width="340" height="225" />
</mxCell>
<mxCell id="edge0" value="1 account — 0..* grants" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;endArrow=none;" edge="1" parent="1" source="account" target="grant">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge1" value="1 Patient account — 0..1 profile" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;endArrow=none;" edge="1" parent="1" source="account" target="patient">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge2" value="1 Professional account — 0..* assignments" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;endArrow=none;" edge="1" parent="1" source="account" target="assignment">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge3" value="0..* assignments — 1 patient ID; information may be absent" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;endArrow=none;" edge="1" parent="1" source="assignment" target="patient">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="note" value="Patient account cardinality is zero before creation and one afterwards. Each newly created profile has exactly one account. Professionals may share patients; no separate managed professional profile, consent workflow or assignment administration is introduced." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff6df;strokeColor=#b28725;fontSize=13;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="60" y="770" width="920" height="115" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="page2" name="Domain — observations and selection">
<mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1540" pageHeight="960" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="title" value="Domain — observations and selection" style="text;html=0;align=left;fontSize=24;fontStyle=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="60" y="25" width="1380" height="45" />
</mxCell>
<mxCell id="patient" value="Patient profile «reference»&#10;Patient identifier&#10;Profile owns patient information" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#e8f0fe;strokeColor=#355070;fontSize=14;align=left;verticalAlign=middle;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="80" y="120" width="340" height="225" />
</mxCell>
<mxCell id="obs" value="Blood-pressure observation&#10;Observation ID / patient ID&#10;Measurement and original recording instants&#10;Systolic / diastolic mmHg; pulse beats/min&#10;Original context text and note" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#e8f0fe;strokeColor=#355070;fontSize=14;align=left;verticalAlign=middle;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="540" y="120" width="340" height="225" />
</mxCell>
<mxCell id="context" value="Measurement context&#10;Setting: Home/Clinic/Other/Unknown&#10;Activity: AtRest/During/After/Unknown&#10;Optional preparation and circumstances&#10;Missing values never inferred" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="540" y="440" width="340" height="225" />
</mxCell>
<mxCell id="period" value="Measurement period&#10;Inclusive start/end instants&#10;Equal valid; reversed invalid&#10;UTC meaning independent of host" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="80" y="440" width="340" height="225" />
</mxCell>
<mxCell id="selection" value="Context selection&#10;Optional setting / activity&#10;Both predicates must match&#10;Explicit Unknown differs from omission" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1000" y="120" width="340" height="225" />
</mxCell>
<mxCell id="edge0" value="1 patient — 0..* observations; each observation 1 patient" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;endArrow=none;" edge="1" parent="1" source="patient" target="obs">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge1" value="1 observation — 1 owned context" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;startArrow=diamond;startFill=1;endArrow=none;" edge="1" parent="1" source="obs" target="context">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge2" value="Selects measurement instants" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;dashed=1;endArrow=open;" edge="1" parent="1" source="period" target="obs">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge3" value="Selects recorded categories; never edits" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;dashed=1;endArrow=open;" edge="1" parent="1" source="selection" target="context">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="note" value="Context has no independent identity/lifecycle; deleting an observation removes its context. Positive three measurements and timestamp are required. Latest uses measurement time, original recording time, then greatest UUID bytes. History ascends measurement time; none of these recording/ID ties determines trend direction." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff6df;strokeColor=#b28725;fontSize=13;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="60" y="770" width="1380" height="115" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="page3" name="Domain — derived views and clinical provenance">
<mxGraphModel dx="1500" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1540" pageHeight="1280" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="title" value="Domain — derived views and clinical provenance" style="text;html=0;align=left;fontSize=24;fontStyle=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="60" y="25" width="1380" height="45" />
</mxCell>
<mxCell id="insight" value="Health insight&#10;Patient / period / selection / count&#10;Three arithmetic means; BP extrema&#10;Context explanation&#10;Derived from 1..* current observations" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="80" y="120" width="340" height="225" />
</mxCell>
<mxCell id="trend" value="Trend assessment&#10;Patient / period / selection / count&#10;Three separate metric assessments&#10;Comparability evidence&#10;Derived from 0..* current observations" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="540" y="120" width="340" height="225" />
</mxCell>
<mxCell id="metric" value="Metric assessment&#10;Name / unit / observed levels&#10;Supported direction and variation&#10;Unavailable reasons / hint&#10;Separate clinical interpretation" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1000" y="120" width="340" height="225" />
</mxCell>
<mxCell id="overview" value="Health overview&#10;Profile required&#10;Latest overall observation optional&#10;Selected-period insight optional&#10;Explicit separate bases; no trend" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="80" y="440" width="340" height="225" />
</mxCell>
<mxCell id="evidence" value="Comparability evidence&#10;Known similarities / differences&#10;Missing relevant details / conflicts&#10;Supported basis / limitations&#10;Never certified by similar numbers" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="540" y="440" width="340" height="225" />
</mxCell>
<mxCell id="reference" value="Clinical reference&#10;Metric and context prerequisites&#10;Reference values / operators&#10;Allowed claim / limitations&#10;General threshold ≠ individual target" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1000" y="440" width="340" height="225" />
</mxCell>
<mxCell id="instruction" value="Guidance instruction&#10;Sequence / topic / instruction&#10;Preparation / equipment / posture&#10;Timing / recording / pulse limits" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="80" y="760" width="340" height="225" />
</mxCell>
<mxCell id="guidance" value="Measurement guidance&#10;Applicability / ordered instructions&#10;Preparation / measurement / recording&#10;Verified content or unavailable&#10;No compliance or observation writes" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="540" y="760" width="340" height="225" />
</mxCell>
<mxCell id="source" value="Reference source&#10;Title / URL / review date&#10;Danish / European applicability&#10;Versioned reviewed provenance" style="rounded=1;whiteSpace=wrap;html=0;fillColor=#e8f5e9;strokeColor=#38734a;fontSize=14;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1000" y="760" width="340" height="225" />
</mxCell>
<mxCell id="edge0" value="1 trend — exactly 3 metric assessments" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;startArrow=diamond;startFill=1;endArrow=none;" edge="1" parent="1" source="trend" target="metric">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge1" value="1 trend — 1 evidence value" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;startArrow=diamond;startFill=1;endArrow=none;" edge="1" parent="1" source="trend" target="evidence">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge2" value="0..1 applicable reference per metric" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;endArrow=none;" edge="1" parent="1" source="metric" target="reference">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge3" value="1 reference — 1..* sources" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;endArrow=none;" edge="1" parent="1" source="reference" target="source">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge4" value="Available guidance — 1..* sources" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;endArrow=none;" edge="1" parent="1" source="guidance" target="source">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge5" value="1 guidance — 0..* ordered instructions" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;startArrow=diamond;startFill=1;endArrow=none;" edge="1" parent="1" source="guidance" target="instruction">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge6" value="1 overview — 0..1 insight" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;endArrow=none;" edge="1" parent="1" source="overview" target="insight">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="note" value="Period and ContextSelection are value references from the preceding page, used by insight/trend/overview insight. Overview contains one profile and zero/one latest observation (preceding pages). All derived views are transient; no stored summary/assessment IDs. Clinical rules gate individual claims; absence of context does not erase valid numerical information." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff6df;strokeColor=#b28725;fontSize=13;align=left;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="60" y="1090" width="1380" height="115" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>