FHIR Questionnaire

Base Path: /fhir/4.0/Questionnaire

Version: 2.0.0

The FHIR Questionnaire API allows you to look up details about the FHIR 4.0 Questionnaires. A Questionnaire can serve as way to define and capture sets of questions and answers, often used in healthcare settings for gathering patient-reported data, clinical assessments, research surveys, and more. A Questionnaire can vary from, but not limited to, patient intake forms, clinical research forms, and past medical history questionnaires.

The endpoint provides the ability to:

  • Retrieve all Questionnaire resources that match a search criteria.
  • Retrieve a specific Questionnaire resource based on its FHIR ID.
  • Retrieve the history of a Questionnaire resource based on its FHIR ID.
  • Retrieve a specific version of a Questionnaire resource based on its FHIR ID and Version ID.
  • Retrieve Questionnaire results from third-party sources.

The Questionnaire API aggregates data from multiple sources, to learn about working with aggregated APIs refer to the Working with Aggregation guide in the Knowledge Hub.

This API is based on the R4 release of the FHIR standard, for more information on this API refer to the official FHIR documentation.


Methods

Retrieve Questionnaires

GET /fhir/4.0/Questionnaire/

Return all Questionnaire resources for the given search criteria, or all Questionnaires if a search criteria is not specified.


Parameters

Name

Type

Data Type

Description


Name:

code

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires to those that match the specified code that corresponds to one of its items in the Questionnaire. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c. It is matched to the Questionnaire.item.code.

Note: Supports passing in a comma-separated list of values.


Sample Value: http://loinc.org|Acyclovir, http://loinc.org|Amdinocillin by Serum bactericidal titer



Name:

context

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires to those that match the specified context of the Questionnaire. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c.

Note: Supports passing in a comma-separated list of values.


Sample Value: http://loinc.org|preop, http://loinc.org|meds



Name:

context-quantity

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires to those that match the specified quantity or range valued use context, identified by Questionnaire.useContext.value as a Quantity or Range. The supported prefixes are gt, ge, lt, le and eq. If no prefix is used, exact number matching is implied.

The format of the query is

  • context-quantity={value}|{system}|{code}
  • context-quantity={value}|{system}|{code} & {value}|{system}|{code} Note: Supports passing in a comma-separated list of values.


Sample Value: 5.4, 4.1|mg, 5,4|http://unitsofmeasure.org|g



Name:

context-type

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires to those that match the specified use context of the Questionnaire. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c. It is matched to the Questionnaire.useContext.code.

Note: Supports passing in a comma-separated list of values.


Sample Value: http://loinc.org|preop, http://loinc.org|meds



Name:

date

optional

Type:

query

Data Type:

array

Description:

Filters the Questionnaires to those with a date on, before, or after a specific date, date-time, or date range. The supported prefixes are gt, ge, lt, le and eq. If no prefix is used, exact date or date-time matching is implied. Dates must be formatted according to ISO 8601 either as a date only (e.g. 1997-07-16) or as a date-time including the timezone (e.g. 1997-07-16T19:20:30+13:00). Ensure that special characters such as + are URL encoded i.e. %2B.

The format of the query is

  • date=gt{dateTimeValue}
  • date=ge{dateTimeValue}&date=le{dateTimeValue}


Sample Value: date=ge2014-01-01&date=le2015-01-01



Name:

definition

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires to those that match the specified definition for the item in the questionnaire, identified by Questionnaire.item.definition.

Note: Supports passing in a comma-separated list of values.


Sample Value: https://loinc.org/44249-1, https://loinc.org/71950-0



Name:

description

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires where the specified description matches a portion of the Questionnaire.description.

Note: Supports passing in a comma-separated list of values.


Sample Value: Diabetes Management Questionnaire to assess patient lifestyle and control, Preoperative assessment for surgical procedures



Name:

effective

optional

Type:

query

Data Type:

array

Description:

Filters the Questionnaires to those with an effective period on, before, or after a specific date, date-time, or date range. The supported prefixes are gt, ge, lt, le and eq. If no prefix is used, exact date or date-time matching is implied. Dates must be formatted according to ISO 8601 either as a date only (e.g. 1997-07-16) or as a date-time including the timezone (e.g. 1997-07-16T19:20:30+13:00). Ensure that special characters such as + are URL encoded i.e. %2B.

The format of the query is

  • effective=gt{dateTimeValue}
  • effective=ge{dateTimeValue}&effective=le{dateTimeValue}


Sample Value: effective=gt2012-01-01&effective=lt2022-01-01



Name:

identifier

optional

Type:

query

Data Type:

array

Description:

Filters Questionnaires by the identifier associated with this questionnaire.

Note: The identifier can be a single item or a comma separated list of identifiers. Each identifier is defined by system and value, separated using a URL encoded | character i.e. %7c.


Sample Value: sysA|Q1, sysB|Q2



Name:

jurisdiction

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires to those that match the specified jurisdiction of the Questionnaire. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c.

Note: Supports passing in a comma-separated list of values.


Sample Value: US|https://loinc.org/77968-6, CA|https://loinc.org/77969-4



Name:

name

optional

Type:

query

Data Type:

array

Description:

Filters questionnaires where the specified computationally friendly name of the questionnaire matches a portion of the Questionnaire.name.

Note: Supports passing in a comma-separated list of values.


Sample Value: patient-assessment-survey



Name:

publisher

optional

Type:

query

Data Type:

array

Description:

Filters questionnaires where the specified name of the publisher matches a portion of the Questionanire.publisher.

Note: Supports passing in a comma-separated list of values.


Sample Value: John Doe, Aaron Smith



Name:

status

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires to those that match the specified current status of the Questionnaire. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c. It is matched to the Questionnaire.status. Multiple statuses can be specified as comma separated values.

Possible values are:

  • draft
  • active
  • retired
  • unknown

    Note:

    • If a status is specified, only http://hl7.org/fhir/publication-status can be used.
    • Supports passing in a comma-separated list of values.


Sample Value: draft



Name:

subject-type

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires to those that match the specified resource that can be the subject of QuestionnaireResponse. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c.

Note: Supports passing in a comma-separated list of values.


Sample Value: Patient, Practitioner



Name:

title

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires where the specified human-friendly name of the questionnaire matches a portion of the Questionnaire.title.

Note: Supports passing in a comma-separated list of values.


Sample Value: Diabetes Management Survey, Patient Assessment Survey



Name:

url

optional

Type:

query

Data Type:

array

Description:

Filters questionnaires to those that match the specified url of the questionnaire, identified by Questionnaire.url.

Note: Supports passing in a comma-separated list of values.


Sample Value: https://loinc.org/69723-5, https://loinc.org/71950-0



Name:

version

optional

Type:

query

Data Type:

array

Description:

Filters the questionnaires to those that match the specified version of the questionnaire, identified by Questionnaire.version.

Note: Supports passing in a comma-separated list of values.


Sample Value: S1, S2



Name:

_lastUpdated

optional

Type:

query

Data Type:

array

Description:

Allows the user to filter questionnaires by the lastUpdated date. The date value can be a single date, as well as lower and/or upper bound.

The supported operations are: =gt, =ge, =lt, =ne, =le, =eq. For more information about using these search operators, refer to the date section on the FHIR Search page.

The {dateTimeValue} value should be in the following format: 2013-01-01T23:00:00-05:00. However, the time portion can be excluded. If a time portion is provided, the time zone must be provided as well.

It is highly recommended to provide the time zone portion in any query. Ensure that special characters such as '+' are encoded so that it can be interpreted correctly. For example: "2014-01-01T00:00:00+13:00" should be encoded like this: "2014-01-01T00:00:00%2B13:00".

If a date query comes in without a time zone, the date will be interpreted according to the server's time zone.

Including this query parameter includes all Locations that match the specified Questionnaire.Meta.lastUpdated.


Sample Value: _lastUpdated=gt2012-01-01



Name:

_summary

optional

Type:

query

Data Type:

string

Description:

Instructs the server to return a subset of the resource, reducing the size of the reponse payload. Possible values are

  • true: return summaries only
  • false: return full resources
  • count: return the count of search matches
  • text: return only the text, id, meta, and top-level mandatory elements
  • data: remove the text element


Sample Value: true



Name:

-include-sources

optional

Type:

query

Data Type:

array

Description:

The -include-sources parameter defines which sources should be queried for the results.

Note: Either -include-sources or -exclude-sources parameter can be specified, not both. If -include-sources is specified, ONLY the specified sources will be searched. Note that the sources specified should be enabled.


Sample Value: Orion%20Health%E2%84%A2%20R4%20Qustionnaires



