feat(medications): carry manufacturer and printed strength on an inventory container

The native pen list renders these two as its headline and subhead. The
server held neither, so a container registered on the web could not be
shown there without fabricating an empty card, and the client kept its
own copy locally with no back-fill possible.

Both columns are additive and nullable (migration 0255). Every existing
row is truthfully NULL — the values were never collected, and a plain
supply row such as a blister pack or a bottle has no use for either.

Strength stays free text rather than a parsed number + unit: pens state
it per dose, per ml, or per cartridge depending on the product, and
forcing a numeric split would lose which of the three was printed.

On PATCH an omitted field leaves the stored value untouched, the same
rule notes already followed, so a client that does not know the fields
cannot blank what another populated; an explicit null still clears. The
web add-container form collects both for a PEN, so the columns do not
ship empty forever.
This commit is contained in:
Marc-André Bombeck committed 2026-07-19 12:28:48 +02:00
1 parent 4ddc08f784
commit 4c3cc84daf
18 files changed
+391 -28

No files matched your search

+40
View File
@@ -12425,6 +12425,19 @@ components:
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
- type: "null"
manufacturer:
description: Marketing-authorisation holder / maker as printed on the carton. Free text, max 120 chars.
anyOf:
- type: string
maxLength: 120
- type: "null"
doseStrength:
description: Strength as printed on the container, e.g. "5 mg/0.5 ml". Free text, max 60 chars — deliberately not split
into a number + unit because pens state strength per dose, per ml, or per cartridge.
anyOf:
- type: string
maxLength: 60
- type: "null"
notes:
anyOf:
- type: string
@@ -12458,6 +12471,19 @@ components:
type: number
minimum: 0
maximum: 1000
manufacturer:
description: Marketing-authorisation holder / maker as printed on the carton. Free text, max 120 chars.
anyOf:
- type: string
maxLength: 120
- type: "null"
doseStrength:
description: Strength as printed on the container, e.g. "5 mg/0.5 ml". Free text, max 60 chars — deliberately not split
into a number + unit because pens state strength per dose, per ml, or per cartridge.
anyOf:
- type: string
maxLength: 60
- type: "null"
notes:
anyOf:
- type: string
@@ -19420,6 +19446,18 @@ components:
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
- type: "null"
manufacturer:
anyOf:
- type: string
- type: "null"
description: Marketing-authorisation holder / maker as printed on the carton. NULL for a container registered before the
field existed, and for plain supply rows that never carried one.
doseStrength:
anyOf:
- type: string
- type: "null"
description: Strength as printed on the container, e.g. "5 mg/0.5 ml". Free text, not split into a number + unit — pens
state strength per dose, per ml, or per cartridge. NULL when unknown.
notes:
anyOf:
- type: string
@@ -19444,6 +19482,8 @@ components:
- expiresAt
- printedExpiry
- purchasedAt
- manufacturer
- doseStrength
- notes
- createdAt
- updatedAt