Describe the bug
We run automated parity tests (BabelFHIR-TS) that validate generated FHIR R4 resources against the Firely .NET SDK validator (v3.1.0) and the HL7 Java Validator (v6.9.1) across six major Implementation Guides. We found 16 profiles where the Firely validator rejects resources that the HL7 Java Validator accepts.
The Firely validator works perfectly on 147 other profiles (100% parity). These 16 are grouped into four categories below.
Live parity report: https://max-health-inc.github.io/BabelFHIR-TS/
1. Extension-based slicing discriminator failure (CH Core 5.0.0, 4 profiles)
Profiles: CHCorePatient, CHCorePatientEPR, CHCorePractitioner, CHCorePractitionerEPR
Error:
Failed to load 'ch-core-address': discriminator should have a 'fixed[x]', 'pattern[x]' or binding element set on 'Extension'
The validator cannot evaluate extension-based slicing discriminators in the ch-core-address profile. HL7 Java Validator passes these.
2. Discriminator evaluation failure on Claim profiles (DaVinci PAS 2.0.1, 6 profiles)
Profiles: PASClaimBase, PASClaim, PASClaimInquiry, PASClaimUpdate, PASInquiryRequestBundle, PASRequestBundle
Error:
Failed to load 'profile-claim-*': discriminators
3. Element ordering / parser sensitivity (DaVinci PAS 2.0.1, 3 profiles)
Profiles: PASDeviceRequest, PASEncounter, PASTask
Error:
Parser bug: 'coding' ordering vs 'text' (profile-specific, passes base validation)
The validator appears sensitive to CodeableConcept element ordering (coding before text). Base validation passes, but profile-level validation rejects the resource.
4. resolve() discriminator path failure (IPS 2.0.0, 3 profiles)
Profiles: BundleUvIps, CompositionUvIps, DiagnosticReportUvIps
Error:
Failed to load 'Composition-uv-ips': discriminator path 'resolve()' at http://hl7
The validator cannot follow resolve() in discriminator paths for IPS Bundle section slicing.
Note: 6 additional ISiK Basis 4.0.3 profiles fail on both validators (same slicing/parser issue classes), likely IG-level complexity rather than SDK-specific.
To Reproduce
Sample resources for each failing profile can be generated via:
npx babelfhir-ts <IG-package> --no-client
Expected behavior
The validator should accept these resources the same way the HL7 Java Validator does.
Describe the bug
We run automated parity tests (BabelFHIR-TS) that validate generated FHIR R4 resources against the Firely .NET SDK validator (v3.1.0) and the HL7 Java Validator (v6.9.1) across six major Implementation Guides. We found 16 profiles where the Firely validator rejects resources that the HL7 Java Validator accepts.
The Firely validator works perfectly on 147 other profiles (100% parity). These 16 are grouped into four categories below.
Live parity report: https://max-health-inc.github.io/BabelFHIR-TS/
1. Extension-based slicing discriminator failure (CH Core 5.0.0, 4 profiles)
Profiles: CHCorePatient, CHCorePatientEPR, CHCorePractitioner, CHCorePractitionerEPR
Error:
The validator cannot evaluate extension-based slicing discriminators in the
ch-core-addressprofile. HL7 Java Validator passes these.2. Discriminator evaluation failure on Claim profiles (DaVinci PAS 2.0.1, 6 profiles)
Profiles: PASClaimBase, PASClaim, PASClaimInquiry, PASClaimUpdate, PASInquiryRequestBundle, PASRequestBundle
Error:
3. Element ordering / parser sensitivity (DaVinci PAS 2.0.1, 3 profiles)
Profiles: PASDeviceRequest, PASEncounter, PASTask
Error:
The validator appears sensitive to
CodeableConceptelement ordering (codingbeforetext). Base validation passes, but profile-level validation rejects the resource.4.
resolve()discriminator path failure (IPS 2.0.0, 3 profiles)Profiles: BundleUvIps, CompositionUvIps, DiagnosticReportUvIps
Error:
The validator cannot follow
resolve()in discriminator paths for IPS Bundle section slicing.Note: 6 additional ISiK Basis 4.0.3 profiles fail on both validators (same slicing/parser issue classes), likely IG-level complexity rather than SDK-specific.
To Reproduce
Sample resources for each failing profile can be generated via:
Expected behavior
The validator should accept these resources the same way the HL7 Java Validator does.