Name:

-exclude-sources

optional

Type:

query

Data Type:

array

Description:

The -exclude-sources parameter defines which sources should NOT be queried for the results.

Note: Either -include-sources or -exclude-sources parameter can be specified, not both. If -exclude-sources is specified, the specified sources will NOT be searched. Note that the sources specified should be enabled..


Sample Value: Orion%20Health%E2%84%A2%20R4%20Qustionnaires



Name:

_elements

optional

Type:

query

Data Type:

string

Description:

Request a specific set of elements be returned, or excluded as part of a resource in the search results. Use _elements for the elements to include and _elements:exclude for the elements to exclude.


Sample Value: _elements=title,name,_elements:exclude=*.title



Name:

_format

optional

Type:

query

Data Type:

string

Description:

Media type of the response. It takes precedence over the accept header.


Default Value: json

Sample Value: json



Name:

_pretty

optional

Type:

query

Data Type:

string

Description:

Ask for a pretty printed response for human convenience.


Default Value: true

Sample Value: true



Name:

-cursor

optional

Type:

query

Data Type:

string

Description:

This is a server internal parameter to navigate different pages, indicating the server a cursor till where result matches were already returned.

This parameter is returned by the server as part of the next link of a paginated query.




Name:

_count

optional

Type:

query

Data Type:

integer

Description:

Limit the number of match results to the specified _count. When _count is specified, the query will be paginated , and only _count or less results will be returned.

The returned bundle may contain a next link if more results could be available.


Sample Value: 30



Name:

_sort

optional

Type:

query

Data Type:

string

Description:

Request which order results should be returned in.

Supported _sort parameters are:

  • date to sort by Questionnaire.date ascending
  • -date to sort by Questionnaire.date descending
  • effective to sort by Questionnaire.effectivePeriod.start ascending
  • -effective to sort by Questionnaire.effectivePeriod.start descending
  • name to sort by Questionnaire.name ascending
  • -name to sort by Questionnaire.name descending
  • title to sort by Questionnaire.title ascending
  • -title to sort by Questionnaire.title descending
  • description to sort by Questionnaire.description ascending
  • -description to sort by Questionnaire.description descending
  • publisher to sort by Questionnaire.publisher ascending
  • -publisher to sort by Questionnaire.publisher descending
  • version to sort by Questionnaire.version ascending
  • -version to sort by Questionnaire.version descending
  • _lastUpdated to sort by Questionnaire.Meta.lastUpdated ascending
  • -_lastUpdated to sort by Questionnaire.Meta.lastUpdated descending

You can use any combination of the parameters.


Default Value: -title,-date

Sample Value: _sort= date



Name:

X-Request-Id

optional

Type:

header

Data Type:

string

Description:

Supply a request Id to track the request.


Sample Value: X-Request-ID: adUEctf6urd



Name:

Accept

optional

Type:

header

Data Type:

string

Description:

Media type of the response


Default Value: application/xml

Sample Value: application/json



Name:

Accept-Language

optional

Type:

header

Data Type:

string

Description:

Specifies the language that the results will be translated to. If not specified it will default to the server's locale. (e.g. fr-FR for french)


Sample Value: en-US



Name:

CSRF-Token

required

Type:

header

Data Type:

string

Description:

This header is required for CSRF protection. The csrfToken from the OHP session must be included in this header.

System will validate the token and reject the request if the token is invalid or not present.

Note: Either CSRF-Token or X-Send-Open-API must be included in headers to do the CSRF protection.




Name:

X-Send-Open-API

required

Type:

header

Data Type:

string

Description:

This header is required for CSRF protection. This header is required to distinguish the api requests from known senders.

System will validate "X-Send-Open-API" request header is present or not. If it is not present, system will reject the request

Note: Either CSRF-Token or X-Send-Open-API must be included in headers to do the CSRF protection.



Responses


application/json+fhir

200

Returns a FHIR Bundle containing 0..* OperationOutcome resources and 0..* Questionnaire resources


application/json+fhir

400

This response code is returned when the query is invalid e.g. an invalid parameter or a partial token in the search.

Sample Requests

Retrieve all Questionnaires by name and status
curl -X GET "https://developer-solution/fhir/4.0/Questionnaire?name=patient-assessment-survey&status=draft" \
-H 'Accept: application/json' \
-H 'Authorization: Basic bGV2ZWwxLnN5c19hOk9yaW9uc3k1IT8='

