Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator throws errors for references that only have identifiers instead of an direct resource reference #2862

Closed
mmsmits opened this issue Sep 12, 2024 · 2 comments

Comments

@mmsmits
Copy link
Member

mmsmits commented Sep 12, 2024

While updating the SDK to 5.10.1, a unit test fails in the validator-api:

This unit test (RunValidateTestSuite (issue-165) )contains a reference looking like this:

<payor>
  <identifier>
    <system value="http://fhir.de/NamingSystem/arge-ik/iknr" />
    <value value="101575519" />
  </identifier>
  <display value="TK" />
</payor>

As you can see, it does not have a direct reference at, but just an identifier and a display.
After upgrading, the validator now throws the following error;

[ERROR] Instance failed constraint ref-1 "SHALL have a contained resource if a local reference is provided" (at Bundle.entry[6].resource[0].payor[0], element Bundle(https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Bundle).entry.resource->Composition(https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Composition).section.entry->MedicationRequest(https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Prescription).insurance->Coverage(https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Coverage).payor) 

This shouldn't have because identifier does not need to point to a contained reference. We don't need to resolve the identifier references at all.

@mmsmits mmsmits added the bug label Sep 12, 2024
@mmsmits
Copy link
Member Author

mmsmits commented Sep 12, 2024

This seems to be a side effect that the ref-1 invariant is acting up since we changed %rootResource, but this is not really trivial to find I guess.

@mmsmits
Copy link
Member Author

mmsmits commented Sep 12, 2024

My bad, this has been fixed in another PR

@mmsmits mmsmits closed this as completed Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant