Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat XHTML at a primitive FHIR type, not a primitive. #2783

Closed
ewoutkramer opened this issue May 3, 2024 · 1 comment
Closed

Treat XHTML at a primitive FHIR type, not a primitive. #2783

ewoutkramer opened this issue May 3, 2024 · 1 comment
Labels
breaking change This issue/commit causes a breaking change, and requires a major version upgrade

Comments

@ewoutkramer
Copy link
Member

In our POCO's the Narrative.Div is a special case. The FHIR spec defines it as a normal element of type XHtml (and we have generated that type), but we have represented that element as a string. Consequently, both ITypedElement and IReadOnlyDictionary have to jump through hoops to make this work like the specification. It is probably better to consider XHtml to be a primitive FHIR type for which the XML serialization has no capabilities for presenting the extensions or id (it could be done in json!).

This is less breaking than it sounds, since in this case, the existing Narrative.Div element remains as a convenience property (just like with all primitives) of type string, we'll be adding a DivElement property, and move the attributes over. This might even allow us to generate the Narrative type, since those are currently hand-written because of this exceptional situation.

@ewoutkramer ewoutkramer added enhancement breaking change This issue/commit causes a breaking change, and requires a major version upgrade labels May 3, 2024
@ewoutkramer
Copy link
Member Author

We did this as part of making POCO generation possible for all datatypes, including the "nasty" ones like XHtml, so this is done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This issue/commit causes a breaking change, and requires a major version upgrade
Projects
None yet
Development

No branches or pull requests

1 participant