While I was working on the new code generator for the .NET API 2.0, I had to review the class hierarchy of FHIR and how we represent this in the StructureDefinition
s that are part of the specification. Certainly, if you are working with multiple versions of FHIR and do any kind of metadata work, you will have found yourself trying to remember the answer to questions like: "Is DataRequirements.codeFilter
based on Element
or BackboneElement
?", "Was SimpleQuantity
a datatype or a profile on Quantity
in R3?" "How did we specify the datatype of Narrative.text
in R4? Did that change across FHIR versions?"
Yet again, I found myself digging through tons of StructureDefinitions to find out the details I needed to get the code generation done. I told myself that this time around, I would actually document it, so you (and a future me) would have just a single page to go to.
Let's first take a look at the Resources. The Resource inheritance