Retrieve Questionnaires

POST /fhir/4.0/Questionnaire/_search

Return all Questionnaire resources for the given search criteria, or all Questionnaires if a search criteria is not specified.


Parameters

Name

Type

Data Type

Description


Name:

Content-Type

required

Type:

header

Data Type:

string

Description:

Specifies how to encode the form data. The Content-Type value must be application/x-www-form-urlencoded.


Sample Value: application/x-www-form-urlencoded



Name:

code

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires to those that match the specified code that corresponds to one of its items in the Questionnaire. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c. It is matched to the Questionnaire.item.code.

Note: Supports passing in a comma-separated list of values.


Sample Value: http://loinc.org|Acyclovir, http://loinc.org|Amdinocillin by Serum bactericidal titer



Name:

context

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires to those that match the specified context of the Questionnaire. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c.

Note: Supports passing in a comma-separated list of values.


Sample Value: http://loinc.org|preop, http://loinc.org|meds



Name:

context-quantity

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires to those that match the specified quantity or range valued use context, identified by Questionnaire.useContext.value as a Quantity or Range. The supported prefixes are gt, ge, lt, le and eq. If no prefix is used, exact number matching is implied.

The format of the query is

  • context-quantity={value}|{system}|{code}
  • context-quantity={value}|{system}|{code} & {value}|{system}|{code} Note: Supports passing in a comma-separated list of values.


Sample Value: 5.4, 4.1|mg, 5,4|http://unitsofmeasure.org|g



Name:

context-type

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires to those that match the specified use context of the Questionnaire. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c. It is matched to the Questionnaire.useContext.code.

Note: Supports passing in a comma-separated list of values.


Sample Value: http://loinc.org|preop, http://loinc.org|meds



Name:

date

optional

Type:

formData

Data Type:

array

Description:

Filters the Questionnaires to those with a date on, before, or after a specific date, date-time, or date range. The supported prefixes are gt, ge, lt, le and eq. If no prefix is used, exact date or date-time matching is implied. Dates must be formatted according to ISO 8601 either as a date only (e.g. 1997-07-16) or as a date-time including the timezone (e.g. 1997-07-16T19:20:30+13:00). Ensure that special characters such as + are URL encoded i.e. %2B.

The format of the query is

  • date=gt{dateTimeValue}
  • date=ge{dateTimeValue}&date=le{dateTimeValue}


Sample Value: date=ge2014-01-01&date=le2015-01-01



Name:

definition

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires to those that match the specified definition for the item in the questionnaire, identified by Questionnaire.item.definition.

Note: Supports passing in a comma-separated list of values.


Sample Value: https://loinc.org/44249-1, https://loinc.org/71950-0



Name:

description

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires where the specified description matches a portion of the Questionnaire.description.

Note: Supports passing in a comma-separated list of values.


Sample Value: Diabetes Management Questionnaire to assess patient lifestyle and control, Preoperative assessment for surgical procedures



Name:

effective

optional

Type:

formData

Data Type:

array

Description:

Filters the Questionnaires to those with an effective period on, before, or after a specific date, date-time, or date range. The supported prefixes are gt, ge, lt, le and eq. If no prefix is used, exact date or date-time matching is implied. Dates must be formatted according to ISO 8601 either as a date only (e.g. 1997-07-16) or as a date-time including the timezone (e.g. 1997-07-16T19:20:30+13:00). Ensure that special characters such as + are URL encoded i.e. %2B.

The format of the query is

  • effective=gt{dateTimeValue}
  • effective=ge{dateTimeValue}&effective=le{dateTimeValue}


Sample Value: effective=gt2012-01-01&effective=lt2022-01-01



Name:

identifier

optional

Type:

formData

Data Type:

array

Description:

Filters Questionnaires by the identifier associated with this questionnaire.

Note: The identifier can be a single item or a comma separated list of identifiers. Each identifier is defined by system and value, separated using a URL encoded | character i.e. %7c.


Sample Value: sysA|Q1, sysB|Q2



Name:

jurisdiction

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires to those that match the specified jurisdiction of the Questionnaire. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c.

Note: Supports passing in a comma-separated list of values.


Sample Value: US|https://loinc.org/77968-6, CA|https://loinc.org/77969-4



Name:

name

optional

