Initial commit: architecture design instructions and documentation

This commit is contained in:
Steffen committed 2026-10-13 13:38:21 +02:00
commit 4bbf5afe3e
64 files changed
+8819

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
# HealthApp as-built architecture
Snapshot: **2026-10-12**, repository commit `5d9371388c15066eeb2bc124ed227659c644dab5`. This describes the checked-out implementation, not a proposed architecture or a certification of a running installation.
## Documents
| Document | Contents |
| --- | --- |
| [Software architecture](software-architecture.md) | Runtime structure, contracts, data, security, deployment and failures |
| [Architecture decisions](architecture-decisions.md) | Observable decisions, evidence, rationale provenance and consequences |
| [Requirements traceability](requirements-traceability.md) | US-01–US-16 implementation and test mapping; coverage limits |
| [Discrepancies](discrepancies.md) | Historical differences, current omissions and unresolved uncertainties |
| [Evidence inventory](evidence-inventory.md) | Source/configuration/test inventory and inspection boundaries |
| [Validation](validation.md) | Deliverable, diagram, link and preservation checks |
| [Class-diagram coverage](class-diagram-coverage.md) | Every declared service type mapped to an individual UML classifier and source file |
## Editable diagrams
Open these files directly in diagrams.net / Draw.io. They contain native shapes, text and connectors, rather than embedded screenshots. Page tabs separate detailed views.
| File | Pages / purpose |
| --- | --- |
| [01-system-context.drawio](diagrams/01-system-context.drawio) | Actors, system boundary and optional experiment infrastructure |
| [02-logical-services.drawio](diagrams/02-logical-services.drawio) | Five processes, gateway routing and local layers |
| [03-domain-model.drawio](diagrams/03-domain-model.drawio) | Complete application domain: health, access, assignments, guidance, assessments and references; separate supporting deployment domain |
| [ApiGateway class diagram](diagrams/04-class-ApiGateway.drawio) | All 16 declared types, including controllers, security and nested records |
| [PatientProfileService class diagram](diagrams/04-class-PatientProfileService.drawio) | All 14 declared types; runtime and EF migration pages |
| [ObservationService class diagram](diagrams/04-class-ObservationService.drawio) | All 17 declared types; runtime and EF migration pages |
| [InsightsService class diagram](diagrams/04-class-InsightsService.drawio) | All 16 declared types, including individual DTO/result/reference records |
| [HealthOverviewService class diagram](diagrams/04-class-HealthOverviewService.drawio) | All 15 declared types, including distinct abstract/HTTP clients and DTOs |
| [04-design-classes.drawio](diagrams/04-design-classes.drawio) | Combined copy of the five service diagrams, plus the administrative provisioning view |
| [05-data-ownership.drawio](diagrams/05-data-ownership.drawio) | Physical tables, file/configuration ownership and transient results |
| [06-deployment.drawio](diagrams/06-deployment.drawio) | Colocated and distributed Linux topologies; Windows/macOS adapters |
| [07-sequences.drawio](diagrams/07-sequences.drawio) | Login/create, record, read/update/delete ownership, calculations, overview, professional access and installation |
## Interpretation
**Verified** means directly observable in repository implementation or configuration; a cited test demonstrates the intended check, not that it was executed in this documentation task. **Inferred** labels a consequence or rationale derived from that evidence. **Unknown** labels something the repository cannot establish. Existing specifications and functionality were preserved. No application code was generated or changed, and no live host was accessed.
@@ -0,0 +1,30 @@
# Observable architecture decisions
These records describe existing choices. They are not new approvals or proposed ADRs. **Documented rationale** is stated in a repository document; **inferred rationale/consequence** is analysis of the code; **unknown rationale** means no reason was found. Each decision is verified independently from implementation evidence.
| ID | Implemented decision and evidence | Rationale provenance | Consequences / limits |
| --- | --- | --- | --- |
| AB-01 | Five independent ASP.NET Core processes; no production service-to-service project references. [Solution](../HealthApp.slnx), [release build](../deploy/build-release.sh) | Documented: independent boundaries and location-independent deployment in [US-16](<../Docs/Requirements/US16 easy installation and deployment installer.txt>) and [service architecture](../Docs/Architecture/02_microservice_architecture.jpg) | Each service publishes/configures/stops separately. Availability dependencies still exist through HTTP. |
| AB-02 | All business HTTP between services goes through Gateway. [Observation](../src/ObservationService/Program.cs), [Insights](../src/InsightsService/Program.cs), [Overview](../src/HealthOverviewService/Program.cs) | Documented path in [architecture correction](../Docs/Architecture/us10-insights-correction.md) and existing service diagram. Additional rationale beyond that choice is unknown. | Inferred: extra hops and centralized availability/load; no direct aggregator-to-source shortcuts. |
| AB-03 | Controllers explicitly forward requests using named HttpClients. [Gateway Observation controller](../src/ApiGateway/Controllers/ObservationController.cs) | Unknown: no separate ADR explaining selection over a proxy library | Routes/header handling are explicit; forwarding implementation is duplicated, and only selected response headers survive. |
| AB-04 | Patient/Profile and Observation own separate PostgreSQL DBs/roles; context stored in same observation row. [contexts](../src/ObservationService/Persistence/ObservationDbContext.cs), [DB provisioning](../deploy/HealthApp.Provisioning/DatabaseProvisioning.cs) | Documented independent ownership in [addendum](../Docs/Requirements/us16-addendum). Same-row context is documented in [implementation README](../src/README.md); original logical model explicitly permits physical mapping choices. | No cross-service FK or DB joins. Context deletion is naturally row deletion. Optional preparation details do not require another table. |
| AB-05 | Account association resides in `patient.account_id`, with unique index. [migration](../src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.cs), [SQL repository](../src/PatientProfileService/Persistence/SqlPatientRepository.cs) | Documented: [authentication implementation](../src/AUTHENTICATION.md) explains single-row consistency and restart persistence | Concurrent creation cannot produce two non-null associations for one account. Existing nullable legacy associations are not backfilled. |
| AB-06 | Insights and Overview have no own DB/repository/result persistence. [Insights application](../src/InsightsService/Application/InsightsApplicationService.cs), [Overview application](../src/HealthOverviewService/Application/HealthOverviewApplicationService.cs) | Documented: [Insights correction](../Docs/Architecture/us10-insights-correction.md), [Overview implementation](../src/OVERVIEW.md) | New requests use current source data. No generated result ID/cache invalidation. Multi-service reads are not one snapshot. |
| AB-07 | Framework protected opaque bearer tickets; password hashing only at login. [login](../src/ApiGateway/Controllers/AuthenticationController.cs), [accounts](../src/ApiGateway/Security/PrototypeAccounts.cs), [startup](../src/ApiGateway/Program.cs) | Documented: [authentication design](../Docs/Design/authentication-and-access-control-design.md) separates credentials/token/policy, excludes custom crypto and repeated password verification. Concrete mechanism/lifetime recorded in [AUTHENTICATION.md](../src/AUTHENTICATION.md). | No JWT issuer/audience configuration, identity server or refresh workflow. Default 30-minute expiry requires new login. Token keys are persistent local files. |
| AB-08 | Gateway establishes ownership by protected HTTP reads and evaluates configured professional assignments. [middleware](../src/ApiGateway/Security/PatientAccessMiddleware.cs) | Documented: [authentication design](../Docs/Design/authentication-and-access-control-design.md) requires actual owner lookup and separated access policy | No ownership inside bearer token. Additional per-request lookup cost/dependency. Empty 404 hides cross-patient existence; professionals cannot write. |
| AB-09 | Backend shared-key guards; distinct callback keys with GET-only whitelist. [internal handler](../src/ApiGateway/Security/InternalServiceAuthenticationHandler.cs), [backend](../src/ObservationService/Program.cs) | Documented: [AUTHENTICATION.md](../src/AUTHENTICATION.md) selects prototype protection satisfying gateway-only enforcement | HTTPS protects key transport. Trusted backend incoming keys bypass end-user checks there; callback credentials have cross-patient access on their limited read routes. No mTLS or user delegation. |
| AB-10 | Require HTTPS outside Development; disable HTTP redirects in business clients. [Gateway Program](../src/ApiGateway/Program.cs), [Observation Program](../src/ObservationService/Program.cs) | HTTPS rationale documented in [authentication design](../Docs/Design/authentication-and-access-control-design.md). Credential redirect protection documented in [AUTHENTICATION.md](../src/AUTHENTICATION.md). | HTTP development is explicit. HTTP is rejected rather than automatically redirected; reverse-proxy forwarded-header support is absent. |
| AB-11 | UTC clock values stored in timestamp-without-timezone columns; offset normalization. [Observation application](../src/ObservationService/Application/ObservationApplicationService.cs) | Documented in [src README](../src/README.md): preserve original TIMESTAMP design while making instants/offset-free interpretation deterministic | Clients must interpret offset-free output as UTC. No local-zone interpretation or stored original offset. |
| AB-12 | Inclusive selection, deterministic latest UUID tie; history sorted by measurement time/UUID. [repository](../src/ObservationService/Persistence/SqlObservationRepository.cs) | Requirements prescribe inclusivity and deterministic ties; concrete final UUID order documented in [src README](../src/README.md) | Recording/edit order cannot override measurement-time precedence. Equal timestamps remain valid. No pagination/size bound. |
| AB-13 | Setter presence flags implement PATCH omission vs null; full numeric PUT remains. [patch](../src/ObservationService/Contracts/PatchObservationRequest.cs), [repository](../src/ObservationService/Persistence/SqlObservationRepository.cs) | Documented [US-08](../Docs/Requirements/us08-update-observation.md) requires preservation/clearing. Exact mechanism rationale inferred: distinguishes omitted JSON members from explicit clearing without a patch library. | Unknown PATCH/PUT fields rejected. No external JSON Patch dependency. No ETag/concurrency token. |
| AB-14 | Decimal final-only summary rounding; timestamp-grouped direction and OLS trend; static sourced references. [calculators](../src/InsightsService/Domain/InsightCalculator.Trends.cs) | Documented methods, clinical limits and cautious inference basis in [TRENDS.md](../src/TRENDS.md), required reproducibility in [US-11](../Docs/Requirements/us11-health-trend.md) | No prediction/significance test/diagnosis. Numerical evidence survives limited context; phrase detection cannot understand arbitrary narratives. Clinical applicability has not been independently validated by this task. |
| AB-15 | Overview reads profile → latest → insight sequentially; context selection applies only to insight. [application](../src/HealthOverviewService/Application/HealthOverviewApplicationService.cs) | Selection distinction documented in [US-12](../Docs/Requirements/us12-health-overview.md); lack of snapshot documented in [OVERVIEW.md](../src/OVERVIEW.md). Rationale for sequential execution is unknown. | Partial absence can still return available profile/latest; source failure returns failure. Inferred: latency follows dependent calls and writes may interleave. |
| AB-16 | External startup account/assignment config; no account/assignment administration API. [accounts](../src/ApiGateway/Security/PrototypeAccounts.cs), [assignments](../src/ApiGateway/Security/ProfessionalAssignments.cs) | Documented prototype scope in [US-13](../Docs/Requirements/us13-patient-authentication.md), [US-14](../Docs/Requirements/us14-professional-access.md) | No credential/assignment DB; changes require process restart. Existing token role/account claims are not rechecked against current account records every request. |
| AB-17 | Portable framework-dependent DLLs plus OS-specific package/service adapters. [build](../deploy/build-release.sh), [Linux](../deploy/installer/install.sh), [Windows](../deploy/installer/install.ps1), [macOS](../deploy/installer/install-macos.sh) | Documented in [INSTALLATION.md](../deploy/INSTALLATION.md): native deployment without combining processes, container requirement or host-generated apphost | Target runtime/native administration remain platform-specific. Non-Debian Linux automation is absent. Native-host execution evidence is limited. |
| AB-18 | Single generated topology plan; scoped SSH/SCP distribution; prototype CA + per-service certificates. [prepare](../deploy/HealthApp.Provisioning/Deployment.cs), [distribute](../deploy/HealthApp.Provisioning/Distribution.cs) | Documented normal-install automation in [US-16 addendum](../Docs/Requirements/us16-addendum), scoped distribution in [INSTALLATION.md](../deploy/INSTALLATION.md) | Compatible keys are automatic; separate independently prepared plans will not interoperate. CA signing private key is not retained. Admin access/network reachability still prerequisite. |
| AB-19 | Fail closed on ownership/upstream failure; absent aggregate data distinguished from dependency failure. [middleware](../src/ApiGateway/Security/PatientAccessMiddleware.cs), [Overview controller](../src/HealthOverviewService/Controllers/HealthOverviewController.cs) | Documented security requirement and [Overview error contract](../src/OVERVIEW.md) | 502/504 mapping, with generic 500 for some malformed ownership shapes. No resilience policy/circuit breaker. |
| AB-20 | Generated PostgreSQL connections disable pooling and use SSL Prefer. [Deployment.ConnectionString](../deploy/HealthApp.Provisioning/Deployment.cs) | Unknown: no explicit rationale found for these settings | Inferred: connection establishment recurs rather than using the driver pool; DB TLS is opportunistic rather than enforced. External configuration can change both. |
| AB-21 | Complete verification creates/reuses synthetic patient/observation then reads overview. [verification](../deploy/HealthApp.Provisioning/InstallationVerification.cs) | Documented in [INSTALLATION.md](../deploy/INSTALLATION.md), required representative workflow in US-16 | Installation can leave labelled test data; it is not a read-only check. No automatic native stop/restart cycle. |
| AB-22 | Public static guidance separate from observation writes. [controller](../src/ApiGateway/Controllers/MeasurementGuidanceController.cs) | Documented in [US-15](../Docs/Requirements/us15-measurement-guidance.md) | Available before records/login. No guidance read creates/certifies an observation. Sources are metadata, not runtime dependencies. |
No rationale has been invented for absent caching, missing optimistic concurrency, default business HTTP timeouts or the lack of deployment rollback. These are observable properties/limits, not necessarily deliberate tradeoffs documented by the authors.
@@ -0,0 +1,102 @@
# Implementation class-diagram coverage
Corrected after review: each service has its own UML class-diagram file. Every source-declared class, record and interface under that service is represented as an individual classifier. Nested types are named with their enclosing type; partial declarations count as one type. EF migrations, migration designers and model snapshots are included on separate persistence-support pages. No controller, DTO or request class is merged into a domain box.
Classifier compartments show actual attributes and operations with UML visibility. Record positional parameters are attributes plus a constructor. Primary-constructor parameters appear as constructor operations, with dependency links to local parameter types. They are not represented as invented C# fields. Explicit local attribute types supply associations; declared base classes/interfaces supply generalization/realization. The observation/context composition is justified by its EF-owned mapping. Inherited/automatically compiler-generated members are not enumerated.
Framework base types appear as labelled references, outside the service-defined type inventory. A same-service reference repeated on another page is marked as a reference and does not count as a second implementation type. Program registration dependencies do not mean shared cross-service memory or direct calls.
| Service | Declared types | Diagram |
| --- | --- | --- |
| ApiGateway | 16 | [ApiGateway](diagrams/04-class-ApiGateway.drawio) |
| PatientProfileService | 14 | [PatientProfileService](diagrams/04-class-PatientProfileService.drawio) |
| ObservationService | 17 | [ObservationService](diagrams/04-class-ObservationService.drawio) |
| InsightsService | 16 | [InsightsService](diagrams/04-class-InsightsService.drawio) |
| HealthOverviewService | 15 | [HealthOverviewService](diagrams/04-class-HealthOverviewService.drawio) |
## Exact inventory
| Service | Fully qualified source type | Kind | Source files | Page |
| --- | --- | --- | --- | --- |
| ApiGateway | `ApiGateway.Controllers.AuthenticationController` | class | [src/ApiGateway/Controllers/AuthenticationController.cs](../src/ApiGateway/Controllers/AuthenticationController.cs) | implementation classes |
| ApiGateway | `ApiGateway.Controllers.AuthenticationController.LoginRequest` | record | [src/ApiGateway/Controllers/AuthenticationController.cs](../src/ApiGateway/Controllers/AuthenticationController.cs) | implementation classes |
| ApiGateway | `ApiGateway.Controllers.HealthOverviewController` | class | [src/ApiGateway/Controllers/HealthOverviewController.cs](../src/ApiGateway/Controllers/HealthOverviewController.cs) | implementation classes |
| ApiGateway | `ApiGateway.Controllers.InsightsController` | class | [src/ApiGateway/Controllers/InsightsController.cs](../src/ApiGateway/Controllers/InsightsController.cs) | implementation classes |
| ApiGateway | `ApiGateway.Controllers.MeasurementGuidanceController` | class | [src/ApiGateway/Controllers/MeasurementGuidanceController.cs](../src/ApiGateway/Controllers/MeasurementGuidanceController.cs) | implementation classes |
| ApiGateway | `ApiGateway.Controllers.MeasurementGuidanceController.GuidanceSource` | record | [src/ApiGateway/Controllers/MeasurementGuidanceController.cs](../src/ApiGateway/Controllers/MeasurementGuidanceController.cs) | implementation classes |
| ApiGateway | `ApiGateway.Controllers.MeasurementGuidanceController.GuidanceStep` | record | [src/ApiGateway/Controllers/MeasurementGuidanceController.cs](../src/ApiGateway/Controllers/MeasurementGuidanceController.cs) | implementation classes |
| ApiGateway | `ApiGateway.Controllers.ObservationController` | class | [src/ApiGateway/Controllers/ObservationController.cs](../src/ApiGateway/Controllers/ObservationController.cs) | implementation classes |
| ApiGateway | `ApiGateway.Controllers.PatientController` | class | [src/ApiGateway/Controllers/PatientController.cs](../src/ApiGateway/Controllers/PatientController.cs) | implementation classes |
| ApiGateway | `ApiGateway.Controllers.ProfessionalController` | class | [src/ApiGateway/Controllers/ProfessionalController.cs](../src/ApiGateway/Controllers/ProfessionalController.cs) | implementation classes |
| ApiGateway | `ApiGateway.Program` | class | [src/ApiGateway/Program.cs](../src/ApiGateway/Program.cs) | implementation classes |
| ApiGateway | `ApiGateway.Security.InternalServiceAuthenticationHandler` | class | [src/ApiGateway/Security/InternalServiceAuthenticationHandler.cs](../src/ApiGateway/Security/InternalServiceAuthenticationHandler.cs) | implementation classes |
| ApiGateway | `ApiGateway.Security.PatientAccessMiddleware` | class | [src/ApiGateway/Security/PatientAccessMiddleware.cs](../src/ApiGateway/Security/PatientAccessMiddleware.cs) | implementation classes |
| ApiGateway | `ApiGateway.Security.ProfessionalAssignments` | class | [src/ApiGateway/Security/ProfessionalAssignments.cs](../src/ApiGateway/Security/ProfessionalAssignments.cs) | implementation classes |
| ApiGateway | `ApiGateway.Security.PrototypeAccount` | class | [src/ApiGateway/Security/PrototypeAccounts.cs](../src/ApiGateway/Security/PrototypeAccounts.cs) | implementation classes |
| ApiGateway | `ApiGateway.Security.PrototypeAccounts` | class | [src/ApiGateway/Security/PrototypeAccounts.cs](../src/ApiGateway/Security/PrototypeAccounts.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Application.PatientApplicationService` | class | [src/PatientProfileService/Application/PatientApplicationService.cs](../src/PatientProfileService/Application/PatientApplicationService.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Application.PatientRepository` | interface | [src/PatientProfileService/Application/PatientRepository.cs](../src/PatientProfileService/Application/PatientRepository.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Application.ProfileAlreadyExistsException` | class | [src/PatientProfileService/Application/ProfileAlreadyExistsException.cs](../src/PatientProfileService/Application/ProfileAlreadyExistsException.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Contracts.CreatePatientRequest` | record | [src/PatientProfileService/Contracts/CreatePatientRequest.cs](../src/PatientProfileService/Contracts/CreatePatientRequest.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Contracts.PatientDto` | record | [src/PatientProfileService/Contracts/PatientDto.cs](../src/PatientProfileService/Contracts/PatientDto.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Contracts.UpdatePatientRequest` | record | [src/PatientProfileService/Contracts/UpdatePatientRequest.cs](../src/PatientProfileService/Contracts/UpdatePatientRequest.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Controllers.PatientController` | class | [src/PatientProfileService/Controllers/PatientController.cs](../src/PatientProfileService/Controllers/PatientController.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Domain.Patient` | class | [src/PatientProfileService/Domain/Patient.cs](../src/PatientProfileService/Domain/Patient.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Persistence.Migrations.AccountProfileAssociation` | class | [src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.Designer.cs](../src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.Designer.cs)<br>[src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.cs](../src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.cs) | EF migration classes |
| PatientProfileService | `PatientProfileService.Persistence.Migrations.InitialPatientSchema` | class | [src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.Designer.cs](../src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.Designer.cs)<br>[src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.cs](../src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.cs) | EF migration classes |
| PatientProfileService | `PatientProfileService.Persistence.Migrations.PatientDbContextModelSnapshot` | class | [src/PatientProfileService/Persistence/Migrations/PatientDbContextModelSnapshot.cs](../src/PatientProfileService/Persistence/Migrations/PatientDbContextModelSnapshot.cs) | EF migration classes |
| PatientProfileService | `PatientProfileService.Persistence.PatientDbContext` | class | [src/PatientProfileService/Persistence/PatientDbContext.cs](../src/PatientProfileService/Persistence/PatientDbContext.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Persistence.SqlPatientRepository` | class | [src/PatientProfileService/Persistence/SqlPatientRepository.cs](../src/PatientProfileService/Persistence/SqlPatientRepository.cs) | implementation classes |
| PatientProfileService | `PatientProfileService.Program` | class | [src/PatientProfileService/Program.cs](../src/PatientProfileService/Program.cs) | implementation classes |
| ObservationService | `ObservationService.Application.ObservationApplicationService` | class | [src/ObservationService/Application/ObservationApplicationService.cs](../src/ObservationService/Application/ObservationApplicationService.cs) | implementation classes |
| ObservationService | `ObservationService.Application.ObservationRepository` | interface | [src/ObservationService/Application/ObservationRepository.cs](../src/ObservationService/Application/ObservationRepository.cs) | implementation classes |
| ObservationService | `ObservationService.Contracts.MeasurementContextPatch` | record | [src/ObservationService/Contracts/MeasurementContextPatch.cs](../src/ObservationService/Contracts/MeasurementContextPatch.cs) | implementation classes |
| ObservationService | `ObservationService.Contracts.ObservationDto` | record | [src/ObservationService/Contracts/ObservationDto.cs](../src/ObservationService/Contracts/ObservationDto.cs) | implementation classes |
| ObservationService | `ObservationService.Contracts.PatchObservationRequest` | record | [src/ObservationService/Contracts/PatchObservationRequest.cs](../src/ObservationService/Contracts/PatchObservationRequest.cs) | implementation classes |
| ObservationService | `ObservationService.Contracts.RecordObservationRequest` | record | [src/ObservationService/Contracts/RecordObservationRequest.cs](../src/ObservationService/Contracts/RecordObservationRequest.cs) | implementation classes |
| ObservationService | `ObservationService.Contracts.UpdateObservationRequest` | record | [src/ObservationService/Contracts/UpdateObservationRequest.cs](../src/ObservationService/Contracts/UpdateObservationRequest.cs) | implementation classes |
| ObservationService | `ObservationService.Controllers.ObservationController` | class | [src/ObservationService/Controllers/ObservationController.cs](../src/ObservationService/Controllers/ObservationController.cs) | implementation classes |
| ObservationService | `ObservationService.Domain.BloodPressureObservation` | class | [src/ObservationService/Domain/BloodPressureObservation.cs](../src/ObservationService/Domain/BloodPressureObservation.cs) | implementation classes |
| ObservationService | `ObservationService.Domain.ContextSelection` | record | [src/ObservationService/Domain/ContextSelection.cs](../src/ObservationService/Domain/ContextSelection.cs) | implementation classes |
| ObservationService | `ObservationService.Domain.MeasurementContext` | record | [src/ObservationService/Domain/MeasurementContext.cs](../src/ObservationService/Domain/MeasurementContext.cs) | implementation classes |
| ObservationService | `ObservationService.Persistence.Migrations.InitialObservationSchema` | class | [src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.Designer.cs](../src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.Designer.cs)<br>[src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.cs](../src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.cs) | EF migration classes |
| ObservationService | `ObservationService.Persistence.Migrations.ObservationDbContextModelSnapshot` | class | [src/ObservationService/Persistence/Migrations/ObservationDbContextModelSnapshot.cs](../src/ObservationService/Persistence/Migrations/ObservationDbContextModelSnapshot.cs) | EF migration classes |
| ObservationService | `ObservationService.Persistence.Migrations.RecordedMeasurementContext` | class | [src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.Designer.cs](../src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.Designer.cs)<br>[src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.cs](../src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.cs) | EF migration classes |
| ObservationService | `ObservationService.Persistence.ObservationDbContext` | class | [src/ObservationService/Persistence/ObservationDbContext.cs](../src/ObservationService/Persistence/ObservationDbContext.cs) | implementation classes |
| ObservationService | `ObservationService.Persistence.SqlObservationRepository` | class | [src/ObservationService/Persistence/SqlObservationRepository.cs](../src/ObservationService/Persistence/SqlObservationRepository.cs) | implementation classes |
| ObservationService | `ObservationService.Program` | class | [src/ObservationService/Program.cs](../src/ObservationService/Program.cs) | implementation classes |
| InsightsService | `InsightsService.Application.InsightsApplicationService` | class | [src/InsightsService/Application/InsightsApplicationService.cs](../src/InsightsService/Application/InsightsApplicationService.cs) | implementation classes |
| InsightsService | `InsightsService.Clients.HttpObservationServiceClient` | class | [src/InsightsService/Clients/HttpObservationServiceClient.cs](../src/InsightsService/Clients/HttpObservationServiceClient.cs) | implementation classes |
| InsightsService | `InsightsService.Clients.ObservationServiceClient` | interface | [src/InsightsService/Clients/ObservationServiceClient.cs](../src/InsightsService/Clients/ObservationServiceClient.cs) | implementation classes |
| InsightsService | `InsightsService.Contracts.HealthInsightDto` | record | [src/InsightsService/Contracts/HealthInsightDto.cs](../src/InsightsService/Contracts/HealthInsightDto.cs) | implementation classes |
| InsightsService | `InsightsService.Contracts.MeasurementContextDto` | record | [src/InsightsService/Contracts/ObservationDto.cs](../src/InsightsService/Contracts/ObservationDto.cs) | implementation classes |
| InsightsService | `InsightsService.Contracts.ObservationDto` | record | [src/InsightsService/Contracts/ObservationDto.cs](../src/InsightsService/Contracts/ObservationDto.cs) | implementation classes |
| InsightsService | `InsightsService.Controllers.InsightsController` | class | [src/InsightsService/Controllers/InsightsController.cs](../src/InsightsService/Controllers/InsightsController.cs) | implementation classes |
| InsightsService | `InsightsService.Domain.ClinicalReference` | record | [src/InsightsService/Domain/TrendAssessment.cs](../src/InsightsService/Domain/TrendAssessment.cs) | implementation classes |
| InsightsService | `InsightsService.Domain.ComparabilityAssessment` | record | [src/InsightsService/Domain/TrendAssessment.cs](../src/InsightsService/Domain/TrendAssessment.cs) | implementation classes |
| InsightsService | `InsightsService.Domain.ContextSelection` | record | [src/InsightsService/Domain/ContextSelection.cs](../src/InsightsService/Domain/ContextSelection.cs) | implementation classes |
| InsightsService | `InsightsService.Domain.HealthInsight` | record | [src/InsightsService/Domain/HealthInsight.cs](../src/InsightsService/Domain/HealthInsight.cs) | implementation classes |
| InsightsService | `InsightsService.Domain.InsightCalculator` | class | [src/InsightsService/Domain/InsightCalculator.Trends.cs](../src/InsightsService/Domain/InsightCalculator.Trends.cs)<br>[src/InsightsService/Domain/InsightCalculator.cs](../src/InsightsService/Domain/InsightCalculator.cs) | implementation classes |
| InsightsService | `InsightsService.Domain.MeasurementAssessment` | record | [src/InsightsService/Domain/TrendAssessment.cs](../src/InsightsService/Domain/TrendAssessment.cs) | implementation classes |
| InsightsService | `InsightsService.Domain.ReferenceSource` | record | [src/InsightsService/Domain/TrendAssessment.cs](../src/InsightsService/Domain/TrendAssessment.cs) | implementation classes |
| InsightsService | `InsightsService.Domain.TrendAssessment` | record | [src/InsightsService/Domain/TrendAssessment.cs](../src/InsightsService/Domain/TrendAssessment.cs) | implementation classes |
| InsightsService | `InsightsService.Program` | class | [src/InsightsService/Program.cs](../src/InsightsService/Program.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Application.HealthOverviewApplicationService` | class | [src/HealthOverviewService/Application/HealthOverviewApplicationService.cs](../src/HealthOverviewService/Application/HealthOverviewApplicationService.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Clients.HttpInsightsServiceClient` | class | [src/HealthOverviewService/Clients/InsightsServiceClient.cs](../src/HealthOverviewService/Clients/InsightsServiceClient.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Clients.HttpObservationServiceClient` | class | [src/HealthOverviewService/Clients/ObservationServiceClient.cs](../src/HealthOverviewService/Clients/ObservationServiceClient.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Clients.HttpPatientProfileServiceClient` | class | [src/HealthOverviewService/Clients/PatientProfileServiceClient.cs](../src/HealthOverviewService/Clients/PatientProfileServiceClient.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Clients.InsightsServiceClient` | class | [src/HealthOverviewService/Clients/InsightsServiceClient.cs](../src/HealthOverviewService/Clients/InsightsServiceClient.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Clients.ObservationServiceClient` | class | [src/HealthOverviewService/Clients/ObservationServiceClient.cs](../src/HealthOverviewService/Clients/ObservationServiceClient.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Clients.PatientProfileServiceClient` | class | [src/HealthOverviewService/Clients/PatientProfileServiceClient.cs](../src/HealthOverviewService/Clients/PatientProfileServiceClient.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Contracts.ContextSelection` | record | [src/HealthOverviewService/Contracts/HealthOverviewDto.cs](../src/HealthOverviewService/Contracts/HealthOverviewDto.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Contracts.HealthInsightDto` | record | [src/HealthOverviewService/Contracts/HealthOverviewDto.cs](../src/HealthOverviewService/Contracts/HealthOverviewDto.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Contracts.HealthOverviewDto` | record | [src/HealthOverviewService/Contracts/HealthOverviewDto.cs](../src/HealthOverviewService/Contracts/HealthOverviewDto.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Contracts.MeasurementContextDto` | record | [src/HealthOverviewService/Contracts/HealthOverviewDto.cs](../src/HealthOverviewService/Contracts/HealthOverviewDto.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Contracts.ObservationDto` | record | [src/HealthOverviewService/Contracts/HealthOverviewDto.cs](../src/HealthOverviewService/Contracts/HealthOverviewDto.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Contracts.PatientDto` | record | [src/HealthOverviewService/Contracts/HealthOverviewDto.cs](../src/HealthOverviewService/Contracts/HealthOverviewDto.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Controllers.HealthOverviewController` | class | [src/HealthOverviewService/Controllers/HealthOverviewController.cs](../src/HealthOverviewService/Controllers/HealthOverviewController.cs) | implementation classes |
| HealthOverviewService | `HealthOverviewService.Program` | class | [src/HealthOverviewService/Program.cs](../src/HealthOverviewService/Program.cs) | implementation classes |
## Validation
Source declarations were enumerated independently and compared with each per-service diagram’s `sourceType` attributes. A merged partial type is expected once per service file. All source-defined types must match exactly, with no extras or omissions. The combined `04-design-classes.drawio` contains the same corrected service views plus the administrative provisioning view; the standalone files are the primary per-service navigation targets.
@@ -0,0 +1,50 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17" compressed="false">
<diagram id="p1" name="System context">
<mxGraphModel dx="1700" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c1" value="System context" style="text;html=0;fontSize=24;fontStyle=1;align=left;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="15" width="1440" height="45" />
</mxCell>
<mxCell id="c2" value="Patient&#10;Pre-created account&#10;Creates own profile; records/reviews own measurements" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="130" width="300" height="170" />
</mxCell>
<mxCell id="c3" value="Healthcare professional&#10;Pre-created account&#10;Reads assigned patients; never writes" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="400" width="300" height="170" />
</mxCell>
<mxCell id="c4" value="HealthApp backend boundary&#10;Gateway + four application services&#10;REST/JSON over HTTPS&#10;Patient/Profile and Observation own persistence&#10;No product frontend in this repository" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="530" y="230" width="400" height="250" />
</mxCell>
<mxCell id="c5" value="Administrator / build machine&#10;Builds portable release&#10;Selects topology and installs native services&#10;Provides host administrative access" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1100" y="150" width="330" height="190" />
</mxCell>
<mxCell id="c6" value="Clinical reference publishers&#10;Sundhed.dk&#10;Source URLs/review dates compiled into code&#10;No runtime HTTP dependency" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1100" y="430" width="330" height="180" />
</mxCell>
<mxCell id="c7" value="HTTPS login + own-data APIs" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c2" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c8" value="HTTPS login + assigned reads" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c3" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c9" value="Native installation / configuration" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=open;dashed=1;" edge="1" parent="1" source="c5" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c10" value="Reference metadata only" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=open;dashed=1;" edge="1" parent="1" source="c4" target="c6">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c11" value="Optional experiment system (outside product)&#10;JMeter generator → Gateway APIs&#10;JMeter ← PerfMon ServerAgent host telemetry&#10;JMeter ← Shelly plug HTTP power&#10;Idle scenario sends zero HealthApp requests" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="420" y="710" width="600" height="190" />
</mxCell>
<mxCell id="c12" value="Synthetic workload only" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c11" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c13" value="Evidence: HealthApp.slnx; src/*/Program.cs; MeasurementGuidanceController; InsightCalculator.Trends; deploy/installer/*; tools/energy-jmeter. See software-architecture.md §§2, 6, 9, 11. Web/mobile clients are context actors, not implemented UI." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="960" width="1400" height="100" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1,65 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17" compressed="false">
<diagram id="p1" name="Service processes and communication">
<mxGraphModel dx="1700" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1750" pageHeight="1250" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c1" value="Service processes and communication" style="text;html=0;fontSize=24;fontStyle=1;align=left;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="15" width="1690" height="45" />
</mxCell>
<mxCell id="c2" value="ApiGateway process&#10;Authentication + PatientAccessMiddleware&#10;Controllers → named HttpClients&#10;Login / public guidance / assignments&#10;Persistent Data Protection key files" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1" link="../../src/ApiGateway/Program.cs">
<mxGeometry as="geometry" x="640" y="110" width="420" height="240" />
</mxCell>
<mxCell id="c3" value="PatientProfileService process&#10;PatientController&#10;→ PatientApplicationService&#10;→ PatientRepository / SqlPatientRepository&#10;→ PatientDbContext" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1" link="../../src/PatientProfileService/Program.cs">
<mxGeometry as="geometry" x="30" y="490" width="360" height="220" />
</mxCell>
<mxCell id="c4" value="ObservationService process&#10;ObservationController → application&#10;→ ObservationRepository / SQL / EF&#10;Patient existence client → Gateway" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1" link="../../src/ObservationService/Program.cs">
<mxGeometry as="geometry" x="470" y="490" width="360" height="220" />
</mxCell>
<mxCell id="c5" value="InsightsService process&#10;InsightsController → application&#10;→ stateless InsightCalculator&#10;Observation HTTP client → Gateway&#10;No DB" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1" link="../../src/InsightsService/Program.cs">
<mxGeometry as="geometry" x="910" y="490" width="360" height="220" />
</mxCell>
<mxCell id="c6" value="HealthOverviewService process&#10;Overview controller → application&#10;Three typed HTTP clients → Gateway&#10;Sequential profile/latest/insight reads&#10;No DB" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1" link="../../src/HealthOverviewService/Program.cs">
<mxGeometry as="geometry" x="1350" y="490" width="360" height="220" />
</mxCell>
<mxCell id="c7" value="Profile APIs&#10;HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c2" target="c3">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c8" value="Observation APIs&#10;HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c2" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c9" value="Summary / trend APIs&#10;HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c2" target="c5">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c10" value="Overview API&#10;HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c2" target="c6">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c11" value="Patient read&#10;HTTPS + X-Service-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c4" target="c2">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c12" value="History read&#10;HTTPS + X-Service-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c5" target="c2">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c13" value="Profile / latest / summary reads&#10;HTTPS + X-Service-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c6" target="c2">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c14" value="Patient DB&#10;patient + migration history&#10;Only Patient/Profile accesses it" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="850" width="360" height="150" />
</mxCell>
<mxCell id="c15" value="Observation DB&#10;observation + flattened context&#10;Only Observation accesses it" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="470" y="850" width="360" height="150" />
</mxCell>
<mxCell id="c16" value="EF Core / PostgreSQL" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c3" target="c14">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c17" value="EF Core / PostgreSQL" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c4" target="c15">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c18" value="No direct application-service network links, shared runtime library, shared domain objects, broker or cross-service DB access. Domain/client names do not change the configured Gateway origin. Each box is a separate project/process. Source links are attached to service boxes." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="1090" width="1680" height="100" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1,205 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" compressed="false" version="24.7.17">
<diagram id="Complete-application-domain:-health,-access-and-guidance" name="Complete application domain: health, access and guidance">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="2550" pageHeight="2100">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c1" value="Complete application domain: health, access and guidance" style="text;html=0;fontSize=26;fontStyle=1;align=left;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="20" width="2470" height="60" />
</mxCell>
<mxCell id="c2" value="Account&#10;Stable account identifier&#10;Trusted Patient / HealthcareProfessional role&#10;Pre-created credentials; no registration" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="50" y="170" width="480" height="195" />
</mxCell>
<mxCell id="c3" value="Patient profile&#10;Patient identifier; name; date of birth&#10;Optional contact information&#10;Persistently associated with patient account" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#dae8fc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="675" y="170" width="480" height="195" />
</mxCell>
<mxCell id="c4" value="Professional assignment&#10;Professional account ↔ patient identifier&#10;Predefined, read-only entitlement&#10;Multiple patients / multiple professionals" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1300" y="170" width="480" height="195" />
</mxCell>
<mxCell id="c5" value="Authentication grant&#10;Account identity and trusted role&#10;Issue/expiry instants; time limited&#10;No patient health information" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1925" y="170" width="480" height="195" />
</mxCell>
<mxCell id="c6" value="Blood-pressure observation&#10;Observation and patient identifiers&#10;Measurement instant; original recording time&#10;Systolic/diastolic pressure and pulse&#10;Optional original context text and note" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#dae8fc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="50" y="510" width="480" height="195" />
</mxCell>
<mxCell id="c7" value="Measurement context&#10;Setting; activity condition&#10;Optional preparation/technique details&#10;Optional additional circumstances&#10;Unknown retained; no inferred compliance" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#fff2cc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="675" y="510" width="480" height="195" />
</mxCell>
<mxCell id="c8" value="Context selection&#10;Optional setting and/or activity&#10;Both selected dimensions must match&#10;Unknown is an explicit selectable category" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#fff2cc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1300" y="510" width="480" height="195" />
</mxCell>
<mxCell id="c9" value="Measurement period&#10;Inclusive start and end instants&#10;Equal bounds valid; reversed invalid&#10;Measurement instants interpreted as UTC" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#fff2cc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1925" y="510" width="480" height="195" />
</mxCell>
<mxCell id="c10" value="Numerical health insight&#10;Systolic/diastolic/pulse arithmetic means&#10;Blood-pressure minima and maxima&#10;Contributing count; selected basis&#10;Context explanation; derived, not stored" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#dae8fc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="50" y="850" width="480" height="195" />
</mxCell>
<mxCell id="c11" value="Trend assessment&#10;Patient, period and context selection&#10;Contributing observation count&#10;Three separate metric assessments&#10;Recorded comparability and limitations" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#dae8fc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="675" y="850" width="480" height="195" />
</mxCell>
<mxCell id="c12" value="Recorded comparability&#10;Known similarities and differences&#10;Missing details and narrative conflicts&#10;Evidence/explanation; not certification" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#fff2cc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1300" y="850" width="480" height="195" />
</mxCell>
<mxCell id="c13" value="Measurement assessment&#10;Metric and unit; mean/minimum/maximum/range&#10;Temporal and overall direction; slope&#10;Reversals/successive variation&#10;Interpretation, reference comparison and hint" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#fff2cc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1925" y="850" width="480" height="195" />
</mxCell>
<mxCell id="c14" value="Health overview&#10;Patient profile&#10;Optional latest overall observation&#10;Optional selected-period numerical insight&#10;Explicit separate bases and absence reasons" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#dae8fc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="50" y="1190" width="480" height="195" />
</mxCell>
<mxCell id="c15" value="Clinical reference&#10;Applicable scope and measurement conditions&#10;Lower/upper boundaries and operators&#10;Source provenance; applicability limits&#10;General reference ≠ individual treatment goal" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#fff2cc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="675" y="1190" width="480" height="195" />
</mxCell>
<mxCell id="c16" value="Reference source&#10;Publication title and URL&#10;Publication update/review dates where supplied&#10;Provenance, not a patient record&#10;No automatic live source refresh" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#fff2cc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1300" y="1190" width="480" height="195" />
</mxCell>
<mxCell id="c17" value="Measurement guidance&#10;Requested setting/activity&#10;Applicable home/resting basis or unavailable&#10;Ordered instructions; explanations/limits&#10;Review date and source provenance" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#dae8fc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1925" y="1190" width="480" height="195" />
</mxCell>
<mxCell id="c18" value="Guidance instruction&#10;Sequence order; topic; instruction&#10;Preparation/equipment/position/measurement/&#10;planned monitoring/recording&#10;No stored compliance state" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#fff2cc;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1925" y="1530" width="480" height="195" />
</mxCell>
<mxCell id="c19" value="Patient account 1 ↔ profile 0..1; legacy profile account 0..1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c2" target="c3">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c20" value="Professional account 1 ↔ assignments 0..*" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c2" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c21" value="Assignments 0..* ↔ patient 1 (identifier may outlive data)" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c4" target="c3">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c22" value="Account 1 ↔ issued grants 0..*" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c2" target="c5">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c23" value="Patient 1 ↔ observations 0..*" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c3" target="c6">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c24" value="Observation 1 ↔ owned context 1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;startArrow=diamond;startFill=1;endArrow=none;" edge="1" parent="1" source="c6" target="c7">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c25" value="Selects recorded setting/activity; does not change them" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="c8" target="c7">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c26" value="Selects by measurement instant" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="c9" target="c6">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c27" value="Derived from 1..* selected observations" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="c6" target="c10">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c28" value="Derived from 0..* selected observations" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="c6" target="c11">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c29" value="Applied selection 1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c8" target="c10">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c30" value="Applied selection 1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c8" target="c11">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c31" value="Requested period 1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c9" target="c10">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c32" value="Requested period 1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c9" target="c11">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c33" value="Assessment 1 ↔ recorded comparability 1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;startArrow=diamond;startFill=1;endArrow=none;" edge="1" parent="1" source="c11" target="c12">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c34" value="Assessment 1 ↔ metric assessments 3" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;startArrow=diamond;startFill=1;endArrow=none;" edge="1" parent="1" source="c11" target="c13">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c35" value="Metric assessment 1 ↔ applicable reference 0..1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c13" target="c15">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c36" value="Reference 1 ↔ sources 1..*" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c15" target="c16">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c37" value="Overview 1 ↔ profile 1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c14" target="c3">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c38" value="Overview 1 ↔ latest overall 0..1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c14" target="c6">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c39" value="Overview 1 ↔ insight 0..1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c14" target="c10">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c40" value="Guidance 1 ↔ ordered instructions 0..*" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;startArrow=diamond;startFill=1;endArrow=none;" edge="1" parent="1" source="c17" target="c18">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c41" value="Guidance 1 ↔ cited sources 0..*" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c17" target="c16">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c42" value="Explains actual circumstances; never sets/saves context" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="c17" target="c7">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c43" value="Scope spans the responsibilities of all five application services: access/accounts/assignments, patient profiles, observation/context/history, numerical insights, metric trends/comparability/references, overview and public guidance. These are business concepts, not controllers, DTOs, repositories or framework classes. Derived views are values, not persisted entities. Professional role is an Account role; there is no separate stored professional profile. Measurement device/cuff are recorded descriptions, not independently managed device entities." style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#f5f5f5;" vertex="1" parent="1">
<mxGeometry as="geometry" x="45" y="1900" width="2460" height="145" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="Deployment-administration-concepts-(separate-supporting-domain)" name="Deployment administration concepts (separate supporting domain)">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="2100" pageHeight="1450">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c1" value="Deployment administration concepts (separate supporting domain)" style="text;html=0;fontSize=26;fontStyle=1;align=left;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="20" width="2020" height="60" />
</mxCell>
<mxCell id="c2" value="Deployment topology&#10;Selected service names&#10;Reachable host/platform/port assignments&#10;Colocated or distributed" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="45" y="170" width="575" height="200" />
</mxCell>
<mxCell id="c3" value="Deployment node&#10;Host and native platform&#10;Administrative access prerequisites&#10;One or more selected service installations" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="170" width="575" height="200" />
</mxCell>
<mxCell id="c4" value="Service installation&#10;Independent executable/process identity&#10;Listening endpoint; local configuration&#10;Lifecycle independent of peers" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1415" y="170" width="575" height="200" />
</mxCell>
<mxCell id="c5" value="Deployment material&#10;Deployment identifier&#10;Compatible service settings and account secrets&#10;Protected files, scoped to selected nodes" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="45" y="500" width="575" height="200" />
</mxCell>
<mxCell id="c6" value="Service configuration&#10;Listening address; dependencies/endpoints&#10;Credentials; certificate paths&#10;Own database connection where applicable" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="500" width="575" height="200" />
</mxCell>
<mxCell id="c7" value="Credential&#10;Service incoming/callback keys&#10;Synthetic account password/hash&#10;Separate database owner credential&#10;Private administrative material" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1415" y="500" width="575" height="200" />
</mxCell>
<mxCell id="c8" value="Owned database&#10;Owning persistent service&#10;Dedicated role and schema&#10;No database for derived-data services" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="45" y="830" width="575" height="200" />
</mxCell>
<mxCell id="c9" value="Service certificate&#10;Endpoint DNS/IP identity&#10;Private key and protected PFX&#10;Validity interval and trust chain" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="830" width="575" height="200" />
</mxCell>
<mxCell id="c10" value="Prototype certificate authority&#10;Public trust anchor&#10;Issues service certificates at preparation&#10;Generated signing key not retained" style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1415" y="830" width="575" height="200" />
</mxCell>
<mxCell id="c11" value="Topology 1 ↔ nodes 1..*" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c2" target="c3">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c12" value="Node 1 ↔ installations 1..*" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c3" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c13" value="Material 1 ↔ planned configurations 5" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c5" target="c6">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c14" value="Installation 1 ↔ configuration 1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c4" target="c6">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c15" value="Configuration references appropriate credentials" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c6" target="c7">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c16" value="Persistent installation 1 ↔ owned database 1; others 0" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c4" target="c8">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c17" value="Configuration 1 ↔ service certificate 1" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c6" target="c9">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c18" value="Authority 1 ↔ issued service certificates 1..*" style="edgeStyle=orthogonalEdgeStyle;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c10" target="c9">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c19" value="Supporting deployment concepts describe existing installer data and administrator responsibilities; they do not create extra application microservices or change the health domain. Source evidence: Deployment.cs, DatabaseProvisioning.cs, ConfigurationWriter.cs and native installers. External certificates are also supported. Experiment tools and operating-system frameworks remain infrastructure, not invented clinical entities." style="rounded=0;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;spacing=12;strokeColor=#555555;fillColor=#f5f5f5;" vertex="1" parent="1">
<mxGeometry as="geometry" x="45" y="1260" width="2010" height="140" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1,374 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17" compressed="false">
<diagram name="ApiGateway — implementation classes" id="ApiGateway---implementation-classes">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="2660" pageHeight="2476" pageScale="1">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="n1" value="ApiGateway — implementation classes" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fontSize=24;fontStyle=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="25" width="2580" height="45" />
</mxCell>
<mxCell id="n2" value="UML: + public, - private, # protected, ~ internal. Three compartments = classifier / attributes / operations. Hollow triangle: inheritance; dashed hollow triangle: interface realization. Solid line: attribute reference; dashed arrow: dependency; filled diamond: verified owned context. Each source type has its own classifier. Primary-constructor parameters are constructor operations, not invented fields." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="85" width="2580" height="100" />
</mxCell>
<mxCell id="n3" value="«class»&#10;AuthenticationController&#10;ApiGateway.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Controllers.AuthenticationController" sourceFiles="src/ApiGateway/Controllers/AuthenticationController.cs" link="../../src/ApiGateway/Controllers/AuthenticationController.cs">
<mxGeometry as="geometry" x="70" y="210" width="520" height="190" />
</mxCell>
<mxCell id="n4" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n3">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n5" value="+ AuthenticationController(PrototypeAccounts accounts,&#10;IOptionsMonitor&lt;BearerTokenOptions&gt; options)&#10;+ Login(LoginRequest request): IActionResult" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n3">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n3-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n3">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n6" value="«record»&#10;LoginRequest&#10;ApiGateway.Controllers.AuthenticationController" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Controllers.AuthenticationController.LoginRequest" sourceFiles="src/ApiGateway/Controllers/AuthenticationController.cs" link="../../src/ApiGateway/Controllers/AuthenticationController.cs">
<mxGeometry as="geometry" x="730" y="210" width="520" height="172" />
</mxCell>
<mxCell id="n7" value="+ AccountId: string {get, init}&#10;+ Password: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n6">
<mxGeometry as="geometry" x="0" y="82" width="520" height="54" />
</mxCell>
<mxCell id="n8" value="+ LoginRequest(string AccountId, string Password)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n6">
<mxGeometry as="geometry" x="0" y="136" width="520" height="36" />
</mxCell>
<mxCell id="n6-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n6">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="136" />
<mxPoint as="targetPoint" x="520" y="136" />
</mxGeometry>
</mxCell>
<mxCell id="n9" value="«class»&#10;HealthOverviewController&#10;ApiGateway.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Controllers.HealthOverviewController" sourceFiles="src/ApiGateway/Controllers/HealthOverviewController.cs" link="../../src/ApiGateway/Controllers/HealthOverviewController.cs">
<mxGeometry as="geometry" x="1390" y="210" width="520" height="226" />
</mxCell>
<mxCell id="n10" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n9">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n11" value="+ HealthOverviewController(IHttpClientFactory clients)&#10;+ GetOverview(Guid patientId, CancellationToken cancellationToken): Task&#10;- ForwardAsync(HttpMethod method, string path, CancellationToken&#10;cancellationToken): Task&#10;- WriteFailureAsync(int status): Task" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n9">
<mxGeometry as="geometry" x="0" y="118" width="520" height="108" />
</mxCell>
<mxCell id="n9-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n9">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n12" value="«class»&#10;InsightsController&#10;ApiGateway.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Controllers.InsightsController" sourceFiles="src/ApiGateway/Controllers/InsightsController.cs" link="../../src/ApiGateway/Controllers/InsightsController.cs">
<mxGeometry as="geometry" x="2050" y="210" width="520" height="244" />
</mxCell>
<mxCell id="n13" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n12">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n14" value="+ InsightsController(IHttpClientFactory clients)&#10;+ GetSummary(Guid patientId, CancellationToken cancellationToken): Task&#10;+ GetTrend(Guid patientId, CancellationToken cancellationToken): Task&#10;- ForwardAsync(HttpMethod method, string path, CancellationToken&#10;cancellationToken): Task&#10;- WriteFailureAsync(int status): Task" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n12">
<mxGeometry as="geometry" x="0" y="118" width="520" height="126" />
</mxCell>
<mxCell id="n12-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n12">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n15" value="«class»&#10;MeasurementGuidanceController&#10;ApiGateway.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Controllers.MeasurementGuidanceController" sourceFiles="src/ApiGateway/Controllers/MeasurementGuidanceController.cs" link="../../src/ApiGateway/Controllers/MeasurementGuidanceController.cs">
<mxGeometry as="geometry" x="70" y="634" width="520" height="154" />
</mxCell>
<mxCell id="n16" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n15">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n17" value="+ Get(string? setting, string? activityCondition): IActionResult" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n15">
<mxGeometry as="geometry" x="0" y="118" width="520" height="36" />
</mxCell>
<mxCell id="n15-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n15">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n18" value="«record»&#10;GuidanceSource&#10;ApiGateway.Controllers.MeasurementGuidanceController" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Controllers.MeasurementGuidanceController.GuidanceSource" sourceFiles="src/ApiGateway/Controllers/MeasurementGuidanceController.cs" link="../../src/ApiGateway/Controllers/MeasurementGuidanceController.cs">
<mxGeometry as="geometry" x="730" y="634" width="520" height="190" />
</mxCell>
<mxCell id="n19" value="+ Title: string {get, init}&#10;+ Url: string {get, init}&#10;+ UpdatedOn: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n18">
<mxGeometry as="geometry" x="0" y="82" width="520" height="72" />
</mxCell>
<mxCell id="n20" value="+ GuidanceSource(string Title, string Url, string UpdatedOn)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n18">
<mxGeometry as="geometry" x="0" y="154" width="520" height="36" />
</mxCell>
<mxCell id="n18-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n18">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="154" />
<mxPoint as="targetPoint" x="520" y="154" />
</mxGeometry>
</mxCell>
<mxCell id="n21" value="«record»&#10;GuidanceStep&#10;ApiGateway.Controllers.MeasurementGuidanceController" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Controllers.MeasurementGuidanceController.GuidanceStep" sourceFiles="src/ApiGateway/Controllers/MeasurementGuidanceController.cs" link="../../src/ApiGateway/Controllers/MeasurementGuidanceController.cs">
<mxGeometry as="geometry" x="1390" y="634" width="520" height="190" />
</mxCell>
<mxCell id="n22" value="+ Order: int {get, init}&#10;+ Topic: string {get, init}&#10;+ Instruction: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n21">
<mxGeometry as="geometry" x="0" y="82" width="520" height="72" />
</mxCell>
<mxCell id="n23" value="+ GuidanceStep(int Order, string Topic, string Instruction)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n21">
<mxGeometry as="geometry" x="0" y="154" width="520" height="36" />
</mxCell>
<mxCell id="n21-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n21">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="154" />
<mxPoint as="targetPoint" x="520" y="154" />
</mxGeometry>
</mxCell>
<mxCell id="n24" value="«class»&#10;ObservationController&#10;ApiGateway.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Controllers.ObservationController" sourceFiles="src/ApiGateway/Controllers/ObservationController.cs" link="../../src/ApiGateway/Controllers/ObservationController.cs">
<mxGeometry as="geometry" x="2050" y="634" width="520" height="424" />
</mxCell>
<mxCell id="n25" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n24">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n26" value="+ ObservationController(IHttpClientFactory clients)&#10;+ RecordObservation(Guid patientId, CancellationToken cancellationToken):&#10;Task&#10;+ DeleteObservation(Guid observationId, CancellationToken&#10;cancellationToken): Task&#10;+ UpdateObservation(Guid observationId, CancellationToken&#10;cancellationToken): Task&#10;+ PatchObservation(Guid observationId, CancellationToken&#10;cancellationToken): Task&#10;+ GetObservation(Guid observationId, CancellationToken&#10;cancellationToken): Task&#10;+ GetLatest(Guid patientId, CancellationToken cancellationToken): Task&#10;+ GetByPeriod(Guid patientId, CancellationToken cancellationToken): Task&#10;- ForwardAsync(HttpMethod method, string path, CancellationToken&#10;cancellationToken): Task&#10;- WriteFailureAsync(int status): Task" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n24">
<mxGeometry as="geometry" x="0" y="118" width="520" height="306" />
</mxCell>
<mxCell id="n24-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n24">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n27" value="«class»&#10;PatientController&#10;ApiGateway.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Controllers.PatientController" sourceFiles="src/ApiGateway/Controllers/PatientController.cs" link="../../src/ApiGateway/Controllers/PatientController.cs">
<mxGeometry as="geometry" x="70" y="1238" width="520" height="280" />
</mxCell>
<mxCell id="n28" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n27">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n29" value="+ PatientController(IHttpClientFactory clients)&#10;+ CreatePatient(CancellationToken cancellationToken): Task&#10;+ GetOwnPatient(CancellationToken cancellationToken): Task&#10;+ GetPatient(Guid patientId, CancellationToken cancellationToken): Task&#10;+ UpdatePatient(Guid patientId, CancellationToken cancellationToken): Task&#10;- ForwardAsync(HttpMethod method, string path, CancellationToken&#10;cancellationToken): Task&#10;- WriteFailureAsync(int status): Task" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n27">
<mxGeometry as="geometry" x="0" y="118" width="520" height="162" />
</mxCell>
<mxCell id="n27-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n27">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n30" value="«class»&#10;ProfessionalController&#10;ApiGateway.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Controllers.ProfessionalController" sourceFiles="src/ApiGateway/Controllers/ProfessionalController.cs" link="../../src/ApiGateway/Controllers/ProfessionalController.cs">
<mxGeometry as="geometry" x="730" y="1238" width="520" height="172" />
</mxCell>
<mxCell id="n31" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n30">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n32" value="+ ProfessionalController(ProfessionalAssignments assignments)&#10;+ GetAssignedPatients(): IActionResult" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n30">
<mxGeometry as="geometry" x="0" y="118" width="520" height="54" />
</mxCell>
<mxCell id="n30-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n30">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n33" value="«class»&#10;InternalServiceAuthenticationHandler&#10;ApiGateway.Security" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#f8cecc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Security.InternalServiceAuthenticationHandler" sourceFiles="src/ApiGateway/Security/InternalServiceAuthenticationHandler.cs" link="../../src/ApiGateway/Security/InternalServiceAuthenticationHandler.cs">
<mxGeometry as="geometry" x="1390" y="1238" width="520" height="226" />
</mxCell>
<mxCell id="n34" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n33">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n35" value="+&#10;InternalServiceAuthenticationHandler(IOptionsMonitor&lt;AuthenticationSchemeOptions&gt;&#10;options, ILoggerFactory logger, UrlEncoder encoder, IConfiguration&#10;configuration)&#10;# HandleAuthenticateAsync(): Task&lt;AuthenticateResult&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n33">
<mxGeometry as="geometry" x="0" y="118" width="520" height="108" />
</mxCell>
<mxCell id="n33-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n33">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n36" value="«class»&#10;PatientAccessMiddleware&#10;ApiGateway.Security" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#f8cecc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Security.PatientAccessMiddleware" sourceFiles="src/ApiGateway/Security/PatientAccessMiddleware.cs" link="../../src/ApiGateway/Security/PatientAccessMiddleware.cs">
<mxGeometry as="geometry" x="2050" y="1238" width="520" height="208" />
</mxCell>
<mxCell id="n37" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n36">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n38" value="+ PatientAccessMiddleware(RequestDelegate next)&#10;+ InvokeAsync(HttpContext context, IHttpClientFactory clients,&#10;IAuthorizationService authorization, ProfessionalAssignments&#10;assignments): Task" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n36">
<mxGeometry as="geometry" x="0" y="118" width="520" height="90" />
</mxCell>
<mxCell id="n36-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n36">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n39" value="«class»&#10;ProfessionalAssignments&#10;ApiGateway.Security" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#f8cecc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Security.ProfessionalAssignments" sourceFiles="src/ApiGateway/Security/ProfessionalAssignments.cs" link="../../src/ApiGateway/Security/ProfessionalAssignments.cs">
<mxGeometry as="geometry" x="70" y="1698" width="520" height="190" />
</mxCell>
<mxCell id="n40" value="- assignments: Dictionary&lt;string, Guid[]&gt; {readonly}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n39">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n41" value="+ ProfessionalAssignments(IConfiguration configuration)&#10;+ GetPatients(string accountId): IReadOnlyList&lt;Guid&gt;&#10;+ IsAssigned(string accountId, Guid patientId): bool" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n39">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n39-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n39">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n42" value="«class»&#10;PrototypeAccount&#10;ApiGateway.Security" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#f8cecc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Security.PrototypeAccount" sourceFiles="src/ApiGateway/Security/PrototypeAccounts.cs" link="../../src/ApiGateway/Security/PrototypeAccounts.cs">
<mxGeometry as="geometry" x="730" y="1698" width="520" height="190" />
</mxCell>
<mxCell id="n43" value="+ AccountId: string {get, set}&#10;+ Role: string {get, set}&#10;+ PasswordHash: string {get, set}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n42">
<mxGeometry as="geometry" x="0" y="82" width="520" height="72" />
</mxCell>
<mxCell id="n44" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n42">
<mxGeometry as="geometry" x="0" y="154" width="520" height="36" />
</mxCell>
<mxCell id="n42-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n42">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="154" />
<mxPoint as="targetPoint" x="520" y="154" />
</mxGeometry>
</mxCell>
<mxCell id="n45" value="«class»&#10;PrototypeAccounts&#10;ApiGateway.Security" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#f8cecc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Security.PrototypeAccounts" sourceFiles="src/ApiGateway/Security/PrototypeAccounts.cs" link="../../src/ApiGateway/Security/PrototypeAccounts.cs">
<mxGeometry as="geometry" x="1390" y="1698" width="520" height="208" />
</mxCell>
<mxCell id="n46" value="- accounts: Dictionary&lt;string, PrototypeAccount&gt; {readonly}&#10;- hasher: PasswordHasher&lt;PrototypeAccount&gt; {readonly}&#10;- dummy: PrototypeAccount {readonly}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n45">
<mxGeometry as="geometry" x="0" y="82" width="520" height="72" />
</mxCell>
<mxCell id="n47" value="+ PrototypeAccounts(IConfiguration configuration)&#10;+ Verify(string accountId, string password): PrototypeAccount?" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n45">
<mxGeometry as="geometry" x="0" y="154" width="520" height="54" />
</mxCell>
<mxCell id="n45-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n45">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="154" />
<mxPoint as="targetPoint" x="520" y="154" />
</mxGeometry>
</mxCell>
<mxCell id="n48" value="«class»&#10;Program&#10;ApiGateway" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#f5f5f5;strokeColor=#444444;" vertex="1" parent="1" sourceType="ApiGateway.Program" sourceFiles="src/ApiGateway/Program.cs" link="../../src/ApiGateway/Program.cs">
<mxGeometry as="geometry" x="2050" y="1698" width="520" height="172" />
</mxCell>
<mxCell id="n49" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n48">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n50" value="+ Main(string[] args): void {static}&#10;- GetBaseUri(IConfiguration configuration, string service): Uri {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n48">
<mxGeometry as="geometry" x="0" y="118" width="520" height="54" />
</mxCell>
<mxCell id="n48-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n48">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n51" value="«framework reference»&#10;ControllerBase" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="70" y="2086" width="520" height="80" />
</mxCell>
<mxCell id="n52" value="«framework reference»&#10;AuthenticationHandler&lt;AuthenticationSchemeOptions&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="2086" width="520" height="80" />
</mxCell>
<mxCell id="n53" value="«framework reference»&#10;IHttpClientFactory" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1390" y="2086" width="520" height="80" />
</mxCell>
<mxCell id="n54" value="«framework reference»&#10;IConfiguration" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="2050" y="2086" width="520" height="80" />
</mxCell>
<mxCell id="n55" value="«framework reference»&#10;ILoggerFactory" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="70" y="2196" width="520" height="80" />
</mxCell>
<mxCell id="n56" value="«framework reference»&#10;UrlEncoder" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="2196" width="520" height="80" />
</mxCell>
<mxCell id="n57" value="«framework reference»&#10;RequestDelegate" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1390" y="2196" width="520" height="80" />
</mxCell>
<mxCell id="e57-0" value="nested classifier" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n3" target="n6" relationship="nested">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-1" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n3" target="n45" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-2" value="nested classifier" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n15" target="n21" relationship="nested">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-3" value="nested classifier" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n15" target="n18" relationship="nested">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-4" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n21" target="n18" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-5" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n18" target="n21" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-6" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n30" target="n39" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-7" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n36" target="n39" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-8" value="accounts [0..*]; hasher [1]; dummy [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n45" target="n42" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-9" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n48" target="n33" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-10" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n48" target="n36" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-11" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n48" target="n39" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-12" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n48" target="n45" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-13" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n9" target="n53" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-14" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n12" target="n53" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-15" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n24" target="n53" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-16" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n27" target="n53" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-17" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n33" target="n54" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-18" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n39" target="n54" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-19" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n45" target="n54" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-20" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n33" target="n55" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-21" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n33" target="n56" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-22" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n36" target="n57" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-23" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n3" target="n51" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-24" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n9" target="n51" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-25" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n12" target="n51" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-26" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n15" target="n51" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-27" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n24" target="n51" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-28" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n27" target="n51" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-29" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n30" target="n51" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e57-30" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n33" target="n52" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="n58" value="Source-linked classifier headers. All declared members shown; compiler-generated record members and inherited framework members are omitted. Partial declarations are merged. Framework base/reference boxes are distinguished from service-defined types. A dependency is not ownership or a cross-service in-process call. See class-diagram-coverage.md for exact file/type coverage." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="2341" width="2580" height="110" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1,359 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17" compressed="false">
<diagram name="HealthOverviewService — implementation classes" id="HealthOverviewService---implementation-classes">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="2660" pageHeight="2402" pageScale="1">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="n459" value="HealthOverviewService — implementation classes" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fontSize=24;fontStyle=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="25" width="2580" height="45" />
</mxCell>
<mxCell id="n460" value="UML: + public, - private, # protected, ~ internal. Three compartments = classifier / attributes / operations. Hollow triangle: inheritance; dashed hollow triangle: interface realization. Solid line: attribute reference; dashed arrow: dependency; filled diamond: verified owned context. Each source type has its own classifier. Primary-constructor parameters are constructor operations, not invented fields." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="85" width="2580" height="100" />
</mxCell>
<mxCell id="n461" value="«class»&#10;HealthOverviewController&#10;HealthOverviewService.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Controllers.HealthOverviewController" sourceFiles="src/HealthOverviewService/Controllers/HealthOverviewController.cs" link="../../src/HealthOverviewService/Controllers/HealthOverviewController.cs">
<mxGeometry as="geometry" x="70" y="210" width="520" height="208" />
</mxCell>
<mxCell id="n462" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n461">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n463" value="+ HealthOverviewController(HealthOverviewApplicationService service)&#10;+ GetOverview(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;ActionResult&lt;HealthOverviewDto&gt;&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n461">
<mxGeometry as="geometry" x="0" y="118" width="520" height="90" />
</mxCell>
<mxCell id="n461-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n461">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n464" value="«class»&#10;HealthOverviewApplicationService&#10;HealthOverviewService.Application" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#e1d5e7;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Application.HealthOverviewApplicationService" sourceFiles="src/HealthOverviewService/Application/HealthOverviewApplicationService.cs" link="../../src/HealthOverviewService/Application/HealthOverviewApplicationService.cs">
<mxGeometry as="geometry" x="730" y="210" width="520" height="244" />
</mxCell>
<mxCell id="n465" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n464">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n466" value="+ HealthOverviewApplicationService(PatientProfileServiceClient patients,&#10;ObservationServiceClient observations, InsightsServiceClient insights)&#10;+ GetOverviewAsync(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;HealthOverviewDto?&gt;&#10;- NormalizeTimestamp(DateTime value): DateTime {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n464">
<mxGeometry as="geometry" x="0" y="118" width="520" height="126" />
</mxCell>
<mxCell id="n464-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n464">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n467" value="«record»&#10;ContextSelection&#10;HealthOverviewService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Contracts.ContextSelection" sourceFiles="src/HealthOverviewService/Contracts/HealthOverviewDto.cs" link="../../src/HealthOverviewService/Contracts/HealthOverviewDto.cs">
<mxGeometry as="geometry" x="1390" y="210" width="520" height="172" />
</mxCell>
<mxCell id="n468" value="+ Setting: string? {get, init}&#10;+ ActivityCondition: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n467">
<mxGeometry as="geometry" x="0" y="82" width="520" height="54" />
</mxCell>
<mxCell id="n469" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n467">
<mxGeometry as="geometry" x="0" y="136" width="520" height="36" />
</mxCell>
<mxCell id="n467-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n467">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="136" />
<mxPoint as="targetPoint" x="520" y="136" />
</mxGeometry>
</mxCell>
<mxCell id="n470" value="«record»&#10;HealthInsightDto&#10;HealthOverviewService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Contracts.HealthInsightDto" sourceFiles="src/HealthOverviewService/Contracts/HealthOverviewDto.cs" link="../../src/HealthOverviewService/Contracts/HealthOverviewDto.cs">
<mxGeometry as="geometry" x="2050" y="210" width="520" height="442" />
</mxCell>
<mxCell id="n471" value="+ PatientId: Guid {get, init}&#10;+ PeriodStart: DateTime {get, init}&#10;+ PeriodEnd: DateTime {get, init}&#10;+ AverageSystolic: decimal {get, init}&#10;+ AverageDiastolic: decimal {get, init}&#10;+ AveragePulse: decimal {get, init}&#10;+ MinSystolic: int {get, init}&#10;+ MaxSystolic: int {get, init}&#10;+ MinDiastolic: int {get, init}&#10;+ MaxDiastolic: int {get, init}&#10;+ AppliedSelection: ContextSelection {get, init}&#10;+ ContributingCount: int {get, init}&#10;+ ContextExplanation: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n470">
<mxGeometry as="geometry" x="0" y="82" width="520" height="252" />
</mxCell>
<mxCell id="n472" value="+ HealthInsightDto(Guid PatientId, DateTime PeriodStart, DateTime&#10;PeriodEnd, decimal AverageSystolic, decimal AverageDiastolic, decimal&#10;AveragePulse, int MinSystolic, int MaxSystolic, int MinDiastolic, int&#10;MaxDiastolic, ContextSelection AppliedSelection, int ContributingCount,&#10;string ContextExplanation)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n470">
<mxGeometry as="geometry" x="0" y="334" width="520" height="108" />
</mxCell>
<mxCell id="n470-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n470">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="334" />
<mxPoint as="targetPoint" x="520" y="334" />
</mxGeometry>
</mxCell>
<mxCell id="n473" value="«record»&#10;HealthOverviewDto&#10;HealthOverviewService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Contracts.HealthOverviewDto" sourceFiles="src/HealthOverviewService/Contracts/HealthOverviewDto.cs" link="../../src/HealthOverviewService/Contracts/HealthOverviewDto.cs">
<mxGeometry as="geometry" x="70" y="832" width="520" height="370" />
</mxCell>
<mxCell id="n474" value="+ Patient: PatientDto {get, init}&#10;+ LatestObservation: ObservationDto? {get, init}&#10;+ Insight: HealthInsightDto? {get, init}&#10;+ PeriodStart: DateTime {get, init}&#10;+ PeriodEnd: DateTime {get, init}&#10;+ InsightSelection: ContextSelection {get, init}&#10;+ InsightContributingCount: int {get, init}&#10;+ LatestObservationBasis: string {get, init}&#10;+ InsightExplanation: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n473">
<mxGeometry as="geometry" x="0" y="82" width="520" height="180" />
</mxCell>
<mxCell id="n475" value="+ HealthOverviewDto(PatientDto Patient, ObservationDto?&#10;LatestObservation, HealthInsightDto? Insight, DateTime PeriodStart,&#10;DateTime PeriodEnd, ContextSelection InsightSelection, int&#10;InsightContributingCount, string LatestObservationBasis, string&#10;InsightExplanation)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n473">
<mxGeometry as="geometry" x="0" y="262" width="520" height="108" />
</mxCell>
<mxCell id="n473-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n473">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="262" />
<mxPoint as="targetPoint" x="520" y="262" />
</mxGeometry>
</mxCell>
<mxCell id="n476" value="«record»&#10;MeasurementContextDto&#10;HealthOverviewService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Contracts.MeasurementContextDto" sourceFiles="src/HealthOverviewService/Contracts/HealthOverviewDto.cs" link="../../src/HealthOverviewService/Contracts/HealthOverviewDto.cs">
<mxGeometry as="geometry" x="730" y="832" width="520" height="316" />
</mxCell>
<mxCell id="n477" value="+ Setting: string {get, init}&#10;+ ActivityCondition: string {get, init}&#10;+ RestDurationMinutes: decimal? {get, init}&#10;+ BodyPosition: string? {get, init}&#10;+ MeasuredArm: string? {get, init}&#10;+ DeviceDetails: string? {get, init}&#10;+ CuffDetails: string? {get, init}&#10;+ AdditionalCircumstances: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n476">
<mxGeometry as="geometry" x="0" y="82" width="520" height="162" />
</mxCell>
<mxCell id="n478" value="+ MeasurementContextDto(string Setting, string ActivityCondition,&#10;decimal? RestDurationMinutes, string? BodyPosition, string? MeasuredArm,&#10;string? DeviceDetails, string? CuffDetails, string? AdditionalCircumstances)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n476">
<mxGeometry as="geometry" x="0" y="244" width="520" height="72" />
</mxCell>
<mxCell id="n476-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n476">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="244" />
<mxPoint as="targetPoint" x="520" y="244" />
</mxGeometry>
</mxCell>
<mxCell id="n479" value="«record»&#10;ObservationDto&#10;HealthOverviewService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Contracts.ObservationDto" sourceFiles="src/HealthOverviewService/Contracts/HealthOverviewDto.cs" link="../../src/HealthOverviewService/Contracts/HealthOverviewDto.cs">
<mxGeometry as="geometry" x="1390" y="832" width="520" height="334" />
</mxCell>
<mxCell id="n480" value="+ ObservationId: Guid {get, init}&#10;+ PatientId: Guid {get, init}&#10;+ MeasuredAt: DateTime {get, init}&#10;+ Systolic: int {get, init}&#10;+ Diastolic: int {get, init}&#10;+ Pulse: int {get, init}&#10;+ Context: string? {get, init}&#10;+ Note: string? {get, init}&#10;+ MeasurementContext: MeasurementContextDto {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n479">
<mxGeometry as="geometry" x="0" y="82" width="520" height="180" />
</mxCell>
<mxCell id="n481" value="+ ObservationDto(Guid ObservationId, Guid PatientId, DateTime&#10;MeasuredAt, int Systolic, int Diastolic, int Pulse, string? Context, string?&#10;Note, MeasurementContextDto MeasurementContext)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n479">
<mxGeometry as="geometry" x="0" y="262" width="520" height="72" />
</mxCell>
<mxCell id="n479-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n479">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="262" />
<mxPoint as="targetPoint" x="520" y="262" />
</mxGeometry>
</mxCell>
<mxCell id="n482" value="«record»&#10;PatientDto&#10;HealthOverviewService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Contracts.PatientDto" sourceFiles="src/HealthOverviewService/Contracts/HealthOverviewDto.cs" link="../../src/HealthOverviewService/Contracts/HealthOverviewDto.cs">
<mxGeometry as="geometry" x="2050" y="832" width="520" height="226" />
</mxCell>
<mxCell id="n483" value="+ PatientId: Guid {get, init}&#10;+ Name: string {get, init}&#10;+ DateOfBirth: DateOnly {get, init}&#10;+ ContactInfo: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n482">
<mxGeometry as="geometry" x="0" y="82" width="520" height="90" />
</mxCell>
<mxCell id="n484" value="+ PatientDto(Guid PatientId, string Name, DateOnly DateOfBirth, string?&#10;ContactInfo)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n482">
<mxGeometry as="geometry" x="0" y="172" width="520" height="54" />
</mxCell>
<mxCell id="n482-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n482">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="172" />
<mxPoint as="targetPoint" x="520" y="172" />
</mxGeometry>
</mxCell>
<mxCell id="n485" value="«class»&#10;HttpInsightsServiceClient&#10;HealthOverviewService.Clients" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Clients.HttpInsightsServiceClient" sourceFiles="src/HealthOverviewService/Clients/InsightsServiceClient.cs" link="../../src/HealthOverviewService/Clients/InsightsServiceClient.cs">
<mxGeometry as="geometry" x="70" y="1382" width="520" height="208" />
</mxCell>
<mxCell id="n486" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n485">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n487" value="+ HttpInsightsServiceClient(HttpClient client)&#10;+ GetSummaryAsync(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;HealthInsightDto?&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n485">
<mxGeometry as="geometry" x="0" y="118" width="520" height="90" />
</mxCell>
<mxCell id="n485-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n485">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n488" value="«class»&#10;HttpObservationServiceClient&#10;HealthOverviewService.Clients" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Clients.HttpObservationServiceClient" sourceFiles="src/HealthOverviewService/Clients/ObservationServiceClient.cs" link="../../src/HealthOverviewService/Clients/ObservationServiceClient.cs">
<mxGeometry as="geometry" x="730" y="1382" width="520" height="190" />
</mxCell>
<mxCell id="n489" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n488">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n490" value="+ HttpObservationServiceClient(HttpClient client)&#10;+ GetLatestAsync(Guid patientId, CancellationToken cancellationToken):&#10;Task&lt;ObservationDto?&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n488">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n488-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n488">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n491" value="«class»&#10;HttpPatientProfileServiceClient&#10;HealthOverviewService.Clients" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Clients.HttpPatientProfileServiceClient" sourceFiles="src/HealthOverviewService/Clients/PatientProfileServiceClient.cs" link="../../src/HealthOverviewService/Clients/PatientProfileServiceClient.cs">
<mxGeometry as="geometry" x="1390" y="1382" width="520" height="190" />
</mxCell>
<mxCell id="n492" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n491">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n493" value="+ HttpPatientProfileServiceClient(HttpClient client)&#10;+ GetPatientAsync(Guid patientId, CancellationToken cancellationToken):&#10;Task&lt;PatientDto?&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n491">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n491-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n491">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n494" value="«abstract class»&#10;InsightsServiceClient&#10;HealthOverviewService.Clients" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Clients.InsightsServiceClient" sourceFiles="src/HealthOverviewService/Clients/InsightsServiceClient.cs" link="../../src/HealthOverviewService/Clients/InsightsServiceClient.cs">
<mxGeometry as="geometry" x="2050" y="1382" width="520" height="190" />
</mxCell>
<mxCell id="n495" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n494">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n496" value="+ GetSummaryAsync(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;HealthInsightDto?&gt; {abstract}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n494">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n494-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n494">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n497" value="«abstract class»&#10;ObservationServiceClient&#10;HealthOverviewService.Clients" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Clients.ObservationServiceClient" sourceFiles="src/HealthOverviewService/Clients/ObservationServiceClient.cs" link="../../src/HealthOverviewService/Clients/ObservationServiceClient.cs">
<mxGeometry as="geometry" x="70" y="1770" width="520" height="172" />
</mxCell>
<mxCell id="n498" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n497">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n499" value="+ GetLatestAsync(Guid patientId, CancellationToken cancellationToken):&#10;Task&lt;ObservationDto?&gt; {abstract}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n497">
<mxGeometry as="geometry" x="0" y="118" width="520" height="54" />
</mxCell>
<mxCell id="n497-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n497">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n500" value="«abstract class»&#10;PatientProfileServiceClient&#10;HealthOverviewService.Clients" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Clients.PatientProfileServiceClient" sourceFiles="src/HealthOverviewService/Clients/PatientProfileServiceClient.cs" link="../../src/HealthOverviewService/Clients/PatientProfileServiceClient.cs">
<mxGeometry as="geometry" x="730" y="1770" width="520" height="172" />
</mxCell>
<mxCell id="n501" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n500">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n502" value="+ GetPatientAsync(Guid patientId, CancellationToken cancellationToken):&#10;Task&lt;PatientDto?&gt; {abstract}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n500">
<mxGeometry as="geometry" x="0" y="118" width="520" height="54" />
</mxCell>
<mxCell id="n500-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n500">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n503" value="«class»&#10;Program&#10;HealthOverviewService" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#f5f5f5;strokeColor=#444444;" vertex="1" parent="1" sourceType="HealthOverviewService.Program" sourceFiles="src/HealthOverviewService/Program.cs" link="../../src/HealthOverviewService/Program.cs">
<mxGeometry as="geometry" x="1390" y="1770" width="520" height="172" />
</mxCell>
<mxCell id="n504" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n503">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n505" value="+ Main(string[] args): void {static}&#10;- GetGatewayUri(IConfiguration configuration): Uri {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n503">
<mxGeometry as="geometry" x="0" y="118" width="520" height="54" />
</mxCell>
<mxCell id="n503-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n503">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n506" value="«framework reference»&#10;ControllerBase" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="70" y="2122" width="520" height="80" />
</mxCell>
<mxCell id="n507" value="«framework reference»&#10;HttpClient" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="2122" width="520" height="80" />
</mxCell>
<mxCell id="e507-0" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n464" target="n494" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-1" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n464" target="n497" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-2" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n464" target="n500" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-3" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n464" target="n467" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-4" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n464" target="n473" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-5" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n494" target="n467" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-6" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n494" target="n470" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-7" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n485" target="n494" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-8" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n485" target="n467" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-9" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n485" target="n470" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-10" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n497" target="n479" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-11" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n488" target="n497" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-12" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n488" target="n479" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-13" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n500" target="n482" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-14" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n491" target="n500" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-15" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n491" target="n482" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-16" value="MeasurementContext [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n479" target="n476" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-17" value="AppliedSelection [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n470" target="n467" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-18" value="InsightSelection [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n473" target="n467" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-19" value="Patient [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n473" target="n482" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-20" value="LatestObservation [0..1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n473" target="n479" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-21" value="Insight [0..1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n473" target="n470" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-22" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n461" target="n464" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-23" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n461" target="n467" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-24" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n461" target="n473" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-25" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n503" target="n464" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-26" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n503" target="n494" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-27" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n503" target="n485" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-28" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n503" target="n497" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-29" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n503" target="n488" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-30" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n503" target="n500" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-31" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n503" target="n491" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-32" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n485" target="n507" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-33" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n488" target="n507" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-34" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n491" target="n507" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e507-35" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n461" target="n506" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="n508" value="Source-linked classifier headers. All declared members shown; compiler-generated record members and inherited framework members are omitted. Partial declarations are merged. Framework base/reference boxes are distinguished from service-defined types. A dependency is not ownership or a cross-service in-process call. See class-diagram-coverage.md for exact file/type coverage." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="2267" width="2580" height="110" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1,368 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17" compressed="false">
<diagram name="InsightsService — implementation classes" id="InsightsService---implementation-classes">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="2660" pageHeight="2816" pageScale="1">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="n353" value="InsightsService — implementation classes" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fontSize=24;fontStyle=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="25" width="2580" height="45" />
</mxCell>
<mxCell id="n354" value="UML: + public, - private, # protected, ~ internal. Three compartments = classifier / attributes / operations. Hollow triangle: inheritance; dashed hollow triangle: interface realization. Solid line: attribute reference; dashed arrow: dependency; filled diamond: verified owned context. Each source type has its own classifier. Primary-constructor parameters are constructor operations, not invented fields." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="85" width="2580" height="100" />
</mxCell>
<mxCell id="n355" value="«class»&#10;InsightsController&#10;InsightsService.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Controllers.InsightsController" sourceFiles="src/InsightsService/Controllers/InsightsController.cs" link="../../src/InsightsService/Controllers/InsightsController.cs">
<mxGeometry as="geometry" x="70" y="210" width="520" height="262" />
</mxCell>
<mxCell id="n356" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n355">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n357" value="+ InsightsController(InsightsApplicationService service)&#10;+ GetSummary(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;ActionResult&lt;HealthInsightDto&gt;&gt;&#10;+ GetTrend(Guid patientId, DateTime from, DateTime to, ContextSelection&#10;selection, CancellationToken cancellationToken):&#10;Task&lt;ActionResult&lt;TrendAssessment&gt;&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n355">
<mxGeometry as="geometry" x="0" y="118" width="520" height="144" />
</mxCell>
<mxCell id="n355-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n355">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n358" value="«class»&#10;InsightsApplicationService&#10;InsightsService.Application" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#e1d5e7;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Application.InsightsApplicationService" sourceFiles="src/InsightsService/Application/InsightsApplicationService.cs" link="../../src/InsightsService/Application/InsightsApplicationService.cs">
<mxGeometry as="geometry" x="730" y="210" width="520" height="298" />
</mxCell>
<mxCell id="n359" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n358">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n360" value="+ InsightsApplicationService(ObservationServiceClient observations,&#10;InsightCalculator calculator)&#10;+ GetSummaryAsync(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;HealthInsight?&gt;&#10;+ GetTrendAsync(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;TrendAssessment&gt;&#10;- NormalizeTimestamp(DateTime value): DateTime {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n358">
<mxGeometry as="geometry" x="0" y="118" width="520" height="180" />
</mxCell>
<mxCell id="n358-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n358">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n361" value="«record»&#10;ClinicalReference&#10;InsightsService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Domain.ClinicalReference" sourceFiles="src/InsightsService/Domain/TrendAssessment.cs" link="../../src/InsightsService/Domain/TrendAssessment.cs">
<mxGeometry as="geometry" x="1390" y="210" width="520" height="298" />
</mxCell>
<mxCell id="n362" value="+ Scope: string {get, init}&#10;+ LowerBoundary: decimal? {get, init}&#10;+ LowerComparison: string? {get, init}&#10;+ UpperBoundary: decimal {get, init}&#10;+ UpperComparison: string {get, init}&#10;+ Sources: IReadOnlyList&lt;ReferenceSource&gt; {get, init}&#10;+ Limitation: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n361">
<mxGeometry as="geometry" x="0" y="82" width="520" height="144" />
</mxCell>
<mxCell id="n363" value="+ ClinicalReference(string Scope, decimal? LowerBoundary, string?&#10;LowerComparison, decimal UpperBoundary, string UpperComparison,&#10;IReadOnlyList&lt;ReferenceSource&gt; Sources, string Limitation)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n361">
<mxGeometry as="geometry" x="0" y="226" width="520" height="72" />
</mxCell>
<mxCell id="n361-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n361">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="226" />
<mxPoint as="targetPoint" x="520" y="226" />
</mxGeometry>
</mxCell>
<mxCell id="n364" value="«record»&#10;ComparabilityAssessment&#10;InsightsService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Domain.ComparabilityAssessment" sourceFiles="src/InsightsService/Domain/TrendAssessment.cs" link="../../src/InsightsService/Domain/TrendAssessment.cs">
<mxGeometry as="geometry" x="2050" y="210" width="520" height="298" />
</mxCell>
<mxCell id="n365" value="+ Status: string {get, init}&#10;+ KnownSimilarities: IReadOnlyList&lt;string&gt; {get, init}&#10;+ KnownDifferences: IReadOnlyList&lt;string&gt; {get, init}&#10;+ MissingDetails: IReadOnlyList&lt;string&gt; {get, init}&#10;+ Conflicts: IReadOnlyList&lt;string&gt; {get, init}&#10;+ Explanation: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n364">
<mxGeometry as="geometry" x="0" y="82" width="520" height="126" />
</mxCell>
<mxCell id="n366" value="+ ComparabilityAssessment(string Status, IReadOnlyList&lt;string&gt;&#10;KnownSimilarities, IReadOnlyList&lt;string&gt; KnownDifferences,&#10;IReadOnlyList&lt;string&gt; MissingDetails, IReadOnlyList&lt;string&gt; Conflicts,&#10;string Explanation)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n364">
<mxGeometry as="geometry" x="0" y="208" width="520" height="90" />
</mxCell>
<mxCell id="n364-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n364">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="208" />
<mxPoint as="targetPoint" x="520" y="208" />
</mxGeometry>
</mxCell>
<mxCell id="n367" value="«record»&#10;ContextSelection&#10;InsightsService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Domain.ContextSelection" sourceFiles="src/InsightsService/Domain/ContextSelection.cs" link="../../src/InsightsService/Domain/ContextSelection.cs">
<mxGeometry as="geometry" x="70" y="688" width="520" height="172" />
</mxCell>
<mxCell id="n368" value="+ Setting: string? {get, init}&#10;+ ActivityCondition: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n367">
<mxGeometry as="geometry" x="0" y="82" width="520" height="54" />
</mxCell>
<mxCell id="n369" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n367">
<mxGeometry as="geometry" x="0" y="136" width="520" height="36" />
</mxCell>
<mxCell id="n367-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n367">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="136" />
<mxPoint as="targetPoint" x="520" y="136" />
</mxGeometry>
</mxCell>
<mxCell id="n370" value="«record»&#10;HealthInsight&#10;InsightsService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Domain.HealthInsight" sourceFiles="src/InsightsService/Domain/HealthInsight.cs" link="../../src/InsightsService/Domain/HealthInsight.cs">
<mxGeometry as="geometry" x="730" y="688" width="520" height="442" />
</mxCell>
<mxCell id="n371" value="+ PatientId: Guid {get, init}&#10;+ PeriodStart: DateTime {get, init}&#10;+ PeriodEnd: DateTime {get, init}&#10;+ AverageSystolic: decimal {get, init}&#10;+ AverageDiastolic: decimal {get, init}&#10;+ AveragePulse: decimal {get, init}&#10;+ MinSystolic: int {get, init}&#10;+ MaxSystolic: int {get, init}&#10;+ MinDiastolic: int {get, init}&#10;+ MaxDiastolic: int {get, init}&#10;+ AppliedSelection: ContextSelection {get, init}&#10;+ ContributingCount: int {get, init}&#10;+ ContextExplanation: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n370">
<mxGeometry as="geometry" x="0" y="82" width="520" height="252" />
</mxCell>
<mxCell id="n372" value="+ HealthInsight(Guid PatientId, DateTime PeriodStart, DateTime PeriodEnd,&#10;decimal AverageSystolic, decimal AverageDiastolic, decimal AveragePulse,&#10;int MinSystolic, int MaxSystolic, int MinDiastolic, int MaxDiastolic,&#10;ContextSelection AppliedSelection, int ContributingCount, string&#10;ContextExplanation)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n370">
<mxGeometry as="geometry" x="0" y="334" width="520" height="108" />
</mxCell>
<mxCell id="n370-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n370">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="334" />
<mxPoint as="targetPoint" x="520" y="334" />
</mxGeometry>
</mxCell>
<mxCell id="n373" value="«class»&#10;InsightCalculator&#10;InsightsService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Domain.InsightCalculator" sourceFiles="src/InsightsService/Domain/InsightCalculator.Trends.cs|src/InsightsService/Domain/InsightCalculator.cs" link="../../src/InsightsService/Domain/InsightCalculator.Trends.cs">
<mxGeometry as="geometry" x="1390" y="688" width="520" height="532" />
</mxCell>
<mxCell id="n374" value="- GeneralLimits: string {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n373">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n375" value="+ CalculateTrend(Guid patientId, DateTime from, DateTime to,&#10;IReadOnlyList&lt;ObservationDto&gt; observations, ContextSelection selection):&#10;TrendAssessment&#10;- AssessMeasurement(string metric, string unit,&#10;IReadOnlyList&lt;ObservationDto&gt; observations, Func&lt;ObservationDto, int&gt;&#10;value, ComparabilityAssessment comparability): MeasurementAssessment&#10;{static}&#10;- SelectReference(string metric, IReadOnlyList&lt;ObservationDto&gt;&#10;observations, ComparabilityAssessment comparability): ClinicalReference?&#10;{static}&#10;- IsHigh(decimal value, ClinicalReference reference): bool {static}&#10;- IsLow(decimal value, ClinicalReference reference): bool {static}&#10;- Round(decimal value): decimal {static}&#10;- Format(decimal value): string {static}&#10;- AssessComparability(IReadOnlyList&lt;ObservationDto&gt; observations):&#10;ComparabilityAssessment {static}&#10;+ CalculateSummary(Guid patientId, DateTime from, DateTime to,&#10;IReadOnlyList&lt;ObservationDto&gt; observations, ContextSelection selection):&#10;HealthInsight?&#10;- DescribeContext(IReadOnlyList&lt;ObservationDto&gt; observations): string&#10;{static}&#10;- Counts(IEnumerable&lt;string&gt; values): string {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n373">
<mxGeometry as="geometry" x="0" y="118" width="520" height="414" />
</mxCell>
<mxCell id="n373-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n373">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n376" value="«record»&#10;MeasurementAssessment&#10;InsightsService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Domain.MeasurementAssessment" sourceFiles="src/InsightsService/Domain/TrendAssessment.cs" link="../../src/InsightsService/Domain/TrendAssessment.cs">
<mxGeometry as="geometry" x="2050" y="688" width="520" height="532" />
</mxCell>
<mxCell id="n377" value="+ Metric: string {get, init}&#10;+ Unit: string {get, init}&#10;+ Mean: decimal? {get, init}&#10;+ Minimum: int? {get, init}&#10;+ Maximum: int? {get, init}&#10;+ Range: int? {get, init}&#10;+ DistinctTimestampCount: int {get, init}&#10;+ Direction: string {get, init}&#10;+ OverallDirection: string {get, init}&#10;+ SlopePerDay: decimal? {get, init}&#10;+ ReversalCount: int {get, init}&#10;+ TotalSuccessiveChange: decimal? {get, init}&#10;+ NumericalExplanation: string {get, init}&#10;+ Reference: ClinicalReference? {get, init}&#10;+ ReferenceComparison: string {get, init}&#10;+ Interpretation: string {get, init}&#10;+ Hint: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n376">
<mxGeometry as="geometry" x="0" y="82" width="520" height="324" />
</mxCell>
<mxCell id="n378" value="+ MeasurementAssessment(string Metric, string Unit, decimal? Mean, int?&#10;Minimum, int? Maximum, int? Range, int DistinctTimestampCount, string&#10;Direction, string OverallDirection, decimal? SlopePerDay, int&#10;ReversalCount, decimal? TotalSuccessiveChange, string&#10;NumericalExplanation, ClinicalReference? Reference, string&#10;ReferenceComparison, string Interpretation, string Hint)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n376">
<mxGeometry as="geometry" x="0" y="406" width="520" height="126" />
</mxCell>
<mxCell id="n376-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n376">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="406" />
<mxPoint as="targetPoint" x="520" y="406" />
</mxGeometry>
</mxCell>
<mxCell id="n379" value="«record»&#10;ReferenceSource&#10;InsightsService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Domain.ReferenceSource" sourceFiles="src/InsightsService/Domain/TrendAssessment.cs" link="../../src/InsightsService/Domain/TrendAssessment.cs">
<mxGeometry as="geometry" x="70" y="1400" width="520" height="208" />
</mxCell>
<mxCell id="n380" value="+ Title: string {get, init}&#10;+ Url: string {get, init}&#10;+ Updated: string {get, init}&#10;+ Reviewed: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n379">
<mxGeometry as="geometry" x="0" y="82" width="520" height="90" />
</mxCell>
<mxCell id="n381" value="+ ReferenceSource(string Title, string Url, string Updated, string Reviewed)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n379">
<mxGeometry as="geometry" x="0" y="172" width="520" height="36" />
</mxCell>
<mxCell id="n379-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n379">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="172" />
<mxPoint as="targetPoint" x="520" y="172" />
</mxGeometry>
</mxCell>
<mxCell id="n382" value="«record»&#10;TrendAssessment&#10;InsightsService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Domain.TrendAssessment" sourceFiles="src/InsightsService/Domain/TrendAssessment.cs" link="../../src/InsightsService/Domain/TrendAssessment.cs">
<mxGeometry as="geometry" x="730" y="1400" width="520" height="370" />
</mxCell>
<mxCell id="n383" value="+ PatientId: Guid {get, init}&#10;+ PeriodStart: DateTime {get, init}&#10;+ PeriodEnd: DateTime {get, init}&#10;+ AppliedSelection: ContextSelection {get, init}&#10;+ ContributingCount: int {get, init}&#10;+ Comparability: ComparabilityAssessment {get, init}&#10;+ Systolic: MeasurementAssessment {get, init}&#10;+ Diastolic: MeasurementAssessment {get, init}&#10;+ Pulse: MeasurementAssessment {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n382">
<mxGeometry as="geometry" x="0" y="82" width="520" height="180" />
</mxCell>
<mxCell id="n384" value="+ TrendAssessment(Guid PatientId, DateTime PeriodStart, DateTime&#10;PeriodEnd, ContextSelection AppliedSelection, int ContributingCount,&#10;ComparabilityAssessment Comparability, MeasurementAssessment&#10;Systolic, MeasurementAssessment Diastolic, MeasurementAssessment&#10;Pulse)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n382">
<mxGeometry as="geometry" x="0" y="262" width="520" height="108" />
</mxCell>
<mxCell id="n382-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n382">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="262" />
<mxPoint as="targetPoint" x="520" y="262" />
</mxGeometry>
</mxCell>
<mxCell id="n385" value="«record»&#10;HealthInsightDto&#10;InsightsService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Contracts.HealthInsightDto" sourceFiles="src/InsightsService/Contracts/HealthInsightDto.cs" link="../../src/InsightsService/Contracts/HealthInsightDto.cs">
<mxGeometry as="geometry" x="1390" y="1400" width="520" height="442" />
</mxCell>
<mxCell id="n386" value="+ PatientId: Guid {get, init}&#10;+ PeriodStart: DateTime {get, init}&#10;+ PeriodEnd: DateTime {get, init}&#10;+ AverageSystolic: decimal {get, init}&#10;+ AverageDiastolic: decimal {get, init}&#10;+ AveragePulse: decimal {get, init}&#10;+ MinSystolic: int {get, init}&#10;+ MaxSystolic: int {get, init}&#10;+ MinDiastolic: int {get, init}&#10;+ MaxDiastolic: int {get, init}&#10;+ AppliedSelection: ContextSelection {get, init}&#10;+ ContributingCount: int {get, init}&#10;+ ContextExplanation: string {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n385">
<mxGeometry as="geometry" x="0" y="82" width="520" height="252" />
</mxCell>
<mxCell id="n387" value="+ HealthInsightDto(Guid PatientId, DateTime PeriodStart, DateTime&#10;PeriodEnd, decimal AverageSystolic, decimal AverageDiastolic, decimal&#10;AveragePulse, int MinSystolic, int MaxSystolic, int MinDiastolic, int&#10;MaxDiastolic, ContextSelection AppliedSelection, int ContributingCount,&#10;string ContextExplanation)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n385">
<mxGeometry as="geometry" x="0" y="334" width="520" height="108" />
</mxCell>
<mxCell id="n385-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n385">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="334" />
<mxPoint as="targetPoint" x="520" y="334" />
</mxGeometry>
</mxCell>
<mxCell id="n388" value="«record»&#10;MeasurementContextDto&#10;InsightsService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Contracts.MeasurementContextDto" sourceFiles="src/InsightsService/Contracts/ObservationDto.cs" link="../../src/InsightsService/Contracts/ObservationDto.cs">
<mxGeometry as="geometry" x="2050" y="1400" width="520" height="316" />
</mxCell>
<mxCell id="n389" value="+ Setting: string? {get, init}&#10;+ ActivityCondition: string? {get, init}&#10;+ RestDurationMinutes: decimal? {get, init}&#10;+ BodyPosition: string? {get, init}&#10;+ MeasuredArm: string? {get, init}&#10;+ DeviceDetails: string? {get, init}&#10;+ CuffDetails: string? {get, init}&#10;+ AdditionalCircumstances: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n388">
<mxGeometry as="geometry" x="0" y="82" width="520" height="162" />
</mxCell>
<mxCell id="n390" value="+ MeasurementContextDto(string? Setting, string? ActivityCondition,&#10;decimal? RestDurationMinutes, string? BodyPosition, string? MeasuredArm,&#10;string? DeviceDetails, string? CuffDetails, string? AdditionalCircumstances)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n388">
<mxGeometry as="geometry" x="0" y="244" width="520" height="72" />
</mxCell>
<mxCell id="n388-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n388">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="244" />
<mxPoint as="targetPoint" x="520" y="244" />
</mxGeometry>
</mxCell>
<mxCell id="n391" value="«record»&#10;ObservationDto&#10;InsightsService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Contracts.ObservationDto" sourceFiles="src/InsightsService/Contracts/ObservationDto.cs" link="../../src/InsightsService/Contracts/ObservationDto.cs">
<mxGeometry as="geometry" x="70" y="2022" width="520" height="334" />
</mxCell>
<mxCell id="n392" value="+ ObservationId: Guid {get, init}&#10;+ PatientId: Guid {get, init}&#10;+ MeasuredAt: DateTime {get, init}&#10;+ Systolic: int {get, init}&#10;+ Diastolic: int {get, init}&#10;+ Pulse: int {get, init}&#10;+ MeasurementContext: MeasurementContextDto? {get, init}&#10;+ Context: string? {get, init}&#10;+ Note: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n391">
<mxGeometry as="geometry" x="0" y="82" width="520" height="180" />
</mxCell>
<mxCell id="n393" value="+ ObservationDto(Guid ObservationId, Guid PatientId, DateTime&#10;MeasuredAt, int Systolic, int Diastolic, int Pulse, MeasurementContextDto?&#10;MeasurementContext = null, string? Context = null, string? Note = null)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n391">
<mxGeometry as="geometry" x="0" y="262" width="520" height="72" />
</mxCell>
<mxCell id="n391-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n391">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="262" />
<mxPoint as="targetPoint" x="520" y="262" />
</mxGeometry>
</mxCell>
<mxCell id="n394" value="«class»&#10;HttpObservationServiceClient&#10;InsightsService.Clients" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Clients.HttpObservationServiceClient" sourceFiles="src/InsightsService/Clients/HttpObservationServiceClient.cs" link="../../src/InsightsService/Clients/HttpObservationServiceClient.cs">
<mxGeometry as="geometry" x="730" y="2022" width="520" height="208" />
</mxCell>
<mxCell id="n395" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n394">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n396" value="+ HttpObservationServiceClient(HttpClient client)&#10;+ GetByPeriodAsync(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;List&lt;ObservationDto&gt;&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n394">
<mxGeometry as="geometry" x="0" y="118" width="520" height="90" />
</mxCell>
<mxCell id="n394-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n394">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n397" value="«interface»&#10;ObservationServiceClient&#10;InsightsService.Clients" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Clients.ObservationServiceClient" sourceFiles="src/InsightsService/Clients/ObservationServiceClient.cs" link="../../src/InsightsService/Clients/ObservationServiceClient.cs">
<mxGeometry as="geometry" x="1390" y="2022" width="520" height="190" />
</mxCell>
<mxCell id="n398" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n397">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n399" value="+ GetByPeriodAsync(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;List&lt;ObservationDto&gt;&gt; {abstract}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n397">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n397-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n397">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n400" value="«class»&#10;Program&#10;InsightsService" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#f5f5f5;strokeColor=#444444;" vertex="1" parent="1" sourceType="InsightsService.Program" sourceFiles="src/InsightsService/Program.cs" link="../../src/InsightsService/Program.cs">
<mxGeometry as="geometry" x="2050" y="2022" width="520" height="172" />
</mxCell>
<mxCell id="n401" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n400">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n402" value="+ Main(string[] args): void {static}&#10;- GetGatewayUri(IConfiguration configuration): Uri {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n400">
<mxGeometry as="geometry" x="0" y="118" width="520" height="54" />
</mxCell>
<mxCell id="n400-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n400">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n403" value="«framework reference»&#10;ControllerBase" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="70" y="2536" width="520" height="80" />
</mxCell>
<mxCell id="n404" value="«framework reference»&#10;HttpClient" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="2536" width="520" height="80" />
</mxCell>
<mxCell id="e404-0" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n358" target="n397" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-1" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n358" target="n367" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-2" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n358" target="n370" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-3" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n358" target="n373" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-4" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n358" target="n382" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-5" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=block;endFill=0;" edge="1" parent="1" source="n394" target="n397" relationship="realization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-6" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n394" target="n391" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-7" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n394" target="n367" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-8" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n397" target="n391" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-9" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n397" target="n367" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-10" value="AppliedSelection [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n385" target="n367" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-11" value="MeasurementContext [0..1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n391" target="n388" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-12" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n355" target="n358" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-13" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n355" target="n385" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-14" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n355" target="n367" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-15" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n355" target="n382" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-16" value="AppliedSelection [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n370" target="n367" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-17" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n373" target="n391" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-18" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n373" target="n367" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-19" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n373" target="n370" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-20" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n373" target="n382" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-21" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n373" target="n364" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-22" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n373" target="n376" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-23" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n373" target="n361" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-24" value="AppliedSelection [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n382" target="n367" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-25" value="Comparability [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n382" target="n364" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-26" value="Systolic [1]; Diastolic [1]; Pulse [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n382" target="n376" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-27" value="Reference [0..1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n376" target="n361" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-28" value="Sources [0..*]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n361" target="n379" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-29" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n400" target="n358" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-30" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n400" target="n394" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-31" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n400" target="n373" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-32" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n394" target="n404" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e404-33" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n355" target="n403" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="n405" value="Source-linked classifier headers. All declared members shown; compiler-generated record members and inherited framework members are omitted. Partial declarations are merged. Framework base/reference boxes are distinguished from service-defined types. A dependency is not ownership or a cross-service in-process call. See class-diagram-coverage.md for exact file/type coverage." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="2681" width="2580" height="110" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1,436 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17" compressed="false">
<diagram name="ObservationService — implementation classes" id="ObservationService---implementation-classes">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="2660" pageHeight="2888" pageScale="1">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="n225" value="ObservationService — implementation classes" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fontSize=24;fontStyle=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="25" width="2580" height="45" />
</mxCell>
<mxCell id="n226" value="UML: + public, - private, # protected, ~ internal. Three compartments = classifier / attributes / operations. Hollow triangle: inheritance; dashed hollow triangle: interface realization. Solid line: attribute reference; dashed arrow: dependency; filled diamond: verified owned context. Each source type has its own classifier. Primary-constructor parameters are constructor operations, not invented fields." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="85" width="2580" height="100" />
</mxCell>
<mxCell id="n227" value="«class»&#10;ObservationController&#10;ObservationService.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Controllers.ObservationController" sourceFiles="src/ObservationService/Controllers/ObservationController.cs" link="../../src/ObservationService/Controllers/ObservationController.cs">
<mxGeometry as="geometry" x="70" y="210" width="520" height="496" />
</mxCell>
<mxCell id="n228" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n227">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n229" value="+ ObservationController(ObservationApplicationService service)&#10;+ RecordObservation(Guid patientId, RecordObservationRequest request,&#10;CancellationToken cancellationToken):&#10;Task&lt;ActionResult&lt;ObservationDto&gt;&gt;&#10;+ DeleteObservation(Guid observationId, CancellationToken&#10;cancellationToken): Task&lt;IActionResult&gt;&#10;+ UpdateObservation(Guid observationId, UpdateObservationRequest&#10;request, CancellationToken cancellationToken):&#10;Task&lt;ActionResult&lt;ObservationDto&gt;&gt;&#10;+ PatchObservation(Guid observationId, PatchObservationRequest request,&#10;CancellationToken cancellationToken):&#10;Task&lt;ActionResult&lt;ObservationDto&gt;&gt;&#10;+ GetObservation(Guid observationId, CancellationToken&#10;cancellationToken): Task&lt;ActionResult&lt;ObservationDto&gt;&gt;&#10;+ GetLatest(Guid patientId, CancellationToken cancellationToken):&#10;Task&lt;ActionResult&lt;ObservationDto&gt;&gt;&#10;+ GetByPeriod(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;ActionResult&lt;List&lt;ObservationDto&gt;&gt;&gt;&#10;- ToDto(BloodPressureObservation observation): ObservationDto {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n227">
<mxGeometry as="geometry" x="0" y="118" width="520" height="378" />
</mxCell>
<mxCell id="n227-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n227">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n230" value="«class»&#10;ObservationApplicationService&#10;ObservationService.Application" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#e1d5e7;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Application.ObservationApplicationService" sourceFiles="src/ObservationService/Application/ObservationApplicationService.cs" link="../../src/ObservationService/Application/ObservationApplicationService.cs">
<mxGeometry as="geometry" x="730" y="210" width="520" height="460" />
</mxCell>
<mxCell id="n231" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n230">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n232" value="+ ObservationApplicationService(ObservationRepository repository,&#10;IHttpClientFactory clients)&#10;+ DeleteAsync(Guid observationId, CancellationToken cancellationToken):&#10;Task&lt;bool&gt;&#10;+ UpdateAsync(Guid observationId, UpdateObservationRequest request,&#10;CancellationToken cancellationToken): Task&lt;BloodPressureObservation?&gt;&#10;+ PatchAsync(Guid observationId, PatchObservationRequest request,&#10;CancellationToken cancellationToken): Task&lt;BloodPressureObservation?&gt;&#10;+ RecordAsync(Guid patientId, RecordObservationRequest request,&#10;CancellationToken cancellationToken): Task&lt;BloodPressureObservation?&gt;&#10;+ GetByIdAsync(Guid observationId, CancellationToken cancellationToken):&#10;Task&lt;BloodPressureObservation?&gt;&#10;+ GetLatestAsync(Guid patientId, CancellationToken cancellationToken):&#10;Task&lt;BloodPressureObservation?&gt;&#10;+ GetByPeriodAsync(Guid patientId, DateTime from, DateTime to,&#10;ContextSelection selection, CancellationToken cancellationToken):&#10;Task&lt;List&lt;BloodPressureObservation&gt;&gt;&#10;- NormalizeTimestamp(DateTime timestamp): DateTime {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n230">
<mxGeometry as="geometry" x="0" y="118" width="520" height="342" />
</mxCell>
<mxCell id="n230-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n230">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n233" value="«interface»&#10;ObservationRepository&#10;ObservationService.Application" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#e1d5e7;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Application.ObservationRepository" sourceFiles="src/ObservationService/Application/ObservationRepository.cs" link="../../src/ObservationService/Application/ObservationRepository.cs">
<mxGeometry as="geometry" x="1390" y="210" width="520" height="388" />
</mxCell>
<mxCell id="n234" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n233">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n235" value="+ DeleteAsync(Guid observationId, CancellationToken cancellationToken):&#10;Task&lt;bool&gt; {abstract}&#10;+ UpdateAsync(Guid observationId, PatchObservationRequest request,&#10;DateTime updatedAt, CancellationToken cancellationToken):&#10;Task&lt;BloodPressureObservation?&gt; {abstract}&#10;+ SaveAsync(BloodPressureObservation observation, CancellationToken&#10;cancellationToken): Task&lt;BloodPressureObservation&gt; {abstract}&#10;+ FindByIdAsync(Guid observationId, CancellationToken&#10;cancellationToken): Task&lt;BloodPressureObservation?&gt; {abstract}&#10;+ FindLatestByPatientIdAsync(Guid patientId, CancellationToken&#10;cancellationToken): Task&lt;BloodPressureObservation?&gt; {abstract}&#10;+ FindByPatientIdAndPeriodAsync(Guid patientId, DateTime from,&#10;DateTime to, ContextSelection selection, CancellationToken&#10;cancellationToken): Task&lt;List&lt;BloodPressureObservation&gt;&gt; {abstract}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n233">
<mxGeometry as="geometry" x="0" y="118" width="520" height="270" />
</mxCell>
<mxCell id="n233-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n233">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n236" value="«class»&#10;ObservationDbContext&#10;ObservationService.Persistence" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Persistence.ObservationDbContext" sourceFiles="src/ObservationService/Persistence/ObservationDbContext.cs" link="../../src/ObservationService/Persistence/ObservationDbContext.cs">
<mxGeometry as="geometry" x="2050" y="210" width="520" height="190" />
</mxCell>
<mxCell id="n237" value="+ Observations: DbSet&lt;BloodPressureObservation&gt; {get}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n236">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n238" value="+ ObservationDbContext(DbContextOptions&lt;ObservationDbContext&gt;&#10;options)&#10;# OnModelCreating(ModelBuilder modelBuilder): void" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n236">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n236-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n236">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n239" value="«class»&#10;SqlObservationRepository&#10;ObservationService.Persistence" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Persistence.SqlObservationRepository" sourceFiles="src/ObservationService/Persistence/SqlObservationRepository.cs" link="../../src/ObservationService/Persistence/SqlObservationRepository.cs">
<mxGeometry as="geometry" x="70" y="886" width="520" height="406" />
</mxCell>
<mxCell id="n240" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n239">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n241" value="+ SqlObservationRepository(ObservationDbContext db)&#10;+ DeleteAsync(Guid observationId, CancellationToken cancellationToken):&#10;Task&lt;bool&gt;&#10;+ UpdateAsync(Guid observationId, PatchObservationRequest request,&#10;DateTime updatedAt, CancellationToken cancellationToken):&#10;Task&lt;BloodPressureObservation?&gt;&#10;+ SaveAsync(BloodPressureObservation observation, CancellationToken&#10;cancellationToken): Task&lt;BloodPressureObservation&gt;&#10;+ FindByIdAsync(Guid observationId, CancellationToken&#10;cancellationToken): Task&lt;BloodPressureObservation?&gt;&#10;+ FindLatestByPatientIdAsync(Guid patientId, CancellationToken&#10;cancellationToken): Task&lt;BloodPressureObservation?&gt;&#10;+ FindByPatientIdAndPeriodAsync(Guid patientId, DateTime from,&#10;DateTime to, ContextSelection selection, CancellationToken&#10;cancellationToken): Task&lt;List&lt;BloodPressureObservation&gt;&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n239">
<mxGeometry as="geometry" x="0" y="118" width="520" height="288" />
</mxCell>
<mxCell id="n239-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n239">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n242" value="«class»&#10;BloodPressureObservation&#10;ObservationService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Domain.BloodPressureObservation" sourceFiles="src/ObservationService/Domain/BloodPressureObservation.cs" link="../../src/ObservationService/Domain/BloodPressureObservation.cs">
<mxGeometry as="geometry" x="730" y="886" width="520" height="334" />
</mxCell>
<mxCell id="n243" value="+ ObservationId: Guid {get, set}&#10;+ PatientId: Guid {get, set}&#10;+ MeasuredAt: DateTime {get, set}&#10;+ Systolic: int {get, set}&#10;+ Diastolic: int {get, set}&#10;+ Pulse: int {get, set}&#10;+ MeasurementContext: MeasurementContext {get, set}&#10;+ Context: string? {get, set}&#10;+ Note: string? {get, set}&#10;+ CreatedAt: DateTime {get, set}&#10;+ UpdatedAt: DateTime {get, set}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n242">
<mxGeometry as="geometry" x="0" y="82" width="520" height="216" />
</mxCell>
<mxCell id="n244" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n242">
<mxGeometry as="geometry" x="0" y="298" width="520" height="36" />
</mxCell>
<mxCell id="n242-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n242">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="298" />
<mxPoint as="targetPoint" x="520" y="298" />
</mxGeometry>
</mxCell>
<mxCell id="n245" value="«record»&#10;ContextSelection&#10;ObservationService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Domain.ContextSelection" sourceFiles="src/ObservationService/Domain/ContextSelection.cs" link="../../src/ObservationService/Domain/ContextSelection.cs">
<mxGeometry as="geometry" x="1390" y="886" width="520" height="172" />
</mxCell>
<mxCell id="n246" value="+ Setting: string? {get, init}&#10;+ ActivityCondition: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n245">
<mxGeometry as="geometry" x="0" y="82" width="520" height="54" />
</mxCell>
<mxCell id="n247" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n245">
<mxGeometry as="geometry" x="0" y="136" width="520" height="36" />
</mxCell>
<mxCell id="n245-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n245">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="136" />
<mxPoint as="targetPoint" x="520" y="136" />
</mxGeometry>
</mxCell>
<mxCell id="n248" value="«record»&#10;MeasurementContext&#10;ObservationService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Domain.MeasurementContext" sourceFiles="src/ObservationService/Domain/MeasurementContext.cs" link="../../src/ObservationService/Domain/MeasurementContext.cs">
<mxGeometry as="geometry" x="2050" y="886" width="520" height="280" />
</mxCell>
<mxCell id="n249" value="+ Setting: string? {get, init}&#10;+ ActivityCondition: string? {get, init}&#10;+ RestDurationMinutes: decimal? {get, init}&#10;+ BodyPosition: string? {get, init}&#10;+ MeasuredArm: string? {get, init}&#10;+ DeviceDetails: string? {get, init}&#10;+ CuffDetails: string? {get, init}&#10;+ AdditionalCircumstances: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n248">
<mxGeometry as="geometry" x="0" y="82" width="520" height="162" />
</mxCell>
<mxCell id="n250" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n248">
<mxGeometry as="geometry" x="0" y="244" width="520" height="36" />
</mxCell>
<mxCell id="n248-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n248">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="244" />
<mxPoint as="targetPoint" x="520" y="244" />
</mxGeometry>
</mxCell>
<mxCell id="n251" value="«record»&#10;MeasurementContextPatch&#10;ObservationService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Contracts.MeasurementContextPatch" sourceFiles="src/ObservationService/Contracts/MeasurementContextPatch.cs" link="../../src/ObservationService/Contracts/MeasurementContextPatch.cs">
<mxGeometry as="geometry" x="70" y="1472" width="520" height="586" />
</mxCell>
<mxCell id="n252" value="- setting: string?&#10;+ Setting: string? {get, init}&#10;+ SettingSpecified: bool {get, private set}&#10;- activityCondition: string?&#10;+ ActivityCondition: string? {get, init}&#10;+ ActivityConditionSpecified: bool {get, private set}&#10;- restDurationMinutes: decimal?&#10;+ RestDurationMinutes: decimal? {get, init}&#10;+ RestDurationMinutesSpecified: bool {get, private set}&#10;- bodyPosition: string?&#10;+ BodyPosition: string? {get, init}&#10;+ BodyPositionSpecified: bool {get, private set}&#10;- measuredArm: string?&#10;+ MeasuredArm: string? {get, init}&#10;+ MeasuredArmSpecified: bool {get, private set}&#10;- deviceDetails: string?&#10;+ DeviceDetails: string? {get, init}&#10;+ DeviceDetailsSpecified: bool {get, private set}&#10;- cuffDetails: string?&#10;+ CuffDetails: string? {get, init}&#10;+ CuffDetailsSpecified: bool {get, private set}&#10;- additionalCircumstances: string?&#10;+ AdditionalCircumstances: string? {get, init}&#10;+ AdditionalCircumstancesSpecified: bool {get, private set}&#10;+ HasChanges: bool {get}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n251">
<mxGeometry as="geometry" x="0" y="82" width="520" height="468" />
</mxCell>
<mxCell id="n253" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n251">
<mxGeometry as="geometry" x="0" y="550" width="520" height="36" />
</mxCell>
<mxCell id="n251-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n251">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="550" />
<mxPoint as="targetPoint" x="520" y="550" />
</mxGeometry>
</mxCell>
<mxCell id="n254" value="«record»&#10;ObservationDto&#10;ObservationService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Contracts.ObservationDto" sourceFiles="src/ObservationService/Contracts/ObservationDto.cs" link="../../src/ObservationService/Contracts/ObservationDto.cs">
<mxGeometry as="geometry" x="730" y="1472" width="520" height="334" />
</mxCell>
<mxCell id="n255" value="+ ObservationId: Guid {get, init}&#10;+ PatientId: Guid {get, init}&#10;+ MeasuredAt: DateTime {get, init}&#10;+ Systolic: int {get, init}&#10;+ Diastolic: int {get, init}&#10;+ Pulse: int {get, init}&#10;+ Context: string? {get, init}&#10;+ Note: string? {get, init}&#10;+ MeasurementContext: MeasurementContext {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n254">
<mxGeometry as="geometry" x="0" y="82" width="520" height="180" />
</mxCell>
<mxCell id="n256" value="+ ObservationDto(Guid ObservationId, Guid PatientId, DateTime&#10;MeasuredAt, int Systolic, int Diastolic, int Pulse, string? Context, string?&#10;Note, MeasurementContext MeasurementContext)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n254">
<mxGeometry as="geometry" x="0" y="262" width="520" height="72" />
</mxCell>
<mxCell id="n254-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n254">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="262" />
<mxPoint as="targetPoint" x="520" y="262" />
</mxGeometry>
</mxCell>
<mxCell id="n257" value="«record»&#10;PatchObservationRequest&#10;ObservationService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Contracts.PatchObservationRequest" sourceFiles="src/ObservationService/Contracts/PatchObservationRequest.cs" link="../../src/ObservationService/Contracts/PatchObservationRequest.cs">
<mxGeometry as="geometry" x="1390" y="1472" width="520" height="478" />
</mxCell>
<mxCell id="n258" value="- systolic: int?&#10;+ Systolic: int? {get, init}&#10;+ SystolicSpecified: bool {get, private set}&#10;- diastolic: int?&#10;+ Diastolic: int? {get, init}&#10;+ DiastolicSpecified: bool {get, private set}&#10;- pulse: int?&#10;+ Pulse: int? {get, init}&#10;+ PulseSpecified: bool {get, private set}&#10;- measurementContext: MeasurementContextPatch?&#10;+ MeasurementContext: MeasurementContextPatch? {get, init}&#10;+ MeasurementContextSpecified: bool {get, private set}&#10;- context: string?&#10;+ Context: string? {get, init}&#10;+ ContextSpecified: bool {get, private set}&#10;- note: string?&#10;+ Note: string? {get, init}&#10;+ NoteSpecified: bool {get, private set}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n257">
<mxGeometry as="geometry" x="0" y="82" width="520" height="342" />
</mxCell>
<mxCell id="n259" value="+ Validate(ValidationContext validationContext):&#10;IEnumerable&lt;ValidationResult&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n257">
<mxGeometry as="geometry" x="0" y="424" width="520" height="54" />
</mxCell>
<mxCell id="n257-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n257">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="424" />
<mxPoint as="targetPoint" x="520" y="424" />
</mxGeometry>
</mxCell>
<mxCell id="n260" value="«record»&#10;RecordObservationRequest&#10;ObservationService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Contracts.RecordObservationRequest" sourceFiles="src/ObservationService/Contracts/RecordObservationRequest.cs" link="../../src/ObservationService/Contracts/RecordObservationRequest.cs">
<mxGeometry as="geometry" x="2050" y="1472" width="520" height="262" />
</mxCell>
<mxCell id="n261" value="+ MeasuredAt: DateTime? {get, init}&#10;+ Systolic: int? {get, init}&#10;+ Diastolic: int? {get, init}&#10;+ Pulse: int? {get, init}&#10;+ MeasurementContext: MeasurementContext? {get, init}&#10;+ Context: string? {get, init}&#10;+ Note: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n260">
<mxGeometry as="geometry" x="0" y="82" width="520" height="144" />
</mxCell>
<mxCell id="n262" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n260">
<mxGeometry as="geometry" x="0" y="226" width="520" height="36" />
</mxCell>
<mxCell id="n260-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n260">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="226" />
<mxPoint as="targetPoint" x="520" y="226" />
</mxGeometry>
</mxCell>
<mxCell id="n263" value="«record»&#10;UpdateObservationRequest&#10;ObservationService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Contracts.UpdateObservationRequest" sourceFiles="src/ObservationService/Contracts/UpdateObservationRequest.cs" link="../../src/ObservationService/Contracts/UpdateObservationRequest.cs">
<mxGeometry as="geometry" x="70" y="2238" width="520" height="190" />
</mxCell>
<mxCell id="n264" value="+ Systolic: int? {get, init}&#10;+ Diastolic: int? {get, init}&#10;+ Pulse: int? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n263">
<mxGeometry as="geometry" x="0" y="82" width="520" height="72" />
</mxCell>
<mxCell id="n265" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n263">
<mxGeometry as="geometry" x="0" y="154" width="520" height="36" />
</mxCell>
<mxCell id="n263-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n263">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="154" />
<mxPoint as="targetPoint" x="520" y="154" />
</mxGeometry>
</mxCell>
<mxCell id="n266" value="«class»&#10;Program&#10;ObservationService" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#f5f5f5;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Program" sourceFiles="src/ObservationService/Program.cs" link="../../src/ObservationService/Program.cs">
<mxGeometry as="geometry" x="730" y="2238" width="520" height="172" />
</mxCell>
<mxCell id="n267" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n266">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n268" value="+ Main(string[] args): Task {static}&#10;- GetGatewayUri(IConfiguration configuration): Uri {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n266">
<mxGeometry as="geometry" x="0" y="118" width="520" height="54" />
</mxCell>
<mxCell id="n266-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n266">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n269" value="«framework reference»&#10;IValidatableObject" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="70" y="2608" width="520" height="80" />
</mxCell>
<mxCell id="n270" value="«framework reference»&#10;ControllerBase" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="2608" width="520" height="80" />
</mxCell>
<mxCell id="n271" value="«framework reference»&#10;DbContext" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1390" y="2608" width="520" height="80" />
</mxCell>
<mxCell id="n272" value="«framework reference»&#10;IHttpClientFactory" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="2050" y="2608" width="520" height="80" />
</mxCell>
<mxCell id="e272-0" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n230" target="n233" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-1" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n230" target="n257" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-2" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n230" target="n260" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-3" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n230" target="n263" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-4" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n230" target="n242" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-5" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n230" target="n245" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-6" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n230" target="n248" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-7" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n233" target="n257" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-8" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n233" target="n242" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-9" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n233" target="n245" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-10" value="MeasurementContext [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n254" target="n248" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-11" value="measurementContext [0..1]; MeasurementContext [0..1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n257" target="n251" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-12" value="MeasurementContext [0..1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n257" target="n248" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-13" value="MeasurementContext [0..1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n260" target="n248" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-14" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n227" target="n230" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-15" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n227" target="n254" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-16" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n227" target="n257" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-17" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n227" target="n260" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-18" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n227" target="n263" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-19" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n227" target="n242" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-20" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n227" target="n245" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-21" value="MeasurementContext [1]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;startArrow=diamond;startFill=1;endArrow=none;" edge="1" parent="1" source="n242" target="n248" relationship="composition">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-25" value="Observations [0..*]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n236" target="n242" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-26" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=block;endFill=0;" edge="1" parent="1" source="n239" target="n233" relationship="realization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-27" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n239" target="n257" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-28" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n239" target="n242" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-29" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n239" target="n245" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-30" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n239" target="n236" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-31" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n266" target="n230" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-32" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n266" target="n236" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-33" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n266" target="n239" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-34" value="constructor dependency" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n230" target="n272" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-35" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=block;endFill=0;" edge="1" parent="1" source="n257" target="n269" relationship="realization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-36" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n227" target="n270" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e272-37" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n236" target="n271" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="n273" value="Source-linked classifier headers. All declared members shown; compiler-generated record members and inherited framework members are omitted. Partial declarations are merged. Framework base/reference boxes are distinguished from service-defined types. A dependency is not ownership or a cross-service in-process call. See class-diagram-coverage.md for exact file/type coverage." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="2753" width="2580" height="110" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram name="ObservationService — EF migration classes" id="ObservationService---EF-migration-classes">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="2660" pageHeight="970" pageScale="1">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="n323" value="ObservationService — EF migration classes" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fontSize=24;fontStyle=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="25" width="2580" height="45" />
</mxCell>
<mxCell id="n324" value="UML: + public, - private, # protected, ~ internal. Three compartments = classifier / attributes / operations. Hollow triangle: inheritance; dashed hollow triangle: interface realization. Solid line: attribute reference; dashed arrow: dependency; filled diamond: verified owned context. Each source type has its own classifier. Primary-constructor parameters are constructor operations, not invented fields." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="85" width="2580" height="100" />
</mxCell>
<mxCell id="n325" value="«class»&#10;InitialObservationSchema&#10;ObservationService.Persistence.Migrations" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Persistence.Migrations.InitialObservationSchema" sourceFiles="src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.Designer.cs|src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.cs" link="../../src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.Designer.cs">
<mxGeometry as="geometry" x="70" y="210" width="520" height="190" />
</mxCell>
<mxCell id="n326" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n325">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n327" value="# BuildTargetModel(ModelBuilder modelBuilder): void&#10;# Up(MigrationBuilder migrationBuilder): void&#10;# Down(MigrationBuilder migrationBuilder): void" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n325">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n325-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n325">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n328" value="«class»&#10;ObservationDbContextModelSnapshot&#10;ObservationService.Persistence.Migrations" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Persistence.Migrations.ObservationDbContextModelSnapshot" sourceFiles="src/ObservationService/Persistence/Migrations/ObservationDbContextModelSnapshot.cs" link="../../src/ObservationService/Persistence/Migrations/ObservationDbContextModelSnapshot.cs">
<mxGeometry as="geometry" x="730" y="210" width="520" height="154" />
</mxCell>
<mxCell id="n329" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n328">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n330" value="# BuildModel(ModelBuilder modelBuilder): void" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n328">
<mxGeometry as="geometry" x="0" y="118" width="520" height="36" />
</mxCell>
<mxCell id="n328-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n328">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n331" value="«class»&#10;RecordedMeasurementContext&#10;ObservationService.Persistence.Migrations" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="ObservationService.Persistence.Migrations.RecordedMeasurementContext" sourceFiles="src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.Designer.cs|src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.cs" link="../../src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.Designer.cs">
<mxGeometry as="geometry" x="1390" y="210" width="520" height="190" />
</mxCell>
<mxCell id="n332" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n331">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n333" value="# BuildTargetModel(ModelBuilder modelBuilder): void&#10;# Up(MigrationBuilder migrationBuilder): void&#10;# Down(MigrationBuilder migrationBuilder): void" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n331">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n331-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n331">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n334" value="«framework reference»&#10;Migration" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="70" y="580" width="520" height="80" />
</mxCell>
<mxCell id="n335" value="«framework reference»&#10;ModelSnapshot" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="580" width="520" height="80" />
</mxCell>
<mxCell id="n336" value="«same-service type, other page»&#10;ObservationDbContext" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1" referenceType="ObservationService.Persistence.ObservationDbContext">
<mxGeometry as="geometry" x="70" y="690" width="520" height="80" />
</mxCell>
<mxCell id="e336-22" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n325" target="n336" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e336-23" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n331" target="n336" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e336-24" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n328" target="n336" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e336-34" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n325" target="n334" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e336-35" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n331" target="n334" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e336-36" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n328" target="n335" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="n337" value="Source-linked classifier headers. All declared members shown; compiler-generated record members and inherited framework members are omitted. Partial declarations are merged. Framework base/reference boxes are distinguished from service-defined types. A dependency is not ownership or a cross-service in-process call. See class-diagram-coverage.md for exact file/type coverage." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="835" width="2580" height="110" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1,349 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17" compressed="false">
<diagram name="PatientProfileService — implementation classes" id="PatientProfileService---implementation-classes">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="2660" pageHeight="1870" pageScale="1">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="n117" value="PatientProfileService — implementation classes" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fontSize=24;fontStyle=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="25" width="2580" height="45" />
</mxCell>
<mxCell id="n118" value="UML: + public, - private, # protected, ~ internal. Three compartments = classifier / attributes / operations. Hollow triangle: inheritance; dashed hollow triangle: interface realization. Solid line: attribute reference; dashed arrow: dependency; filled diamond: verified owned context. Each source type has its own classifier. Primary-constructor parameters are constructor operations, not invented fields." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="85" width="2580" height="100" />
</mxCell>
<mxCell id="n119" value="«class»&#10;PatientController&#10;PatientProfileService.Controllers" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#dae8fc;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Controllers.PatientController" sourceFiles="src/PatientProfileService/Controllers/PatientController.cs" link="../../src/PatientProfileService/Controllers/PatientController.cs">
<mxGeometry as="geometry" x="70" y="210" width="520" height="316" />
</mxCell>
<mxCell id="n120" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n119">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n121" value="+ PatientController(PatientApplicationService service)&#10;+ CreatePatient(CreatePatientRequest request, CancellationToken&#10;cancellationToken): Task&lt;ActionResult&lt;PatientDto&gt;&gt;&#10;+ GetByAccount(string accountId, CancellationToken cancellationToken):&#10;Task&lt;ActionResult&lt;PatientDto&gt;&gt;&#10;+ GetPatient(Guid patientId, CancellationToken cancellationToken):&#10;Task&lt;ActionResult&lt;PatientDto&gt;&gt;&#10;+ UpdatePatient(Guid patientId, UpdatePatientRequest request,&#10;CancellationToken cancellationToken): Task&lt;ActionResult&lt;PatientDto&gt;&gt;&#10;- ToDto(Patient patient): PatientDto {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n119">
<mxGeometry as="geometry" x="0" y="118" width="520" height="198" />
</mxCell>
<mxCell id="n119-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n119">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n122" value="«class»&#10;PatientApplicationService&#10;PatientProfileService.Application" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#e1d5e7;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Application.PatientApplicationService" sourceFiles="src/PatientProfileService/Application/PatientApplicationService.cs" link="../../src/PatientProfileService/Application/PatientApplicationService.cs">
<mxGeometry as="geometry" x="730" y="210" width="520" height="298" />
</mxCell>
<mxCell id="n123" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n122">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n124" value="+ PatientApplicationService(PatientRepository repository)&#10;+ CreatePatientAsync(CreatePatientRequest request, string accountId,&#10;CancellationToken cancellationToken): Task&lt;Patient&gt;&#10;+ GetByAccountAsync(string accountId, CancellationToken&#10;cancellationToken): Task&lt;Patient?&gt;&#10;+ GetPatientAsync(Guid patientId, CancellationToken cancellationToken):&#10;Task&lt;Patient?&gt;&#10;+ UpdatePatientAsync(Guid patientId, UpdatePatientRequest request,&#10;CancellationToken cancellationToken): Task&lt;Patient?&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n122">
<mxGeometry as="geometry" x="0" y="118" width="520" height="180" />
</mxCell>
<mxCell id="n122-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n122">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n125" value="«interface»&#10;PatientRepository&#10;PatientProfileService.Application" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#e1d5e7;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Application.PatientRepository" sourceFiles="src/PatientProfileService/Application/PatientRepository.cs" link="../../src/PatientProfileService/Application/PatientRepository.cs">
<mxGeometry as="geometry" x="1390" y="210" width="520" height="280" />
</mxCell>
<mxCell id="n126" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n125">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n127" value="+ FindByAccountIdAsync(string accountId, CancellationToken&#10;cancellationToken): Task&lt;Patient?&gt; {abstract}&#10;+ SaveAsync(Patient patient, CancellationToken cancellationToken):&#10;Task&lt;Patient&gt; {abstract}&#10;+ FindByIdAsync(Guid patientId, CancellationToken cancellationToken):&#10;Task&lt;Patient?&gt; {abstract}&#10;+ UpdateProfileAsync(Guid patientId, string name, string? contactInfo,&#10;CancellationToken cancellationToken): Task&lt;bool&gt; {abstract}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n125">
<mxGeometry as="geometry" x="0" y="118" width="520" height="162" />
</mxCell>
<mxCell id="n125-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n125">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n128" value="«class»&#10;ProfileAlreadyExistsException&#10;PatientProfileService.Application" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#e1d5e7;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Application.ProfileAlreadyExistsException" sourceFiles="src/PatientProfileService/Application/ProfileAlreadyExistsException.cs" link="../../src/PatientProfileService/Application/ProfileAlreadyExistsException.cs">
<mxGeometry as="geometry" x="2050" y="210" width="520" height="154" />
</mxCell>
<mxCell id="n129" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n128">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n130" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n128">
<mxGeometry as="geometry" x="0" y="118" width="520" height="36" />
</mxCell>
<mxCell id="n128-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n128">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n131" value="«class»&#10;PatientDbContext&#10;PatientProfileService.Persistence" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Persistence.PatientDbContext" sourceFiles="src/PatientProfileService/Persistence/PatientDbContext.cs" link="../../src/PatientProfileService/Persistence/PatientDbContext.cs">
<mxGeometry as="geometry" x="70" y="706" width="520" height="172" />
</mxCell>
<mxCell id="n132" value="+ Patients: DbSet&lt;Patient&gt; {get}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n131">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n133" value="+ PatientDbContext(DbContextOptions&lt;PatientDbContext&gt; options)&#10;# OnModelCreating(ModelBuilder modelBuilder): void" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n131">
<mxGeometry as="geometry" x="0" y="118" width="520" height="54" />
</mxCell>
<mxCell id="n131-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n131">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n134" value="«class»&#10;SqlPatientRepository&#10;PatientProfileService.Persistence" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Persistence.SqlPatientRepository" sourceFiles="src/PatientProfileService/Persistence/SqlPatientRepository.cs" link="../../src/PatientProfileService/Persistence/SqlPatientRepository.cs">
<mxGeometry as="geometry" x="730" y="706" width="520" height="298" />
</mxCell>
<mxCell id="n135" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n134">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n136" value="+ SqlPatientRepository(PatientDbContext db)&#10;+ SaveAsync(Patient patient, CancellationToken cancellationToken):&#10;Task&lt;Patient&gt;&#10;+ FindByAccountIdAsync(string accountId, CancellationToken&#10;cancellationToken): Task&lt;Patient?&gt;&#10;+ FindByIdAsync(Guid patientId, CancellationToken cancellationToken):&#10;Task&lt;Patient?&gt;&#10;+ UpdateProfileAsync(Guid patientId, string name, string? contactInfo,&#10;CancellationToken cancellationToken): Task&lt;bool&gt;" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n134">
<mxGeometry as="geometry" x="0" y="118" width="520" height="180" />
</mxCell>
<mxCell id="n134-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n134">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n137" value="«class»&#10;Patient&#10;PatientProfileService.Domain" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#fff2cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Domain.Patient" sourceFiles="src/PatientProfileService/Domain/Patient.cs" link="../../src/PatientProfileService/Domain/Patient.cs">
<mxGeometry as="geometry" x="1390" y="706" width="520" height="262" />
</mxCell>
<mxCell id="n138" value="+ AccountId: string? {get, set}&#10;+ PatientId: Guid {get, set}&#10;+ Name: string {get, set}&#10;+ DateOfBirth: DateOnly {get, set}&#10;+ ContactInfo: string? {get, set}&#10;+ CreatedAt: DateTime {get, set}&#10;+ UpdatedAt: DateTime {get, set}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n137">
<mxGeometry as="geometry" x="0" y="82" width="520" height="144" />
</mxCell>
<mxCell id="n139" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n137">
<mxGeometry as="geometry" x="0" y="226" width="520" height="36" />
</mxCell>
<mxCell id="n137-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n137">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="226" />
<mxPoint as="targetPoint" x="520" y="226" />
</mxGeometry>
</mxCell>
<mxCell id="n140" value="«record»&#10;CreatePatientRequest&#10;PatientProfileService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Contracts.CreatePatientRequest" sourceFiles="src/PatientProfileService/Contracts/CreatePatientRequest.cs" link="../../src/PatientProfileService/Contracts/CreatePatientRequest.cs">
<mxGeometry as="geometry" x="2050" y="706" width="520" height="190" />
</mxCell>
<mxCell id="n141" value="+ Name: string? {get, init}&#10;+ DateOfBirth: DateOnly? {get, init}&#10;+ ContactInfo: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n140">
<mxGeometry as="geometry" x="0" y="82" width="520" height="72" />
</mxCell>
<mxCell id="n142" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n140">
<mxGeometry as="geometry" x="0" y="154" width="520" height="36" />
</mxCell>
<mxCell id="n140-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n140">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="154" />
<mxPoint as="targetPoint" x="520" y="154" />
</mxGeometry>
</mxCell>
<mxCell id="n143" value="«record»&#10;PatientDto&#10;PatientProfileService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Contracts.PatientDto" sourceFiles="src/PatientProfileService/Contracts/PatientDto.cs" link="../../src/PatientProfileService/Contracts/PatientDto.cs">
<mxGeometry as="geometry" x="70" y="1184" width="520" height="226" />
</mxCell>
<mxCell id="n144" value="+ PatientId: Guid {get, init}&#10;+ Name: string {get, init}&#10;+ DateOfBirth: DateOnly {get, init}&#10;+ ContactInfo: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n143">
<mxGeometry as="geometry" x="0" y="82" width="520" height="90" />
</mxCell>
<mxCell id="n145" value="+ PatientDto(Guid PatientId, string Name, DateOnly DateOfBirth, string?&#10;ContactInfo)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n143">
<mxGeometry as="geometry" x="0" y="172" width="520" height="54" />
</mxCell>
<mxCell id="n143-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n143">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="172" />
<mxPoint as="targetPoint" x="520" y="172" />
</mxGeometry>
</mxCell>
<mxCell id="n146" value="«record»&#10;UpdatePatientRequest&#10;PatientProfileService.Contracts" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#ffe6cc;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Contracts.UpdatePatientRequest" sourceFiles="src/PatientProfileService/Contracts/UpdatePatientRequest.cs" link="../../src/PatientProfileService/Contracts/UpdatePatientRequest.cs">
<mxGeometry as="geometry" x="730" y="1184" width="520" height="172" />
</mxCell>
<mxCell id="n147" value="+ Name: string? {get, init}&#10;+ ContactInfo: string? {get, init}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n146">
<mxGeometry as="geometry" x="0" y="82" width="520" height="54" />
</mxCell>
<mxCell id="n148" value="(no declared operations)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n146">
<mxGeometry as="geometry" x="0" y="136" width="520" height="36" />
</mxCell>
<mxCell id="n146-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n146">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="136" />
<mxPoint as="targetPoint" x="520" y="136" />
</mxGeometry>
</mxCell>
<mxCell id="n149" value="«class»&#10;Program&#10;PatientProfileService" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#f5f5f5;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Program" sourceFiles="src/PatientProfileService/Program.cs" link="../../src/PatientProfileService/Program.cs">
<mxGeometry as="geometry" x="1390" y="1184" width="520" height="154" />
</mxCell>
<mxCell id="n150" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n149">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n151" value="+ Main(string[] args): Task {static}" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n149">
<mxGeometry as="geometry" x="0" y="118" width="520" height="36" />
</mxCell>
<mxCell id="n149-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n149">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n152" value="«framework reference»&#10;Exception" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="70" y="1590" width="520" height="80" />
</mxCell>
<mxCell id="n153" value="«framework reference»&#10;ControllerBase" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="1590" width="520" height="80" />
</mxCell>
<mxCell id="n154" value="«framework reference»&#10;DbContext" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1390" y="1590" width="520" height="80" />
</mxCell>
<mxCell id="e154-0" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n122" target="n125" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-1" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n122" target="n128" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-2" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n122" target="n140" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-3" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n122" target="n146" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-4" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n122" target="n137" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-5" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n125" target="n137" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-6" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n119" target="n122" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-7" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n119" target="n140" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-8" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n119" target="n143" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-9" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n119" target="n146" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-10" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n119" target="n137" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-14" value="Patients [0..*]" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="n131" target="n137" relationship="association">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-15" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=block;endFill=0;" edge="1" parent="1" source="n134" target="n125" relationship="realization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-16" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n134" target="n128" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-17" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n134" target="n137" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-18" value="signature / constructor" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n134" target="n131" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-19" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n149" target="n122" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-20" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n149" target="n131" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-21" value="registers / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n149" target="n134" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-22" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n128" target="n152" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-23" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n119" target="n153" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e154-24" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n131" target="n154" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="n155" value="Source-linked classifier headers. All declared members shown; compiler-generated record members and inherited framework members are omitted. Partial declarations are merged. Framework base/reference boxes are distinguished from service-defined types. A dependency is not ownership or a cross-service in-process call. See class-diagram-coverage.md for exact file/type coverage." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="1735" width="2580" height="110" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram name="PatientProfileService — EF migration classes" id="PatientProfileService---EF-migration-classes">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="2660" pageHeight="970" pageScale="1">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="n195" value="PatientProfileService — EF migration classes" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fontSize=24;fontStyle=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="25" width="2580" height="45" />
</mxCell>
<mxCell id="n196" value="UML: + public, - private, # protected, ~ internal. Three compartments = classifier / attributes / operations. Hollow triangle: inheritance; dashed hollow triangle: interface realization. Solid line: attribute reference; dashed arrow: dependency; filled diamond: verified owned context. Each source type has its own classifier. Primary-constructor parameters are constructor operations, not invented fields." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="85" width="2580" height="100" />
</mxCell>
<mxCell id="n197" value="«class»&#10;AccountProfileAssociation&#10;PatientProfileService.Persistence.Migrations" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Persistence.Migrations.AccountProfileAssociation" sourceFiles="src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.Designer.cs|src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.cs" link="../../src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.Designer.cs">
<mxGeometry as="geometry" x="70" y="210" width="520" height="190" />
</mxCell>
<mxCell id="n198" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n197">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n199" value="# BuildTargetModel(ModelBuilder modelBuilder): void&#10;# Up(MigrationBuilder migrationBuilder): void&#10;# Down(MigrationBuilder migrationBuilder): void" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n197">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n197-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n197">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n200" value="«class»&#10;InitialPatientSchema&#10;PatientProfileService.Persistence.Migrations" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Persistence.Migrations.InitialPatientSchema" sourceFiles="src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.Designer.cs|src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.cs" link="../../src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.Designer.cs">
<mxGeometry as="geometry" x="730" y="210" width="520" height="190" />
</mxCell>
<mxCell id="n201" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n200">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n202" value="# BuildTargetModel(ModelBuilder modelBuilder): void&#10;# Up(MigrationBuilder migrationBuilder): void&#10;# Down(MigrationBuilder migrationBuilder): void" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n200">
<mxGeometry as="geometry" x="0" y="118" width="520" height="72" />
</mxCell>
<mxCell id="n200-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n200">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n203" value="«class»&#10;PatientDbContextModelSnapshot&#10;PatientProfileService.Persistence.Migrations" style="swimlane;startSize=82;horizontal=1;html=0;whiteSpace=wrap;align=center;verticalAlign=top;fontSize=13;fontStyle=1;spacing=7;fillColor=#d5e8d4;strokeColor=#444444;" vertex="1" parent="1" sourceType="PatientProfileService.Persistence.Migrations.PatientDbContextModelSnapshot" sourceFiles="src/PatientProfileService/Persistence/Migrations/PatientDbContextModelSnapshot.cs" link="../../src/PatientProfileService/Persistence/Migrations/PatientDbContextModelSnapshot.cs">
<mxGeometry as="geometry" x="1390" y="210" width="520" height="154" />
</mxCell>
<mxCell id="n204" value="(no declared attributes)" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n203">
<mxGeometry as="geometry" x="0" y="82" width="520" height="36" />
</mxCell>
<mxCell id="n205" value="# BuildModel(ModelBuilder modelBuilder): void" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;fillColor=none;strokeColor=none;" vertex="1" parent="n203">
<mxGeometry as="geometry" x="0" y="118" width="520" height="36" />
</mxCell>
<mxCell id="n203-sep" style="endArrow=none;strokeColor=#444444;" edge="1" parent="n203">
<mxGeometry as="geometry" relative="1">
<mxPoint as="sourcePoint" x="0" y="118" />
<mxPoint as="targetPoint" x="520" y="118" />
</mxGeometry>
</mxCell>
<mxCell id="n206" value="«framework reference»&#10;Migration" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="70" y="580" width="520" height="80" />
</mxCell>
<mxCell id="n207" value="«framework reference»&#10;ModelSnapshot" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1">
<mxGeometry as="geometry" x="730" y="580" width="520" height="80" />
</mxCell>
<mxCell id="n208" value="«same-service type, other page»&#10;PatientDbContext" style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;align=center;fillColor=#ffffff;strokeColor=#777777;dashed=1;" vertex="1" parent="1" referenceType="PatientProfileService.Persistence.PatientDbContext">
<mxGeometry as="geometry" x="70" y="690" width="520" height="80" />
</mxCell>
<mxCell id="e208-11" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n200" target="n208" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e208-12" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n197" target="n208" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e208-13" value="creates / configures" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;dashed=1;endArrow=open;" edge="1" parent="1" source="n203" target="n208" relationship="dependency">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e208-22" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n200" target="n206" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e208-23" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n197" target="n206" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e208-24" value="" style="edgeStyle=orthogonalEdgeStyle;html=0;rounded=0;fontSize=11;labelBackgroundColor=#ffffff;endArrow=block;endFill=0;" edge="1" parent="1" source="n203" target="n207" relationship="generalization">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="n209" value="Source-linked classifier headers. All declared members shown; compiler-generated record members and inherited framework members are omitted. Partial declarations are merged. Framework base/reference boxes are distinguished from service-defined types. A dependency is not ownership or a cross-service in-process call. See class-diagram-coverage.md for exact file/type coverage." style="text;html=0;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=13;spacing=8;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="835" width="2580" height="110" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,47 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17" compressed="false">
<diagram id="p1" name="Ownership and physical persistence">
<mxGraphModel dx="1700" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="1400" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c1" value="Ownership and physical persistence" style="text;html=0;fontSize=24;fontStyle=1;align=left;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="15" width="1640" height="45" />
</mxCell>
<mxCell id="c2" value="Patient/Profile process&#10;PatientDbContext / SqlPatientRepository&#10;Own credentials only" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="120" width="450" height="160" />
</mxCell>
<mxCell id="c3" value="Observation process&#10;ObservationDbContext / SqlObservationRepository&#10;Own credentials only" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="900" y="120" width="450" height="160" />
</mxCell>
<mxCell id="c4" value="Patient database: patient&#10;PK patient_id UUID&#10;account_id TEXT nullable; UNIQUE&#10;name VARCHAR NOT NULL&#10;date_of_birth DATE NOT NULL&#10;contact_info VARCHAR nullable&#10;created_at / updated_at TIMESTAMP NOT NULL&#10;+ __EFMigrationsHistory" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="420" width="520" height="310" />
</mxCell>
<mxCell id="c5" value="Observation database: blood_pressure_observation&#10;PK observation_id UUID; external patient_id UUID&#10;measured_at / created_at / updated_at TIMESTAMP&#10;systolic / diastolic / pulse INTEGER NOT NULL&#10;context / note VARCHAR nullable&#10;setting / activity_condition TEXT NOT NULL = Unknown&#10;rest_duration_minutes NUMERIC nullable&#10;body_position / measured_arm / device_details /&#10;cuff_details / additional_circumstances TEXT nullable&#10;+ __EFMigrationsHistory" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="900" y="420" width="650" height="350" />
</mxCell>
<mxCell id="c6" value="EF Core / own role" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c2" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c7" value="EF Core / own role" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c3" target="c5">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c8" value="Logical patient_id reference ONLY&#10;No SQL access / FK / join" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=none;" edge="1" parent="1" source="c5" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c9" value="Gateway-owned files/configuration&#10;Configured password hashes + roles&#10;Configured professional assignment IDs&#10;Persistent Data Protection XML key ring&#10;No Gateway clinical database" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="900" width="520" height="220" />
</mxCell>
<mxCell id="c10" value="Insights / Overview&#10;Deserialize local wire DTOs&#10;Calculate/compose results in request memory&#10;No result database, stored IDs or cache&#10;No source-database credentials" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="640" y="900" width="490" height="220" />
</mxCell>
<mxCell id="c11" value="Administrative deployment material&#10;Manifest/service.env/JSON/PFX&#10;Generated account passwords and service/DB keys&#10;Protected root/admin files; scoped distribution&#10;Public CA exported; signing key not retained" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1180" y="900" width="450" height="220" />
</mxCell>
<mxCell id="c12" value="TIMESTAMP means timestamp without time zone, interpreted as UTC clock values. MeasurementContext uses columns in the observation row, not a separate table. Only PK and account uniqueness indexes are declared. Diagram shows logical database owners; PostgreSQL servers may be colocated or separate. Sources: DbContexts, migrations, Deployment/DatabaseProvisioning." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="1220" width="1630" height="100" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1,165 @@
<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17" compressed="false">
<diagram id="p1" name="Colocated Linux: separate native processes">
<mxGraphModel dx="1700" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="1250" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c1" value="Colocated Linux: separate native processes" style="text;html=0;fontSize=24;fontStyle=1;align=left;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="15" width="1640" height="45" />
</mxCell>
<mxCell id="c2" value="Client machine&#10;HTTPS trust in public CA&#10;Token-bearing requests → Gateway" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="110" width="350" height="170" />
</mxCell>
<mxCell id="c3" value="One Linux host: Debian/Ubuntu family + apt + systemd&#10;.NET 10 ASP.NET Core runtime; local PostgreSQL for selected persistent services&#10;Same service DLLs as distributed deployment; all ports configurable" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="460" y="110" width="1190" height="160" />
</mxCell>
<mxCell id="c4" value="healthapp-api-gateway.service&#10;Dedicated healthapp-api-gateway identity&#10;Independent dotnet process&#10;HTTPS 0.0.0.0:5443&#10;/opt/healthapp/api-gateway&#10;/etc/healthapp/api-gateway/service.env" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="410" width="300" height="240" />
</mxCell>
<mxCell id="c5" value="healthapp-patient-profile.service&#10;Dedicated healthapp-patient-profile identity&#10;Independent dotnet process&#10;HTTPS 0.0.0.0:5081&#10;/opt/healthapp/patient-profile&#10;/etc/healthapp/patient-profile/service.env" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="375" y="410" width="300" height="240" />
</mxCell>
<mxCell id="c6" value="healthapp-observation.service&#10;Dedicated healthapp-observation identity&#10;Independent dotnet process&#10;HTTPS 0.0.0.0:5082&#10;/opt/healthapp/observation&#10;/etc/healthapp/observation/service.env" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="710" y="410" width="300" height="240" />
</mxCell>
<mxCell id="c7" value="healthapp-insights.service&#10;Dedicated healthapp-insights identity&#10;Independent dotnet process&#10;HTTPS 0.0.0.0:5083&#10;/opt/healthapp/insights&#10;/etc/healthapp/insights/service.env" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1045" y="410" width="300" height="240" />
</mxCell>
<mxCell id="c8" value="healthapp-health-overview.service&#10;Dedicated healthapp-health-overview identity&#10;Independent dotnet process&#10;HTTPS 0.0.0.0:5084&#10;/opt/healthapp/health-overview&#10;/etc/healthapp/health-overview/service.env" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1380" y="410" width="300" height="240" />
</mxCell>
<mxCell id="c9" value="HTTPS :5443" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c2" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c10" value="HTTPS + incoming key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c4" target="c5">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c11" value="HTTPS + incoming key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c4" target="c6">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c12" value="HTTPS + incoming key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c4" target="c7">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c13" value="HTTPS + incoming key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c4" target="c8">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c14" value="HTTPS + callback key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c6" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c15" value="HTTPS + callback key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c7" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c16" value="HTTPS + callback key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c8" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c17" value="Local PostgreSQL server&#10;Separate profile DB and observation DB&#10;Separate roles; no cross-database rights" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="390" y="830" width="610" height="180" />
</mxCell>
<mxCell id="c18" value="Profile DB" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c5" target="c17">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c19" value="Observation DB" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c6" target="c17">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c20" value="Private administrative plan + public CA trust&#10;Gateway key ring: /var/lib/healthapp-api-gateway/keys&#10;Per-service PFX; env supplied by systemd" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1090" y="820" width="540" height="180" />
</mxCell>
<mxCell id="c21" value="Topology is supported configuration, not a fresh inspection of a live host. Peer units are not PartOf/Requires/BindsTo one another. Default port numbers come from Deployment.cs, not hard-coded application routing. Stopping a process does not directly stop peers; dependent API workflows can fail." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="1100" width="1620" height="100" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="p2" name="Distributed Linux: supported topology">
<mxGraphModel dx="1700" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1800" pageHeight="1350" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c22" value="Distributed Linux: supported topology" style="text;html=0;fontSize=24;fontStyle=1;align=left;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="15" width="1740" height="45" />
</mxCell>
<mxCell id="c23" value="Machine A&#10;Gateway process / systemd&#10;HTTPS :5443&#10;Local account/assignment configuration&#10;Own key ring + certificate&#10;No clinical DB" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="700" y="110" width="380" height="210" />
</mxCell>
<mxCell id="c24" value="Machine B&#10;Patient/Profile process / systemd&#10;HTTPS :5081&#10;Own profile DB + role&#10;Local PostgreSQL or configured remote DB" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="550" width="380" height="220" />
</mxCell>
<mxCell id="c25" value="Machine C&#10;Observation process / systemd&#10;HTTPS :5082&#10;Own observation DB + role&#10;Local PostgreSQL or configured remote DB" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="470" y="550" width="380" height="220" />
</mxCell>
<mxCell id="c26" value="Machine D&#10;Insights process / systemd&#10;HTTPS :5083&#10;No DB&#10;History client origin = Gateway" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="910" y="550" width="380" height="220" />
</mxCell>
<mxCell id="c27" value="Machine E&#10;Overview process / systemd&#10;HTTPS :5084&#10;No DB&#10;All three client origins = Gateway" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1350" y="550" width="380" height="220" />
</mxCell>
<mxCell id="c28" value="HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c23" target="c24">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c29" value="HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c23" target="c25">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c30" value="HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c23" target="c26">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c31" value="HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c23" target="c27">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c32" value="HTTPS + X-Service-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c25" target="c23">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c33" value="HTTPS + X-Service-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c26" target="c23">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c34" value="HTTPS + X-Service-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c27" target="c23">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c35" value="Administrative preparation / distribution&#10;One topology plan → scoped files per host&#10;SSH/SCP and noninteractive native install&#10;OS CA trust + dedicated service identities&#10;Final HTTPS topology verification" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="490" y="970" width="760" height="230" />
</mxCell>
<mxCell id="c36" value="SSH/SCP administration (not app traffic)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=open;dashed=1;" edge="1" parent="1" source="c35" target="c23">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c37" value="Each process uses its own local config/private certificate. No shared runtime directory or common process memory across machines. All origin hosts/ports configurable. Real multi-machine deployment remains an evidence limit; tests use separate loopback origins and transport doubles." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="1240" width="1720" height="100" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="p3" name="Native platform adapters: same application DLLs">
<mxGraphModel dx="1700" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="1200" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c38" value="Native platform adapters: same application DLLs" style="text;html=0;fontSize=24;fontStyle=1;align=left;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="15" width="1640" height="45" />
</mxCell>
<mxCell id="c39" value="Build machine&#10;.NET 10 SDK + package feeds&#10;Publish separate framework-dependent DLLs&#10;No OS-specific apphost; no containers&#10;Bundle includes provisioner + installers" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="570" y="110" width="560" height="200" />
</mxCell>
<mxCell id="c40" value="Linux target&#10;Debian/Ubuntu ancestry, apt, systemd&#10;Install aspnetcore-runtime-10.0 if absent&#10;PostgreSQL when persistent service selected&#10;Per-service Unix users/env/PFX&#10;Native unit + restart-on-failure" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="540" width="490" height="270" />
</mxCell>
<mxCell id="c41" value="Windows target&#10;Windows Services / virtual service identities&#10;.NET runtime download if absent&#10;EDB PostgreSQL 17 manifest/checksum&#10;%ProgramData%/HealthApp paths&#10;JSON/PFX ACLs + selected firewall rules&#10;UseWindowsService lifetime" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="600" y="540" width="490" height="270" />
</mxCell>
<mxCell id="c42" value="macOS target&#10;launchd / hidden service identities&#10;.NET runtime download if absent&#10;Homebrew PostgreSQL 17 / owned cluster&#10;Apple tools/Homebrew if needed&#10;/Library/Application Support/HealthApp&#10;System CA trust; private env/plist" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1170" y="540" width="490" height="270" />
</mxCell>
<mxCell id="c43" value="Same DLLs; native adapter" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c39" target="c40">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c44" value="Same DLLs; native adapter" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c39" target="c41">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c45" value="Same DLLs; native adapter" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c39" target="c42">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c46" value="Verified code paths/config-format tests ≠ proven native execution on every target. Manual GitHub Actions workflow exists; run outcomes unknown. Linux --root performs offline staging only. Native adapters need administrator/network access; distribution does not provision host SSH permissions. Evidence: deploy/build-release.*, installer/*, ConfigurationWriter, LaunchdWriter." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="970" width="1630" height="100" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
File diff suppressed because it is too large. Load diff
+40
View File
@@ -0,0 +1,40 @@
# Documented design versus implementation
Scope: repository snapshot 2026-10-12, commit `5d9371388c15066eeb2bc124ed227659c644dab5`. **Difference** is not automatically a defect. Current `.drawio` authority and explicit corrections supersede same-stem historical JPEGs under [Architecture README](../Docs/Architecture/README.md). No authoritative document was edited and no conflicting design was silently selected for implementation.
## Verified differences and elaborations
| ID | Original/current documentation | As-built evidence and interpretation |
| --- | --- | --- |
| D-01 | Original [domain model](../Docs/Architecture/01_domain_model.jpg) and [duplicate domain image](../Docs/Architecture/personal_health_measurement_all_diagrams-Domain%20Model.jpg) show Patient, Observation and Health Summary only | Account/profile lifecycle, professional assignments, measurement context, selections, trend assessments and overview concepts now exist. `HealthInsight` is a transient summary without stored summary ID. This is an expanded as-built model, not a claim that the original three concepts were replaced. [domains](../src/InsightsService/Domain/HealthInsight.cs), [assignments](../src/ApiGateway/Security/ProfessionalAssignments.cs) |
| D-02 | [Patient class](../Docs/Architecture/03_class_patient_profile_service.jpg) and [Patient ER](../Docs/Architecture/07_er_patient_profile_service.jpg) omit account association and account lookup | `Patient.AccountId`, nullable `account_id` and unique index plus by-account API now implement US-01/13. [migration](../src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.cs), [controller](../src/PatientProfileService/Controllers/PatientController.cs). Existing null associations are retained; no migration backfill assigns old rows to credentials. |
| D-03 | Original authentication design's opening/Section 10 says token format, lifetime, persistence owner and gateway protection are open; final paragraph permits minimum established mechanisms | Concrete opaque framework Bearer tokens, default 30-minute lifetime, Patient-owned association and shared-key HTTPS boundaries are implemented and described in [AUTHENTICATION.md](../src/AUTHENTICATION.md). Opening/open-decision text was not updated, so the document has residual status ambiguity. The final permission is consistent with selecting simple mechanisms; this task does not infer an unrecorded formal approval history. |
| D-04 | Historical Insights ER showed persisted HealthSummary; old Overview ER showed an overview persistence concept | Current [Insights correction](../Docs/Architecture/us10-insights-correction.md), [Insights drawio](../Docs/Architecture/09_er_insights_service.drawio) and [Overview drawio](../Docs/Architecture/06_class_health_overview_service.drawio) already supersede those concepts. Code has no DB/repository in either service. Historical inconsistency is resolved by current baseline; do not report it as a new implementation violation. |
| D-05 | Updated logical diagrams use schematic methods/names (`activity`, preparation details, HealthOverview/DTO) and sometimes combine domain/DTO boxes | Code uses `ActivityCondition`, `RestDurationMinutes`, flattened owned columns; separate local consumer DTOs; Overview client abstractions are abstract classes whereas Insights' client is an interface. Observation DTO does not expose creation/update timestamps although its domain entity contains them. These are implementation details permitted by Architecture README, not unexplained new services/tables. [context mapping](../src/ObservationService/Persistence/ObservationDbContext.cs), [DTO](../src/ObservationService/Contracts/ObservationDto.cs) |
| D-06 | Original class diagrams omit EF contexts, framework authentication, patch-presence fields and detailed trend result types | As-built class pages show those actual dependencies/attributes and responsibilities. No shared runtime contracts or direct class links across service boundaries were found. [patch](../src/ObservationService/Contracts/PatchObservationRequest.cs), [trend records](../src/InsightsService/Domain/TrendAssessment.cs), [Gateway startup](../src/ApiGateway/Program.cs) |
| D-07 | US-16 and its addendum describe Linux/systemd; later implementation guide also describes Windows/macOS | Native Windows Services/launchd adapters and WindowsServices package are present. This expands implemented platform support beyond the Linux wording while retaining service boundaries. Whether formal requirements should be updated is outside this assignment. Native success on every advertised platform is unknown. [adapters](../deploy/installer/install.ps1), [macOS](../deploy/installer/install-macos.sh) |
| D-08 | Committed systemd templates use `User=healthapp` and `/etc/healthapp/NAME.env`; installer guide describes dedicated users/nested files | Installer rewrites templates into `healthapp-NAME` user/group and `/etc/healthapp/NAME/service.env`. Using templates manually without that transform differs from normal installed behavior. [template](../deploy/systemd/healthapp-observation.service), [installer](../deploy/installer/install.sh) |
| D-09 | Original topology depicts client Web/Mobile | No product frontend is present. This repository implements the API backend; JMeter/curl/test clients are actual consumers. It is unknown whether a client lives in another repository. Backend stories do not establish a frontend deliverable. |
| D-10 | Installation prose broadly says native verification checks independent processes; US-16 AC-I includes stop/restart demonstration | Linux and Windows adapters check running state/distinct PIDs. macOS adapter calls `launchctl print` and HTTPS probes but does not explicitly compare PIDs. Live verification does not cycle stop/restart; test suite does so with direct processes. This is a runtime-verification limitation, not proof that services cannot restart independently. [Linux verifier](../deploy/installer/verify.sh), [macOS](../deploy/installer/install-macos.sh), [tests](../tests/Deployment.AcceptanceTests/InstallationTests.cs) |
| D-11 | Early ownership section of [AUTHENTICATION.md](../src/AUTHENTICATION.md) says trend/overview endpoints remain unimplemented; later sections say they are implemented | Both endpoint sets, client permissions and integration tests exist. The earlier sentence is stale and contradicts later sections of that same implementation document. Earlier service-protection text names only Observation/Insights callbacks, while the later US-12 section/code also provides Overview callbacks. [routes](../src/ApiGateway/Controllers/HealthOverviewController.cs), [trend controller](../src/InsightsService/Controllers/InsightsController.cs) |
## Current behavior with requirements or evidence limits
| ID | Verified behavior | Requirement/evidence implication |
| --- | --- | --- |
| U-01 | Narrative conflict detection is a finite substring list, including documented English/Danish phrases. [calculator](../src/InsightsService/Domain/InsightCalculator.Trends.cs) | US-04/11 broadly require relevant conflicts to be apparent; cited example `during exercise` is covered. Arbitrary wording/negation is not semantically understood. Exhaustive natural-language fulfillment is unknown and not proven by existing fixtures. |
| U-02 | Reference thresholds and development labels have compiled sources/limits; favourable/concerning logic is coded locally. [TRENDS](../src/TRENDS.md) | Numerical behavior is testable. Whether every inference is clinically supported under all input combinations needs an independent domain assessment; this documentation does not assert clinical validation. |
| U-03 | Ownership middleware compares most path segments case-sensitively; routing accepts conventional case variants | Canonical routes work. A case-varied route can return 404/403 instead of the controller behavior. Requirements do not prescribe casing; observable interface inconsistency, not a confirmed missing story. [middleware](../src/ApiGateway/Security/PatientAccessMiddleware.cs) |
| U-04 | Missing expected ownership JSON fields/invalid JSON lack dedicated upstream 502 mapping; general exception handling applies | Such malformed responses may yield 500, unlike explicit Insights/Overview invalid-JSON 502 handling. Upstream failure-injection tests do not prove every malformed shape/status path. |
| U-05 | Assignments are startup configuration, no installer assignment population; generated professional has none | US-14 assigned reads exist and are tested with predefined test assignments. A normal fresh installation cannot demonstrate a populated professional review workflow until assignments are configured. This does not require an out-of-scope assignment-management API. |
| U-06 | Deployment tests use different loopback addresses, controlled SSH/SCP and package doubles | These establish interfaces/scoping/command intent, not actual multi-machine routing, network/firewall policy or native package/service-manager success. Manual CI workflow exists; execution results are unknown in this task. |
| U-07 | Generated DB connections use `Pooling=false;SslMode=Prefer`; normal Linux startup bootstrap checks local PostgreSQL even if an external admin file is supplied | This is the actual configuration. Mandatory verified DB TLS is not implemented. External-DB Linux installation can still provision/check an unnecessary local server; the guide's general external-DB description does not mention this coupling. [bootstrap call](../deploy/installer/install.sh), [connection builder](../deploy/HealthApp.Provisioning/Deployment.cs) |
| U-08 | Installer detects existing app/config and refuses; failure retains partial output | No safe resumable upgrade/uninstall/transactional rollback is implemented. First-install retries may require administrative handling of retained material. This is documented prototype scope, not a silently repaired behavior. |
| U-09 | Complete flag in local installers/verifier is selected by literal `all` | Explicitly listing all five service names installs them but does not trigger the complete synthetic workflow in those wrappers. Distribution uses selected count for completeness. This is an observable verification asymmetry under US-16, without changing the application topology. |
| U-10 | Overview does sequential reads; no concurrency token or snapshot; history unbounded | Concurrent-write snapshot, conditional-edit protection, pagination and load resilience are absent. They are not explicit baseline story requirements; do not reclassify them as missing accepted features. |
| U-11 | Filesystem key ring has no explicitly configured encryption-at-rest; no immediate bearer revocation or account-record recheck | The prototype has persistent protected tickets and file permissions, not a full identity lifecycle. Registration/recovery/MFA/refresh/administration are explicitly outside scope. Production security compliance is not established. |
| U-12 | Supplied PFX is checked for a private key, then runtime verifies endpoints; generated leaf/CA expiry not automatically renewed | Early preflight, rotation, renewal and universal third-party chain support are not proven. Replacing certificates is an administrative first-install facility, not an implemented renewal service. |
## Unresolved unknowns
Live installed software/configuration may differ from this checkout; no server, device or administrative session was accessed. Native Windows/macOS CI runs, actual deployment firewall rules, backup/restore behavior, multi-instance Gateway behavior, certificate renewal procedures, production security/clinical approval and external client implementations cannot be established from this repository. [Traceability](requirements-traceability.md) separates these from observed functional support.
@@ -0,0 +1,486 @@
# Evidence inventory
Snapshot: 2026-10-12; source commit `5d9371388c15066eeb2bc124ed227659c644dab5`. This inventory lists tracked specification, application, deployment and acceptance-test files used to bound the review. SHA-256 prefixes identify file content, not a test result. Source links remain repository-relative.
## Inspection boundaries
Production source, contracts, persistence mappings/migrations, startup/security configuration, installer/provisioner, relevant acceptance fixtures/assertions and specification text were inspected. Current Draw.io cell content and original context/domain/Patient class/Patient ER images were examined. Same-stem historical JPEGs are superseded by current editable diagrams; their authority is governed by Architecture README. Test code is evidence of intended verification, not a fresh execution claim.
Experiment scripts/plans and their README were inspected for ancillary architecture. Private credentials and ignored raw load-test results were deliberately excluded; they are not needed to document production responsibilities. No live server or native installer was executed. No dependency versions were looked up externally; project declarations define this snapshot.
## File evidence
| File | Kind | SHA-256 prefix |
| --- | --- | --- |
| [.github/workflows/prototype-native-install.yml](../.github/workflows/prototype-native-install.yml) | Deployment / configuration / native validation | `de4240167653b10b` |
| [.gitignore](../.gitignore) | Repository / build / instructions | `5ff2245aafc37c27` |
| [AGENTS.md](../AGENTS.md) | Repository / build / instructions | `02330ed17811077c` |
| [Docs/Architecture/01_domain_model.jpg](../Docs/Architecture/01_domain_model.jpg) | Specification / context | `43354c405b637578` |
| [Docs/Architecture/02_microservice_architecture.jpg](../Docs/Architecture/02_microservice_architecture.jpg) | Specification / context | `67862bb8e9c1029f` |
| [Docs/Architecture/03_class_patient_profile_service.jpg](../Docs/Architecture/03_class_patient_profile_service.jpg) | Specification / context | `4abc364239a97b0d` |
| [Docs/Architecture/04_class_observation_service.drawio](../Docs/Architecture/04_class_observation_service.drawio) | Specification / context | `0b48a2760252607d` |
| [Docs/Architecture/04_class_observation_service.jpg](../Docs/Architecture/04_class_observation_service.jpg) | Specification / context | `749647606ee3a5a7` |
| [Docs/Architecture/05_class_insights_service.drawio](../Docs/Architecture/05_class_insights_service.drawio) | Specification / context | `8c5837f38eb745e1` |
| [Docs/Architecture/05_class_insights_service.jpg](../Docs/Architecture/05_class_insights_service.jpg) | Specification / context | `18d5fbeec5db5947` |
| [Docs/Architecture/06_class_health_overview_service.drawio](../Docs/Architecture/06_class_health_overview_service.drawio) | Specification / context | `8c401510f8c0a2e8` |
| [Docs/Architecture/06_class_health_overview_service.jpg](../Docs/Architecture/06_class_health_overview_service.jpg) | Specification / context | `1c2751c7fdbf123b` |
| [Docs/Architecture/07_er_patient_profile_service.jpg](../Docs/Architecture/07_er_patient_profile_service.jpg) | Specification / context | `8074f734e3e4e28e` |
| [Docs/Architecture/08_er_observation_service.drawio](../Docs/Architecture/08_er_observation_service.drawio) | Specification / context | `88cc97c26ff40650` |
| [Docs/Architecture/08_er_observation_service.jpg](../Docs/Architecture/08_er_observation_service.jpg) | Specification / context | `e6b02064ba2019ac` |
| [Docs/Architecture/09_er_insights_service-overruled no persistence here to give an idea of what data is needed to be able to use from other services or calculate.jpg](../Docs/Architecture/09_er_insights_service-overruled%20no%20persistence%20here%20to%20give%20an%20idea%20of%20what%20data%20is%20needed%20to%20be%20able%20to%20use%20from%20other%20services%20or%20calculate.jpg) | Specification / context | `6f01585a506f84ef` |
| [Docs/Architecture/09_er_insights_service.drawio](../Docs/Architecture/09_er_insights_service.drawio) | Specification / context | `534ba79368ac79eb` |
| [Docs/Architecture/10_er_health_overview_service-overruled no persistence here to give an idea of what data is needed to be able to use from other services or calculate.jpg](../Docs/Architecture/10_er_health_overview_service-overruled%20no%20persistence%20here%20to%20give%20an%20idea%20of%20what%20data%20is%20needed%20to%20be%20able%20to%20use%20from%20other%20services%20or%20calculate.jpg) | Specification / context | `b27db286ce26cbc1` |
| [Docs/Architecture/README.md](../Docs/Architecture/README.md) | Specification / context | `3754fa7ed95a6ef5` |
| [Docs/Architecture/personal_health_measurement_all_diagrams-Domain Model.jpg](../Docs/Architecture/personal_health_measurement_all_diagrams-Domain%20Model.jpg) | Specification / context | `285c4c52440a3000` |
| [Docs/Architecture/us10-insights-correction.md](../Docs/Architecture/us10-insights-correction.md) | Specification / context | `259d59ee31518068` |
| [Docs/Design/authentication-and-access-control-design.md](../Docs/Design/authentication-and-access-control-design.md) | Specification / context | `b044d0f78d542be0` |
| [Docs/Requirements/00-common-requirements.md](../Docs/Requirements/00-common-requirements.md) | Specification / context | `1f056a53699e0875` |
| [Docs/Requirements/US16 easy installation and deployment installer.txt](../Docs/Requirements/US16%20easy%20installation%20and%20deployment%20installer.txt) | Specification / context | `07416edc16ce034a` |
| [Docs/Requirements/us01-create-patient-profile.md](../Docs/Requirements/us01-create-patient-profile.md) | Specification / context | `52872490bd37b15e` |
| [Docs/Requirements/us02-view-patient-profile.md](../Docs/Requirements/us02-view-patient-profile.md) | Specification / context | `8af9e4e55ddb9bb4` |
| [Docs/Requirements/us03-update-patient-profile.md](../Docs/Requirements/us03-update-patient-profile.md) | Specification / context | `0825a974cea87924` |
| [Docs/Requirements/us04-record-observation.md](../Docs/Requirements/us04-record-observation.md) | Specification / context | `894e99dac4e05604` |
| [Docs/Requirements/us05-view-observation.md](../Docs/Requirements/us05-view-observation.md) | Specification / context | `3632aebd02b34996` |
| [Docs/Requirements/us06-latest-observation.md](../Docs/Requirements/us06-latest-observation.md) | Specification / context | `dfec3b4fcb1c8410` |
| [Docs/Requirements/us07-observation-history.md](../Docs/Requirements/us07-observation-history.md) | Specification / context | `dec0f06cee54e713` |
| [Docs/Requirements/us08-update-observation.md](../Docs/Requirements/us08-update-observation.md) | Specification / context | `1e65e62813db4e50` |
| [Docs/Requirements/us09-delete-observation.md](../Docs/Requirements/us09-delete-observation.md) | Specification / context | `28e4dc1cbc92f60b` |
| [Docs/Requirements/us10-calculated-insight.md](../Docs/Requirements/us10-calculated-insight.md) | Specification / context | `ed2f03e69d460ef5` |
| [Docs/Requirements/us11-health-trend.md](../Docs/Requirements/us11-health-trend.md) | Specification / context | `7121bb4890e70621` |
| [Docs/Requirements/us12-health-overview.md](../Docs/Requirements/us12-health-overview.md) | Specification / context | `58db5d95b70b09f7` |
| [Docs/Requirements/us13-patient-authentication.md](../Docs/Requirements/us13-patient-authentication.md) | Specification / context | `d2584876fbb17ecd` |
| [Docs/Requirements/us14-professional-access.md](../Docs/Requirements/us14-professional-access.md) | Specification / context | `bb451f00e4bad5d7` |
| [Docs/Requirements/us15-measurement-guidance.md](../Docs/Requirements/us15-measurement-guidance.md) | Specification / context | `1aa52764ac93fcdb` |
| [Docs/Requirements/us16-addendum](../Docs/Requirements/us16-addendum) | Specification / context | `61f88829b2501050` |
| [Docs/requirements-reconciliation-changelog.md](../Docs/requirements-reconciliation-changelog.md) | Specification / context | `318c4e2c9f3c1137` |
| [HealthApp.slnx](../HealthApp.slnx) | Repository / build / instructions | `3b070ed1a967e900` |
| [README.MD](../README.MD) | Repository / build / instructions | `fd783476366adf4c` |
| [deploy/HealthApp.Provisioning/ConfigurationWriter.cs](../deploy/HealthApp.Provisioning/ConfigurationWriter.cs) | Deployment / configuration / native validation | `702f4a646eac3dd6` |
| [deploy/HealthApp.Provisioning/DatabaseProvisioning.cs](../deploy/HealthApp.Provisioning/DatabaseProvisioning.cs) | Deployment / configuration / native validation | `e1c8e252642b12f8` |
| [deploy/HealthApp.Provisioning/Deployment.cs](../deploy/HealthApp.Provisioning/Deployment.cs) | Deployment / configuration / native validation | `8f3e6fc3761fe731` |
| [deploy/HealthApp.Provisioning/Distribution.cs](../deploy/HealthApp.Provisioning/Distribution.cs) | Deployment / configuration / native validation | `d9b7c467172e3156` |
| [deploy/HealthApp.Provisioning/HealthApp.Provisioning.csproj](../deploy/HealthApp.Provisioning/HealthApp.Provisioning.csproj) | Deployment / configuration / native validation | `5f18785a17f78d01` |
| [deploy/HealthApp.Provisioning/InstallationVerification.cs](../deploy/HealthApp.Provisioning/InstallationVerification.cs) | Deployment / configuration / native validation | `094877cb5e6ff6e8` |
| [deploy/HealthApp.Provisioning/LaunchdWriter.cs](../deploy/HealthApp.Provisioning/LaunchdWriter.cs) | Deployment / configuration / native validation | `b1d9b620ade4b525` |
| [deploy/HealthApp.Provisioning/Program.cs](../deploy/HealthApp.Provisioning/Program.cs) | Deployment / configuration / native validation | `e42034fedec2c3c1` |
| [deploy/INSTALLATION.md](../deploy/INSTALLATION.md) | Deployment / configuration / native validation | `94e8e3b7a7bcdf6f` |
| [deploy/api-gateway.env.example](../deploy/api-gateway.env.example) | Deployment / configuration / native validation | `e8137593d4710953` |
| [deploy/build-release.ps1](../deploy/build-release.ps1) | Deployment / configuration / native validation | `d85375f5a7392fe3` |
| [deploy/build-release.sh](../deploy/build-release.sh) | Deployment / configuration / native validation | `7de7fb0ffe963671` |
| [deploy/health-overview.env.example](../deploy/health-overview.env.example) | Deployment / configuration / native validation | `b7883d73a34da16a` |
| [deploy/insights.env.example](../deploy/insights.env.example) | Deployment / configuration / native validation | `8fff870eede50c4f` |
| [deploy/installer/bootstrap.sh](../deploy/installer/bootstrap.sh) | Deployment / configuration / native validation | `db52696d484fe728` |
| [deploy/installer/distribute.sh](../deploy/installer/distribute.sh) | Deployment / configuration / native validation | `bda6aa53146a3d4d` |
| [deploy/installer/install-macos.sh](../deploy/installer/install-macos.sh) | Deployment / configuration / native validation | `bd78d0ec3be482ce` |
| [deploy/installer/install.ps1](../deploy/installer/install.ps1) | Deployment / configuration / native validation | `4c1bbaac58c99539` |
| [deploy/installer/install.sh](../deploy/installer/install.sh) | Deployment / configuration / native validation | `ccc35b5764e96a7d` |
| [deploy/installer/services.sh](../deploy/installer/services.sh) | Deployment / configuration / native validation | `6a21a5c213fbe7b2` |
| [deploy/installer/verify.sh](../deploy/installer/verify.sh) | Deployment / configuration / native validation | `62d50b2bcd40b04a` |
| [deploy/observation.env.example](../deploy/observation.env.example) | Deployment / configuration / native validation | `c18f0f6abb1f32e9` |
| [deploy/patient-profile.env.example](../deploy/patient-profile.env.example) | Deployment / configuration / native validation | `f01a3ba42d22dbcf` |
| [deploy/systemd/healthapp-api-gateway.service](../deploy/systemd/healthapp-api-gateway.service) | Deployment / configuration / native validation | `15a9b7bc43a72940` |
| [deploy/systemd/healthapp-health-overview.service](../deploy/systemd/healthapp-health-overview.service) | Deployment / configuration / native validation | `d8841c4b04c74f3b` |
| [deploy/systemd/healthapp-insights.service](../deploy/systemd/healthapp-insights.service) | Deployment / configuration / native validation | `8ec5dbfa6e1a9fbd` |
| [deploy/systemd/healthapp-observation.service](../deploy/systemd/healthapp-observation.service) | Deployment / configuration / native validation | `a61518322838ca14` |
| [deploy/systemd/healthapp-patient-profile.service](../deploy/systemd/healthapp-patient-profile.service) | Deployment / configuration / native validation | `262b269a997923aa` |
| [src/AUTHENTICATION.md](../src/AUTHENTICATION.md) | Application / implementation documentation | `38e4a3580e1cc8aa` |
| [src/ApiGateway/ApiGateway.csproj](../src/ApiGateway/ApiGateway.csproj) | Application / implementation documentation | `6e81c32841f12d91` |
| [src/ApiGateway/Controllers/AuthenticationController.cs](../src/ApiGateway/Controllers/AuthenticationController.cs) | Application / implementation documentation | `f76ec4f393c55ee6` |
| [src/ApiGateway/Controllers/HealthOverviewController.cs](../src/ApiGateway/Controllers/HealthOverviewController.cs) | Application / implementation documentation | `0a05ccd0dd9b763e` |
| [src/ApiGateway/Controllers/InsightsController.cs](../src/ApiGateway/Controllers/InsightsController.cs) | Application / implementation documentation | `810c906f771ce01e` |
| [src/ApiGateway/Controllers/MeasurementGuidanceController.cs](../src/ApiGateway/Controllers/MeasurementGuidanceController.cs) | Application / implementation documentation | `1be2c32f56a5cda6` |
| [src/ApiGateway/Controllers/ObservationController.cs](../src/ApiGateway/Controllers/ObservationController.cs) | Application / implementation documentation | `2a33302f8d8158e2` |
| [src/ApiGateway/Controllers/PatientController.cs](../src/ApiGateway/Controllers/PatientController.cs) | Application / implementation documentation | `2b416bb49e98c400` |
| [src/ApiGateway/Controllers/ProfessionalController.cs](../src/ApiGateway/Controllers/ProfessionalController.cs) | Application / implementation documentation | `87f7c5830215673a` |
| [src/ApiGateway/Program.cs](../src/ApiGateway/Program.cs) | Application / implementation documentation | `9e6ba8e51c837719` |
| [src/ApiGateway/Security/InternalServiceAuthenticationHandler.cs](../src/ApiGateway/Security/InternalServiceAuthenticationHandler.cs) | Application / implementation documentation | `985ee505d8e38d15` |
| [src/ApiGateway/Security/PatientAccessMiddleware.cs](../src/ApiGateway/Security/PatientAccessMiddleware.cs) | Application / implementation documentation | `497c7f69c179fa04` |
| [src/ApiGateway/Security/ProfessionalAssignments.cs](../src/ApiGateway/Security/ProfessionalAssignments.cs) | Application / implementation documentation | `7883c801dcdec8df` |
| [src/ApiGateway/Security/PrototypeAccounts.cs](../src/ApiGateway/Security/PrototypeAccounts.cs) | Application / implementation documentation | `a4cbcaa6db514439` |
| [src/ApiGateway/appsettings.json](../src/ApiGateway/appsettings.json) | Application / implementation documentation | `817db0bf2ecca783` |
| [src/HealthOverviewService/Application/HealthOverviewApplicationService.cs](../src/HealthOverviewService/Application/HealthOverviewApplicationService.cs) | Application / implementation documentation | `234190b299f0487c` |
| [src/HealthOverviewService/Clients/InsightsServiceClient.cs](../src/HealthOverviewService/Clients/InsightsServiceClient.cs) | Application / implementation documentation | `1087c1ac57605ae7` |
| [src/HealthOverviewService/Clients/ObservationServiceClient.cs](../src/HealthOverviewService/Clients/ObservationServiceClient.cs) | Application / implementation documentation | `f6cef0c6f78e04ea` |
| [src/HealthOverviewService/Clients/PatientProfileServiceClient.cs](../src/HealthOverviewService/Clients/PatientProfileServiceClient.cs) | Application / implementation documentation | `7bba92bc1b382c3d` |
| [src/HealthOverviewService/Contracts/HealthOverviewDto.cs](../src/HealthOverviewService/Contracts/HealthOverviewDto.cs) | Application / implementation documentation | `d95e27f230cfeeb1` |
| [src/HealthOverviewService/Controllers/HealthOverviewController.cs](../src/HealthOverviewService/Controllers/HealthOverviewController.cs) | Application / implementation documentation | `c3e9bc2e646527a4` |
| [src/HealthOverviewService/HealthOverviewService.csproj](../src/HealthOverviewService/HealthOverviewService.csproj) | Application / implementation documentation | `6e81c32841f12d91` |
| [src/HealthOverviewService/Program.cs](../src/HealthOverviewService/Program.cs) | Application / implementation documentation | `63a799d09cdeaf1e` |
| [src/HealthOverviewService/appsettings.json](../src/HealthOverviewService/appsettings.json) | Application / implementation documentation | `817db0bf2ecca783` |
| [src/InsightsService/Application/InsightsApplicationService.cs](../src/InsightsService/Application/InsightsApplicationService.cs) | Application / implementation documentation | `7319a7f8057b1906` |
| [src/InsightsService/Clients/HttpObservationServiceClient.cs](../src/InsightsService/Clients/HttpObservationServiceClient.cs) | Application / implementation documentation | `91677b578eddbd12` |
| [src/InsightsService/Clients/ObservationServiceClient.cs](../src/InsightsService/Clients/ObservationServiceClient.cs) | Application / implementation documentation | `802b8cc66f58441d` |
| [src/InsightsService/Contracts/HealthInsightDto.cs](../src/InsightsService/Contracts/HealthInsightDto.cs) | Application / implementation documentation | `001d24e7d2b0dedf` |
| [src/InsightsService/Contracts/ObservationDto.cs](../src/InsightsService/Contracts/ObservationDto.cs) | Application / implementation documentation | `fd37572e721ba288` |
| [src/InsightsService/Controllers/InsightsController.cs](../src/InsightsService/Controllers/InsightsController.cs) | Application / implementation documentation | `0304dc102bb192ab` |
| [src/InsightsService/Domain/ContextSelection.cs](../src/InsightsService/Domain/ContextSelection.cs) | Application / implementation documentation | `82b9acd07e6b4de0` |
| [src/InsightsService/Domain/HealthInsight.cs](../src/InsightsService/Domain/HealthInsight.cs) | Application / implementation documentation | `fc634cb3b99905c3` |
| [src/InsightsService/Domain/InsightCalculator.Trends.cs](../src/InsightsService/Domain/InsightCalculator.Trends.cs) | Application / implementation documentation | `ef196331aad4cf12` |
| [src/InsightsService/Domain/InsightCalculator.cs](../src/InsightsService/Domain/InsightCalculator.cs) | Application / implementation documentation | `2575a8f7641f6f23` |
| [src/InsightsService/Domain/TrendAssessment.cs](../src/InsightsService/Domain/TrendAssessment.cs) | Application / implementation documentation | `5ba75fba606fa7ca` |
| [src/InsightsService/InsightsService.csproj](../src/InsightsService/InsightsService.csproj) | Application / implementation documentation | `6e81c32841f12d91` |
| [src/InsightsService/Program.cs](../src/InsightsService/Program.cs) | Application / implementation documentation | `3aceaf19cc216790` |
| [src/InsightsService/appsettings.json](../src/InsightsService/appsettings.json) | Application / implementation documentation | `817db0bf2ecca783` |
| [src/OVERVIEW.md](../src/OVERVIEW.md) | Application / implementation documentation | `aa7f4ca1ffca79de` |
| [src/ObservationService/Application/ObservationApplicationService.cs](../src/ObservationService/Application/ObservationApplicationService.cs) | Application / implementation documentation | `4ceaa7d67b391b0a` |
| [src/ObservationService/Application/ObservationRepository.cs](../src/ObservationService/Application/ObservationRepository.cs) | Application / implementation documentation | `a1c21ef7e0700b4f` |
| [src/ObservationService/Contracts/MeasurementContextPatch.cs](../src/ObservationService/Contracts/MeasurementContextPatch.cs) | Application / implementation documentation | `fae0cad81e9bec85` |
| [src/ObservationService/Contracts/ObservationDto.cs](../src/ObservationService/Contracts/ObservationDto.cs) | Application / implementation documentation | `989312e16eaa4306` |
| [src/ObservationService/Contracts/PatchObservationRequest.cs](../src/ObservationService/Contracts/PatchObservationRequest.cs) | Application / implementation documentation | `3be4db307b24e5c8` |
| [src/ObservationService/Contracts/RecordObservationRequest.cs](../src/ObservationService/Contracts/RecordObservationRequest.cs) | Application / implementation documentation | `7430845925f6ae9c` |
| [src/ObservationService/Contracts/UpdateObservationRequest.cs](../src/ObservationService/Contracts/UpdateObservationRequest.cs) | Application / implementation documentation | `f1d987f3d0d996ce` |
| [src/ObservationService/Controllers/ObservationController.cs](../src/ObservationService/Controllers/ObservationController.cs) | Application / implementation documentation | `68fe89a643bf1ff0` |
| [src/ObservationService/Domain/BloodPressureObservation.cs](../src/ObservationService/Domain/BloodPressureObservation.cs) | Application / implementation documentation | `a968856d9d9a7e8d` |
| [src/ObservationService/Domain/ContextSelection.cs](../src/ObservationService/Domain/ContextSelection.cs) | Application / implementation documentation | `1d7eeba19330a191` |
| [src/ObservationService/Domain/MeasurementContext.cs](../src/ObservationService/Domain/MeasurementContext.cs) | Application / implementation documentation | `500c7e2c02213fc1` |
| [src/ObservationService/ObservationService.csproj](../src/ObservationService/ObservationService.csproj) | Application / implementation documentation | `2a14c125f601d5fa` |
| [src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.Designer.cs](../src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.Designer.cs) | Application / implementation documentation | `9f24f074d1c49343` |
| [src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.cs](../src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.cs) | Application / implementation documentation | `1a44e09a08a6045f` |
| [src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.Designer.cs](../src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.Designer.cs) | Application / implementation documentation | `1cb88c86e7a13a5c` |
| [src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.cs](../src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.cs) | Application / implementation documentation | `da719484aab8eff2` |
| [src/ObservationService/Persistence/Migrations/ObservationDbContextModelSnapshot.cs](../src/ObservationService/Persistence/Migrations/ObservationDbContextModelSnapshot.cs) | Application / implementation documentation | `fb9c5c7d874f4b23` |
| [src/ObservationService/Persistence/ObservationDbContext.cs](../src/ObservationService/Persistence/ObservationDbContext.cs) | Application / implementation documentation | `6d9f0c6106db8b2f` |
| [src/ObservationService/Persistence/SqlObservationRepository.cs](../src/ObservationService/Persistence/SqlObservationRepository.cs) | Application / implementation documentation | `f77e38151d481cc3` |
| [src/ObservationService/Program.cs](../src/ObservationService/Program.cs) | Application / implementation documentation | `7ad86451a63a7b49` |
| [src/ObservationService/appsettings.json](../src/ObservationService/appsettings.json) | Application / implementation documentation | `8cd0df652a9a4966` |
| [src/PatientProfileService/Application/PatientApplicationService.cs](../src/PatientProfileService/Application/PatientApplicationService.cs) | Application / implementation documentation | `8f673a37101bd11a` |
| [src/PatientProfileService/Application/PatientRepository.cs](../src/PatientProfileService/Application/PatientRepository.cs) | Application / implementation documentation | `4d9d0ee890f2ce9e` |
| [src/PatientProfileService/Application/ProfileAlreadyExistsException.cs](../src/PatientProfileService/Application/ProfileAlreadyExistsException.cs) | Application / implementation documentation | `96ee280d51c6996f` |
| [src/PatientProfileService/Contracts/CreatePatientRequest.cs](../src/PatientProfileService/Contracts/CreatePatientRequest.cs) | Application / implementation documentation | `dd75326c9d723b9a` |
| [src/PatientProfileService/Contracts/PatientDto.cs](../src/PatientProfileService/Contracts/PatientDto.cs) | Application / implementation documentation | `2886340d45231135` |
| [src/PatientProfileService/Contracts/UpdatePatientRequest.cs](../src/PatientProfileService/Contracts/UpdatePatientRequest.cs) | Application / implementation documentation | `27528295eccdb708` |
| [src/PatientProfileService/Controllers/PatientController.cs](../src/PatientProfileService/Controllers/PatientController.cs) | Application / implementation documentation | `ac2c59bf16c70ea7` |
| [src/PatientProfileService/Domain/Patient.cs](../src/PatientProfileService/Domain/Patient.cs) | Application / implementation documentation | `7eaeee54560d9754` |
| [src/PatientProfileService/PatientProfileService.csproj](../src/PatientProfileService/PatientProfileService.csproj) | Application / implementation documentation | `2a14c125f601d5fa` |
| [src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.Designer.cs](../src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.Designer.cs) | Application / implementation documentation | `721fdc07915da2fa` |
| [src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.cs](../src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.cs) | Application / implementation documentation | `715e32ae82b3133a` |
| [src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.Designer.cs](../src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.Designer.cs) | Application / implementation documentation | `7d58aae8acc9e4e1` |
| [src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.cs](../src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.cs) | Application / implementation documentation | `d61827e783580644` |
| [src/PatientProfileService/Persistence/Migrations/PatientDbContextModelSnapshot.cs](../src/PatientProfileService/Persistence/Migrations/PatientDbContextModelSnapshot.cs) | Application / implementation documentation | `4137f40f98d3de0d` |
| [src/PatientProfileService/Persistence/PatientDbContext.cs](../src/PatientProfileService/Persistence/PatientDbContext.cs) | Application / implementation documentation | `c3ae81375a6973bb` |
| [src/PatientProfileService/Persistence/SqlPatientRepository.cs](../src/PatientProfileService/Persistence/SqlPatientRepository.cs) | Application / implementation documentation | `637d9a788b95ced0` |
| [src/PatientProfileService/Program.cs](../src/PatientProfileService/Program.cs) | Application / implementation documentation | `087178aa8c556e97` |
| [src/PatientProfileService/appsettings.json](../src/PatientProfileService/appsettings.json) | Application / implementation documentation | `8cd0df652a9a4966` |
| [src/README.md](../src/README.md) | Application / implementation documentation | `8779152d2a416c51` |
| [src/TRENDS.md](../src/TRENDS.md) | Application / implementation documentation | `0506cb4fef1e36e8` |
| [tests/Deployment.AcceptanceTests/BootstrapTests.cs](../tests/Deployment.AcceptanceTests/BootstrapTests.cs) | Acceptance / fixture / test support | `fe3dc46f5c127bb3` |
| [tests/Deployment.AcceptanceTests/Deployment.AcceptanceTests.csproj](../tests/Deployment.AcceptanceTests/Deployment.AcceptanceTests.csproj) | Acceptance / fixture / test support | `aa3bee15a11bd295` |
| [tests/Deployment.AcceptanceTests/DeploymentFixture.cs](../tests/Deployment.AcceptanceTests/DeploymentFixture.cs) | Acceptance / fixture / test support | `7138d67f1ab0def4` |
| [tests/Deployment.AcceptanceTests/InstallationTests.cs](../tests/Deployment.AcceptanceTests/InstallationTests.cs) | Acceptance / fixture / test support | `b771a4ffdd667eb1` |
| [tests/Observation.AcceptanceTests/ContextFilteredHistoryTests.cs](../tests/Observation.AcceptanceTests/ContextFilteredHistoryTests.cs) | Acceptance / fixture / test support | `0995b4980a55c1cd` |
| [tests/Observation.AcceptanceTests/ContextSelectedInsightTests.cs](../tests/Observation.AcceptanceTests/ContextSelectedInsightTests.cs) | Acceptance / fixture / test support | `ce8e908a3ff10c01` |
| [tests/Observation.AcceptanceTests/DeleteContextualisedObservationTests.cs](../tests/Observation.AcceptanceTests/DeleteContextualisedObservationTests.cs) | Acceptance / fixture / test support | `2709163cd782fee2` |
| [tests/Observation.AcceptanceTests/DeleteObservationTests.cs](../tests/Observation.AcceptanceTests/DeleteObservationTests.cs) | Acceptance / fixture / test support | `916ebbcc0f5d3737` |
| [tests/Observation.AcceptanceTests/HealthInsightTests.cs](../tests/Observation.AcceptanceTests/HealthInsightTests.cs) | Acceptance / fixture / test support | `b6e1cfac712455f3` |
| [tests/Observation.AcceptanceTests/HealthOverviewTests.cs](../tests/Observation.AcceptanceTests/HealthOverviewTests.cs) | Acceptance / fixture / test support | `0e7874fde9943828` |
| [tests/Observation.AcceptanceTests/HealthTrendTests.cs](../tests/Observation.AcceptanceTests/HealthTrendTests.cs) | Acceptance / fixture / test support | `48266f7b71838fe9` |
| [tests/Observation.AcceptanceTests/LatestObservationTests.cs](../tests/Observation.AcceptanceTests/LatestObservationTests.cs) | Acceptance / fixture / test support | `d4cb653d7fc0999b` |
| [tests/Observation.AcceptanceTests/MeasurementContextMigrationTests.cs](../tests/Observation.AcceptanceTests/MeasurementContextMigrationTests.cs) | Acceptance / fixture / test support | `7cf4d025ac906cce` |
| [tests/Observation.AcceptanceTests/Observation.AcceptanceTests.csproj](../tests/Observation.AcceptanceTests/Observation.AcceptanceTests.csproj) | Acceptance / fixture / test support | `68f9427df8b24b70` |
| [tests/Observation.AcceptanceTests/ObservationApiFixture.cs](../tests/Observation.AcceptanceTests/ObservationApiFixture.cs) | Acceptance / fixture / test support | `a26195b246a37547` |
| [tests/Observation.AcceptanceTests/ObservationHistoryTests.cs](../tests/Observation.AcceptanceTests/ObservationHistoryTests.cs) | Acceptance / fixture / test support | `17299fb041080f2a` |
| [tests/Observation.AcceptanceTests/PatchObservationTests.cs](../tests/Observation.AcceptanceTests/PatchObservationTests.cs) | Acceptance / fixture / test support | `84cbd448712e3b32` |
| [tests/Observation.AcceptanceTests/PatientAuthenticationTests.cs](../tests/Observation.AcceptanceTests/PatientAuthenticationTests.cs) | Acceptance / fixture / test support | `466ae0a234bb5deb` |
| [tests/Observation.AcceptanceTests/ProfessionalAccessTests.cs](../tests/Observation.AcceptanceTests/ProfessionalAccessTests.cs) | Acceptance / fixture / test support | `1e3c87b0666c6a87` |
| [tests/Observation.AcceptanceTests/RecordMeasurementContextTests.cs](../tests/Observation.AcceptanceTests/RecordMeasurementContextTests.cs) | Acceptance / fixture / test support | `d582410cd6b277a7` |
| [tests/Observation.AcceptanceTests/RecordObservationTests.cs](../tests/Observation.AcceptanceTests/RecordObservationTests.cs) | Acceptance / fixture / test support | `2cb26f6bed1d3c8e` |
| [tests/Observation.AcceptanceTests/UpdateObservationTests.cs](../tests/Observation.AcceptanceTests/UpdateObservationTests.cs) | Acceptance / fixture / test support | `ad18354dc70dbe42` |
| [tests/Observation.AcceptanceTests/ViewObservationContextTests.cs](../tests/Observation.AcceptanceTests/ViewObservationContextTests.cs) | Acceptance / fixture / test support | `3b25fb13e3582bdf` |
| [tests/PatientProfile.AcceptanceTests/AuthenticationIntegrationTests.cs](../tests/PatientProfile.AcceptanceTests/AuthenticationIntegrationTests.cs) | Acceptance / fixture / test support | `60dbf89fd22f9e75` |
| [tests/PatientProfile.AcceptanceTests/CreatePatientTests.cs](../tests/PatientProfile.AcceptanceTests/CreatePatientTests.cs) | Acceptance / fixture / test support | `2b0bb2b9b727a178` |
| [tests/PatientProfile.AcceptanceTests/MeasurementGuidanceTests.cs](../tests/PatientProfile.AcceptanceTests/MeasurementGuidanceTests.cs) | Acceptance / fixture / test support | `b4de9f53f067bf7d` |
| [tests/PatientProfile.AcceptanceTests/PatientApiFixture.cs](../tests/PatientProfile.AcceptanceTests/PatientApiFixture.cs) | Acceptance / fixture / test support | `e54c213453683996` |
| [tests/PatientProfile.AcceptanceTests/PatientProfile.AcceptanceTests.csproj](../tests/PatientProfile.AcceptanceTests/PatientProfile.AcceptanceTests.csproj) | Acceptance / fixture / test support | `d224cf5a084478bf` |
| [tests/PatientProfile.AcceptanceTests/UpdatePatientTests.cs](../tests/PatientProfile.AcceptanceTests/UpdatePatientTests.cs) | Acceptance / fixture / test support | `2bfebdf5fceaf2fc` |
| [tests/Support/AuthenticatedTestClient.cs](../tests/Support/AuthenticatedTestClient.cs) | Acceptance / fixture / test support | `112bb94396a6272b` |
## Test behavior index
This index records declared test method names so that claims can be cross-checked against concrete assertions/setup. Theory case counts are not enumerated; method count is not the executed test count.
### BootstrapTests.cs
Source: [tests/Deployment.AcceptanceTests/BootstrapTests.cs](../tests/Deployment.AcceptanceTests/BootstrapTests.cs).
- `Package_provisioning_detects_runtime_and_postgresql_and_installs_only_needed_dependencies`
### InstallationTests.cs
Source: [tests/Deployment.AcceptanceTests/InstallationTests.cs](../tests/Deployment.AcceptanceTests/InstallationTests.cs).
- `A_selected_service_release_can_be_built_into_a_relative_output_directory`
- `Only_selected_payloads_configuration_and_independent_units_are_installed`
- `Configuration_and_certificates_are_generated_with_matching_credentials_and_private_permissions`
- `Dedicated_database_roles_cannot_access_each_others_data_or_administer_the_server`
- `New_deployments_get_new_secrets_and_do_not_overwrite_existing_material`
- `Native_configuration_adapters_use_the_same_service_values_and_independent_paths`
- `Invalid_service_selection_is_rejected_without_creating_an_installation`
- `Invalid_topology_fails_before_generating_configuration_or_credentials`
- `A_single_installed_service_starts_and_stops_without_other_local_service_processes`
- `Two_colocated_installed_services_run_with_independent_configuration_and_processes`
- `Installed_complete_system_runs_in_five_processes_and_preserves_network_and_persistence_boundaries`
### ContextFilteredHistoryTests.cs
Source: [tests/Observation.AcceptanceTests/ContextFilteredHistoryTests.cs](../tests/Observation.AcceptanceTests/ContextFilteredHistoryTests.cs).
- `Independent_and_combined_selections_return_matching_context_and_metadata`
- `Unknown_selections_match_unknown_categories_without_interpreting_legacy_text`
- `No_selection_retains_all_contexts_in_chronological_order_after_restart`
- `Empty_filtered_history_is_an_empty_array_with_applied_selection_metadata`
- `Filtered_history_preserves_patient_scope_inclusive_boundaries_and_equal_bounds`
- `Unsupported_selections_are_rejected_without_changing_observations`
- `Professional_reads_follow_assignments_and_other_patient_tokens_cannot_use_filters_to_gain_access`
### ContextSelectedInsightTests.cs
Source: [tests/Observation.AcceptanceTests/ContextSelectedInsightTests.cs](../tests/Observation.AcceptanceTests/ContextSelectedInsightTests.cs).
- `Independent_and_combined_selections_use_only_matching_observations_and_report_their_basis`
- `Unfiltered_insight_includes_unknown_context_and_explains_mixed_and_missing_conditions`
- `Unknown_selection_is_explicit_and_legacy_narrative_does_not_create_known_membership`
- `Means_round_only_the_final_value_to_two_decimals_with_half_up_rounding`
- `Corrections_clearing_and_deletion_change_membership_and_fresh_summary_results_after_restart`
- `Filtered_insight_preserves_patient_scope_inclusive_bounds_and_equal_instants`
- `Unsupported_selection_is_rejected_with_validation_details`
- `Professional_selection_requires_assignment_and_other_patient_access_is_rejected`
### DeleteContextualisedObservationTests.cs
Source: [tests/Observation.AcceptanceTests/DeleteContextualisedObservationTests.cs](../tests/Observation.AcceptanceTests/DeleteContextualisedObservationTests.cs).
- `Deleted_context_stays_absent_from_retrieval_filtered_history_and_latest_after_restart`
- `New_numerical_summary_excludes_deleted_values_and_retains_current_remaining_observations`
- `Deleting_only_contextualised_observation_leaves_empty_filtered_history_and_no_summary`
- `Unauthorised_deletions_preserve_the_observation_and_all_context`
### DeleteObservationTests.cs
Source: [tests/Observation.AcceptanceTests/DeleteObservationTests.cs](../tests/Observation.AcceptanceTests/DeleteObservationTests.cs).
- `Deleted_observation_stays_absent_after_restart_and_other_observations_are_preserved`
- `Deleting_the_only_observation_leaves_empty_history_and_no_latest_observation`
- `Missing_observation_returns_not_found_without_changing_existing_data`
### HealthInsightTests.cs
Source: [tests/Observation.AcceptanceTests/HealthInsightTests.cs](../tests/Observation.AcceptanceTests/HealthInsightTests.cs).
- `Averages_use_only_the_requested_patient_and_period_after_restart`
- `Minimum_and_maximum_values_are_calculated`
- `Fractional_averages_are_preserved_and_recalculated_after_correction_and_deletion`
- `No_matching_observations_reports_insufficient_data`
- `Invalid_or_missing_period_is_rejected`
- `Equal_bounds_and_offsets_match_recording_timestamp_semantics`
- `Unavailable_observations_report_failure_instead_of_insufficient_data`
### HealthOverviewTests.cs
Source: [tests/Observation.AcceptanceTests/HealthOverviewTests.cs](../tests/Observation.AcceptanceTests/HealthOverviewTests.cs).
- `Overview_preserves_profile_latest_context_and_selected_insight_with_different_bases`
- `No_observations_returns_profile_and_explicit_insight_absence`
- `Empty_selected_insight_preserves_profile_latest_and_applied_selection`
- `Unfiltered_pooled_insight_preserves_mixed_and_unknown_context_explanations`
- `Equal_offset_instants_are_valid_and_single_observation_insight_is_sufficient`
- `Latest_tie_rules_and_current_corrections_deletions_and_profile_edits_survive_restart`
- `Invalid_period_or_context_is_rejected_with_details`
- `Assigned_missing_patient_reports_absence_without_exposing_other_patients`
- `Overview_requires_owner_or_assigned_professional_and_blocks_direct_bypass`
- `Overview_service_credential_is_restricted_to_required_reads`
- `Unavailable_source_or_overview_is_a_failure_not_absent_insight`
### HealthTrendTests.cs
Source: [tests/Observation.AcceptanceTests/HealthTrendTests.cs](../tests/Observation.AcceptanceTests/HealthTrendTests.cs).
- `Full_period_direction_and_separate_units_and_levels`
- `Equal_endpoints_do_not_hide_intermediate_excursion_or_reversal`
- `Overall_decrease_can_coexist_with_reversals_and_large_variation`
- `Low_variation_outside_reference_is_not_healthy`
- `Favourable_pressure_decrease_can_still_be_high_while_falling_pulse_is_concerning`
- `Moving_low_pulse_up_or_high_pulse_down_is_not_automatically_concerning`
- `Opposite_pulse_excursions_within_timestamp_ties_are_not_hidden_by_their_mean`
- `References_are_setting_specific_sourced_and_not_treatment_targets`
- `Pulse_reference_boundaries_are_exclusive`
- `Missing_context_preserves_numerical_direction_but_not_resting_interpretation`
- `Known_categories_with_missing_preparation_support_limited_reference_comparison`
- `Missing_optional_circumstances_do_not_block_supported_comparison`
- `Conflicting_rest_narrative_withholds_resting_interpretation`
- `Different_conditions_and_preparation_are_visible_and_limit_combined_trajectory`
- `Known_inadequate_pressure_preparation_does_not_block_resting_pulse_reference`
- `Timestamp_ties_do_not_manufacture_direction_or_hide_descriptive_range`
- `Empty_and_single_series_report_each_unavailable_part`
- `Retrieval_and_identifier_order_do_not_change_results_including_ties`
- `Inclusive_patient_period_and_equal_offset_instants_apply_before_sufficiency`
- `Labelled_home_and_clinic_selections_and_independent_dimensions_use_only_matches`
- `Unknown_empty_and_one_selected_observation_do_not_borrow_excluded_data`
- `Corrected_values_context_and_deletions_are_used_on_every_request_after_restart`
- `Invalid_period_or_selection_is_rejected_with_explanation`
- `Trend_access_requires_authentication_ownership_or_professional_assignment`
- `Upstream_failure_is_not_misreported_as_empty_data`
### LatestObservationTests.cs
Source: [tests/Observation.AcceptanceTests/LatestObservationTests.cs](../tests/Observation.AcceptanceTests/LatestObservationTests.cs).
- `Latest_is_selected_by_measurement_time_for_the_requested_patient_after_restart`
- `Patient_without_observations_returns_not_found_even_when_another_patient_has_observations`
- `Newer_after_activity_observation_is_returned_with_its_own_context`
- `Missing_context_does_not_replace_latest_with_an_older_complete_observation`
- `Measurement_timestamp_ties_use_original_recording_time_and_ignore_later_edits`
- `Complete_timestamp_ties_choose_greatest_identifier_reproducibly_across_restart`
### MeasurementContextMigrationTests.cs
Source: [tests/Observation.AcceptanceTests/MeasurementContextMigrationTests.cs](../tests/Observation.AcceptanceTests/MeasurementContextMigrationTests.cs).
- `Upgrading_an_existing_observation_retains_values_and_text_without_inventing_context`
### ObservationHistoryTests.cs
Source: [tests/Observation.AcceptanceTests/ObservationHistoryTests.cs](../tests/Observation.AcceptanceTests/ObservationHistoryTests.cs).
- `Selected_period_returns_only_the_matching_observation_after_restart`
- `Results_are_chronological_and_include_both_period_boundaries`
- `No_matching_observations_returns_an_empty_array`
- `Invalid_or_missing_period_is_rejected_without_changing_observations`
- `Offset_bounds_are_normalized_consistently_with_recorded_measurements`
### PatchObservationTests.cs
Source: [tests/Observation.AcceptanceTests/PatchObservationTests.cs](../tests/Observation.AcceptanceTests/PatchObservationTests.cs).
- `Context_can_be_added_to_a_historical_observation_without_changing_its_measurements`
- `Correcting_one_context_field_preserves_omitted_data_and_changes_selection_after_restart`
- `Individual_optional_fields_can_be_corrected_or_cleared_without_erasing_other_context`
- `Explicit_null_context_object_clears_structured_context_but_preserves_legacy_text_and_numbers`
- `Single_numerical_and_legacy_text_updates_preserve_other_values`
- `Invalid_patches_reject_the_whole_update_without_changes`
- `Unsupported_context_in_a_legacy_put_does_not_silently_apply_its_numerical_changes`
- `Missing_observation_is_not_created_by_a_context_patch`
- `Other_patients_professionals_and_unauthenticated_clients_cannot_patch_context`
### PatientAuthenticationTests.cs
Source: [tests/Observation.AcceptanceTests/PatientAuthenticationTests.cs](../tests/Observation.AcceptanceTests/PatientAuthenticationTests.cs).
- `Login_without_profile_returns_normalized_identity_and_no_patient_data`
- `Invalid_account_and_invalid_password_have_same_rejection`
- `Missing_and_invalid_tokens_reject_every_existing_patient_operation`
- `Own_observations_and_insights_are_available_but_another_patients_reads_and_writes_are_rejected`
- `Caller_supplied_account_identity_cannot_replace_authenticated_identity`
- `Profile_creation_retries_and_concurrency_preserve_one_persistent_association`
- `Failed_creation_can_be_retried_without_an_orphan_profile`
- `Expired_token_is_rejected_and_login_produces_a_fresh_token`
- `Tampering_with_a_valid_token_is_rejected`
- `Database_failure_rolls_back_profile_and_association_together`
- `Direct_services_reject_client_tokens_missing_keys_and_forged_keys`
- `Service_credentials_are_limited_to_their_documented_read_calls`
- `Healthcare_professional_cannot_create_profiles`
### ProfessionalAccessTests.cs
Source: [tests/Observation.AcceptanceTests/ProfessionalAccessTests.cs](../tests/Observation.AcceptanceTests/ProfessionalAccessTests.cs).
- `Login_recognizes_professional_identity_and_does_not_put_assignments_in_the_token_response`
- `Professionals_list_only_their_own_assignments_and_can_share_patients`
- `Assigned_profiles_observations_context_history_latest_and_insights_are_readable`
- `Unassigned_patients_and_observations_are_rejected_even_with_a_supplied_assigned_patient_id`
- `Missing_information_for_assigned_patients_follows_existing_retrieval_behaviour`
- `Professionals_cannot_create_update_or_delete_any_patient_information`
- `Missing_invalid_and_expired_tokens_do_not_disclose_assignments_or_patient_data`
- `Incorrect_professional_secret_and_unknown_account_have_identical_login_rejections`
- `Patient_cannot_list_professional_assignments_and_retains_own_access`
- `Assignment_removal_is_used_after_restart_even_with_an_existing_token`
- `Observation_ownership_lookup_failure_fails_closed_while_assignment_list_remains_available`
### RecordMeasurementContextTests.cs
Source: [tests/Observation.AcceptanceTests/RecordMeasurementContextTests.cs](../tests/Observation.AcceptanceTests/RecordMeasurementContextTests.cs).
- `Complete_context_is_saved_with_the_correct_values_and_retrievable_after_restart`
- `Setting_and_activity_are_independent_and_departures_from_guidance_are_valid`
- `Partial_and_absent_context_remain_unknown_without_reinterpreting_legacy_text`
- `Conflicting_categories_and_narrative_are_preserved_without_relabelling`
- `Invalid_context_is_rejected_with_validation_details_without_saving`
- `Context_is_protected_against_other_patient_reads_and_submissions_and_professional_writes`
- `Assigned_professional_can_retrieve_saved_context`
### RecordObservationTests.cs
Source: [tests/Observation.AcceptanceTests/RecordObservationTests.cs](../tests/Observation.AcceptanceTests/RecordObservationTests.cs).
- `Valid_observation_is_assigned_an_identifier_associated_with_the_patient_and_retrievable_after_restart`
- `Optional_fields_can_be_omitted_and_identifiers_are_distinct`
- `Non_positive_values_are_rejected_without_saving`
- `Missing_or_malformed_information_is_rejected_without_saving`
- `Missing_patient_is_rejected_without_saving`
- `Missing_observation_returns_not_found`
- `Failed_patient_lookup_is_rejected_without_saving`
### UpdateObservationTests.cs
Source: [tests/Observation.AcceptanceTests/UpdateObservationTests.cs](../tests/Observation.AcceptanceTests/UpdateObservationTests.cs).
- `Correction_preserves_other_information_and_is_visible_in_all_retrievals_after_restart`
- `All_three_measured_values_can_be_corrected`
- `Non_positive_values_are_rejected_without_changing_observation`
- `Missing_or_malformed_values_are_rejected_without_changes`
- `Missing_observation_is_rejected_without_inserting_a_new_observation`
### ViewObservationContextTests.cs
Source: [tests/Observation.AcceptanceTests/ViewObservationContextTests.cs](../tests/Observation.AcceptanceTests/ViewObservationContextTests.cs).
- `Complete_saved_context_is_returned_with_its_measurements_and_timestamp_after_restart`
- `Partial_saved_context_distinguishes_known_setting_from_unknown_condition_and_details`
- `Historical_free_text_is_returned_without_inventing_setting_or_activity`
- `Missing_observation_reports_not_found_without_disclosing_saved_context`
- `Unauthorised_callers_cannot_read_observation_context`
- `Assigned_professional_reads_the_same_context_as_the_owner`
### AuthenticationIntegrationTests.cs
Source: [tests/PatientProfile.AcceptanceTests/AuthenticationIntegrationTests.cs](../tests/PatientProfile.AcceptanceTests/AuthenticationIntegrationTests.cs).
- `Production_gateway_rejects_plain_http_even_for_login_and_public_guidance`
- `Standard_replacement_handler_with_same_identity_retains_ownership_policy`
### CreatePatientTests.cs
Source: [tests/PatientProfile.AcceptanceTests/CreatePatientTests.cs](../tests/PatientProfile.AcceptanceTests/CreatePatientTests.cs).
- `Valid_profile_is_assigned_an_identifier_and_can_be_retrieved_after_restart`
- `Missing_required_information_is_rejected_without_persisting`
- `Malformed_information_is_rejected`
- `Separate_creations_have_distinct_identifiers_and_contact_information_is_optional`
- `Unknown_identifier_returns_not_found`
### MeasurementGuidanceTests.cs
Source: [tests/PatientProfile.AcceptanceTests/MeasurementGuidanceTests.cs](../tests/PatientProfile.AcceptanceTests/MeasurementGuidanceTests.cs).
- `Public_guidance_without_patient_records_is_labelled_and_has_ordered_sourced_instructions`
- `Activity_is_not_relabelled_as_rest_or_certified`
- `Unsupported_guidance_is_explicitly_unavailable_without_unverified_instructions`
- `Invalid_categories_return_explained_rejections`
### UpdatePatientTests.cs
Source: [tests/PatientProfile.AcceptanceTests/UpdatePatientTests.cs](../tests/PatientProfile.AcceptanceTests/UpdatePatientTests.cs).
- `Updated_profile_preserves_identity_and_date_of_birth_and_survives_restart`
- `Updating_a_missing_patient_is_rejected_without_creating_a_profile`
- `Invalid_name_is_rejected_without_changing_the_profile`
## Ancillary tool evidence
| Tool | Responsibility |
| --- | --- |
| [PasswordHash](../tools/PasswordHash/Program.cs) | Established framework hashing utility; reads stdin |
| [energy-jmeter README](../tools/energy-jmeter/README.md) | Experiment topology, data/config boundaries and metric collection |
| [run.py](../tools/energy-jmeter/run.py) | Orchestrates warmup/measurement, validates telemetry and generates reports |
| [generate-plans.py](../tools/energy-jmeter/generate-plans.py) | Native JMX sessions, Gaussian delays, token renewals, live power/PerfMon |
| [perfmon.py](../tools/energy-jmeter/perfmon.py) / [shelly.py](../tools/energy-jmeter/shelly.py) | Metric interpretation/validation and measured-window summaries |
| [report.py](../tools/energy-jmeter/report.py) | Aligned per-second reporting, separate from application runtime |
@@ -0,0 +1,62 @@
# Requirements-to-implementation traceability
Authoritative scope: [common requirements](../Docs/Requirements/00-common-requirements.md), numbered US-01–US-15, [US-16](<../Docs/Requirements/US16 easy installation and deployment installer.txt>) and [installer addendum](../Docs/Requirements/us16-addendum). This is a static implementation/test review, not a new acceptance-test execution report.
**Implemented** means required behavior is visible in source and mapped tests. **Implemented with limits** means mechanisms exist but some scope/operational evidence is incomplete. No whole US-01–US-15 was found absent. That does not certify every clinical statement or possible deployment/input case. Test coverage references are evidence of checks present, not a claim they passed during this task.
## Story mapping
| Story | Observable implementation / acceptance behavior | Source and relevant tests | Status / limits |
| --- | --- | --- | --- |
| [US-01 create profile](../Docs/Requirements/us01-create-patient-profile.md) | Authenticated initial creation; required name/birth date; generated ID and atomic account association; repeat 409; unique index handles concurrent creation; persistence/retry/DB rollback | [application](../src/PatientProfileService/Application/PatientApplicationService.cs), [repository](../src/PatientProfileService/Persistence/SqlPatientRepository.cs), [CreatePatientTests](../tests/PatientProfile.AcceptanceTests/CreatePatientTests.cs), [PatientAuthenticationTests](../tests/Observation.AcceptanceTests/PatientAuthenticationTests.cs) | Implemented. Interrupted DB writes are checked with a trigger; lost response is approximated by retry after success. No separate process-kill-at-every-write-boundary test. |
| [US-02 view profile](../Docs/Requirements/us02-view-patient-profile.md) | Persisted DTO includes ID/name/date/contact; protected own/assigned reads; absent 404 | [controller](../src/PatientProfileService/Controllers/PatientController.cs), [CreatePatientTests](../tests/PatientProfile.AcceptanceTests/CreatePatientTests.cs), [ProfessionalAccessTests](../tests/Observation.AcceptanceTests/ProfessionalAccessTests.cs) | Implemented. Covered in creation/access suites rather than a separate ViewPatientTests file. |
| [US-03 update profile](../Docs/Requirements/us03-update-patient-profile.md) | Update name/contact; ID/birth/account/original creation preserved; missing does not create | [SQL repository](../src/PatientProfileService/Persistence/SqlPatientRepository.cs), [UpdatePatientTests](../tests/PatientProfile.AcceptanceTests/UpdatePatientTests.cs) | Implemented. Birth-date editing is not an accepted story behavior. |
| [US-04 record observation](../Docs/Requirements/us04-record-observation.md) | Timestamp and positive numerical values; patient lookup before own DB save; independent context dimensions, optional details, unknown defaults, legacy text retained, later read | [application](../src/ObservationService/Application/ObservationApplicationService.cs), [mapping](../src/ObservationService/Persistence/ObservationDbContext.cs), [RecordObservationTests](../tests/Observation.AcceptanceTests/RecordObservationTests.cs), [RecordMeasurementContextTests](../tests/Observation.AcceptanceTests/RecordMeasurementContextTests.cs), [migration test](../tests/Observation.AcceptanceTests/MeasurementContextMigrationTests.cs) | Implemented with limits: preservation is general; narrative conflict interpretation uses US-11 finite phrases. No arbitrary-language conflict detector. |
| [US-05 view observation](../Docs/Requirements/us05-view-observation.md) | Read by observation ID includes current measurements/time/context/note; owner/assignment lookup before access; missing 404 | [controller](../src/ObservationService/Controllers/ObservationController.cs), [ViewObservationContextTests](../tests/Observation.AcceptanceTests/ViewObservationContextTests.cs) | Implemented. Directly seeded Given states verify retrieval independently of creating a reading. |
| [US-06 latest](../Docs/Requirements/us06-latest-observation.md) | Greatest measurement time, then original recording time, then greatest UUID; context completeness ignored; no observations 404 | [repository](../src/ObservationService/Persistence/SqlObservationRepository.cs), [LatestObservationTests](../tests/Observation.AcceptanceTests/LatestObservationTests.cs) | Implemented, including deterministic complete ties across restart. |
| [US-07 history](../Docs/Requirements/us07-observation-history.md) | Inclusive/equal periods, ascending time/UUID, selected dimensions AND, explicit Unknown, no-selection includes all, empty array, metadata headers, invalid selections rejected | [controller](../src/ObservationService/Controllers/ObservationController.cs), [repository](../src/ObservationService/Persistence/SqlObservationRepository.cs), [ObservationHistoryTests](../tests/Observation.AcceptanceTests/ObservationHistoryTests.cs), [ContextFilteredHistoryTests](../tests/Observation.AcceptanceTests/ContextFilteredHistoryTests.cs) | Implemented. Full unpaginated result is actual contract; no requirement for pagination. |
| [US-08 correction](../Docs/Requirements/us08-update-observation.md) | Numeric PUT; partial PATCH adds/corrects/clears individual context fields; omitted fields preserved; unsupported fields/category rejected before save; current selection/calculation membership | [patch](../src/ObservationService/Contracts/PatchObservationRequest.cs), [repository](../src/ObservationService/Persistence/SqlObservationRepository.cs), [UpdateObservationTests](../tests/Observation.AcceptanceTests/UpdateObservationTests.cs), [PatchObservationTests](../tests/Observation.AcceptanceTests/PatchObservationTests.cs) | Implemented. No concurrent-update conflict detection, outside explicit story criteria. |
| [US-09 delete](../Docs/Requirements/us09-delete-observation.md) | Physical row/context deletion; no later read/history/statistics contribution; unaffected remaining data; access controls | [repository](../src/ObservationService/Persistence/SqlObservationRepository.cs), [DeleteObservationTests](../tests/Observation.AcceptanceTests/DeleteObservationTests.cs), [DeleteContextualisedObservationTests](../tests/Observation.AcceptanceTests/DeleteContextualisedObservationTests.cs) | Implemented. No separate stored result/context lifecycle to clean up. |
| [US-10 numerical insight](../Docs/Requirements/us10-calculated-insight.md) | Current filtered observations; arithmetic means/final two-decimal half-up; BP extrema; single sufficient; empty insufficient 404; explicit selection/count/context limitations | [calculator](../src/InsightsService/Domain/InsightCalculator.cs), [HealthInsightTests](../tests/Observation.AcceptanceTests/HealthInsightTests.cs), [ContextSelectedInsightTests](../tests/Observation.AcceptanceTests/ContextSelectedInsightTests.cs) | Implemented. No stored summary per baseline correction. |
| [US-11 trend](../Docs/Requirements/us11-health-trend.md) | Three separate metric assessments, full-period direction/OLS/variation, reversals and timestamp ties, reference scopes/limits, context comparability, selections and unavailable parts; corrections/deletions fresh | [calculator](../src/InsightsService/Domain/InsightCalculator.Trends.cs), [HealthTrendTests](../tests/Observation.AcceptanceTests/HealthTrendTests.cs), [method documentation](../src/TRENDS.md) | Implemented with limits: finite narrative phrases and locally coded clinical inferences need separate clinical review for broader claims; not independently validated here. |
| [US-12 overview](../Docs/Requirements/us12-health-overview.md) | Profile + latest overall + selected-period insight; latest context distinct; no-match keeps available parts; unknown/mixed explanations; invalid period/access/failures | [application](../src/HealthOverviewService/Application/HealthOverviewApplicationService.cs), [HealthOverviewTests](../tests/Observation.AcceptanceTests/HealthOverviewTests.cs) | Implemented. No trend component and no cross-service snapshot, both documented. |
| [US-13 patient authentication](../Docs/Requirements/us13-patient-authentication.md) | Valid generic login; opaque expiry/tamper checks; own-data restrictions by actual owner; profile-less login/create; persistence/bypass protection | [security](../src/ApiGateway/Security/PatientAccessMiddleware.cs), [PatientAuthenticationTests](../tests/Observation.AcceptanceTests/PatientAuthenticationTests.cs), [AuthenticationIntegrationTests](../tests/PatientProfile.AcceptanceTests/AuthenticationIntegrationTests.cs) | Implemented. Test clocks/replacement handlers are test-only; native secrets/files/network remain deployment responsibilities. |
| [US-14 professional reads](../Docs/Requirements/us14-professional-access.md) | Login role, own assignment list, many-to-many assignment reading including context/trends/overview; empty/missing results; unassigned concealment; all writes rejected | [assignments](../src/ApiGateway/Security/ProfessionalAssignments.cs), [ProfessionalAccessTests](../tests/Observation.AcceptanceTests/ProfessionalAccessTests.cs), [trend](../tests/Observation.AcceptanceTests/HealthTrendTests.cs), [overview](../tests/Observation.AcceptanceTests/HealthOverviewTests.cs) | Implemented. Fresh installer professional has no assignments; configured examples/tests demonstrate assigned workflow. Assignment administration is excluded. |
| [US-15 guidance](../Docs/Requirements/us15-measurement-guidance.md) | Public ordered sourced home/rest instructions, applicability/review dates, pulse/activity limits, unavailable setting explanation, no record/certification side effects; valid submission independent of viewing | [controller](../src/ApiGateway/Controllers/MeasurementGuidanceController.cs), [MeasurementGuidanceTests](../tests/PatientProfile.AcceptanceTests/MeasurementGuidanceTests.cs), [record-context tests](../tests/Observation.AcceptanceTests/RecordMeasurementContextTests.cs) | Implemented. Clinical references are compiled metadata, not dynamically refreshed guidance or evidence of current source validation in this task. |
| US-16 independent installation plus addendum | Selected payloads/processes/config; matching keys/HTTPS trust; runtime/PostgreSQL provisioning, separate DBs/roles/migrations; colocated/distributed origins; verification | [installer](../deploy/installer/install.sh), [provisioner](../deploy/HealthApp.Provisioning/Program.cs), [InstallationTests](../tests/Deployment.AcceptanceTests/InstallationTests.cs), [BootstrapTests](../tests/Deployment.AcceptanceTests/BootstrapTests.cs) | Implemented with operational/verification limits detailed below. Windows/macOS extend the Linux requirement text. |
## US-11 acceptance groups
| Criteria | Implementation/test basis |
| --- | --- |
| A/B/C: separate metrics, patient/period, direction | `CalculateTrend`, `AssessMeasurement`; separate units and all-timepoint calculations; tests `Full_period_direction_and_separate_units_and_levels`, `Inclusive_patient_period_and_equal_offset_instants_apply_before_sufficiency` |
| D/E: intermediate excursion and reversal | Raw range plus grouped adjacent absolute change/sign reversals; tests `Equal_endpoints_do_not_hide_intermediate_excursion_or_reversal`, `Overall_decrease_can_coexist_with_reversals_and_large_variation` |
| F/G/H/I: levels/interpretations/conflicting metrics | Applicable reference comparisons and separate hints; tests `Low_variation_outside_reference_is_not_healthy`, `Favourable_pressure_decrease_can_still_be_high_while_falling_pulse_is_concerning`, pulse boundary/tie excursion tests; independent clinical assessment remains unperformed |
| J/K/L: missing context, insufficiency, reference values | `AssessComparability`/`SelectReference`, explicit unavailable parts and provisional references; missing preparation/inadequate rest/setting-specific reference tests |
| M/N: ordering independence and freshness | Timestamp grouping/sorting; fresh HTTP history on each call; tests `Retrieval_and_identifier_order_do_not_change_results_including_ties`, `Corrected_values_context_and_deletions_are_used_on_every_request_after_restart` |
| Context additions | Filtered history retrieval, metadata and comparability evidence; selected Home/Clinic/Unknown, empty/single series and contradictory phrase tests |
All named tests above are in [HealthTrendTests.cs](../tests/Observation.AcceptanceTests/HealthTrendTests.cs).
## US-16 acceptance groups and operational gaps
| Criterion | Evidence | Remaining uncertainty / incomplete verification |
| --- | --- | --- |
| A/B/C selected/single/multiple/all | Release selection, installer selection, distinct payloads/units, direct independent processes | Normal single-node partial installation must reuse a plan with reachable remote dependencies or defer final topology check; creating a new default plan is not discovery of an existing deployment. |
| D independent config | Per-service env/JSON/certificates/origins/DB values; native configuration tests | Source templates and generated units differ; document generated behavior. |
| E separate machines | Runtime origins and HTTP are location-independent; scoped SSH/SCP distribution tests | Real separate-machine native deployment/network evidence not established by loopback/double tests. |
| F independent service management | Native registrations have no peer coupling; direct process stop/restart tests | Linux/Windows/macOS manager behavior must be demonstrated on native hosts; no new native run was performed here. |
| G persistence ownership | Separate DB/role generation, PUBLIC revocation, dedicated credential checks | Normal DB credentials own schema for migrations; mandatory encrypted DB transport is not implemented. |
| H preserve architecture | Same DLLs and Gateway-routed APIs on all layouts | No container/shared-memory/merged-service runtime path present. |
| I installation verification | Native active/PID checks (Linux/Windows), HTTPS/DB/callback probes, complete synthetic workflow | Live verifier does not explicitly stop/restart each service; macOS has no explicit distinct-PID comparison. Literal `all` enables complete verification in local wrappers; listing all five names does not. |
| Addendum dependencies/config | Apt ancestry/package checks; generated secrets/CA/PFX/roles/config/migration/native startup | Package doubles do not prove every distro/version/CPU; Linux automation limited to Debian/Ubuntu family; Windows/macOS packages/native execution require native evidence. |
## Missing functionality versus scope exclusions
No wholly unimplemented accepted backend user story was identified by this static review. Concrete incomplete **verification** items are native stop/restart demonstration in the live verifier, explicit macOS PID separation, complete-workflow verification for the five-name selection form, and actual multi-machine/native-platform evidence. General narrative understanding and independent clinical applicability remain **unknown**, rather than established complete capabilities. See [discrepancies](discrepancies.md) for exact evidence.
Registration, recovery, MFA, refresh tokens, professional credential verification, consent/emergency access, professional writes, assignment administration, a product frontend, pagination, optimistic concurrency, backup/restore, HA and production hardening are not accepted features established by the inspected stories. Their absence is recorded without adding scope or treating suggestions as approved requirements.
## Shared constraints
Ownership/professional access applies across all patient-specific routes; guidance alone is public. Inclusive/equal periods and offset normalization apply consistently to history, summary, trend and overview insight. `Unknown` is independently selectable; legacy narrative is never converted to a definite category. Persistence/restart tests and migration tests check ownership and context continuity. The snapshot is backend/source complete but not a claim that tests, external clinical sources or every deployment platform were freshly validated.
@@ -0,0 +1,291 @@
# HealthApp software architecture — as built
## 1. Scope and evidence
This is a source-level snapshot dated 2026-10-12 at commit `5d9371388c15066eeb2bc124ed227659c644dab5`. The system is a prototype REST backend for synthetic patient profiles, blood-pressure observations and derived assessments. It includes an installer and separate experiment tools. A web/mobile client is a context actor in the original diagrams; no product frontend is implemented in this repository.
Descriptions below are verified from source unless explicitly labelled inferred or unknown. Evidence links resolve to the inspected repository. Existing specifications supply context, especially [architecture authority](../Docs/Architecture/README.md), [common requirements](../Docs/Requirements/00-common-requirements.md), [Insights correction](../Docs/Architecture/us10-insights-correction.md) and [authentication design](../Docs/Design/authentication-and-access-control-design.md). Their differences from the implementation are catalogued in [discrepancies](discrepancies.md).
The [evidence inventory](evidence-inventory.md) records the inspected files. Automated tests were read, not rerun; this document makes no new test-pass, performance, clinical-validation or native-platform deployment claim.
## 2. Style, boundaries and structure
The implementation uses five independently buildable ASP.NET Core controller projects and operating-system processes. The topology is synchronous request/response microservices with a central API Gateway, service-owned persistence, and conventional controller/application/repository layering in the two persistent services. There is no application message bus, event processing, background synchronization or shared production implementation library. See [solution](../HealthApp.slnx), [logical diagram](diagrams/02-logical-services.drawio) and each service's `Program.cs` below.
| Process / project | Responsibility | Local implementation | State |
| --- | --- | --- | --- |
| [ApiGateway](../src/ApiGateway/Program.cs) | Client login, token authentication, ownership/assignment authorization, explicit API forwarding, public guidance | Controllers, security middleware, framework authentication and named HTTP clients | Startup account/assignment configuration; persistent token-protection key files |
| [PatientProfileService](../src/PatientProfileService/Program.cs) | Initial profile/account association, profile reads and updates | Controller → scoped application service → repository interface → SQL repository → EF context | Own PostgreSQL database, `patient` table |
| [ObservationService](../src/ObservationService/Program.cs) | Record/read/latest/history/correct/delete observations and their context | Controller → scoped application service → repository interface → SQL repository → EF context; gateway HTTP client for patient existence | Own PostgreSQL database, `blood_pressure_observation` table |
| [InsightsService](../src/InsightsService/Program.cs) | On-demand numerical summaries and context-aware trend assessment | Controller → scoped application service → observation HTTP client and singleton stateless calculator | No database or generated-result persistence |
| [HealthOverviewService](../src/HealthOverviewService/Program.cs) | Compose profile, latest overall observation and selected-period numerical insight | Controller → scoped application service → three typed HTTP clients | No database or generated-result persistence |
Every business call between services passes through the Gateway. The Gateway sends `X-Gateway-Key` to a target service; Observation, Insights and Overview call the Gateway using their own `X-Service-Key`. The Patient/Profile service has no outgoing business HTTP dependency. There are no direct Insights→Observation or Overview→Patient/Profile network calls: client class names denote the resource consumed, while their configured origin is the Gateway. This matches the [original service topology](../Docs/Architecture/02_microservice_architecture.jpg).
Within a service, dependencies are ordinary dependency injection calls. Between services, dependencies are actual HTTP/JSON calls; production projects do not reference each other's implementations. Tests do reference multiple projects and create hosts in one test runner, which is a testing arrangement, not the deployed process model.
The separate [HealthApp.Provisioning](../deploy/HealthApp.Provisioning/Program.cs) executable prepares deployment material, provisions databases and verifies the installed system. It is an administrative utility, not an additional microservice. [PasswordHash](../tools/PasswordHash/Program.cs) is another standalone utility for hashing input passwords, outside the solution's service topology.
## 3. Domain and ownership
The [domain diagram](diagrams/03-domain-model.drawio) uses business concepts, while [class diagrams](diagrams/04-design-classes.drawio) use actual implementation types.
The complete domain view includes authentication grants, professional assignments, guidance instructions and reference provenance as well as profiles, observations and calculated views. Deployment administration has a separate supporting-domain page. Each service also has its own implementation class-diagram file, linked from [README](README.md). Each declared class, record and interface is an individual UML classifier, including nested records, startup and generated EF support types. [Class-diagram coverage](class-diagram-coverage.md) maps all 78 source types and explains visibility, members and relationship notation.
A pre-created **account** identifies a Patient or HealthcareProfessional. A Patient account has zero associated profiles initially and one after creation. A **patient profile** has a generated identifier, name, date of birth and optional contact information. The association is persisted in the profile's row, separate from credential configuration. Legacy rows can have null account association.
A **blood-pressure observation** belongs to one patient by external patient identifier. It records measurement time, systolic/diastolic pressure, device-reported pulse, original free-text context and note, and one structured **measurement context**. Setting and activity categories remain independent; missing values become `Unknown`. Optional preparation/technique details remain unknown/null rather than being inferred from legacy text. Context has no independent persisted identifier or lifecycle.
A **context selection** optionally restricts setting and/or activity. Both supplied dimensions must match; omitted dimensions are unrestricted. An explicit `Unknown` is a filter value, not omission. A **health insight** summarizes current selected observations. A **trend assessment** contains separate systolic, diastolic and pulse assessments plus comparability evidence. A **health overview** combines a profile, optional latest observation and optional numerical insight. These are calculated values, not stored domain entities.
HealthcareProfessional **assignments** form a configured many-to-many account/patient relationship. No professional profile or assignment table exists. General **measurement guidance** has no patient association and does not write observations.
Evidence: [Patient](../src/PatientProfileService/Domain/Patient.cs), [observation](../src/ObservationService/Domain/BloodPressureObservation.cs), [measurement context](../src/ObservationService/Domain/MeasurementContext.cs), [selection](../src/ObservationService/Domain/ContextSelection.cs), [insight](../src/InsightsService/Domain/HealthInsight.cs), [trend types](../src/InsightsService/Domain/TrendAssessment.cs), [overview contracts](../src/HealthOverviewService/Contracts/HealthOverviewDto.cs), [assignments](../src/ApiGateway/Security/ProfessionalAssignments.cs).
## 4. Public API and contracts
All routes below are exposed by Gateway controllers. IDs are GUID route values. JSON uses the standard ASP.NET Core serializer conventions. Authentication applies to patient-specific routes; professionals can only read assigned patients, and only professionals can list their own assignments.
| Method and route | Input / result | Owning component |
| --- | --- | --- |
| `POST /api/authentication/login` | Required `accountId`, `password`; 200 access token, token type, lifetime, account ID, role; invalid credentials 401 | Gateway |
| `GET /api/measurement-guidance` | Optional setting/activity; 200 ordered guidance or explained unavailability; unsupported values 400 | Gateway; public |
| `GET /api/professionals/me/patients` | 200 array of `{patientId}` assignments, possibly empty | Gateway |
| `POST /api/patients` | Required name/dateOfBirth, optional contactInfo; 201 profile and Location; existing profile 409 | Patient/Profile |
| `GET /api/patients/me` | 200 authenticated account's profile; unavailable 404 | Patient/Profile via Gateway account lookup |
| `GET /api/patients/{patientId}` | 200 profile; missing/unauthorized owner 404 | Patient/Profile |
| `PUT /api/patients/{patientId}` | Required name, optional contactInfo; 200 updated profile; date of birth is not editable | Patient/Profile |
| `POST /api/patients/{patientId}/observations` | Required measuredAt and positive integer systolic/diastolic/pulse; optional structured context, context text and note; 201 observation and Location | Observation |
| `GET /api/observations/{observationId}` | 200 observation with recorded context; unavailable 404 | Observation |
| `PUT /api/observations/{observationId}` | All three positive measured values required; 200 corrected observation; other fields preserved | Observation |
| `PATCH /api/observations/{observationId}` | At least one supported measured/context/note field; 200 patched observation | Observation |
| `DELETE /api/observations/{observationId}` | 204 deleted; unavailable 404 | Observation |
| `GET /api/patients/{patientId}/observations/latest` | 200 latest overall observation; none 404 | Observation |
| `GET /api/patients/{patientId}/observations` | Required from/to, optional context selection; 200 array, empty `[]` allowed | Observation |
| `GET /api/patients/{patientId}/insights` | Required from/to, optional context selection; 200 numerical insight; no matching data 404 Problem | Insights |
| `GET /api/patients/{patientId}/trends` | Same query; 200 assessment, including explicit unavailable parts for empty/insufficient data | Insights |
| `GET /api/patients/{patientId}/overview` | Same query applied to insight only; 200 overview with nullable latest/insight; missing patient 404 Problem | Overview |
Gateway route evidence: [Patient](../src/ApiGateway/Controllers/PatientController.cs), [Observation](../src/ApiGateway/Controllers/ObservationController.cs), [Insights](../src/ApiGateway/Controllers/InsightsController.cs), [Overview](../src/ApiGateway/Controllers/HealthOverviewController.cs), [Professional](../src/ApiGateway/Controllers/ProfessionalController.cs), [Authentication](../src/ApiGateway/Controllers/AuthenticationController.cs), [Guidance](../src/ApiGateway/Controllers/MeasurementGuidanceController.cs). Backend-specific statuses/validation are defined by the corresponding controllers and contracts, not by a general reverse-proxy engine.
### 4.1 Forwarding and internal contracts
Gateway forwarding constructs a new HTTP request with a configured target and key. It streams POST/PUT/PATCH bodies and forwards Content-Type, not arbitrary client headers. It does not forward client tokens, client-selected account identities or callback keys. Profile creation explicitly derives `X-Account-Id` from the authenticated claim. Response forwarding preserves status, Content-Type and Location (absolute locations are reduced to path/query). Observation forwarding also preserves `X-Measurement-Setting` and `X-Activity-Condition`. The rest of upstream headers are not generically copied. Redirect following is disabled on all configured business HTTP clients.
Backend endpoints mostly mirror the Gateway routes. Patient/Profile additionally exposes `GET /api/patients/by-account/{accountId}` behind its key boundary; Gateway uses it internally and does not expose a corresponding controller route. `/api/patients/me`, login, guidance and assignment listing are Gateway-owned routes.
DTOs are defined locally within each service; consumers deserialize equivalent wire shapes without shared service project references. Insights duplicates an observation/context DTO; Overview duplicates patient, observation, insight and selection DTOs. These are structural JSON contracts, not references to remote domain objects. There is no OpenAPI/Swagger endpoint, API-versioning mechanism or generated client in the application setup.
### 4.2 Validation, patch and period semantics
`[ApiController]`, data annotations and JSON parsing reject invalid model input with 400 validation details. Categories are case-sensitive for recording/filtering/patching: settings `Home`, `Clinic`, `Other`, `Unknown`; activities `AtRest`, `DuringActivity`, `AfterActivity`, `Unknown`. General guidance trims and compares categories without case sensitivity. Numeric observation values must be positive integers; optional rest duration is a nonnegative decimal in minutes. There are no documented clinical upper/lower plausibility checks beyond those input constraints.
PATCH uses setter-maintained `...Specified` flags marked `[JsonIgnore]`. Omitted fields remain unchanged; explicit null clears optional text/details; null setting/activity becomes `Unknown`; null entire context resets it to unknown categories/null details. Numeric values cannot be cleared. Empty or unknown-field patches are rejected. Observation PUT accepts only the three numerical fields and rejects unmapped fields. Profile update preserves identifier, birth date, original creation time and account association; omitted/null contact information clears it. These behaviors are implemented in [patch contracts](../src/ObservationService/Contracts/PatchObservationRequest.cs), [context patch](../src/ObservationService/Contracts/MeasurementContextPatch.cs), [PUT contract](../src/ObservationService/Contracts/UpdateObservationRequest.cs) and [repositories](../src/ObservationService/Persistence/SqlObservationRepository.cs).
Period boundaries are inclusive. Reversed bounds are rejected; equal bounds are valid. Offset-free timestamp values are interpreted as UTC clock values, independent of host timezone. Offset-bearing values are normalized to UTC and stored as `DateTimeKind.Unspecified` in PostgreSQL `timestamp without time zone`. Responses therefore need not contain a trailing `Z`; clients must retain the documented UTC interpretation. `DateOnly` represents birth dates. Evidence: [record/period normalization](../src/ObservationService/Application/ObservationApplicationService.cs), [Insights normalization](../src/InsightsService/Application/InsightsApplicationService.cs), [Overview normalization](../src/HealthOverviewService/Application/HealthOverviewApplicationService.cs), [implementation timestamp documentation](../src/README.md), [offset/boundary tests](../tests/Observation.AcceptanceTests/ContextFilteredHistoryTests.cs).
## 5. Persistence and consistency
See [data diagram](diagrams/05-data-ownership.drawio). Each persistent service has a scoped EF Core DbContext and SQL repository. Reads generally use `AsNoTracking`; observation patches load a tracked entity and save it. Patient updates use `ExecuteUpdateAsync`, observation deletes use `ExecuteDeleteAsync`. There is no shared database access between application services.
| Owner/table | Columns and constraints |
| --- | --- |
| Patient/Profile `patient` | `patient_id uuid` PK generated by application; `account_id text NULL` with unique index `IX_patient_account_id`; required `name varchar`, `date_of_birth date`; optional `contact_info varchar`; required `created_at`, `updated_at timestamp without time zone` |
| Observation `blood_pressure_observation` | `observation_id uuid` PK generated by application; external `patient_id uuid`; `measured_at timestamp without time zone`; integer `systolic`, `diastolic`, `pulse`; optional `context`, `note varchar`; required original/update timestamps; required text `setting`, `activity_condition` default `Unknown`; nullable numeric `rest_duration_minutes` and text body position/arm/device/cuff/circumstances |
| Each EF-owned database | Framework `__EFMigrationsHistory`; no patient/observation cross-database foreign key |
`MeasurementContext` is an EF owned value flattened into the observation row. There is no separate context/preparation table. Database mappings declare PKs and the account uniqueness index, but no observation patient/time/filter indexes or category/positive-value check constraints. Input validation is enforced by APIs/application services; database credentials remain a separate trust boundary.
Evidence: [PatientDbContext](../src/PatientProfileService/Persistence/PatientDbContext.cs), [ObservationDbContext](../src/ObservationService/Persistence/ObservationDbContext.cs), [profile initial migration](../src/PatientProfileService/Persistence/Migrations/20260930200031_InitialPatientSchema.cs), [association migration](../src/PatientProfileService/Persistence/Migrations/20261005082209_AccountProfileAssociation.cs), [observation initial migration](../src/ObservationService/Persistence/Migrations/20261001095222_InitialObservationSchema.cs), [context migration](../src/ObservationService/Persistence/Migrations/20261005094632_RecordedMeasurementContext.cs).
### 5.1 Profile creation
Profile creation and account association are a single row insert. The application checks for an existing account first, but the unique database index is the final concurrency guard. A conflicting PostgreSQL `23505` for that index is translated into `ProfileAlreadyExistsException` and 409. Database failure leaves no separate association step to recover; a lost successful response followed by retry returns the existing-profile conflict, and `/api/patients/me` retrieves the association. Legacy null-account rows remain possible, with no automatic credential association/backfill.
Evidence: [application](../src/PatientProfileService/Application/PatientApplicationService.cs), [repository](../src/PatientProfileService/Persistence/SqlPatientRepository.cs), [concurrency/retry/trigger rollback tests](../tests/Observation.AcceptanceTests/PatientAuthenticationTests.cs).
### 5.2 Observation queries and changes
Recording first verifies patient existence by Observation→Gateway→Patient/Profile. Only then does it save the observation in its own database. This is not a distributed transaction or database foreign key. There is no patient deletion endpoint, but the runtime lookup and write still occur at different instants.
Latest orders by descending measurement time, then original `created_at`, then observation UUID under PostgreSQL ordering. Edits never update original recording time. History filters one patient, inclusive period and both requested context predicates; it orders measurement time ascending then UUID ascending. It returns all matching rows as a list with no pagination or result-size cap. Patch updates preserve omitted values; physical deletion removes the row and all its flattened context.
New insights/trends/overviews read current data. No invalidation event is needed because no generated result is stored. This does **not** imply a cross-service snapshot: overview profile, latest and insight are separate reads. A write between them can produce a composition from different instants.
## 6. Calculation and aggregation behavior
### 6.1 Numerical insight
Insights requests filtered history through the Gateway and calculates arithmetic decimal means for systolic/diastolic/pulse; only final means are rounded to two decimals, midpoint away from zero (half-up for the permitted positive inputs). Blood-pressure minima/maxima retain original integer values. One observation suffices. Zero returns no insight and a 404 Problem; it is not an upstream failure.
The response includes patient, normalized period, applied selection, contributing count and descriptive context explanation. Mixed/unknown settings, activities and optional details are disclosed. Source data is neither relabelled nor persisted by Insights. Evidence: [summary calculator](../src/InsightsService/Domain/InsightCalculator.cs), [HTTP observation client](../src/InsightsService/Clients/HttpObservationServiceClient.cs), [summary tests](../tests/Observation.AcceptanceTests/ContextSelectedInsightTests.cs).
### 6.2 Trends and comparability
Each metric retains mean/min/max/range over every selected raw observation. Temporal calculations group identical measurement timestamps into arithmetic means, then sort by timestamp. At least two distinct timestamps are needed for direction. Adjacent nonzero changes determine Increasing, Decreasing, Mixed or NoClearDirection; sign changes count reversals. Total successive change sums absolute adjacent changes. An ordinary least-squares fit across all distinct timestamp means supplies OverallDirection and SlopePerDay; each timestamp group has equal weight. Time is scaled to the observed span for calculation; slope output is rounded to six decimals. Empty or single-timestamp data returns explicit unavailable portions, not fabricated direction.
Recorded comparability inspects setting/activity/rest/posture/arm/device/cuff similarities, missing details and differences, plus differing additional circumstances. A finite list of case-insensitive narrative phrases detects conflicts between declared Home/Clinic/AtRest and preserved text. This is deterministic phrase matching, not NLP; unrecognized text does not establish correctness, and negations can still match.
The compiled reference metadata supports resting pulse comparisons below 50 or above 100 beats/min, and high blood-pressure comparisons at or above home 135/85 or clinic 140/90 mmHg. Blood-pressure reference selection requires a single known Home/Clinic setting and recorded AtRest, without detected conflicts or explicitly inadequate rest/posture. Missing preparation details can permit a limited provisional reference comparison. These figures describe the **implemented reference selection**, not new medical advice or an independent verification of the sources.
Interpretation distinguishes supported numerical findings from cautiously labelled PotentiallyFavourable, PotentiallyConcerning, Mixed or CannotInterpret. It requires additional comparability/temporal support for development interpretations, never combines the three metrics into one good/bad score, and includes reference scope, operators, sources, dates and limitations. Current guidance/reference text is compiled into the application; no clinical website is called at runtime.
Evidence: [trend calculator](../src/InsightsService/Domain/InsightCalculator.Trends.cs), [result types](../src/InsightsService/Domain/TrendAssessment.cs), [documented method/rationale](../src/TRENDS.md), [numerical/context/reference tests](../tests/Observation.AcceptanceTests/HealthTrendTests.cs). This task checks architectural consistency, not clinical validity.
### 6.3 Health overview
Overview performs three **sequential** awaits: profile, latest overall observation, selected-period numerical insight. A missing profile returns no overview; a 404 latest or insight becomes null and preserves the available profile/other component. Non-404 failures do not silently become absent data. Latest remains independent of the insight's period and context selection. The result explicitly states both bases and contributes no trend component.
The insight request adds another chain: Overview→Gateway→Insights→Gateway→Observation. Each network leg uses the caller's configured service credential; original user tokens do not flow down the chain. Evidence: [overview application](../src/HealthOverviewService/Application/HealthOverviewApplicationService.cs), [client handling](../src/HealthOverviewService/Clients/InsightsServiceClient.cs), [overview tests](../tests/Observation.AcceptanceTests/HealthOverviewTests.cs), [overview sequence](diagrams/07-sequences.drawio).
## 7. Authentication, authorization and security
### 7.1 Client identity
Gateway validates pre-created credentials using ASP.NET Core Identity's `PasswordHasher<PrototypeAccount>`. Accounts are external configuration bound once into a singleton dictionary. Roles are limited to Patient and HealthcareProfessional; account IDs permit ASCII letters/digits/hyphen/underscore, with a maximum length of 128. Unknown accounts still execute hash verification against a dummy hash. Invalid/incorrect credentials share one generic response. Malformed hash verification is rejected; successful hashes that would benefit from rehashing are not persisted back to configuration.
Login issues the framework's protected opaque Bearer authentication ticket, **not a JWT**, using Data Protection application name `HealthApp.ApiGateway`. Claims contain stable account ID and role, not patient health records or patient ownership. Default lifetime is 30 minutes, configurable from 1–1440. Subsequent requests validate the token without password verification. There is no refresh, logout/revocation endpoint, session database, registration or identity-provider integration. Successful login responses carry `no-store` and `no-cache`.
Gateway persists its Data Protection key ring to configured `Authentication:KeyDirectory`. No explicit `ProtectKeysWith...` key-at-rest encryption is configured; filesystem permissions are the deployment protection visible in this implementation. Persistent compatible keys allow tokens to survive a normal Gateway restart. Multi-instance Gateway key coordination, immediate account-change token revocation and external identity-provider behavior are not implemented or verified. See [accounts](../src/ApiGateway/Security/PrototypeAccounts.cs), [login](../src/ApiGateway/Controllers/AuthenticationController.cs), [Gateway startup](../src/ApiGateway/Program.cs), [authentication tests](../tests/Observation.AcceptanceTests/PatientAuthenticationTests.cs).
### 7.2 Per-request access control
Fallback authorization requires authentication; login and general guidance explicitly permit anonymous callers. Role policies require the stable NameIdentifier claim. `PatientAccessMiddleware` then establishes actual access:
- A Patient can POST its initial profile and GET `/api/patients/me` before knowing its patient ID. The profile service enforces uniqueness.
- Other patient operations obtain the account's current persisted profile through the protected by-account API. Requested patient routes must match its ID.
- Observation-ID routes first fetch the observation from Observation to establish the actual owning patient. This additional read occurs before returning/modifying/deleting it.
- Professionals may only GET and must have the patient ID in their configured assignment set. The assignment-list route returns only that professional's configured IDs. Assignments are read once, deduplicated and sorted; edits require restart to affect the singleton.
- Unauthorized ownership/unassigned/missing ownership gives an empty 404 to avoid exposing another patient's existence. Missing/invalid token is 401; authenticated forbidden role/method is 403.
Ownership data is not cached between requests. Patient-specific responses do not receive a global explicit no-store directive in the code. Middleware path-segment comparisons are case-sensitive, despite routing's normal case-insensitive behavior and a few case-insensitive special routes; canonical lower-case routes are used throughout tests/clients. Evidence: [middleware](../src/ApiGateway/Security/PatientAccessMiddleware.cs), [assignments](../src/ApiGateway/Security/ProfessionalAssignments.cs), [professional tests](../tests/Observation.AcceptanceTests/ProfessionalAccessTests.cs), [replacement-handler test](../tests/PatientProfile.AcceptanceTests/AuthenticationIntegrationTests.cs).
### 7.3 Internal trust boundary
Every backend checks `X-Gateway-Key` with fixed-time comparison before controllers. A client bearer token alone cannot call a backend. The key grants the Gateway-level trusted caller boundary; backend controllers do not re-evaluate patient ownership or professional assignment. Compromise/disclosure of a backend incoming key therefore bypasses client authorization for that backend's exposed API.
Gateway chooses InternalService authentication whenever `X-Service-Key` is present; otherwise it chooses Bearer. An invalid callback key does not fall back to a valid bearer token. Three distinct configured callback identities have the following GET-only permissions:
| Callback identity | Allowed Gateway reads |
| --- | --- |
| Observation | `/api/patients/{patientId}` |
| Insights | `/api/patients/{patientId}/observations` with period/selection query |
| HealthOverview | Patient profile, latest observation and numerical insight for `{patientId}` |
Service identities do not carry end-user ownership; permitted reads can address any valid patient ID. They cannot write, list professional assignments, read individual observation IDs or call unlisted aggregation routes. Backend incoming and callback keys are independently generated; length ≥32 is required at startup, while installer-generated secrets are 32 random bytes rendered as 64 hex characters. The unused incoming-key field generated for Gateway is not a Gateway authentication mechanism.
Evidence: [internal handler](../src/ApiGateway/Security/InternalServiceAuthenticationHandler.cs), [service whitelist](../src/ApiGateway/Security/PatientAccessMiddleware.cs), [backend guard example](../src/ObservationService/Program.cs), [bypass/permission tests](../tests/Observation.AcceptanceTests/PatientAuthenticationTests.cs), [Overview restrictions](../tests/Observation.AcceptanceTests/HealthOverviewTests.cs).
### 7.4 Transport and secrets
Non-Development modes require HTTPS business origins. Plain HTTP is rejected with 400 by Gateway and 401 by backends; requests are not redirected to HTTPS. Development permits HTTP for local tests/development while still requiring authentication keys. Base origins must be absolute HTTP(S), root-path URLs without userinfo, query or fragment. There is no application mTLS, forwarded-header trust setup, CORS configuration or rate limiter.
The installer configures Kestrel PFX certificates and OS trust. Client machines independently need trust in the exported public CA or a supplied trusted certificate chain. Server certificates authenticate endpoint names; internal application keys authenticate callers. PostgreSQL-generated connections use `SslMode=Prefer`, not mandatory verified TLS, and default to local database hosts. This is a different boundary from mandatory production HTTPS between application processes.
Generated deployment manifests/account files contain secrets and are protected administratively. Linux uses private deployment files/root-readable environment files and service-group-readable certificates; Windows ACLs and macOS permissions are described below. Application logging uses framework logging/stdout/stderr. No explicit sensitive-data logging is enabled, but request paths can contain patient/observation identifiers. No audit-log store or patient-data log redaction facility is implemented. These are observable limits, not an expansion of the prototype's stated scope.
## 8. Concurrency, caching and runtime behavior
ASP.NET handles concurrent HTTP requests; database and network work uses async Task/CancellationToken. Scoped application services/repositories/contexts are per request. The singleton calculator has no mutable per-request state; accounts/assignments are startup snapshots. Gateway re-entrant callback HTTP traffic is handled as new requests, not recursive in-process calls. Inferred consequence: aggregate workflows add Gateway hops and dependent-service load even when only one external request is counted.
There is no application response/data cache, output-cache middleware, distributed cache, stored statistics or materialized view. Static guidance and loaded account/assignment dictionaries are configuration/reference state rather than caches of clinical data. Framework HTTP handler reuse and database connection behavior are separate infrastructure concerns. The generated database connection strings explicitly set `Pooling=false` and a 10-second connection timeout; externally supplied connection strings can choose different settings. No business HttpClient timeout override or resilience/retry/circuit-breaker policy is configured. The verifier's retry policy does not apply to ordinary application requests.
Profile creation uniqueness is explicitly concurrency-safe. Other updates have no EF concurrency token, version/ETag or conditional-write contract. Inferred: concurrent edits can overwrite each other's changes, especially owned context replacement after reading its previous value; the read following a profile update can observe a later writer's values. There is no multi-service transaction, request idempotency key for observation creation or guaranteed atomic overview snapshot.
History and calculation clients materialize full matching arrays in memory. Overview awaits sources sequentially rather than parallelizing them. Request cancellation is passed through normal HTTP/database operations; connection/HTTP timeouts can happen independently, and client-disconnect cancellation is not deliberately converted to 504.
Runtime evidence: all five `Program.cs` files, [Observation repository](../src/ObservationService/Persistence/SqlObservationRepository.cs), [Patient repository](../src/PatientProfileService/Persistence/SqlPatientRepository.cs), [overview application](../src/HealthOverviewService/Application/HealthOverviewApplicationService.cs), [connection-string generation](../deploy/HealthApp.Provisioning/Deployment.cs).
## 9. Deployment architecture and dependencies
### 9.1 Build and runtime
All five service projects target `net10.0`. Services include `Microsoft.Extensions.Hosting.WindowsServices` 10.0.12. The persistent services use Npgsql EF provider 10.0.3 and EF Relational/Design 10.0.12; Design is private tooling. Provisioning uses Npgsql 10.0.3 and the ASP.NET shared framework. Versions are those declared by the inspected project files, not a latest-version recommendation. xUnit, ASP.NET testing support and PostgreSQL are acceptance-test dependencies.
[build-release.sh](../deploy/build-release.sh) and [build-release.ps1](../deploy/build-release.ps1) publish selected projects separately in Release, framework-dependent (`--self-contained false`) without an apphost (`UseAppHost=false`), plus the provisioner. The bundle carries installer scripts, systemd templates, safe examples and installation documentation. Build requires .NET 10 SDK and package access. Target machines require the .NET 10 ASP.NET Core runtime and PostgreSQL only for persistent services; automatic provisioning supplies missing supported dependencies.
### 9.2 Topology and configuration
Colocated and distributed layouts use the same DLLs and HTTP interfaces. [deployment diagrams](diagrams/06-deployment.drawio) show both supported layouts, not a claim about current physical hosts. Defaults are Gateway HTTPS 5443 and Patient/Profile/Observation/Insights/Overview HTTPS 5081/5082/5083/5084. Generated bindings are `https://0.0.0.0:PORT`; origins and certificate names use configured hosts. Ports must be 1024–65535; services at the same literal host need different ports. IPv6-reachable binding behavior and alias equivalence are not explicitly tested by this documentation task.
Standard .NET configuration loads JSON, environment and command-line values. Committed `appsettings.json` contains logging only. Required external values are:
| Service | Configuration |
| --- | --- |
| Gateway | `Authentication:Accounts`, `Authentication:KeyDirectory`, optional token lifetime; `Access:ProfessionalAssignments`; four `Services:{name}:BaseUrl/Key`; callback keys `InternalAccess:{Observation,Insights,HealthOverview}:Key` |
| Patient/Profile | `ConnectionStrings:PatientDatabase`, `InternalAccess:GatewayKey` |
| Observation | `ConnectionStrings:ObservationDatabase`, incoming Gateway key, `Services:ApiGateway:BaseUrl/Key` |
| Insights and Overview | Incoming Gateway key, `Services:ApiGateway:BaseUrl/Key`; no database settings |
| Each HTTPS host | Binding plus `Kestrel:Certificates:Default:Path/Password`, environment |
Environment-file keys use `__` for configuration sections. Missing/invalid required origins, keys, accounts and connection strings stop startup; startup validation is not a dependency reachability check. Patient/Profile and Observation support `--migrate`: migrations run and the process exits before normal host security/origin startup checks. Normal startup never migrates.
### 9.3 Provisioning stages
1. Validate selected service names, payloads and absence of existing installation/configuration. A repeated first-install command refuses overwrite; no upgrade/uninstall engine exists.
2. Detect supported native platform/dependencies. Linux accepts Debian/Ubuntu `ID`/`ID_LIKE`, apt and running systemd/root access. Package availability, not fixed release numbers, controls provisioning. Only actual Debian can receive a Microsoft Debian runtime repository fallback. Required package names are `aspnetcore-runtime-10.0` and, where needed, `postgresql`.
3. Prepare one private plan covering all five services, even for a subset. Generate per-service keys, database settings for the two owners, synthetic `prototype-patient`, `prototype-professional`, `installation-check` accounts and hashed Gateway account config. The professional initially has no assignments.
4. Generate a prototype CA (two-year validity) and service-name/IP SAN certificates (one-year validity). Only public CA material is retained; its generated signing private key is disposed. Alternatively accept externally supplied public CA and all service PFX/password files. Supplied material is not preflighted against every runtime requirement; endpoint verification checks trust/name later.
5. Create selected persistent services' separate DBs/roles, revoke public database/schema access and give the owner schema rights for migrations. Reuse a consistent generated plan, not independently generated incompatible secrets. Database roles cannot administer/create databases/roles/replicate. An external PostgreSQL admin connection can be supplied; generated service endpoint settings adopt its host/port.
6. Install selected payloads, protected configuration/certificates, native identities and registrations; apply migrations and start each selected process.
7. Verify local native status/distinct PIDs where implemented, HTTPS reachability, DB service identity, callback credentials and topology. Complete-system verification logs in and creates/reuses a labelled synthetic check profile/observation, then retrieves overview through all five services. Verification is therefore not entirely read-only.
Evidence: [Linux installer](../deploy/installer/install.sh), [bootstrap](../deploy/installer/bootstrap.sh), [deployment preparation](../deploy/HealthApp.Provisioning/Deployment.cs), [DB provisioning](../deploy/HealthApp.Provisioning/DatabaseProvisioning.cs), [config adapter](../deploy/HealthApp.Provisioning/ConfigurationWriter.cs), [verifier](../deploy/HealthApp.Provisioning/InstallationVerification.cs).
### 9.4 Native execution and paths
| Platform | Runtime management and paths | Important boundaries |
| --- | --- | --- |
| Linux | `healthapp-NAME.service`; `/opt/healthapp/NAME`; `/etc/healthapp/NAME/service.env`; Gateway `/var/lib/healthapp-api-gateway/keys`; default plan `/var/lib/healthapp-installation/deployment` | Dedicated `healthapp-NAME` users/groups; env root-only, certificates root/service group; systemd supplies env; default local PostgreSQL |
| Windows | Independent Windows Services/virtual `NT SERVICE\healthapp-NAME` identities; `%ProgramData%\HealthApp` with services/config/state | Private administrative ACLs plus own-service read/state rights; production JSON copied into application directory; selected HTTPS firewall rules; runtime downloaded if absent; EDB PostgreSQL 17 installer resolved from maintained package manifest and SHA-256 checked |
| macOS | Independent launchd daemons/hidden `_healthapp_NAME` identities; `/Library/Application Support/HealthApp` with services/config/state | System-keychain CA trust; Homebrew PostgreSQL 17 and installer-owned cluster if no external server; Apple command-line tools/Homebrew provisioning; private plist contains environment secrets |
Systemd source templates still show a shared `healthapp` user and old flat env paths. The installer rewrites them to per-service identities and nested env paths; the generated units are the as-built installed behavior. Units request network-online, restart on failure after five seconds, use SIGINT and a 30-second stop timeout. They do not couple peers via Requires/PartOf/BindsTo or impose explicit resource limits/sandbox directives. Backend DB unavailability does not necessarily stop a host before its first DB request. Independent stopping means process independence, not availability of workflows that depend on it.
Windows uses standard WindowsServices lifetime integration and restart-on-failure configuration. macOS `RunAtLoad`/`KeepAlive` launchd registration keeps daemons alive. The repository supplies a manual [native-install workflow](../.github/workflows/prototype-native-install.yml); its existence is not evidence that Windows/macOS live registration or CI execution succeeded.
### 9.5 Distributed administration and verification limits
One prepared topology can be grouped by host and installed through SSH/SCP using [Distribution](../deploy/HealthApp.Provisioning/Distribution.cs). Each node receives selected applications/private material and necessary remote origins, not all unrelated keys/DB passwords. The Gateway legitimately needs outgoing backend keys and callback authentication keys. Unix installation needs administrative SSH with noninteractive sudo; Windows requires an elevated SSH session. Host-administration access is a prerequisite separate from generated application credentials.
Node startup can defer cross-topology verification until other hosts start. Final verification probes actual origins. There is no remote runtime file-sharing dependency after installation. Failed installation retains existing/generated material and reports the failed step; it has no cross-host rollback transaction or remote-artifact cleanup guarantee. Linux `--root` is offline staging, not live package/service deployment.
Verification contains short startup retry loops for transient 502/503/504/connectivity failures, uses custom-root TLS validation with server-name checking, and tests actual database identity. Linux installer/verifier checks native active state and distinct MainPID values. Neither live verifier deliberately cycles every service through stop/restart. Independent stop/restart is exercised by deployment acceptance tests, with direct process control; native manager execution is a separate evidence limit. See [traceability](requirements-traceability.md).
## 10. Failure behavior
| Trigger | Implemented outcome |
| --- | --- |
| Missing/malformed model, unsupported category, reversed/missing period | 400 validation response; no intended partial write |
| Invalid login / missing, forged or expired bearer | 401; invalid login response does not identify which credential failed |
| Incorrect backend incoming key / production backend HTTP | 401 before controller |
| Production Gateway HTTP | Empty 400, including public/login routes |
| Forbidden professional write, role or internal service route | 403 |
| Cross-patient ownership, unassigned patient, no own profile, absent observation | Generally empty Gateway 404; authorized missing backend resources follow their own API response |
| Second/concurrent profile creation | 409 existing-profile condition, protected by unique DB index |
| No history / summary / temporal data | History 200 `[]`; summary 404 insufficient data; trends 200 explicit unavailable parts; overview keeps available profile/latest with null insight |
| Gateway forwarding connection failure | 502 Problem; upstream status responses otherwise forwarded |
| Local non-client-cancelled upstream timeout | 504 Problem; an upstream 504 already received remains an upstream response and can be mapped by a consuming service |
| Observation patient-lookup failure | 502/504, no saved observation |
| Insights/Overview upstream non-success or malformed JSON | 502; a local timeout 504; appropriate 404 treated as absence only in Overview clients |
| Ownership lookup invalid JSON/missing expected field, unhandled DB error or other exception | Generic exception-handler path, normally 500; not all invalid upstream shapes have an explicit 502 mapping |
| Gateway stream fails after response has started | Connection aborted; response cannot be replaced safely with a new error body |
| Required config invalid / packages unavailable / certificate or provisioning failure | Startup or installer fails; step diagnostics; retained data/material rather than automatic rollback |
Every host installs `AddProblemDetails`/`UseExceptionHandler`; response shapes are not entirely uniform (empty status responses, login `{title}`, validation Problems and explicit Problems coexist). Overview interprets any 404 from its designated insight route as absent insight; it does not inspect the upstream problem title to distinguish all possible causes. Gateway ownership lookup is an extra availability dependency on Patient/Profile for patient requests, even when the requested operation is otherwise Observation- or Insights-owned.
No automatic business retry, circuit breaker, overload shedding, rate limit, dedicated readiness/liveness API or fault-tolerant replica configuration is implemented. Inferred: a Gateway outage prevents all normal external operations and aggregation callbacks; a source outage may leave peer processes running while dependent workflows fail. Runtime failure tests: [patient failures](../tests/Observation.AcceptanceTests/PatientAuthenticationTests.cs), [insight failures](../tests/Observation.AcceptanceTests/HealthInsightTests.cs), [trend failures](../tests/Observation.AcceptanceTests/HealthTrendTests.cs), [overview failures](../tests/Observation.AcceptanceTests/HealthOverviewTests.cs).
## 11. Test and experiment architecture
Application acceptance fixtures use real PostgreSQL databases and HTTP hosts, standard credential hashing/protected tokens, controlled identities and an injectable token clock. They check persistence across host restarts, isolation, ownership, professional restrictions, period/category semantics and failures. Some tests seed directly into an owning DbContext to establish Given state; that is not production cross-service DB access. Test-specific replacement authentication verifies policy separation but is not the deployment mechanism.
Deployment acceptance builds/publishes a release, invokes the real offline installer/provisioner, creates isolated DBs/roles and launches five separate Production HTTPS processes at distinct loopback origins. It checks native config formats, secrets/certificate output, DB isolation, migrations, restart independence and representative workflows. SSH/SCP distribution and apt bootstrap commands use controlled doubles. Such tests cannot establish a real five-machine topology or native Windows/macOS service-manager operation. Evidence: [application fixture](../tests/Observation.AcceptanceTests/ObservationApiFixture.cs), [test token helper](../tests/Support/AuthenticatedTestClient.cs), [deployment fixture](../tests/Deployment.AcceptanceTests/DeploymentFixture.cs), [installation tests](../tests/Deployment.AcceptanceTests/InstallationTests.cs), [bootstrap tests](../tests/Deployment.AcceptanceTests/BootstrapTests.cs).
The optional [energy/JMeter tooling](../tools/energy-jmeter/README.md) runs outside the product processes. Generated JMX plans exercise synthetic API sessions, renew opaque tokens by login, and include Gaussian interaction delays. PerfMon ServerAgent host telemetry and Shelly plug HTTP power readings are collected live into JMeter, defaulting to one-second intervals. The runner separates warmup from the measured duration and reports request latency/throughput and CPU/RAM/power on aligned timelines. Idle sends no application requests. These agents/devices are experimental dependencies, not a sixth HealthApp service or a production monitoring/security guarantee. Private credentials and ignored raw experiment results were not inspected for this assignment.
## 12. Significant constraints and decisions
The architecture preserves independent process/persistence boundaries, Gateway-routed REST, controller APIs, external configuration and on-demand derived results. It deliberately uses pre-created accounts/assignments and synthetic data. No account administration, assignment-management UI, consent/emergency workflows, medication recommendations, professional edits or production identity-provider implementation is present; these are documented exclusions, not implicitly missing stories.
[Architecture decisions](architecture-decisions.md) distinguishes explicitly documented rationale from inferred consequences. [Requirements traceability](requirements-traceability.md) identifies implementation/verification limits without silently adding requirements. [Discrepancies](discrepancies.md) distinguishes superseded diagrams, current elaborations and unresolved evidence gaps. This documentation proposes no architectural or implementation changes.
+27
View File
@@ -0,0 +1,27 @@
# Documentation validation
Validated on 2026-10-12 against source commit `5d9371388c15066eeb2bc124ed227659c644dab5`.
## Deliverables
- Required architecture narrative, README, observable decisions, requirements traceability and discrepancies are present.
- Twelve native editable Draw.io files cover all required views. Five are standalone service class diagrams; the combined class file contains the same service views plus provisioning. The complete domain diagram has an application-domain page and a separate deployment-domain page.
- Every one of the 78 source-declared service classes, records and interfaces is an individual UML classifier in its service diagram. Classifiers have separate name, attribute and operation compartments; nested types and partial declarations are accounted for. Migrations/designer members/snapshots appear on distinct EF-support pages.
- Domain concepts and implementation classes are on separate diagrams.
- The evidence inventory links source, configuration, requirements and concrete test methods.
## Checks performed
Native XML was parsed for every diagram. Checks verified `mxfile`/`mxGraphModel` structure, unique cell IDs, existing connector endpoints, positive shape geometry, free-edge message/lifeline endpoints and absence of embedded raster-image diagram content. Native boxes do not overlap. A font-metric estimate checked wrapped label height against every shape; no estimated text overflow was found. Relative source links attached to diagram nodes and local Markdown links resolve to existing files.
Following the class-diagram correction, declarations were independently enumerated from each service's source files and compared against the diagram's fully qualified `sourceType` values. Exact per-service coverage is required: Gateway 16, Patient/Profile 14, Observation 17, Insights 16 and Overview 15. Member signatures were checked for arrays, nullable/default record parameters, visibility/private setters and merged partial migration methods. The earlier grouped class views were replaced, not retained as complete service diagrams.
Content was checked against actual service startup, controllers, client origins/headers, security middleware, domain/contracts, repositories, EF mappings/migrations, provisioning/native adapters and relevant acceptance assertions. The diagrams use the same Gateway-routed communication, separate database ownership, opaque-token mechanism, context semantics and sequential overview behavior as the narrative. Historic superseded diagrams and stale implementation prose are distinguished from current-baseline differences.
The directory contains documentation and `.drawio` source only. No application code, configuration, tests or existing documentation was changed. A SHA-256 comparison confirmed all **229 pre-existing tracked files** retain their original contents; Git reports only the new `AsBuiltArchitecture/` directory.
## Evidence limits
Application/deployment suites were inspected rather than rerun: this assignment authorizes documentation, not changes to existing implementation/build artifacts or live installation. No native installer, remote host, device or external clinical source was exercised. Test doubles and loopback origins are not described as real multi-machine/native deployment evidence.
Draw.io XML/geometry/source-link validation was automated; the Draw.io desktop/browser GUI was not available here, so GUI round-trip/import rendering was not separately exercised. Each file is uncompressed native Draw.io XML with editable labels, shapes and connectors, not an image-only export. The document records uncertainties rather than presenting these limits as verified runtime behavior.