# US-11 trend API and methods `GET /api/patients/{patientId}/trends?from=...&to=...&setting=Home&activityCondition=AtRest` uses the same inclusive UTC measurement-instant semantics and optional context selections as history and numerical insight. Offset-free timestamps mean UTC. Both selected dimensions must match; `Unknown` is an explicit category. Patient ownership or professional assignment is required. Each selection is a separate labelled result for the same requested period. No cross-setting difference is interpreted as improvement. Analytics obtains current immutable observations through the typed ObservationQueries interface inside the authorized request snapshot, without result persistence. A valid request returns 200 even for an empty selection. Count zero, null descriptive values and explicit `Unavailable` direction distinguish empty data from dependency/deadline failures (503/504). One observation or all observations at a single instant retain descriptive values, but temporal direction is unavailable. Invalid/missing period or unsupported selections return 400. The algorithm is unchanged; method version is baseline-2026-10-05. ## Numerical method Each metric has its own unit, mean, minimum, maximum and range over every eligible observation. Decimal means are rounded only for output, to two decimals with midpoint rounding away from zero. No numerical range threshold is used to declare clinical stability or instability. Temporal calculations group equal measurement instants using the arithmetic mean for each metric, then order those groups by measurement instant. Identifier and storage order play no part. Direction uses every adjacent nonzero change: all positive means Increasing, all negative Decreasing, both signs Mixed, all zero NoClearDirection. Reversal count counts sign changes after excluding zero steps. TotalSuccessiveChange sums absolute changes between consecutive timestamp means. This retains intermediate excursions, while raw min/max retain differences within timestamp ties. No temporal change is assigned between measurements at the same instant. OverallDirection additionally reports the sign of an ordinary least-squares line over all timestamp means. Time is scaled from zero to one over the observed span; each distinct timestamp has equal weight. SlopePerDay converts that fitted slope to metric units per day and rounds to six decimals. Classification uses the unrounded slope. An extremely small nonzero slope may round to zero; its sign is a mathematical result, not evidence of clinical significance. The fit describes a linear tendency, not a prediction, causal effect or a monotonic trajectory. Mixed direction and reversal count remain visible even when an overall slope exists. Irregular sampling and repeated observations can affect the description; there is no significance test, smoothing, diagnostic protocol or clinical variability classification. ## Context and interpretation Comparability lists known similarities, differences and missing information for setting, activity, rest duration, body position, measured arm, device and cuff. Differing recorded additional circumstances also limit comparability. Matching complete recorded fields support comparability of recorded details only, without certifying clinical technique or equipment. Missing optional additional circumstances do not block a supported reference comparison. Known inadequate rest is reported separately. Limited deterministic conflict detection recognises case-insensitive `during exercise`, `during activity`, `after exercise`, `after activity`, `under motion`, `under træning`, `efter motion`, `efter træning` against AtRest; `at clinic`, `in clinic`, `at the clinic`, `på klinik`, `hos lægen` against Home; and `at home`, `hjemme` against Clinic. It examines preserved context, notes and recorded preparation text, without recategorising observations. This is conservative phrase detection, not general language understanding; negated phrases can still withhold interpretation. Arbitrary narrative is not proof of correct technique. Detected conflicts withhold resting-reference interpretation while preserving numerical information. Sources reviewed 2026-10-05: - [Lægehåndbogen: Højt blodtryk](https://www.sundhed.dk/sundhedsfaglig/laegehaandbogen/hjerte-kar/symptomer-og-tegn/hoejt-blodtryk/) (updated 2024-09-25): separate high-pressure boundaries of home 135/85 and clinic 140/90 mmHg, inclusive. The reference comparison requires a single known setting and recorded AtRest; known rest below five minutes or a non-seated recorded position prevents it. Missing optional preparation details permit only a provisional comparison, explicitly identifying unknown technique. Arbitrary period means do not establish the source's diagnostic protocol. No lower BP boundary is inferred. - [Patienthåndbogen: Bradykardi](https://www.sundhed.dk/borger/patienthaandbogen/hjerte-og-blodkar/sygdomme/hjertearytmier/bradykardi-langsom-puls/) (updated 2025-09-02) and [Hurtig puls](https://www.sundhed.dk/borger/patienthaandbogen/hjerte-og-blodkar/sygdomme/hjertearytmier/takykardier-hurtig-puls/) (updated 2025-05-12): resting pulse below 50 or above 100 beats/min provides limited rate-reference comparisons. Low pulse can be physiological in trained people. Rate alone does not diagnose rhythm abnormalities; age, fitness, medicines and symptoms remain unknown. These boundaries are not a universal healthy range or a patient-specific target. Every metric returns its reference scope, exact comparison operators, source URLs, update/review dates, counts outside the boundaries and limitations. Comparisons remain available despite missing preparation information when the known context supports that limited comparison. Mixed or unknown activity, conflicting narrative, mixed BP settings, or unsupported BP setting make the affected comparison unavailable. Interpretation of development requires temporal separation, applicable references and supported recorded comparability. The following are deliberately cautious inferences from the cited references, not new clinical decision rules: a consistent fall from high BP that remains high may be PotentiallyFavourable, while explicitly still high; resting pulse moving from outside towards the reference interval may be PotentiallyFavourable unless any contributing observation crosses the opposite boundary, including values within timestamp ties. Excursions outside a boundary with reversals are Mixed. Other outside-reference levels may be PotentiallyConcerning, including falling low pulse or unchanging high BP. Remaining cases are CannotInterpret. No BP fall below the high threshold is automatically called favourable, because an applicable lower limit or personalised goal is unavailable. Each hint distinguishes numerical variation from clinical meaning, explains incomplete/differing context, and disclaims diagnosis and medication advice. There is no combined good/bad classification across metrics. Reference comparisons and hints are for review, not a replacement for individual clinical assessment.