Skip to content

Fix Immunization dates: use the bare occurrence path in the ViewDefinition (fixes #71) - #72

Open
dhes wants to merge 1 commit into
ohs-foundation:mainfrom
dhes:fix-immunization-occurrence
Open

Fix Immunization dates: use the bare occurrence path in the ViewDefinition (fixes #71)#72
dhes wants to merge 1 commit into
ohs-foundation:mainfrom
dhes:fix-immunization-occurrence

Conversation

@dhes

@dhes dhes commented Aug 29, 2026

Copy link
Copy Markdown

What

The Immunization ViewDefinition's date column used the choice-shorthand path occurrenceDateTime, which kotlin-fhirpath evaluates to empty — its accessors resolve only the bare occurrence element (and per the FHIRPath spec, choice elements are addressed by their base name, with ofType() for type selection). As a result immunization dates never rendered anywhere in the app. This changes the path to occurrence (one word) and, since dates now exist, sorts the section newest-first — ISO-8601 string ordering, undated entries sink to the bottom.

Testing

  • Verified against a live HAPI server with a real patient record: all 47 immunizations render with dates, newest first, on desktop and Android emulator.
  • :reference-app:jvmTest green.

Fixes #71.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LGgxE9TK56BNPJJX2PnYhj

The ViewDefinition used the choice-shorthand path `occurrenceDateTime`,
which kotlin-fhirpath evaluates to empty (accessors resolve only the
bare `occurrence` element), so dates never rendered. Use `occurrence`.
Also sort the section newest-first via the ISO-8601 string form.

Reported as ohs-foundation#71.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGgxE9TK56BNPJJX2PnYhj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Immunization dates never render: ViewDefinition uses choice-shorthand path occurrenceDateTime

1 participant