Merge branch 'feat/v139-targets-and-links' into release/v1.39.0

This commit is contained in:
Marc-André Bombeck committed 2026-09-24 09:53:41 +02:00
commit e89f41710a
58 files changed
+2785 -214

No files matched your search

+130 -16
View File
@@ -27652,12 +27652,20 @@ components:
type: string
minLength: 1
maxLength: 40
vaccinationIds:
maxItems: 100
type: array
items:
type: string
minLength: 1
maxLength: 40
description: "Metadata edit for a stored document: `title` (user label; null clears it), `kind` (category),
`documentDate` (user filing date, YYYY-MM-DD; null clears it), `episodeIds` (REPLACE-SET of condition links —
the document's links become exactly this set; an empty array unlinks everything; every id must be a live episode
of the caller or the whole request answers 404), `encounterIds` (the same replace-set semantics over the
caller's visits). At least one field required. No `userId` field — narrowed from the session and fed to the
Prisma `where` with the row id."
caller's visits), `vaccinationIds` (the same replace-set semantics over the caller's vaccination doses, up to
100 so one childhood record can be filed against a whole primary schedule). At least one field required. No
`userId` field — narrowed from the session and fed to the Prisma `where` with the row id."
InboundExtractRequest:
anyOf:
- type: object
@@ -30216,20 +30224,20 @@ components:
documents.inbound.notIndexed, documents.inbound.pdfNeedsAnthropic,
documents.inbound.providerUnsupported, documents.inbound.quotaExceeded, documents.inbound.rateLimited,
documents.inbound.restoreDuplicate, documents.inbound.restoreGone, documents.inbound.uploadBusy,
documents.inbound.uploadTimeout; encounter — encounter.invalid, encounter.link.invalid,
encounter.practitioner-not-found, encounter.reminder-conflict, encounter.reminder-not-found; environment
— environment.invalid, environment.no_home, environment.range_too_large, environment.travel.not_found;
export — export.selection.empty, export.selection.unknown_leaf; familyHistory — familyHistory.invalid;
feedback — feedback.body.invalid; health_score_config — health_score_config.invalid,
health_score_config.too_narrow; illness — illness.day-log.invalid, illness.disabled,
illness.episode.chronic-no-resolve, illness.episode.invalid, illness.episode.invalid-window,
illness.episode.parent-not-found, illness.insights.invalid; import — import.write_failed; ingest —
ingest.rate_limited; insights — insights.generate.budgetExceeded, insights.generate.outboundScreened,
insights.generate.profileScopeChanged, insights.generate.scopeChanged; labs —
labs.biomarker.create.invalid, labs.biomarker.duplicate, labs.biomarker.notFound,
labs.biomarker.update.invalid, labs.biomarker.update.referenceRangeInvalid, labs.create.invalid,
labs.ocr.budgetExceeded, labs.ocr.extractFailed, labs.ocr.fileTooLarge, labs.ocr.fileType,
labs.ocr.localOcrDisabled, labs.ocr.pdfNeedsAnthropic, labs.ocr.providerUnsupported,
documents.inbound.uploadTimeout, documents.inbound.vaccinationNotFound; encounter — encounter.invalid,
encounter.link.invalid, encounter.practitioner-not-found, encounter.reminder-conflict,
encounter.reminder-not-found; environment — environment.invalid, environment.no_home,
environment.range_too_large, environment.travel.not_found; export — export.selection.empty,
export.selection.unknown_leaf; familyHistory — familyHistory.invalid; feedback — feedback.body.invalid;
health_score_config — health_score_config.invalid, health_score_config.too_narrow; illness —
illness.day-log.invalid, illness.disabled, illness.episode.chronic-no-resolve, illness.episode.invalid,
illness.episode.invalid-window, illness.episode.parent-not-found, illness.insights.invalid; import —
import.write_failed; ingest — ingest.rate_limited; insights — insights.generate.budgetExceeded,
insights.generate.outboundScreened, insights.generate.profileScopeChanged,
insights.generate.scopeChanged; labs — labs.biomarker.create.invalid, labs.biomarker.duplicate,
labs.biomarker.notFound, labs.biomarker.update.invalid, labs.biomarker.update.referenceRangeInvalid,
labs.create.invalid, labs.ocr.budgetExceeded, labs.ocr.extractFailed, labs.ocr.fileTooLarge,
labs.ocr.fileType, labs.ocr.localOcrDisabled, labs.ocr.pdfNeedsAnthropic, labs.ocr.providerUnsupported,
labs.ocr.rateLimited, labs.restore.invalid, labs.result.notFound, labs.update.invalid,
labs.update.linkedFieldsImmutable, labs.update.numericExpected, labs.update.qualitativeExpected,
labs.update.referenceRangeInvalid, labs.update.sourceReferenceRangeInvalid; managed_profile —
@@ -50748,6 +50756,35 @@ components:
- sources
additionalProperties: false
- type: "null"
weightTrend:
description: Which way a weight change counts as progress, judged against the person's own stored target rather than
assuming a fall is good. Render the arrow, 7-day delta and comparison caption from `direction`; do not
recompute it. Optional for older cached snapshots; when absent, treat it as `up-bad`.
type: object
properties:
direction:
type: string
enum:
- up-good
- up-bad
- hold
description: "How the weight tile colours a change. `up-good`: a rise is progress (below the target band). `up-bad`: a
fall is progress (above the band, and the reading when no target is stored). `hold`: the weight is
inside the band, so a flat change is progress and a move either way is neutral, never a setback."
targetPosition:
anyOf:
- type: string
enum:
- below
- inside
- above
- type: "null"
description: Where the 7-day average (else the latest reading) sits against the person's own stored weight target. Null
when no target is stored or there is no reading.
required:
- direction
- targetPosition
additionalProperties: false
required:
- summaries
- lastSeenByType
@@ -60579,8 +60616,17 @@ components:
type: array
items:
$ref: "#/components/schemas/Vaccination"
renewals:
anyOf:
- type: array
items:
$ref: "#/components/schemas/VaccinationRenewal"
- type: "null"
description: Each antigen's renewal state, earliest due first. Null when the caller acts under a grant that does not
cover the measurements section the booster reminders live in.
required:
- vaccinations
- renewals
additionalProperties: false
description: The caller's immunization history, newest dose first, with every entry's series already resolved over the
whole live set — never over the filtered page, which would report the oldest dose in a window as the first ever
@@ -60816,6 +60862,37 @@ components:
grant does not cover the document vault: a dose lives in the health background but points into the vault, and a
page's filename is itself the sensitive part. The link is still listed — the caller may know the dose was
transcribed from a page — and `redacted` tells a withheld name apart from a page that simply has no date."
VaccinationRenewal:
type: object
properties:
antigen:
type: string
reminderId:
type: string
dueAt:
type: string
daysUntil:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
state:
type: string
enum:
- current
- dueSoon
- overdue
required:
- antigen
- reminderId
- dueAt
- daysUntil
- state
additionalProperties: false
description: "One antigen's renewal state, read from the booster reminder the person confirmed for it (`dueAt` is that
reminder's next due instant). `daysUntil` counts calendar days on the person's own clock and is negative once
the date has passed. `state` is `overdue` once it has passed, `dueSoon` within 30 days, `current` otherwise.
Render from `state`; do not recompute it. Nothing here is derived from age, history or the catalogue: an antigen
without a confirmed booster has no entry."
CreateVaccinationEnvelope:
type: object
properties:
@@ -62803,6 +62880,15 @@ components:
type: array
items:
$ref: "#/components/schemas/ExtractedFact"
vaccinationLinks:
anyOf:
- type: array
items:
$ref: "#/components/schemas/DocumentVaccinationLink"
- type: "null"
description: "Vaccination doses this document is filed against. Null when the caller acts inside somebody else's record
under a grant that does not cover the health background the doses live in: the page is shared, the doses are
not, and an empty list would claim the page records none."
summary:
anyOf:
- type: string
@@ -62844,6 +62930,7 @@ components:
- createdAt
- updatedAt
- facts
- vaccinationLinks
- summary
- summaryGeneratedAt
- summaryState
@@ -62932,6 +63019,33 @@ components:
with per-field provenance + a confidence gate. STATED status only — codes (SNOMED/ICD-10/LOINC/RxNorm/ATC) are
present only when the document wrote them; no range-flag, no inferred links. `needsReview` is true when the fact
scored below the confidence floor (it cannot be approved until edited).
DocumentVaccinationLink:
type: object
properties:
vaccinationId:
type: string
occurredAt:
anyOf:
- type: string
- type: "null"
catalogSlug:
anyOf:
- type: string
- type: "null"
vaccineName:
anyOf:
- type: string
- type: "null"
required:
- vaccinationId
- occurredAt
- catalogSlug
- vaccineName
additionalProperties: false
description: A link to one of the caller's vaccination doses — "this page records that dose". `catalogSlug` is the
catalogue entry when this release still knows the dose's slug, for the reader's own bundle to name; null is the
signal to show `vaccineName`, the person's own wording. The same table the dose's own
`/api/vaccinations/{id}/links` writes from the other end.
InboundDocumentUpdateEnvelope:
type: object
properties: