Commit bb5d9bc

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-06-26 11:59:38
add extensive documentation on how data is stored
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent 0985b42
Changed files (4)
app/lib/app.dart
@@ -53,7 +53,7 @@ class _AppState extends State<App> {
   void dispose() {
     _configDB?.database.close();
     _configDB = null;
-    _entryDB?.close(); // TODO: check this is safe
+    _entryDB?.close();
     _entryDB = null;
     _settings?.dispose();
     _exportSettings?.dispose();
@@ -73,8 +73,8 @@ class _AppState extends State<App> {
     if (widget.forceClearAppDataOnLaunch) {
       final dbPath = await getDatabasesPath();
       try {
-        File(join(dbPath, 'blood_pressure.db')).deleteSync();
-        File(join(dbPath, 'blood_pressure.db-journal')).deleteSync();
+        File(join(dbPath, 'bp.db')).deleteSync();
+        File(join(dbPath, 'bp.db-journal')).deleteSync();
       } on FileSystemException {
         // File is likely already deleted or couldn't be created in the first place.
       }
@@ -114,7 +114,6 @@ class _AppState extends State<App> {
       medRepo,
       intakeRepo,
     );
-    // TODO: document how data is stored in the app
 
     // update logic
     if (_settings!.lastVersion == 0) {
docs/resources/data-package.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="980px" height="999px" viewBox="-0.5 -0.5 980 999"
+     class="ge-export-svg-auto"><defs><style type="text/css">@media (prefers-color-scheme: dark) {&#xa;svg.ge-export-svg-auto:not(mjx-container &gt; svg) { filter: invert(100%) hue-rotate(180deg); }&#xa;svg.ge-export-svg-auto foreignObject img,&#xa;svg.ge-export-svg-auto image:not(svg.ge-export-svg-auto switch image),&#xa;svg.ge-export-svg-auto svg:not(mjx-container &gt; svg)&#xa;{ filter: invert(100%) hue-rotate(180deg) }&#xa;}</style></defs><g><g data-cell-id="WIyWlLk6GJQsqaUBKTNV-0"><g data-cell-id="WIyWlLk6GJQsqaUBKTNV-1"><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-124"><g/><g data-cell-id="677lHFKOsBNGkGCZTMkS-0"><g><rect x="150" y="628" width="810" height="370" fill="#f8cecc" stroke="#b85450" pointer-events="all"/></g></g><g data-cell-id="677lHFKOsBNGkGCZTMkS-1"><g><rect x="150" y="628" width="40" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 643px; margin-left: 151px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">DB</div></div></div></foreignObject><text x="170" y="647" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">DB</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-2"><g><path d="M 260 793 L 260 768" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-5"><g><path d="M 260 833 L 260 858" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-8"><g><path d="M 310 793 L 330 793 L 330 708 L 380 708" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-57"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 796px; margin-left: 319px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">1</div></div></div></foreignObject><text x="319" y="800" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">1</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-18"><g><path d="M 310 803 L 345 803 L 345 759 L 380 759" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-59"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 807px; margin-left: 321px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">1</div></div></div></foreignObject><text x="321" y="811" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">1</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-24"><g><path d="M 310 813 L 345 813 L 380 812" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-58"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 815px; margin-left: 321px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">1</div></div></div></foreignObject><text x="321" y="819" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">1</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-35"><g><path d="M 310 833 L 330 833 L 330 928 L 380 928" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-60"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 834px; margin-left: 319px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">1</div></div></div></foreignObject><text x="319" y="838" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">1</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-0"><g><rect x="210" y="793" width="100" height="40" rx="4" ry="4" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 813px; margin-left: 211px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>Timestamps</div></div></div></div></foreignObject><text x="260" y="817" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Timestamps</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-1"><g><ellipse cx="260" cy="753" rx="40" ry="15" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 753px; margin-left: 221px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; text-decoration: underline; white-space: normal; overflow-wrap: normal;">entryID</div></div></div></foreignObject><text x="260" y="757" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" text-decoration="underline">entryID</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-4"><g><ellipse cx="260" cy="873" rx="40" ry="15" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 873px; margin-left: 221px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>time</div></div></div></div></foreignObject><text x="260" y="877" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">time</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-10"><g><path d="M 470 708 L 500 708" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-56"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 709px; margin-left: 486px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">1</div></div></div></foreignObject><text x="486" y="713" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">1</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-6"><g><path d="M 425 688 L 470 708 L 425 728 L 380 708 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 708px; margin-left: 381px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>recorded</div></div></div></div></foreignObject><text x="425" y="712" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">recorded</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-12"><g><path d="M 590 708 L 630 708" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-9"><g><rect x="500" y="693" width="90" height="30" rx="3" ry="3" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 708px; margin-left: 501px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>Systolic</div></div></div></div></foreignObject><text x="545" y="712" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Systolic</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-11"><g><ellipse cx="670" cy="708" rx="40" ry="15" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 708px; margin-left: 631px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">sys</div></div></div></foreignObject><text x="670" y="712" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">sys</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-13"><g><path d="M 470 759 L 500 759" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-55"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 759px; margin-left: 486px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">1</div></div></div></foreignObject><text x="486" y="763" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">1</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-14"><g><path d="M 425 739 L 470 759 L 425 779 L 380 759 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 759px; margin-left: 381px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>recorded</div></div></div></div></foreignObject><text x="425" y="763" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">recorded</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-15"><g><path d="M 590 759 L 630 759" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-16"><g><rect x="500" y="744" width="90" height="30" rx="3" ry="3" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 759px; margin-left: 501px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Diastolic</div></div></div></foreignObject><text x="545" y="763" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Diastolic</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-17"><g><ellipse cx="670" cy="759" rx="40" ry="15" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 759px; margin-left: 631px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">dia</div></div></div></foreignObject><text x="670" y="763" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">dia</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-19"><g><path d="M 470 812 L 500 812" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-54"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 814px; margin-left: 486px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">1</div></div></div></foreignObject><text x="486" y="818" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">1</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-20"><g><path d="M 425 792 L 470 812 L 425 832 L 380 812 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 812px; margin-left: 381px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>recorded</div></div></div></div></foreignObject><text x="425" y="816" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">recorded</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-21"><g><path d="M 590 812 L 630 812" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-22"><g><rect x="500" y="797" width="90" height="30" rx="3" ry="3" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 812px; margin-left: 501px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">...</div></div></div></foreignObject><text x="545" y="816" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">...</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-23"><g><ellipse cx="670" cy="812" rx="40" ry="15" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 812px; margin-left: 631px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">...</div></div></div></foreignObject><text x="670" y="816" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">...</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-25"><g><path d="M 470 928 L 500 928" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-52"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 929px; margin-left: 486px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">1</div></div></div></foreignObject><text x="486" y="933" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">1</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-26"><g><path d="M 425 908 L 470 928 L 425 948 L 380 928 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 928px; margin-left: 381px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>recorded</div></div></div></div></foreignObject><text x="425" y="932" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">recorded</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-27"><g><path d="M 590 928 L 630 928" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-28"><g><rect x="500" y="913" width="90" height="30" rx="3" ry="3" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 928px; margin-left: 501px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>Intake</div></div></div></div></foreignObject><text x="545" y="932" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Intake</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-29"><g><ellipse cx="670" cy="928" rx="40" ry="15" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 928px; margin-left: 631px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">dosis</div></div></div></foreignObject><text x="670" y="932" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">dosis</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-40"><g><path d="M 815 868 L 815 848 L 790 848 L 790 833" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-42"><g><path d="M 865 868 L 865 848 L 890 848 L 890 833" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-44"><g><path d="M 865 908 L 865 928 L 890 928 L 890 943" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-36"><g><rect x="790" y="868" width="100" height="40" rx="4" ry="4" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 888px; margin-left: 791px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>Medicine</div></div></div></div></foreignObject><text x="840" y="892" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Medicine</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-37"><g><ellipse cx="790" cy="818" rx="40" ry="15" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 818px; margin-left: 751px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; text-decoration: underline; white-space: normal; overflow-wrap: normal;">medID</div></div></div></foreignObject><text x="790" y="822" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" text-decoration="underline">medID</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-41"><g><ellipse cx="890" cy="818" rx="40" ry="15" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 818px; margin-left: 851px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">designation</div></div></div></foreignObject><text x="890" y="822" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">designation</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-43"><g><ellipse cx="890" cy="958" rx="40" ry="15" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 958px; margin-left: 851px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">defaultDose</div></div></div></foreignObject><text x="890" y="962" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">defaultDose</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-46"><g><path d="M 790 968 L 815 968 L 815 908" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-51"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 924px; margin-left: 815px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">n</div></div></div></foreignObject><text x="815" y="928" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">n</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-48"><g><path d="M 700 968 L 545 968 L 545 943" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-49"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 952px; margin-left: 546px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">1</div></div></div></foreignObject><text x="546" y="955" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">1</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-45"><g><path d="M 745 948 L 790 968 L 745 988 L 700 968 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 968px; margin-left: 701px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>recorded</div></div></div></div></foreignObject><text x="745" y="972" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">recorded</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-161"><g/><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-160"><g><rect x="900" y="38.5" width="60" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 54px; margin-left: 901px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">public api</div></div></div></foreignObject><text x="930" y="57" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">public api</text></switch></g></g></g></g><g data-cell-id="V5ZIyjliIRmLtVfotpUW-2"><g><rect x="151" y="125" width="289" height="160" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-165"><g/><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-151"><g><rect x="150" y="305" width="510" height="170" fill="#e1d5e7" stroke="#9673a6" pointer-events="all"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-83"><g><path d="M 392 385 L 392 345 L 642 345 L 642 385" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 392 385 L 392 455 L 642 455 L 642 385" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 392 385 L 642 385" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 248px; height: 1px; padding-top: 352px; margin-left: 393px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"><span style="font-weight: normal;">&lt;&lt;interface&gt;&gt;</span><br /><div>Repository&lt;T&gt;</div></div></div></div></foreignObject><text x="517" y="364" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" font-weight="bold">&lt;&lt;interface&gt;&gt;...</text></switch></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-86"><g><rect x="392" y="385" width="250" height="70" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 240px; height: 1px; padding-top: 392px; margin-left: 398px;"><div style="box-sizing: border-box; font-size: 0px; text-align: left; max-height: 66px; overflow: hidden;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>+ add(T): Future&lt;void&gt;</div><div>+ get(DateTimeRange): Future&lt;List&lt;T&gt;&gt;<br /></div><div>+ remove(T): Future&lt;void&gt;</div></div></div></div></foreignObject><text x="398" y="404" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px">+ add(T): Future&lt;void&gt;...</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-136"><g><path d="M 342 354 L 376.13 353.86" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 389.13 353.8 L 376.16 360.36 L 376.11 347.36 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-146"><g><path d="M 342 404 L 377.88 404" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><path d="M 390.88 404 L 377.88 410.5 L 377.88 397.5 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-147"><g><path d="M 162 464 L 162 434 L 342 434 L 342 464" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 162 464 L 342 464" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 441px; margin-left: 163px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">...</div></div></div></foreignObject><text x="252" y="453" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" font-weight="bold">...</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-152"><g><rect x="150" y="305" width="100" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 320px; margin-left: 151px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">DB-Abstraction</div></div></div></foreignObject><text x="200" y="324" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">DB-Abstraction</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-162"><g><svg xmlns="http://www.w3.org/2000/svg" height="17" viewBox="0 -960 960 960" width="16" x="639.5" y="307.5" style="font-family: initial;"><path fill="lime" d="M240-160h480v-400H240v400Zm240-120q33 0 56.5-23.5T560-360q0-33-23.5-56.5T480-440q-33 0-56.5 23.5T400-360q0 33 23.5 56.5T480-280ZM240-160v-400 400Zm0 80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h280v-80q0-83 58.5-141.5T720-920q83 0 141.5 58.5T920-720h-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80h120q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Z"/></svg></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-132"><g><path d="M 162 374 L 162 334 L 342 334 L 342 374" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 162 374 L 342 374" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 341px; margin-left: 163px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"><div>BloodPressureRepository</div><div>&lt;BloodPressureRecord&gt;</div></div></div></div></foreignObject><text x="252" y="353" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" font-weight="bold">BloodPressureRepository...</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-137"><g><path d="M 162 424 L 162 384 L 342 384 L 342 424" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 162 424 L 342 424" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 391px; margin-left: 163px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"><div>MedIntakeRepository</div><div>&lt;MedicineIntake&gt;</div></div></div></div></foreignObject><text x="252" y="403" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" font-weight="bold">MedIntakeRepository...</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-169"><g/><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-166"><g><rect x="670" y="305" width="290" height="170" fill="#e1d5e7" stroke="#9673a6" pointer-events="all"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-153"><g><rect x="723" y="335" width="180" height="45" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 342px; margin-left: 724px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"><div><span style="font-weight: normal;"><i>«freezed»</i></span></div><div>BloodPressureRecord</div></div></div></div></foreignObject><text x="813" y="354" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" font-weight="bold">«freezed»...</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-155"><g><rect x="723" y="386" width="180" height="44" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 393px; margin-left: 724px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"><div><span style="font-weight: normal;"><i>«freezed»</i></span></div><div>MedicineIntake</div></div></div></div></foreignObject><text x="813" y="405" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" font-weight="bold">«freezed»...</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-156"><g><rect x="723" y="438" width="180" height="24" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 445px; margin-left: 724px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">...</div></div></div></foreignObject><text x="813" y="457" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">...</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-167"><g><svg xmlns="http://www.w3.org/2000/svg" height="17" viewBox="0 -960 960 960" width="16" x="939.5" y="306.5" style="font-family: initial;"><path fill="lime" d="M240-160h480v-400H240v400Zm240-120q33 0 56.5-23.5T560-360q0-33-23.5-56.5T480-440q-33 0-56.5 23.5T400-360q0 33 23.5 56.5T480-280ZM240-160v-400 400Zm0 80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h280v-80q0-83 58.5-141.5T720-920q83 0 141.5 58.5T920-720h-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80h120q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Z"/></svg></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-168"><g><rect x="670" y="305" width="60" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 320px; margin-left: 671px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Types</div></div></div></foreignObject><text x="700" y="324" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Types</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-171"/><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-174"><g/><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-172"><g><rect x="160" y="167" width="270" height="25" rx="3.75" ry="3.75" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 268px; height: 1px; padding-top: 174px; margin-left: 162px;"><div style="box-sizing: border-box; font-size: 0px; text-align: left;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">  intialize(Database): Future&lt;bool&gt;</div></div></div></foreignObject><text x="162" y="186" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px">  intialize(Database): Future&lt;bool&gt;</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-173"><g><svg xmlns="http://www.w3.org/2000/svg" height="17" viewBox="0 -960 960 960" width="16" x="409.5" y="170.5" style="font-family: initial;"><path fill="lime" d="M240-160h480v-400H240v400Zm240-120q33 0 56.5-23.5T560-360q0-33-23.5-56.5T480-440q-33 0-56.5 23.5T400-360q0 33 23.5 56.5T480-280ZM240-160v-400 400Zm0 80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h280v-80q0-83 58.5-141.5T720-920q83 0 141.5 58.5T920-720h-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80h120q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Z"/></svg></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-182"><g/><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-184"><g><rect x="160" y="247" width="270" height="25" rx="3.75" ry="3.75" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 268px; height: 1px; padding-top: 254px; margin-left: 162px;"><div style="box-sizing: border-box; font-size: 0px; text-align: left;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">  get&lt;T extends Repository&gt;(): Future&lt;T&gt;</div></div></div></foreignObject><text x="162" y="266" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px">  get&lt;T extends Repository&gt;(): Future&lt;T&gt;</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-185"><g><svg xmlns="http://www.w3.org/2000/svg" height="17" viewBox="0 -960 960 960" width="16" x="409.5" y="250.5" style="font-family: initial;"><path fill="lime" d="M240-160h480v-400H240v400Zm240-120q33 0 56.5-23.5T560-360q0-33-23.5-56.5T480-440q-33 0-56.5 23.5T400-360q0 33 23.5 56.5T480-280ZM240-160v-400 400Zm0 80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h280v-80q0-83 58.5-141.5T720-920q83 0 141.5 58.5T920-720h-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80h120q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Z"/></svg></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-175"><g/><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-180"><g/><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-176"><g><rect x="158" y="206" width="272" height="25" rx="3.75" ry="3.75" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 270px; height: 1px; padding-top: 213px; margin-left: 160px;"><div style="box-sizing: border-box; font-size: 0px; text-align: left;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">  disableDB(): Future&lt;void&gt;</div></div></div></foreignObject><text x="160" y="225" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px">  disableDB(): Future&lt;void&gt;</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-177"><g><svg xmlns="http://www.w3.org/2000/svg" height="17" viewBox="0 -960 960 960" width="16" x="409.5" y="209.5" style="font-family: initial;"><path fill="lime" d="M240-160h480v-400H240v400Zm240-120q33 0 56.5-23.5T560-360q0-33-23.5-56.5T480-440q-33 0-56.5 23.5T400-360q0 33 23.5 56.5T480-280ZM240-160v-400 400Zm0 80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h280v-80q0-83 58.5-141.5T720-920q83 0 141.5 58.5T920-720h-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80h120q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Z"/></svg></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-188"><g/><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-186"><g><path d="M 130 295 L 125 295 Q 120 295 120 305 L 120 380 Q 120 390 115 390 L 112.5 390 Q 110 390 115 390 L 117.5 390 Q 120 390 120 400 L 120 475 Q 120 485 125 485 L 130 485" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-187"><g><rect x="0" y="376.43" width="100" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 391px; margin-left: 98px;"><div style="box-sizing: border-box; font-size: 0px; text-align: right;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;"><div align="right">Domain Layer</div></div></div></div></foreignObject><text x="98" y="395" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="end">Domain Layer</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-189"><g/><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-190"><g><path d="M 130 495 L 125 495 Q 120 495 120 505 L 120 736.5 Q 120 746.5 115 746.5 L 112.5 746.5 Q 110 746.5 115 746.5 L 117.5 746.5 Q 120 746.5 120 756.5 L 120 988 Q 120 998 125 998 L 130 998" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-191"><g><rect x="20" y="734.89" width="80" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 1px; height: 1px; padding-top: 750px; margin-left: 98px;"><div style="box-sizing: border-box; font-size: 0px; text-align: right;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;"><div align="right">Data Layer</div></div></div></div></foreignObject><text x="98" y="753" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="end">Data Layer</text></switch></g></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-192"><g><rect x="920" y="15" width="60" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 30px; margin-left: 921px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"><h3>Legend</h3></div></div></div></foreignObject><text x="950" y="34" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" font-weight="bold">Legend</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-159"><g><svg xmlns="http://www.w3.org/2000/svg" height="17" viewBox="0 -960 960 960" width="17" x="956.5" y="43.5" style="font-family: initial;"><path fill="lime" d="M240-160h480v-400H240v400Zm240-120q33 0 56.5-23.5T560-360q0-33-23.5-56.5T480-440q-33 0-56.5 23.5T400-360q0 33 23.5 56.5T480-280ZM240-160v-400 400Zm0 80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h280v-80q0-83 58.5-141.5T720-920q83 0 141.5 58.5T920-720h-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80h120q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Z"/></svg></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-193"><g><rect x="10" y="5" width="360" height="50" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 358px; height: 1px; padding-top: 30px; margin-left: 11px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"><h1>Data package architecture</h1></div></div></div></foreignObject><text x="190" y="34" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" font-weight="bold">Data package architecture</text></switch></g></g></g><g data-cell-id="dVhomwKUP0TNwWyi8ZUl-111"><g><rect x="151" y="495" width="810" height="113" fill="#ffe6cc" stroke="#d79b00" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 808px; height: 1px; padding-top: 502px; margin-left: 153px;"><div style="box-sizing: border-box; font-size: 0px; text-align: left;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">  DatabaseManager:<div align="left">  - sets up</div><div align="left">  - updates</div><div align="left">  - controls access to<br /></div><div>  the database<br /></div></div></div></div></foreignObject><text x="153" y="514" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px">DatabaseManager:...</text></switch></g></g></g><g data-cell-id="V5ZIyjliIRmLtVfotpUW-0"><g><path d="M 550.88 608.01 L 554.62 608.09 L 554.08 634.98 L 557.91 635.05 L 552.01 644.5 L 546.5 634.82 L 550.33 634.9 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><g data-cell-id="V5ZIyjliIRmLtVfotpUW-1"><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 627px; margin-left: 553px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><div style="display: inline-block; font-size: 11px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">manages</div></div></div></foreignObject><text x="553" y="630" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="11px" text-anchor="middle">manages</text></switch></g></g></g></g><g data-cell-id="V5ZIyjliIRmLtVfotpUW-3"><g><rect x="160" y="133" width="240" height="30" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 238px; height: 1px; padding-top: 148px; margin-left: 162px;"><div style="box-sizing: border-box; font-size: 0px; text-align: left;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><h2 align="left">Package API<br /></h2></div></div></div></foreignObject><text x="162" y="152" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px">Package API&#xa;</text></switch></g></g></g><g data-cell-id="F7Ttx3mO8q6ESlEpXPi8-7"><g/><g data-cell-id="F7Ttx3mO8q6ESlEpXPi8-1"><g><rect x="450" y="125" width="510" height="160" fill="#e1d5e7" stroke="#9673a6" pointer-events="all"/></g></g><g data-cell-id="F7Ttx3mO8q6ESlEpXPi8-4"><g><rect x="500" y="165" width="180" height="23.53" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 172px; margin-left: 501px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">FullEntry</div></div></div></foreignObject><text x="590" y="184" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">FullEntry</text></switch></g></g></g><g data-cell-id="F7Ttx3mO8q6ESlEpXPi8-5"><g><svg xmlns="http://www.w3.org/2000/svg" height="15" viewBox="0 -960 960 960" width="16" x="939.5" y="124.5" style="font-family: initial;"><path fill="lime" d="M240-160h480v-400H240v400Zm240-120q33 0 56.5-23.5T560-360q0-33-23.5-56.5T480-440q-33 0-56.5 23.5T400-360q0 33 23.5 56.5T480-280ZM240-160v-400 400Zm0 80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h280v-80q0-83 58.5-141.5T720-920q83 0 141.5 58.5T920-720h-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80h120q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Z"/></svg></g></g><g data-cell-id="F7Ttx3mO8q6ESlEpXPi8-6"><g><rect x="450" y="125" width="60" height="26.47" fill="none" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 138px; margin-left: 451px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Utilities</div></div></div></foreignObject><text x="480" y="142" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Utilities</text></switch></g></g></g><g data-cell-id="F7Ttx3mO8q6ESlEpXPi8-8"><g><rect x="730" y="165" width="180" height="23.53" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 172px; margin-left: 731px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><div>FullEntryList</div></div></div></div></foreignObject><text x="820" y="184" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">FullEntryList</text></switch></g></g></g><g data-cell-id="F7Ttx3mO8q6ESlEpXPi8-9"><g><rect x="500" y="205" width="180" height="23.53" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 212px; margin-left: 501px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">...</div></div></div></foreignObject><text x="590" y="224" fill="rgb(0, 0, 0)" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">...</text></switch></g></g></g></g></g></g></g></svg>
\ No newline at end of file
docs/data-package.md
@@ -0,0 +1,57 @@
+*developer documentation - users can safely ignore this*
+
+User data is stored in a designated database that is accessed through a minimal CRUD API. This aims to reduce the risk of data loss. The general idea is described by this diagram:
+
+![Diagramm showing DB tables and the layered health data store API](resources/data-package.svg)
+
+## Package guide
+
+The primary organisational unit is the Repository, which abstracts away a table in the db. To prevent accidental misuse, only the class signature is exposed beyond the package. The actual implementation is package private and instantiated through the HealthDataStore class. Here is the general pattern:
+
+### Common API
+
+```repository.dart``` (exported)
+```dart
+abstract class Repository<T> {
+  Future<void> add(T value);
+  // ...
+}
+```
+
+```health_data_store.dart``` (exported)
+```dart
+class HealthDataStore {
+  // ...
+  NoteRepository get noteRepo =>
+      NoteRepositoryImpl(_dbMngr.db);
+}
+```
+
+### Feature specific API example
+```note_repository.dart``` (exported)
+```dart
+abstract class NoteRepository extends Repository<Note> { }
+```
+
+`note_repository_impl.dart` (private)
+```dart
+class NoteRepositoryImpl extends NoteRepository {
+  @override
+  Future<void> add(T value) {
+    // ...
+  }
+  // ...
+}
+```
+
+## DB management
+
+The database schema is created and updated by a designated DatabaseManager class. By giving this class sole control, the risk of unexpected db state is minimized and updating the scheme becomes easy.
+
+When adding new fields to the db, existing tables can stay untouched and a new type with a designated table can be created. For this type a repository must be implemented like explained above. Should the type need supplementary information, more tables may be created (look at MedicineRepository for reference).
+
+## Full entry
+
+The FullEntry type is a utility type that provides easy handling of record, note and intakes. This is required due to the close coupling of these types in the UI (same list entry, same input form, joint export).
+
+This is no ideal solution as it largely defeats the point of the separation. When possible UI using the data should be designed in a way that doesn't rely on this kind of coupling. 
\ No newline at end of file
docs/files.md
@@ -6,16 +6,22 @@ The app stores persistent data in the app storage. This document aims to provide
 
 The `dbPath`/`config.db` file is a SQLite3 database containing Settings and some other configuration data such as the current display ranges and added medications. The database contains tables for logically different parts of the config, which all contain one line with the config in json format and an userid (which currently serves no purpose). The intervall table contains multiple entries.
 
-In the `dbPath`/`blood_pressure.db` SQLite3 database you find one `bloodPressureModel` table containing entries with the blood pressure records including a json representation of the color in the ("needlePin") column.
-
-The `await getDatabasesPath()`/`medicine.intakes` File consists of a plain text csv like representation of medicine intakes. The format of this file was rather experimental and gets replaced as part of [#257](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/issues/257). For an exact description look at the `deserialize` factory method of the `IntakeHistory` class, but in general every line (including the first) contains a medicine intake with fields seperated by `\x00`. The first field is the medicine id, the second is the time the medicine was taken in milliseconds since epoch and the third is the dosis of the medicine.
+The `dbPath`/`bp.db` file is a SQLite3 database containing user data accessed through [health_data_store](data-package.md). 
 
 ## Exported files
 
-Exporting the records as a SqliteDB will export a copy of the `blood_pressure.db` file described above. Similarly, the settings export will yield the `config.db` file as present in storage.
+Exporting the records as a SqliteDB will export a copy of the `bp.db` file described above. Similarly, the settings export will yield the `config.db` file as present in storage.
 
 When exporting the data as CSV, the file will use standard platform newlines (`\r\n`) unless not configured differently a headline with the names of all exported columns delimited by the `,` character. Unlike the config suggests note strings are not always wrapped in `'` characters. Fields without any value are either empty or contain a lowercase `null`.
 
 ## Legacy data
 
-Until [#189](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/pull/189) and [#195](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/pull/195) ([v1.5.5](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/tree/v1.5.5)) settings were stored in androids shared preferences storage. It consisted of a lot of individual keys and update code can be found in the [update_legacy_settings.dart](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/blob/main/app/lib/model/storage/update_legacy_settings.dart) file. Support will be dropped in october 2024 (a year after migration started).
\ No newline at end of file
+### Until [#189](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/pull/189) and [#195](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/pull/195) ([v1.5.5](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/tree/v1.5.5))
+
+Settings were stored in androids shared preferences storage. It consisted of a lot of individual keys and update code can be found in the [update_legacy_settings.dart](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/blob/main/app/lib/model/storage/update_legacy_settings.dart) file. Support will be dropped in october 2024 (a year after migration started).
+
+### Until [#332](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/pull/332/)
+
+In a `dbPath`/`blood_pressure.db` SQLite3 database a `bloodPressureModel` table contains entries with the blood pressure records and notes including a json representation of the color in the ("needlePin") column.
+
+The `await getDatabasesPath()`/`medicine.intakes` File consists of a plain text csv like representation of medicine intakes. The format of this file was rather experimental and gets replaced as part of [#257](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/issues/257). For an exact description look at the `deserialize` factory method of the `IntakeHistory` class, but in general every line (including the first) contains a medicine intake with fields seperated by `\x00`. The first field is the medicine id, the second is the time the medicine was taken in milliseconds since epoch and the third is the dosis of the medicine.
\ No newline at end of file