Files
HealthAppRepositoryB/Docs/Architecture/.$04_class_observation_service.drawio.bkp
T

2 lines
7.4 KiB
XML

<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17"><diagram id="04_class_observation_service" name="Observation Service — updated class model"><mxGraphModel dx="1740" dy="1280" grid="1" gridSize="10" page="1" pageScale="1" pageWidth="1740" pageHeight="1280"><root><mxCell id="0" /><mxCell id="1" parent="0" /><mxCell id="title" value="Observation Service — updated class model" style="text;html=0;fontSize=24;fontStyle=1;align=center;" vertex="1" parent="1"><mxGeometry as="geometry" x="40" y="10" width="1660" height="50" /></mxCell><mxCell id="e0" value="uses" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=open;dashed=1;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="c" target="a"><mxGeometry as="geometry" relative="1" /></mxCell><mxCell id="e1" value="uses" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=open;dashed=1;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="a" target="r"><mxGeometry as="geometry" relative="1" /></mxCell><mxCell id="e2" value="implemented by" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=open;dashed=1;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="r" target="sql"><mxGeometry as="geometry" relative="1" /></mxCell><mxCell id="e3" value="contains" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=open;dashed=1;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="o" target="ctx"><mxGeometry as="geometry" relative="1" /></mxCell><mxCell id="c" value="ObservationController" style="swimlane;html=0;startSize=36;horizontal=1;fillColor=#eeeeee;swimlaneFillColor=#ffffff;strokeColor=#333333;fontColor=#111111;fontSize=17;fontStyle=1;align=center;" vertex="1" parent="1"><mxGeometry as="geometry" x="40" y="100" width="500" height="260" /></mxCell><mxCell id="cbody" value="record(request): acknowledgement&#10;getById(id): ObservationDto&#10;getLatest(patientId): ObservationDto?&#10;getByPeriod(patientId, period, selection)&#10;update(id, patch): acknowledgement&#10;delete(id): acknowledgement" style="text;html=0;align=left;verticalAlign=top;spacing=10;fontSize=15;fontFamily=Helvetica;whiteSpace=wrap;overflow=hidden;" vertex="1" parent="c"><mxGeometry as="geometry" x="0" y="36" width="500" height="224" /></mxCell><mxCell id="a" value="ObservationApplicationService" style="swimlane;html=0;startSize=36;horizontal=1;fillColor=#eeeeee;swimlaneFillColor=#ffffff;strokeColor=#333333;fontColor=#111111;fontSize=17;fontStyle=1;align=center;" vertex="1" parent="1"><mxGeometry as="geometry" x="620" y="100" width="500" height="260" /></mxCell><mxCell id="abody" value="record / getById / getLatest&#10;getByPeriod(period, selection)&#10;update(id, patch) / delete(id)&#10;Validate context categories and values&#10;Preserve omitted values in partial updates" style="text;html=0;align=left;verticalAlign=top;spacing=10;fontSize=15;fontFamily=Helvetica;whiteSpace=wrap;overflow=hidden;" vertex="1" parent="a"><mxGeometry as="geometry" x="0" y="36" width="500" height="224" /></mxCell><mxCell id="r" value="ObservationRepository «interface»" style="swimlane;html=0;startSize=36;horizontal=1;fillColor=#eeeeee;swimlaneFillColor=#ffffff;strokeColor=#333333;fontColor=#111111;fontSize=17;fontStyle=1;align=center;" vertex="1" parent="1"><mxGeometry as="geometry" x="1200" y="100" width="500" height="260" /></mxCell><mxCell id="rbody" value="save(observation)&#10;findById(id) / findLatest(patientId)&#10;findByPeriod(patientId, period, selection)&#10;update(id, patch) / delete(id)&#10;Persist context and original recording time" style="text;html=0;align=left;verticalAlign=top;spacing=10;fontSize=15;fontFamily=Helvetica;whiteSpace=wrap;overflow=hidden;" vertex="1" parent="r"><mxGeometry as="geometry" x="0" y="36" width="500" height="224" /></mxCell><mxCell id="o" value="BloodPressureObservation / ObservationDto" style="swimlane;html=0;startSize=36;horizontal=1;fillColor=#eeeeee;swimlaneFillColor=#ffffff;strokeColor=#333333;fontColor=#111111;fontSize=17;fontStyle=1;align=center;" vertex="1" parent="1"><mxGeometry as="geometry" x="40" y="520" width="500" height="360" /></mxCell><mxCell id="obody" value="observationId: UUID; patientId: UUID&#10;measuredAt: DateTime&#10;systolic, diastolic, pulse: int&#10;measurementContext: MeasurementContext&#10;context: String? (legacy text)&#10;note: String?&#10;createdAt: DateTime (original recording)&#10;updatedAt: DateTime" style="text;html=0;align=left;verticalAlign=top;spacing=10;fontSize=15;fontFamily=Helvetica;whiteSpace=wrap;overflow=hidden;" vertex="1" parent="o"><mxGeometry as="geometry" x="0" y="36" width="500" height="324" /></mxCell><mxCell id="ctx" value="MeasurementContext «value object»" style="swimlane;html=0;startSize=36;horizontal=1;fillColor=#eeeeee;swimlaneFillColor=#ffffff;strokeColor=#333333;fontColor=#111111;fontSize=17;fontStyle=1;align=center;" vertex="1" parent="1"><mxGeometry as="geometry" x="620" y="520" width="500" height="360" /></mxCell><mxCell id="ctxbody" value="setting: Home / Clinic / Other / Unknown&#10;activity: Rest / During / After / Unknown&#10;restDuration: optional&#10;bodyPosition: optional&#10;measuredArm: optional&#10;device / cuff details: optional&#10;additionalCircumstances: optional&#10;Missing details remain unknown" style="text;html=0;align=left;verticalAlign=top;spacing=10;fontSize=15;fontFamily=Helvetica;whiteSpace=wrap;overflow=hidden;" vertex="1" parent="ctx"><mxGeometry as="geometry" x="0" y="36" width="500" height="324" /></mxCell><mxCell id="sql" value="SqlObservationRepository" style="swimlane;html=0;startSize=36;horizontal=1;fillColor=#eeeeee;swimlaneFillColor=#ffffff;strokeColor=#333333;fontColor=#111111;fontSize=17;fontStyle=1;align=center;" vertex="1" parent="1"><mxGeometry as="geometry" x="1200" y="520" width="500" height="200" /></mxCell><mxCell id="sqlbody" value="Implements ObservationRepository&#10;Owns persistence within Observation Service&#10;No other service accesses its database" style="text;html=0;align=left;verticalAlign=top;spacing=10;fontSize=15;fontFamily=Helvetica;whiteSpace=wrap;overflow=hidden;" vertex="1" parent="sql"><mxGeometry as="geometry" x="0" y="36" width="500" height="164" /></mxCell><mxCell id="sel" value="ContextSelection «request value»" style="swimlane;html=0;startSize=36;horizontal=1;fillColor=#eeeeee;swimlaneFillColor=#ffffff;strokeColor=#333333;fontColor=#111111;fontSize=17;fontStyle=1;align=center;" vertex="1" parent="1"><mxGeometry as="geometry" x="620" y="930" width="500" height="180" /></mxCell><mxCell id="selbody" value="optional setting; optional activity&#10;Both supplied: match both&#10;Unknown is selectable&#10;Omitted selections include all contexts" style="text;html=0;align=left;verticalAlign=top;spacing=10;fontSize=15;fontFamily=Helvetica;whiteSpace=wrap;overflow=hidden;" vertex="1" parent="sel"><mxGeometry as="geometry" x="0" y="36" width="500" height="144" /></mxCell><mxCell id="note0" value="Latest = measurement time, then original recording time, then documented deterministic tie rule." style="text;html=0;align=left;fontSize=15;" vertex="1" parent="1"><mxGeometry as="geometry" x="40" y="1175" width="1660" height="25" /></mxCell><mxCell id="note1" value="Gateway enforces access. Other services consume Observation APIs through the gateway." style="text;html=0;align=left;fontSize=15;" vertex="1" parent="1"><mxGeometry as="geometry" x="40" y="1200" width="1660" height="25" /></mxCell></root></mxGraphModel></diagram></mxfile>