firely-net-sdk
firely-net-sdk copied to clipboard
Remove old validation rule preventing narrative text in contained resources
Describe the bug The FHIR Specification no longer specifies that contained resources cannot have narrative. (the removed invariant was dom-1) https://jira.hl7.org/browse/FHIR-18483
https://github.com/FirelyTeam/firely-net-common/blob/9ec523fff207655b9bb66c57cd0b76c14b6519bd/src/Hl7.Fhir.Support.Poco/Validation/CodedValidationException.cs#L58
https://github.com/FirelyTeam/firely-net-common/blob/9ec523fff207655b9bb66c57cd0b76c14b6519bd/src/Hl7.Fhir.Support.Poco/Model/DomainResource.cs#L51
This unit test is verifying something that is no longer correct. https://github.com/FirelyTeam/firely-net-sdk/blob/2e731218f2d588b50ce4ea34540f29ce9c027aee/src/Hl7.Fhir.Core.Tests/Validation/ValidationTests.cs#L194
Version used:
- FHIR Version: R4, R4B, R5 (this was a valid case back in STU3 - invariant: dom-1)
- Version: 4.1.0 (I'm sure this has been around for quite a while ;)
I propose we add a Firely Favorite label to this, since the new parsers (and attribute validators) actively enforce this now using a hand-written rule.
I think it is not trivial to still keep validating this in R3 using the attributes and not in the others, but dom-1 will still catch it during profile validation for R3.
So the code that I've highlighted can be removed and the unit test updated and leave the dom1 in R3 to catch that? If so I'm happy to make the PR for it.
Correct.