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

add underscore to regex to be able to use underscore in URIs. #1887

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Daare
Copy link

@Daare Daare commented Jan 21, 2025

possible solution for issue #1886

The regexes used for validating full URLs and references are causing errors in cases where short URLs are present in a FHIR Bundle and the referenced resource has a full url that contains an underscore. Specifically, the issue arises with short references like Patient/263778 or Condition/ecde719d-4484-4093-b277-3ae90d0a2de8 and full urls like: https://rd-vm01.rd.dtcs.local/iM1AS_QO999/api/v1/fhir/Patient/263778 and https://rd-vm01.rd.dtcs.local/iM1AS_QO999/api/v1/fhir/Condition/ecde719d-4484-4093-b277-3ae90d0a2de8. In contrast when the full url is used for referencing instead of the short reference no issue occurs.

Expected Behavior:
It is possible to use a short reference to reference a resource that has a full url which contains an underscore.

@grahamegrieve
Copy link
Collaborator

This doesn't look valid to me

@Daare
Copy link
Author

Daare commented Jan 22, 2025

@grahamegrieve please elaborate

additional i have some examples which can be tried on https://validator.fhir.org/

@grahamegrieve
Copy link
Collaborator

You added _ in two places - before the Resource name, and also in the resource id. It's not valid to use _ in the id section. Also, there needs to a PR to the test cases to add passing and failing tests for this change

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.

2 participants