What is specialization/constraint StructureDefinition defined byStructureDefinition.derivation?

Hi everyone,

What does StructureDefinition.derivation indicate? The comment says the specialization difinition adds new element to the base type and the constraint difinition cannot add new element and adds additional rules to existing concrete type.

Are there any difference other than whether there is a new element or not?

I found some explanation about constraint StrudtureDefition distributed among the Profiling (which i didn’t recognized until I realized there are 2 type StructureDefinitions):

What StructureDefinitions can do when they are constraining existing resources and datatypes is limited in some respects: …

When a profile is constraining another profile…,

but I couldn’t find any description about specialization StructureDefinition other than The comment or TypeDerivationRule terminology.

I would be glad if you let me know what is specialization StructureDefinition and the drawbacks of using specialization StructureDefinition, hopefully with the description in the FHIR document.

Thank you in advance.

Specialization can only be used when defining new resources (which only HL7 can do) or when working with logical models. If you’re profiling a FHIR resource, you’re always using ‘constraint’.

If you’d like additional clarification to be included in the specification, feel free to use the ‘propose a change’ link in the spec. (Registration is free.)

1 Like

Thank for detailed answer, I’ll try to propose if it seems needed.