Type:

formData

Data Type:

array

Description:

Filters questionnaires where the specified computationally friendly name of the questionnaire matches a portion of the Questionnaire.name.

Note: Supports passing in a comma-separated list of values.


Sample Value: patient-assessment-survey



Name:

publisher

optional

Type:

formData

Data Type:

array

Description:

Filters questionnaires where the specified name of the publisher matches a portion of the Questionanire.publisher.

Note: Supports passing in a comma-separated list of values.


Sample Value: John Doe, Aaron Smith



Name:

status

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires to those that match the specified current status of the Questionnaire. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c. It is matched to the Questionnaire.status. Multiple statuses can be specified as comma separated values.

Possible values are:

  • draft
  • active
  • retired
  • unknown

    Note:

    • If a status is specified, only http://hl7.org/fhir/publication-status can be used.
    • Supports passing in a comma-separated list of values.


Sample Value: draft



Name:

subject-type

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires to those that match the specified resource that can be the subject of QuestionnaireResponse. The code value consists of a coding system and a code separated using a URL encoded | character i.e. %7c.

Note: Supports passing in a comma-separated list of values.


Sample Value: Patient, Practitioner



Name:

title

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires where the specified human-friendly name of the questionnaire matches a portion of the Questionnaire.title.

Note: Supports passing in a comma-separated list of values.


Sample Value: Diabetes Management Survey, Patient Assessment Survey



Name:

url

optional

Type:

formData

Data Type:

array

Description:

Filters questionnaires to those that match the specified url of the questionnaire, identified by Questionnaire.url.

Note: Supports passing in a comma-separated list of values.


Sample Value: https://loinc.org/69723-5, https://loinc.org/71950-0



Name:

version

optional

Type:

formData

Data Type:

array

Description:

Filters the questionnaires to those that match the specified version of the questionnaire, identified by Questionnaire.version.

Note: Supports passing in a comma-separated list of values.


Sample Value: S1, S2



Name:

_lastUpdated

optional

Type:

formData

Data Type:

array

Description:

Allows the user to filter questionnaires by the lastUpdated date. The date value can be a single date, as well as lower and/or upper bound.

The supported operations are: =gt, =ge, =lt, =ne, =le, =eq. For more information about using these search operators, refer to the date section on the FHIR Search page.

The {dateTimeValue} value should be in the following format: 2013-01-01T23:00:00-05:00. However, the time portion can be excluded. If a time portion is provided, the time zone must be provided as well.

It is highly recommended to provide the time zone portion in any query. Ensure that special characters such as '+' are encoded so that it can be interpreted correctly. For example: "2014-01-01T00:00:00+13:00" should be encoded like this: "2014-01-01T00:00:00%2B13:00".

If a date query comes in without a time zone, the date will be interpreted according to the server's time zone.

Including this query parameter includes all Locations that match the specified Questionnaire.Meta.lastUpdated.


Sample Value: _lastUpdated=gt2012-01-01



Name:

_summary

optional

Type:

formData

Data Type:

string

Description:

Instructs the server to return a subset of the resource, reducing the size of the reponse payload. Possible values are

  • true: return summaries only
  • false: return full resources
  • count: return the count of search matches
  • text: return only the text, id, meta, and top-level mandatory elements
  • data: remove the text element


Sample Value: true



Name:

-include-sources

optional

Type:

formData

Data Type:

array

Description:

The -include-sources parameter defines which sources should be queried for the results.

Note: Either -include-sources or -exclude-sources parameter can be specified, not both. If -include-sources is specified, ONLY the specified sources will be searched. Note that the sources specified should be enabled.


Sample Value: Orion%20Health%E2%84%A2%20R4%20Qustionnaires



Name:

-exclude-sources

optional

Type:

formData

Data Type:

array

Description:

The -exclude-sources parameter defines which sources should NOT be queried for the results.

Note: Either -include-sources or -exclude-sources parameter can be specified, not both. If -exclude-sources is specified, the specified sources will NOT be searched. Note that the sources specified should be enabled..


Sample Value: Orion%20Health%E2%84%A2%20R4%20Qustionnaires



Name:

_elements

optional

Type:

formData

Data Type:

string

Description:

Request a specific set of elements be returned, or excluded as part of a resource in the search results. Use _elements for the elements to include and _elements:exclude for the elements to exclude.


