feat: add medication enrichment lookup to the medication editor

* feat: add medication enrichment lookup

* fix: avoid double unescape in enrichment sanitization

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Daniel Volz
2026-03-20 20:39:38 +01:00
committed by GitHub
parent e1b47e82b2
commit b796e03bcb
16 changed files with 3510 additions and 2 deletions
+44
View File
@@ -225,6 +225,50 @@
"weight": "z.B. 240",
"notes": "z.B. Mit Essen einnehmen, Alkohol vermeiden... (optional)"
},
"enrichment": {
"title": "Optionale Medikamentensuche",
"coverageLabel": "Unvollständige freie Abdeckung",
"collapsedHint": "Öffne das nur, wenn du Suchvorschläge nutzen möchtest.",
"toggleShow": "Suche anzeigen",
"toggleHide": "Suche ausblenden",
"infoShow": "Infos zu den Quellen",
"infoHide": "Quellenhinweise ausblenden",
"infoTitle": "Was du erwarten kannst",
"description": "Durchsuche zuerst RxNorm und openFDA, nutze EMA nur als letzten Fallback und prüfe jeden Treffer, bevor du etwas ins Formular übernimmst.",
"searchLabel": "Medikamentenquellen durchsuchen",
"searchPlaceholder": "Nach Marke oder Wirkstoff suchen",
"searchAction": "Suchen",
"searching": "Suche läuft...",
"showMoreAction": "Mehr Treffer anzeigen",
"noResults": "Es wurden in der aktuellen Freiquellen-Suche keine Treffer gefunden. Du kannst das Medikament manuell weiter erfassen.",
"manualEntryHint": "Diese Hilfe ist optional und kann Medikamente, Stärken oder lokale Marktvarianten übersehen.",
"searchError": "Die Medikamentensuche ist momentan nicht verfügbar. Bitte fahre mit der manuellen Eingabe fort.",
"applyAction": "Übernehmen",
"applying": "Wird übernommen...",
"applied": "Ins Formular übernommen",
"applyError": "Das Autofill konnte nicht übernommen werden. Bitte bearbeite das Medikament manuell weiter.",
"partialNote": "Es waren nur teilweise Autofill-Vorschläge verfügbar. Prüfe die Felder vor dem Speichern.",
"strengthTitle": "Stärke-Vorschläge",
"strengthHint": "Wähle eine Stärke aus, um Dosis pro Tablette und Einheit zu aktualisieren.",
"appliedStrength": "Übernommene Stärke: {{label}}",
"details": {
"showAction": "Mehr Details",
"hideAction": "Weniger Details",
"authorisationHolder": "Zulassungsinhaber",
"therapeuticArea": "Therapiebereich",
"authorisationDate": "Zulassungsdatum"
},
"genericStatus": {
"generic": "Generikum",
"original": "Original",
"unknown": "Status unbekannt"
},
"sources": {
"ema": "EMA",
"rxnorm": "RxNorm",
"openfda": "openFDA (USA)"
}
},
"validation": {
"startDateAfterIntake": "Das Medikations-Startdatum ({{medicationStartDate}}) darf nicht nach dem Einnahmedatum ({{intakeDate}}) liegen.",
"endDateBeforeStart": "Das Medikations-Enddatum ({{medicationEndDate}}) darf nicht vor dem Startdatum ({{medicationStartDate}}) liegen."
+44
View File
@@ -225,6 +225,50 @@
"weight": "e.g. 240",
"notes": "e.g. Take with food, avoid alcohol... (optional)"
},
"enrichment": {
"title": "Optional medication lookup",
"coverageLabel": "Incomplete free-source coverage",
"collapsedHint": "Open this only if you want lookup suggestions.",
"toggleShow": "Show lookup",
"toggleHide": "Hide lookup",
"infoShow": "About sources",
"infoHide": "Hide source notes",
"infoTitle": "What to expect",
"description": "Search RxNorm and openFDA first, use EMA as a last fallback, and review each result before applying anything to the form.",
"searchLabel": "Search medication sources",
"searchPlaceholder": "Search by brand or ingredient",
"searchAction": "Search",
"searching": "Searching...",
"showMoreAction": "Show more results",
"noResults": "No matches were found in the current free-source search. You can continue entering the medication manually.",
"manualEntryHint": "This helper is optional and may miss medications, strengths, or local market variants.",
"searchError": "Medication lookup is currently unavailable. Please continue with manual entry.",
"applyAction": "Apply",
"applying": "Applying...",
"applied": "Applied to form",
"applyError": "Autofill could not be applied. Please keep editing the medication manually.",
"partialNote": "Only partial autofill suggestions were available. Review the fields before saving.",
"strengthTitle": "Strength suggestions",
"strengthHint": "Choose a strength to update dose per pill and unit.",
"appliedStrength": "Applied strength: {{label}}",
"details": {
"showAction": "More details",
"hideAction": "Less details",
"authorisationHolder": "Authorisation holder",
"therapeuticArea": "Therapeutic area",
"authorisationDate": "Authorisation date"
},
"genericStatus": {
"generic": "Generic",
"original": "Original",
"unknown": "Status unknown"
},
"sources": {
"ema": "EMA",
"rxnorm": "RxNorm",
"openfda": "openFDA (US)"
}
},
"validation": {
"startDateAfterIntake": "Medication start date ({{medicationStartDate}}) cannot be after intake date ({{intakeDate}}).",
"endDateBeforeStart": "Medication end date ({{medicationEndDate}}) cannot be before medication start date ({{medicationStartDate}})."