Custom Search Parameter always returns 0 results for the custom resource

20 views
Skip to first unread message

Neeraj Kumar

unread,
Feb 17, 2021, 12:54:32 AM2/17/21
to HAPI FHIR
Hi,
I am using Hapi-Fhir version 5.3.0-SNAPSHOT. I have implemented the 'CustomResource' and It's successfully getting created and search by 'id' is also working. The JSON structure for 'CustomResource' is,
{
    "resourceType": "CustomResource",
    "dogs": "Himalayan Sheepdog",
    "customDataType": {
        "date": "2020-02-01",
        "kittens": "Juvenile cat"
    }
}

I have created a custom search parameter for the string field 'dogs'. The JSON structure for 'SearchParameter' is,

{
    "resourceType": "SearchParameter",
    "id": "cr-dogs",
    "title": "Custom Resource Dogs",
    "base": [
        "CustomResource"
    ],
    "status": "active",
    "name": "dogs",
    "code": "dogs",
    "type": "string",
    "expression": "CustomResource.dogs"
}


But when I hit this search URL It always returns 0 results. Any idea what's wrong I am doing here.
Reply all
Reply to author
Forward
0 new messages