fix(anamnesis): one newest AUDIT-C entry, scored against the wording offered

The stored language is the wording the read route offers the account;
a request naming another wording, or a takenAt more than five minutes
ahead, is refused. Latest, offerDue, the Coach block and the doctor
report all read the newest entry whose answers open.

The old one-word alcohol pattern gives way to an AUDIT-C entry in the
Coach block, and the alcohol section lists it with a remove action.
This commit is contained in:
Marc-André Bombeck committed 2026-10-16 05:36:42 +02:00
1 parent e9a0b3d959
commit b99b70127d
17 files changed
+515 -87

No files matched your search

+13 -2
View File
@@ -24630,8 +24630,11 @@ paths:
tags:
- Anamnesis
summary: Record an AUDIT-C (v1.43)
description: Scores the three items on the server. A replay with the same `externalId` answers 200 with the stored
result. 422 `anamnesis.auditC.invalid`; 429 `anamnesis.auditC.rateLimited` after 30 in an hour.
description: Scores the three items on the server. The entry is stored in the language of the wording the read route
offers this account (`auditC.instrument.locale`), and the cut-off follows that wording; `locale`, when sent,
must name that same wording. A replay with the same `externalId` answers 200 with the stored result. 422
`anamnesis.auditC.invalid` (also for another wording than the one offered, and for a `takenAt` more than five
minutes ahead of the server clock); 429 `anamnesis.auditC.rateLimited` after 30 in an hour.
parameters:
- *a6
requestBody:
@@ -38941,6 +38944,9 @@ components:
id:
type: string
minLength: 1
ref:
type: string
minLength: 1
name:
type: string
minLength: 1
@@ -40523,6 +40529,9 @@ components:
id:
type: string
minLength: 1
ref:
type: string
minLength: 1
panel:
anyOf:
- type: string
@@ -86403,6 +86412,7 @@ components:
anyOf:
- $ref: "#/components/schemas/AuditCResult"
- type: "null"
description: The newest entry whose answers this host can open; an entry it cannot open is listed in `history` only.
history:
type: array
items:
@@ -86426,6 +86436,7 @@ components:
description: Newest first, at most 20.
offerDue:
type: boolean
description: No readable entry, or the newest one whose answers open (the one in `latest`) is 365 days old or older.
instrument:
type: object
properties: