Architecture is proposed and there are also alternative architectures proposed

This commit is contained in:
Steffen committed 2026-10-14 00:38:08 +02:00
1 parent ccf9041183
commit 3426236c6c
24 files changed
+2516

No files matched your search

@@ -0,0 +1,65 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" type="device" compressed="false">
<diagram id="page1" name="Persistence — one database, explicit logical ownership">
<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="Persistence — one database, explicit logical ownership" 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="profile" value="Profile module&#10;Private Profile persistence adapter&#10;No observation repository access" 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="Observations module&#10;Private Observation persistence adapter&#10;No profile SQL queries" 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="derived" value="Analytics + Overview&#10;Module query contracts only&#10;Current immutable source values&#10;No tables/result IDs/cache" 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="1000" y="120" width="340" height="225" />
</mxCell>
<mxCell id="patientdb" value="PostgreSQL: profile schema&#10;patient PK UUID&#10;account ID UNIQUE NOT NULL&#10;name / birth date / optional contact&#10;creation / update instants&#10;Profile migration owner" style="shape=cylinder3;whiteSpace=wrap;html=0;fillColor=#f1e8fa;strokeColor=#76558d;fontSize=14;align=left;spacing=14;" vertex="1" parent="1">
<mxGeometry as="geometry" x="80" y="440" width="340" height="225" />
</mxCell>
<mxCell id="obsdb" value="Same PostgreSQL DB: observations schema&#10;observation PK UUID; patient FK restricted&#10;measurement / original / update instants&#10;positive readings; owned context columns&#10;original text / note; patient-time index&#10;Observation migration owner" style="shape=cylinder3;whiteSpace=wrap;html=0;fillColor=#f1e8fa;strokeColor=#76558d;fontSize=14;align=left;spacing=14;" vertex="1" parent="1">
<mxGeometry as="geometry" x="540" y="440" width="340" height="225" />
</mxCell>
<mxCell id="config" value="API/access private files&#10;Account credential hashes + trusted roles&#10;Predefined assignments&#10;Persistent token-protection keys&#10;Guidance/reference bundle: versioned" 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="1000" y="440" width="340" height="225" />
</mxCell>
<mxCell id="role" value="Application runtime DB role&#10;Only required DML on both schemas&#10;Shared request transaction / bounded pool&#10;No DDL/admin rights&#10;Module separation is NOT security isolation" 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="80" y="760" width="340" height="225" />
</mxCell>
<mxCell id="admin" value="Administrative provisioning material&#10;Generated app/DB credentials&#10;Protected API certificate/key and settings&#10;Separate privileged migration identities&#10;No continuously running utility" 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="1000" y="760" width="340" height="225" />
</mxCell>
<mxCell id="edge0" value="Owns reads/writes" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;dashed=1;endArrow=open;" edge="1" parent="1" source="profile" target="patientdb">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge1" value="Owns reads/writes" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;dashed=1;endArrow=open;" edge="1" parent="1" source="obs" target="obsdb">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge2" value="patient ID FK; delete restricted" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;endArrow=none;" edge="1" parent="1" source="obsdb" target="patientdb">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge3" value="Current selected series / latest" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;dashed=1;endArrow=open;" edge="1" parent="1" source="derived" target="obs">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge4" value="Profile read values" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;dashed=1;endArrow=open;" edge="1" parent="1" source="derived" target="profile">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge5" value="DML capability" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;dashed=1;endArrow=open;" edge="1" parent="1" source="role" target="patientdb">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge6" value="DML capability" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;dashed=1;endArrow=open;" edge="1" parent="1" source="role" target="obsdb">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="edge7" value="Provisions credentials / grants" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;strokeColor=#46566a;dashed=1;endArrow=open;" edge="1" parent="1" source="admin" target="role">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="note" value="One database process/storage boundary, two owned schemas. Context lives/deletes with its observation. Runtime role can reach both schemas; module ownership is enforced by interfaces/private adapters. Physical database separation in original US-16 is explicitly revised. Keys/configuration are operational state, not generated clinical-result persistence." 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>