Merge branch 'main' into fix/wipe-geo-truths

This commit is contained in:
Marc-André Bombeck authored and GitHub committed 2026-08-08 03:29:51 +02:00
commit cbf949d43a
93 files changed
+5417 -236

No files matched your search

+172 -9
View File
@@ -9147,6 +9147,16 @@ paths:
type: number
referenceHigh:
type: number
sourceReferenceLow:
type: number
sourceReferenceHigh:
type: number
sourceReferenceText:
anyOf:
- type: string
maxLength: 120
- type: string
const: ""
takenAt:
type: string
format: date-time
@@ -9254,6 +9264,22 @@ paths:
anyOf:
- type: number
- type: "null"
sourceReferenceLow:
anyOf:
- type: number
- type: "null"
sourceReferenceHigh:
anyOf:
- type: number
- type: "null"
sourceReferenceText:
anyOf:
- anyOf:
- type: string
maxLength: 120
- type: string
const: ""
- type: "null"
takenAt:
type: string
format: date-time
@@ -9430,6 +9456,12 @@ paths:
type: number
referenceHigh:
type: number
referenceText:
anyOf:
- type: string
maxLength: 120
- type: string
const: ""
takenAt:
type: string
format: date-time
@@ -11616,6 +11648,11 @@ paths:
anyOf:
- type: number
- type: "null"
referenceText:
anyOf:
- type: string
maxLength: 120
- type: "null"
effectiveDate:
anyOf:
- type: string
@@ -32974,6 +33011,30 @@ components:
anyOf:
- type: number
- type: "null"
catalogReferenceLow:
anyOf:
- type: number
- type: "null"
catalogReferenceHigh:
anyOf:
- type: number
- type: "null"
sourceReferenceLow:
anyOf:
- type: number
- type: "null"
sourceReferenceHigh:
anyOf:
- type: number
- type: "null"
sourceReferenceText:
anyOf:
- type: string
- type: "null"
referenceOrigin:
$ref: "#/components/schemas/LabReferenceRangeOrigin"
referenceDivergesFromCatalog:
type: boolean
takenAt:
type: string
source:
@@ -32996,6 +33057,13 @@ components:
- unit
- referenceLow
- referenceHigh
- catalogReferenceLow
- catalogReferenceHigh
- sourceReferenceLow
- sourceReferenceHigh
- sourceReferenceText
- referenceOrigin
- referenceDivergesFromCatalog
- takenAt
- source
- hasNote
@@ -33003,12 +33071,31 @@ components:
- createdAt
- updatedAt
additionalProperties: false
description: A stored lab result. Exactly one of `value` (numeric) or `valueText` (qualitative, e.g. "negativ") is
non-null; `rangeStatus` is always `unknown` for a qualitative row (no number to classify). `biomarkerId` links
the user-scoped catalog marker (null for legacy free-text rows); when linked, `analyte` / `unit` /
`referenceLow` / `referenceHigh` are RESOLVED server-side from the Biomarker — the client renders them and never
recomputes the range. The encrypted note is never echoed in list rows; `hasNote` flags its presence and the
single-resource GET returns the decrypted `note`.
description: >-
A stored lab result. Exactly one of `value` (numeric) or `valueText` (qualitative, e.g. "negativ") is non-null;
`rangeStatus` is always `unknown` for a qualitative row (no number to classify). `biomarkerId` links the
user-scoped catalog marker (null for legacy free-text rows); when linked, `analyte` / `unit` are RESOLVED
server-side from the Biomarker.
Three reference windows ride on the row and the server says which one applies. `referenceLow` / `referenceHigh`
are the window IN FORCE and the one `rangeStatus` was computed from — read these to render the range and you are
correct without doing any resolution of your own. `sourceReferenceLow` / `sourceReferenceHigh` /
`sourceReferenceText` are the range this reading's own report printed (the text verbatim, kept even when no
numbers could be read out of it). `catalogReferenceLow` / `catalogReferenceHigh` are the Biomarker band.
`referenceOrigin` names the winner and `referenceDivergesFromCatalog` is true when the report's window and the
catalog band state different limits — a surface showing only one of the two is showing a partial answer. The
client renders these values and never recomputes the range. The encrypted note is never echoed in list rows;
`hasNote` flags its presence and the single-resource GET returns the decrypted `note`.
LabReferenceRangeOrigin:
type: string
enum:
- source
- catalog
- none
description: Which window `referenceLow` / `referenceHigh` came from. `source` = the range printed on this reading's own
report, which wins for that reading because it is the window the physician evaluated the value against.
`catalog` = the user's Biomarker band, the net for readings with no printed range. `none` = no window on file.
LabReferenceRangeStatus:
type: string
enum:
@@ -33016,9 +33103,9 @@ components:
- below
- above
- unknown
description: "Server-computed, NEUTRAL reference-range verdict. `unknown` when the lab reported no usable bounds.
Inclusive bounds: a value on the limit reads in-range. The badge that renders this must stay calm and
informative — not an alarming red."
description: "Server-computed, NEUTRAL reference-range verdict, always against `referenceLow` / `referenceHigh` (the
window in force for that reading). `unknown` when no usable bounds are on file. Inclusive bounds: a value on the
limit reads in-range. The badge that renders this must stay calm and informative — not an alarming red."
CreateLabResultResponse:
type: object
properties:
@@ -33086,6 +33173,30 @@ components:
anyOf:
- type: number
- type: "null"
catalogReferenceLow:
anyOf:
- type: number
- type: "null"
catalogReferenceHigh:
anyOf:
- type: number
- type: "null"
sourceReferenceLow:
anyOf:
- type: number
- type: "null"
sourceReferenceHigh:
anyOf:
- type: number
- type: "null"
sourceReferenceText:
anyOf:
- type: string
- type: "null"
referenceOrigin:
$ref: "#/components/schemas/LabReferenceRangeOrigin"
referenceDivergesFromCatalog:
type: boolean
takenAt:
type: string
source:
@@ -33110,6 +33221,13 @@ components:
- unit
- referenceLow
- referenceHigh
- catalogReferenceLow
- catalogReferenceHigh
- sourceReferenceLow
- sourceReferenceHigh
- sourceReferenceText
- referenceOrigin
- referenceDivergesFromCatalog
- takenAt
- source
- rangeStatus
@@ -33292,6 +33410,14 @@ components:
anyOf:
- type: number
- type: "null"
referenceText:
anyOf:
- type: string
- type: "null"
description: The reference range EXACTLY as printed on the report, verbatim ("3,5 - 5,0", "< 116", "bis 5,0",
"negativ"). `referenceLow` / `referenceHigh` carry the same window reduced to numbers WHEN it reduces to
numbers; this field carries it either way, so a window stated in words is not lost between the report and
the reading.
takenAt:
anyOf:
- type: string
@@ -33329,6 +33455,7 @@ components:
- unit
- referenceLow
- referenceHigh
- referenceText
- takenAt
- confidence
- biomarkerMatch
@@ -33426,6 +33553,34 @@ components:
anyOf:
- type: number
- type: "null"
catalogReferenceLow:
anyOf:
- type: number
- type: "null"
catalogReferenceHigh:
anyOf:
- type: number
- type: "null"
sourceReferenceLow:
anyOf:
- type: number
- type: "null"
sourceReferenceHigh:
anyOf:
- type: number
- type: "null"
sourceReferenceText:
anyOf:
- type: string
- type: "null"
referenceOrigin:
type: string
enum:
- source
- catalog
- none
referenceDivergesFromCatalog:
type: boolean
takenAt:
type: string
source:
@@ -33453,6 +33608,13 @@ components:
- unit
- referenceLow
- referenceHigh
- catalogReferenceLow
- catalogReferenceHigh
- sourceReferenceLow
- sourceReferenceHigh
- sourceReferenceText
- referenceOrigin
- referenceDivergesFromCatalog
- takenAt
- source
- hasNote
@@ -33460,6 +33622,7 @@ components:
- createdAt
- updatedAt
additionalProperties: false
description: A written reading. Its reference window resolves exactly as it does on `/api/labs` — see `LabResult`.
ListBiomarkersEnvelope:
type: object
properties: