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

Custom Search Parameter does not Consider in x-fhir-query #2554

Closed
asad-zaman opened this issue May 29, 2024 · 1 comment · Fixed by #2555
Closed

Custom Search Parameter does not Consider in x-fhir-query #2554

asad-zaman opened this issue May 29, 2024 · 1 comment · Fixed by #2555
Labels
effort:small Small effort - 2 days P1 High priority issue

Comments

@asad-zaman
Copy link
Contributor

Describe the bug
Support for Custom Search Parameter implemented here #1382. But this doesn't work when we try to pull data via x-fhir-query.

Component
Core library - Engine

To Reproduce
Steps to reproduce the behavior:

  1. Use below application/x-fhir-query expression in the Questionnaire to pull Patient data
{
  "url": "http:https://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-answerExpression",
  "valueExpression": {
	"language": "application/x-fhir-query",
	"expression": "Patient?gender=female&maritalStatus=M"
  }
}
  1. It ended with an exception like java.lang.IllegalArgumentException: maritalStatus not found in Patient though we supply maritalStatus via a custom search parameter in FhirEngineConfiguration like below:
FhirEngineProvider.init(
  FhirEngineConfiguration(
	customSearchParameters =
	  listOf(
		SearchParameter().apply {
		  addBase("Patient")
		  name = "maritalStatus"
		  code = "maritalStatus"
		  type = Enumerations.SearchParamType.TOKEN
		  expression = "Patient.maritalStatus.coding.code"
		  description = "Search the maritalStatus of Patient"
		},
	  ),
  ),
)

Expected behavior
x-fhir-query should consider the custom search parameter to pull related data.

Would you like to work on the issue?
A PR is created which resolves the issue.

@asad-zaman asad-zaman changed the title Custom Search Parameter does not consider in x-fhir-query Custom Search Parameter does not Consider in x-fhir-query May 29, 2024
@asad-zaman
Copy link
Contributor Author

cc: @aditya-07, @MJ1998

@aditya-07 aditya-07 added P1 High priority issue effort:small Small effort - 2 days labels May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:small Small effort - 2 days P1 High priority issue
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

2 participants