Closed nickmcsimpson closed 2 years ago
From @feordin:
I think there is a slight change needed to the Expression property of the new search parameter. I was able to index the value with the following SearchParameter:
{ "resourceType" : "SearchParameter", "id" : "72aa994c-ed25-4b05-99a3-4168d295299f", "url" : "http://test/service-request/result-status-extension", "name" : "result-status", "status" : "active", "date" : "2022-02-14", "publisher" : "Exquisite Publisher", "contact" : [ { "telecom" : [ { "system" : "other", "value" : "http://test/" } ] } ], "description" : "Returns Service Requests with a result status extension matching the specified code.", "jurisdiction" : [ { "coding" : [ { "system" : "urn:iso:std:iso:3166", "code" : "US", "display" : "United States of America" } ] } ], "code" : "result-status", "base" : [ "ServiceRequest" ], "type" : "token", "expression" : "ServiceRequest.extension.where(url = 'http://test/service-request/result-status-extension').value.coding" }
@CaitlinV39
Thanks for the help! Using .value.coding
did fix my issue. I incorrectly assumed the structure of the example (Race) used in the documentation. As this example, contrary to my implementation, is pulling an extension inside an extension.
It does seem peculiar that Search Parameters can be created and never resolved though. Maybe not showing invalid Search Parameters values in the $reindex output is intentional, but it would be nice for troubleshooting this as a newbie if these search parameters could show even if they didn't find a value.
Much appreciated.
Question My team has started down the path of using Extensions to store various pieces of data in our server. In order to enable searching by these values, my understanding is that the fields must be indexed. In order to do so I attempted to create Search Parameters for one such field called 'result-status'
Here is how we are storing the value on a ServiceRequest document:
Here is how I am attempting to define a SearchParameter:
Ultimately, this expression is not what we are after, we want the 'code' value nested in the extension's codeable concept value. I've tried multiple different iterations of the expression trying to get anything to work. I'm able to create the Search Parameters, but when running GET
{{fhirUrl}}/ServiceRequest/:UUID/$reindex
I'd expect the new search parameter to be evaluated and shown in the output. Running a 'POST' here to reindex a single item also doesn't change anything. Either way, the new search parameter isn't evaluated looking at the/$reindex
output of the single record:Is my understanding of how to test my new search parameters incorrect? Meaning, when it's created, it will attempt to evaluate when running the '/$reindex' route? If it fails, will I see anything? Is there an Azure Portal or service configuration that would prevent reindexing? Is this nested value expression even supported?
I've been following the Azure Documentation