Profiles & Operations > Operation: Search Questionnaire

Search Questionnaire

The Search Questionnaire Restful operation issues a parameterized query that results in a searchset Bundle that contains Questionnaire resources that match the search parameters. This operation supports retrieval of a set of results using the following search criteria:

Query Search Parameters Type Description Usage Note
url
(Questionnaire.url)
uri Canonical identifier for this questionnaire, represented as a URI (globally unique)

Specification

This FHIR Search Questionnaire operation is based on the HL7 R4 Restful Search operation.

Questionnaire Search Request

The Questionnaire Search Request is an HTTP GET or POST operation. The syntax of the request is as follows:

POST [base]/Questionnaire/_search (with parameters passed in the HTTP Body)

Or alternatively,

GET [base]/Questionnaire?param1=value1&param2=value2%...

Questionnaire Search Response

The Questionnaire Search operation will return a FHIR Bundle (Bundle.type = searchset), containing the the search result entries for for Questionnaire FHIR resources

General

Example Search Queries

Search by Questionnaire URL

[base]/Questionnaire?url=http://sampleorg.com/Questionnaire/3141

Expected Behavior

See Response Handling page for additional response handling behaviour.

Legend
code = OperationOutcome.issue.code
severity = OperationOutcome.issue.severity
details.coding.code=OperationOutcome.issue.details.coding.code
details.coding.display=OperationOutcome.issue.details.coding.display
details.text = OperationOutcome.issue.details.coding.text


HTTP Status Scenario Description severity code details.coding.code details.coding.display details.text
200 OK At least one Questionnaire resource matching the specified search criteria is found HTTP 200 OK. Returns a search result Bundle containing Questionnaire resources that match the search criteria.
200 OK No Questionnaire resources matching the specified search criteria are found. Returns an search result Bundle with zero search results. Also returns an OperationOutcome resource with a warning indicating no summaries were found. warning not-found
400 Bad Request Missing security token error required Missing required security token: PIN
400 Bad Request POST operation contains incorrect header value for "Content-Type" - should be "application/fhir+json" error invalid
400 Bad Request When there was syntactical error such as a missing or invalid header, a missing or invalid URL parameter, a request body that can't be parsed or doesn't conform to the basic FHIR JSON/XML syntax rules, etc. Returns an OperationOutcome resource indicating an issue. The client must fix the request and try again. error invalid Will vary depending on the error
401 Unauthorized Failed authentication error security Authorization is required for the interaction that was attempted
406 Not Acceptable The Accept header requested a format that the server does not support error not-supported
422 Unprocessible Entity FHIR validation errors such as invalid code, wrong date format, or violation of LOB defined business rules Will vary depending on the error Will vary depending on the error OH-defined error code OH-defined errror message
429 Too Many Requests Rate Limit error throttled Too Many Requests
500 Internal Server Error PHSD API validates the request but cannot return a valid response due to internal issues. fatal exception Internal Error
503 Service Unavailable Indicates that the services has been temporarily taken down (on purpose)
504 Gateway Timeout Downstream system(s) did not return timely response error timeout