Skip to content

TypeSchema: Replace inline FHIRValue casts with proper FHIRCoding import#133

Merged
ryukzak merged 1 commit intomainfrom
fix/field-builder-fhir-value-cast
Apr 8, 2026
Merged

TypeSchema: Replace inline FHIRValue casts with proper FHIRCoding import#133
ryukzak merged 1 commit intomainfrom
fix/field-builder-fhir-value-cast

Conversation

@ryukzak
Copy link
Copy Markdown
Collaborator

@ryukzak ryukzak commented Apr 8, 2026

  • Import FHIRCoding instead of using inline import("@atomic-ehr/fhirschema").FHIRValue casts
  • Type codingValues as FHIRCoding[] (more precise than FHIRValue) using flatMap to safely filter undefined matches
  • Remove as unknown as FHIRValue double cast — { coding: FHIRCoding[] } satisfies FHIRCodeableConcept which is a FHIRValue union member
  • Remove redundant ternary that wrapped single-element arrays identically to multi-element

@ryukzak ryukzak merged commit afd47f7 into main Apr 8, 2026
31 checks passed
@ryukzak ryukzak deleted the fix/field-builder-fhir-value-cast branch April 8, 2026 14:33
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.

1 participant