Sample Value: _elements=title,name,_elements:exclude=*.title



Name:

_format

optional

Type:

formData

Data Type:

string

Description:

Media type of the response. It takes precedence over the accept header.


Default Value: json

Sample Value: json



Name:

_pretty

optional

Type:

formData

Data Type:

string

Description:

Ask for a pretty printed response for human convenience.


Default Value: true

Sample Value: true



Name:

-cursor

optional

Type:

formData

Data Type:

string

Description:

This is a server internal parameter to navigate different pages, indicating the server a cursor till where result matches were already returned.

This parameter is returned by the server as part of the next link of a paginated query.




Name:

_count

optional

Type:

formData

Data Type:

integer

Description:

Limit the number of match results to the specified _count. When _count is specified, the query will be paginated , and only _count or less results will be returned.

The returned bundle may contain a next link if more results could be available.


Sample Value: 30



Name:

_sort

optional

Type:

formData

Data Type:

string

Description:

Request which order results should be returned in.

Supported _sort parameters are:

  • date to sort by Questionnaire.date ascending
  • -date to sort by Questionnaire.date descending
  • effective to sort by Questionnaire.effectivePeriod.start ascending
  • -effective to sort by Questionnaire.effectivePeriod.start descending
  • name to sort by Questionnaire.name ascending
  • -name to sort by Questionnaire.name descending
  • title to sort by Questionnaire.title ascending
  • -title to sort by Questionnaire.title descending
  • description to sort by Questionnaire.description ascending
  • -description to sort by Questionnaire.description descending
  • publisher to sort by Questionnaire.publisher ascending
  • -publisher to sort by Questionnaire.publisher descending
  • version to sort by Questionnaire.version ascending
  • -version to sort by Questionnaire.version descending
  • _lastUpdated to sort by Questionnaire.Meta.lastUpdated ascending
  • -_lastUpdated to sort by Questionnaire.Meta.lastUpdated descending

You can use any combination of the parameters.


Default Value: -title,-date

Sample Value: _sort= date



Name:

X-Request-Id

optional

Type:

header

Data Type:

string

Description:

Supply a request Id to track the request.


Sample Value: X-Request-ID: adUEctf6urd



Name:

Accept

optional

Type:

header

Data Type:

string

Description:

Media type of the response


Default Value: application/xml

Sample Value: application/json



Name:

Accept-Language

optional

Type:

header

Data Type:

string

Description:

Specifies the language that the results will be translated to. If not specified it will default to the server's locale. (e.g. fr-FR for french)


Sample Value: en-US



Name:

CSRF-Token

required

Type:

header

Data Type:

string

Description:

This header is required for CSRF protection. The csrfToken from the OHP session must be included in this header.

System will validate the token and reject the request if the token is invalid or not present.

Note: Either CSRF-Token or X-Send-Open-API must be included in headers to do the CSRF protection.




Name:

X-Send-Open-API

required

Type:

header

Data Type:

string

Description:

This header is required for CSRF protection. This header is required to distinguish the api requests from known senders.

System will validate "X-Send-Open-API" request header is present or not. If it is not present, system will reject the request

Note: Either CSRF-Token or X-Send-Open-API must be included in headers to do the CSRF protection.



Responses


application/json+fhir

200

Returns a FHIR Bundle containing 0..* OperationOutcome resources and 0..* Questionnaire resources


application/json+fhir

400

This response code is returned when the query is invalid e.g. an invalid parameter or a partial token in the search.

Sample Requests

Retrieve all Questionnaires by its name and status
curl -X POST "https://developer-solution/fhir/4.0/Questionnaire/_search" \
-H 'Accept: application/json' \
-H 'Authorization: Basic bGV2ZWwxLnN5c19hOk9yaW9uc3k1IT8=' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'name=patient-assessment-survey' \
-d 'status=draft'

Retrieve a single Questionnaire

GET /fhir/4.0/Questionnaire/{id}

This method returns the Questionnaire resource matching the requested resource ID.


Parameters

Name

Type

Data Type

Description


Name:

id

required

Type:

path

Data Type:

string

Description:

The id of the Questionnaire resource to query for


Sample Value: shaTWIQUXLR7RLNCR45AMPETZEQYJ6UDN6OV43CD6JCRJJZE3OX6IJQ



Name:

_elements

optional

Type:

query

Data Type:

string

Description:

Request a specific set of elements be returned, or excluded as part of a resource in the search results. Use _elements for the elements to include and _elements:exclude for the elements to exclude.


Sample Value: _elements=title,name,_elements:exclude=*.title



Name:

_pretty

optional

Type:

query

Data Type:

string

Description:

Ask for a pretty printed response for human convenience.


Default Value: true

Sample Value: true



Name:

_format

optional

Type:

query

Data Type:

string

Description:

Media type of the response. It takes precedence over the accept header. Possible values are json and xml.


Default Value: xml

Sample Value: json



Name:

Accept

optional

Type:

header

Data Type:

string

Description:

Media type of the response. Possible values are application/json and application/xml.


Default Value: application/xml

Sample Value: application/json



Name:

X-Request-Id

optional

Type:

header

Data Type:

string

Description:

Supply a request Id to track the request.


Sample Value: X-Request-ID: adUEctf6urd



Name:

Accept-Language

optional

Type:

header

Data Type:

string

Description:

Specifies the language that the results will be translated to. If not specified it will default to the server's locale. (e.g. fr-FR for french)


Sample Value: en-US



Name:

CSRF-Token

required

Type:

header

Data Type:

string

Description:

This header is required for CSRF protection. The csrfToken from the OHP session must be included in this header. System will validate the token and reject the request if the token is invalid or not present.




Name:

X-Send-Open-API

required

Type:

header

Data Type:

string

Description:

This header is required for CSRF protection. This header is required to distinguish the api requests from known senders. System will validate "X-Send-Open-API" request header is present or not. If it is not present, system will reject the request.



Responses


application/json+fhir

200

Returns a Questionnaire resource matching the requested resource ID.


application/json+fhir

400

This code is returned when the FHIR ID is empty or not valid.


application/json+fhir

404

No Questionnaire resource found with the requested resource ID.

Sample Requests

Retrieve a Questionnaire identified by a specific resource id
curl -X GET "https://developer-solution/fhir/4.0/Questionnaire/shaTWIQUXLR7RLNCR45AMPETZEQYJ6UDN6OV43CD6JCRJJZE3OX6IJQ" \
-H 'Accept: application/json' \
-H 'Authorization: Basic bGV2ZWwxLnN5c19hOk9yaW9uc3k1IT8='

Retrieve a Questionnaire's history

GET /fhir/4.0/Questionnaire/{id}/_history

This method returns the change history for a Questionnaire resource matching the requested resource ID. Questionnaire resources can be retrieved from multiple data sources, and not all sources are able to return history information. This operation will return an empty set of data if no versions of the specified Questionnaire can be found, which includes cases where:

  • The specified Questionnaire resource cannot be found.
  • The data source for the Questionnaire is unable to return history information.


Parameters

Name

Type

Data Type

Description


Name:

id

required

Type:

path

Data Type:

string

Description:

The id of the Questionnaire resource to query for


Sample Value: shaVTELCSNUDS2RR2TZZIZJ2CRSBNXML6B5TJTKWF7CQLADAQKQD4QQ



Name:

_elements

optional

Type:

query

Data Type:

string

Description:

Request a specific set of elements be returned, or excluded as part of a resource in the search results. Use _elements for the elements to include and _elements:exclude for the elements to exclude.


Sample Value: _elements=title,name,_elements:exclude=*.title



Name:

_pretty

optional

Type:

query

Data Type:

string

Description:

Ask for a pretty printed response for human convenience.


Default Value: true

Sample Value: true



Name:

_format

optional

Type:

query

Data Type:

string

Description:

Media type of the response. It takes precedence over the accept header. Possible values are json and xml.


Default Value: xml

Sample Value: json



Name:

Accept

optional

Type:

header

Data Type:

string

Description:

Media type of the response. Possible values are application/json and application/xml.


Default Value: application/xml

Sample Value: application/json



Name:

X-Request-Id

optional

Type:

header

Data Type:

string

Description:

Supply a request Id to track the request.


Sample Value: X-Request-ID: adUEctf6urd



Name:

Accept-Language

optional

Type:

header

Data Type:

string

Description:

Specifies the language that the results will be translated to. If not specified it will default to the server's locale. (e.g. fr-FR for french)


Sample Value: en-US



Name:

CSRF-Token

required

Type:

header

Data Type:

string

Description:

This header is required for CSRF protection. The csrfToken from the OHP session must be included in this header. System will validate the token and reject the request if the token is invalid or not present.




Name:

X-Send-Open-API

required

Type:

header

Data Type:

string

Description:

This header is required for CSRF protection. This header is required to distinguish the api requests from known senders. System will validate "X-Send-Open-API" request header is present or not. If it is not present, system will reject the request.



Responses


application/json+fhir

200

A FHIR Bundle containing 0..* Questionnaire resources matching the requested resource ID.


application/json+fhir

400

The source providing the Questionnaire resource is not capable of returning history of Questionnaire resources.


application/json+fhir

404

No Questionnaire resource found with the requested resource ID.

Sample Requests

Retrieve the history of a Questionnaire identified a specific resource id
curl -X GET "https://developer-solution/fhir/4.0/Questionnaire/shaVTELCSNUDS2RR2TZZIZJ2CRSBNXML6B5TJTKWF7CQLADAQKQD4QQ/_history" \
-H 'Accept: application/json' \
-H 'Authorization: Basic bGV2ZWwxLnN5c19hOk9yaW9uc3k1IT8='

Retrieve a specific version of a Questionnaire

GET /fhir/4.0/Questionnaire/{id}/_history/{versionid}

This method returns a specific version of the Questionnaire resource matching the requested resource ID. Questionnaire resources can be retrieved from multiple data sources. This operation will return an empty set of data if no versions of the specified questionnaire can be found, which includes cases where:

  • The specified Questionnaire resource cannot be found.


Parameters

Name

Type

Data Type

Description


Name:

id

required

Type:

path

Data Type:

string

Description:

The id of the Questionnaire resource


Sample Value: shaVTELCSNUDS2RR2TZZIZJ2CRSBNXML6B5TJTKWF7CQLADAQKQD4QQ



Name:

versionid

required

Type:

path

Data Type:

integer

Description:

The version of the Questionnaire resource


Sample Value: 2



Name:

_elements

optional

Type:

query

Data Type:

string

Description:

Request a specific set of elements be returned, or excluded as part of a resource in the search results. Use _elements for the elements to include and _elements:exclude for the elements to exclude.


Sample Value: _elements=title,name,_elements:exclude=*.title



Name:

_pretty

optional

Type:

query

Data Type:

string

Description:

Ask for a pretty printed response for human convenience.


Default Value: true

Sample Value: true



Name:

_format

optional

Type:

query

Data Type:

string

Description:

Media type of the response. It takes precedence over the accept header. Possible values are json and xml.


Default Value: xml

Sample Value: json



Name:

Accept

optional

Type:

header

Data Type:

string

Description:

Media type of the response. Possible values are application/json and application/xml.


Default Value: application/xml

Sample Value: application/json



Name:

X-Request-Id

optional

Type:

header

Data Type:

string

Description:

Supply a request Id to track the request.


Sample Value: X-Request-ID: adUEctf6urd



Name:

Accept-Language

optional

Type:

header

Data Type:

string

Description:

Specifies the language that the results will be translated to. If not specified it will default to the server's locale. (e.g. fr-FR for french)


Sample Value: en-US



Name:

CSRF-Token

required

Type:

header

Data Type:

string

Description:

This header is required for CSRF protection. The csrfToken from the OHP session must be included in this header. System will validate the token and reject the request if the token is invalid or not present.




Name:

X-Send-Open-API

required

Type:

header

Data Type:

string

Description:

This header is required for CSRF protection. This header is required to distinguish the api requests from known senders. System will validate "X-Send-Open-API" request header is present or not. If it is not present, system will reject the request.



Responses


application/json+fhir

200

Returns a Questionnaire resource matching the the requested resource ID and version id.


application/json+fhir

400

The source providing the Questionnaire resource is not capable of returning history of Questionnaire resources.


application/json+fhir

404

  • No Questionnaire resource found with the requested resource ID.
  • The version id specified does not exist for the Questionnaire resource with the requested resource ID.

Sample Requests

Retrieve the version of Questionnaire identified by a resource id and a version id
curl -X GET "https://developer-solution/fhir/4.0/Questionnaire/shaVTELCSNUDS2RR2TZZIZJ2CRSBNXML6B5TJTKWF7CQLADAQKQD4QQ/_history/2" \
-H 'Accept: application/json' \
-H 'Authorization: Basic bGV2ZWwxLnN5c19hOk9yaW9uc3k1IT8='