Expected behavior
The expectation is that the test passes and an extension can be added to a primitive FHIR data type. For the above example, the familyStringType on all HumanName should include an extension "mothersMaidenName"
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: [e.g. iOS]
Version [e.g. 22]
Additional context
The problem appears to be in ExpressionUtility.getKeyName which ends up stripping a leading underscore and results in both _family and family converting to family and only one value being persisted in the resolved values
Describe the bug Extensions cannot be added to primitive types since the names prefixed with
_
(i.e._birthTime
) are dropped when processing schemas.To Reproduce This is a contrived example to conveniently highlight the bug.
Apply this diff to
HumanName.yml
and this test
Expected behavior The expectation is that the test passes and an extension can be added to a primitive FHIR data type. For the above example, the
family
StringType
on allHumanName
should include an extension "mothersMaidenName"Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context The problem appears to be in
ExpressionUtility.getKeyName
which ends up stripping a leading underscore and results in both_family
andfamily
converting tofamily
and only one value being persisted in the resolved values