Skip to content

Conversation

MartinBernstorff
Copy link

@MartinBernstorff MartinBernstorff commented Jun 19, 2025

When creating a resource, if no Resource.meta.source is provided:

Source has the form: < Source URI >#< request ID >.

https://smilecdr.com/docs/fhir_repository/tracing_and_provenance.html#request-tracing

However, if the SourceURI is blank, that means it'll have the form #<requestID> which looks like a fragment, i.e. a reference to a contained resource. Therefor, resource validation will fail. We see this on our running server.

Likely a related issue: #6960

To avoid this, if the <SourceURI> is blank, we no longer prefix with #. I am not convinced this is a good solution.

Alternatives

  • The resource validator could avoid checking for fragments in Resource.meta.source
  • We could infer, or require, a theProvenanceSourceUri
  • We could avoid setting the Resource.meta.source if theProvenanceSourceUri is empty

@MartinBernstorff MartinBernstorff changed the title Avoid Resource.meta.source string matching an illegal fragment Avoid Resource.meta.source string matching an illegal fragment Jun 20, 2025
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

Successfully merging this pull request may close these issues.

1 participant