-
Notifications
You must be signed in to change notification settings - Fork 157
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
Truncate String parameter value before persisting to the database #4021
Comments
This is a regression/change in behavior from 4.11.1. Previously, string search parameter values were truncated in ParameterVisitorBatchDAO:
This class is no longer present in 5.0.0 after the parameter persistence was refactored. |
#4024 fixed our tests so that we actually exercise the insert parameters logic as part of the persistence tests. After that change, the CI pipeline was properly failing due to this issue. After merging Prasanna's fix, that pull request is now passing which helps to confirm that this is working as expected now. |
I created a sample test patient with a name like the following:
I then confirmed that I am able to search this patient by
Further, I verified that I cannot search it by
I think it would be nice to provide a warning back to the user if they submit a searchable string value that has been truncated on the server, but that is separate from this issue so lets call this one done. |
linking #1638 which is somewhat related to that comment about providing a warning in the case of truncation |
Describe the bug
The string parameter value should be truncated before persisting to the database.
The size of string columns in the search tables(_str_values) is limited to 1024 bytes.
Environment
Which version of LinuxForHealth FHIR Server? 5.0
To Reproduce
Expected behavior
The string parameter value should be truncated before persisting to the database.
Additional context
This can probably be done in SearchParametersTransportAdapter.stringValue() method.
The text was updated successfully, but these errors were encountered: