SearchParameters created with REST API don't work
See original GitHub issueDescribe the bug
The server returns the error message Search parameter 'favorite-color' for resource type 'Patient' was not found. after creating the search parameter from the example.
Environment 4.11.1
To Reproduce Steps to reproduce the behavior:
- Create the SearchParameter:
POST https://your_fhir_server/api/v4/SearchParameter
{
"resourceType": "SearchParameter",
"id": "Patient-favorite-color",
"url": "http://example.com/fhir/SearchParameter/Patient-favorite-color",
"version": "4.0.0",
"name": "favorite-color",
"status": "draft",
"experimental": false,
"date": "2018-12-27T22:37:54+11:00",
"publisher": "LinuxForHealth FHIR Server Test",
"contact": [{
"telecom": [{
"system": "url",
"value": "http://linuxforhealth.org"
}]
},
{
"telecom": [{
"system": "url",
"value": "http://linuxforhealth.org"
}]
}],
"description": "the patient's favorite color",
"code": "favorite-color",
"base": ["Patient"],
"type": "string",
"xpathUsage": "normal",
"xpath": "f:Patient/f:extension[@url='http://example.com/fhir/extension/Patient/favorite-color']/f:valueString",
"expression": "Patient.extension.where(url='http://example.com/fhir/extension/Patient/favorite-color').value",
"multipleOr": true,
"multipleAnd": true,
"modifier": []
}
- Search with it:
GET https://your_fhir_server/api/v4/Patient?favorite-color:exact=pink
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Issue with API url: cannot seem to pass parameters correctly
I have created the url correctly, and if I insert the search parameters directly in the url, when I console log I can...
Read more >How do searches fit into a RESTful interface?
A client can GET a collection of jobs, using query params to narrow the ... to RESTful and not to ROA, it means...
Read more >Search REST API Reference - Algolia
Search parameters used to filter the index content. If not specified, all objects are returned. Can only be used on the first call....
Read more >WordPress REST API: The Next Generation CMS Feature
While WordPress is built on – and will continue to be built on – PHP, the WP REST API is an attempt to...
Read more >Search Documents (Azure Cognitive Search REST API)
Do not create multiple indexes for each language unless you plan to query one at a time. Paging - Get the first page...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I forgot to wrap the SearchParameter into Bundle inside
extension-search-parameters.json. Now it works withextension-search-parameters.jsonconfiguration provided.Glad you got it working with
extension-search-parameters.json.SearchParameter resources from the database should be loaded on server start if you set
fhirServer/core/serverRegistryResourceProviderEnabled=true. However, previously ingested resources will need to be reindexed for this new search parameter to take effect. I believe that part is working, but if you find otherwise please open an issue.