mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 22:50:51 +00:00
feat(records): surface structured allergies and family history in the doctor report and AI context
The structured Allergy / FamilyHistoryEntry stores reached FHIR export only: the doctor-report PDF shipped without the two sections every clinical intake asks for first, and the Coach knew allergies only from the free-text answer — a penicillin allergy recorded in the structured records UI never reached either surface. Doctor report: two new section toggles (allergies, familyHistory; both default ON, same stance as labs) across the prefs schema, the export selection, the aggregator, the PDF renderer, and the export panel. The tables render stored fields only — substance/category/kind/severity/ reaction/status and relationship/condition/age-at-onset; the reaction decrypts fail-soft per row and free-text notes are never read, matching the illness-journal stance. OpenAPI regenerated for the extended sections shape. Coach: the about-me context block now appends the structured rows as clearly labelled entries (authoritative over the free-text answer on conflict); the projection is a pure composer with unit tests. New section labels land in all six locales.
This commit is contained in:
1 parent
8d36e69f75
commit
9b4f3ce56d
15 files changed
+573
-14
No files matched your search
@@ -58,6 +58,8 @@ interface SectionState {
|
||||
mood: boolean;
|
||||
bmi: boolean;
|
||||
labs: boolean;
|
||||
allergies: boolean;
|
||||
familyHistory: boolean;
|
||||
}
|
||||
|
||||
const DEFAULT_SECTIONS: SectionState = {
|
||||
@@ -79,6 +81,8 @@ const DEFAULT_SECTIONS: SectionState = {
|
||||
mood: false, // privacy default
|
||||
bmi: true,
|
||||
labs: true,
|
||||
allergies: true,
|
||||
familyHistory: true,
|
||||
};
|
||||
|
||||
function buildSelectionSections(s: SectionState) {
|
||||
@@ -106,6 +110,8 @@ function buildSelectionSections(s: SectionState) {
|
||||
mood: s.mood,
|
||||
bmi: s.bmi,
|
||||
labs: s.labs,
|
||||
allergies: s.allergies,
|
||||
familyHistory: s.familyHistory,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -406,6 +412,16 @@ export function HealthRecordExportPanel() {
|
||||
checked={sections.labs}
|
||||
onToggle={() => toggle("labs")}
|
||||
/>
|
||||
<ToggleRow
|
||||
label={t("settings.healthRecord.allergies")}
|
||||
checked={sections.allergies}
|
||||
onToggle={() => toggle("allergies")}
|
||||
/>
|
||||
<ToggleRow
|
||||
label={t("settings.healthRecord.familyHistory")}
|
||||
checked={sections.familyHistory}
|
||||
onToggle={() => toggle("familyHistory")}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{isPdfLike && (
|
||||
|
||||
Reference in new issue
Block a user