Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Allow raw resources where Reference-s are used too #37

@aartaka

Description

@aartaka

So I'm working on a CCDA to FHIR converter, which recursively parses CCDA resources and generates a nested tree of FHIR resources. Which was fine in a previous implementation, because it was untyped. But now that I'm using generated TypeScript bindings, they mandate that nested resources should be Reference-s instead:

export interface Observation extends DomainResource {
    // ...
    partOf?: Reference<'ImagingStudy' | 'Immunization' | 'MedicationAdministration' | 'MedicationDispense' | 'MedicationStatement' | 'Procedure'>[];
    performer?: Reference<'CareTeam' | 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'RelatedPerson'>[];
    // ...
}

Meaning I should somehow store resources somewhere instead of recursively including them in the tree. Which most likely means global state, and global state is not nice. Is there any possibility that you may allow raw resources in addition to Reference-s in the fields where nested resources are included?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions