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

Token params with system and value longer than maximum length should be created and searched differently #5029

Closed
TynerGjs opened this issue Jun 26, 2023 · 0 comments · Fixed by #4998

Comments

@TynerGjs
Copy link
Contributor

Description
Originally, token params with system/value longer than the maximum length will be truncated to maximum length, and then hashed and stored. This makes it unable to search using the original system/value.

To Reproduce
Steps to reproduce the behavior:

  1. Create a resource with identifier.value over 200 characters, e.g.
{
    "resourceType": "Organization",
    "identifier": [
        {
            "system": "http://www.mySystem.com",
            "value":
"This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string"
        }
    ],
    "name": "myOrganization"
}
  1. search using the identifier, e.g.
GET {{base_url}}/Organization?identifier=This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string_This_is_a_very_long_string

Current behavior
A Bad Request response is returned since the identifier is too long.

Expected behavior
The created resource is returned.

Environment (please complete the following information):

  • HAPI FHIR master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant