Files
HealthAppRepository/Docs/Architecture/04_class_observation_service.drawio
T

74 lines
8.0 KiB
Plaintext

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