R4 Draft for Comment

This page is part of the FHIR Specification (v3.2.0: R4 Ballot 1). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

FHIR Infrastructure Work GroupMaturity Level: 5 Normative Compartments: Not linked to any defined compartments

Normative Candidate Note: This page is candidate normative content for R4 in the Conformance Package. Once normative, it will lose it's Maturity Level, and breaking changes will no longer be made.

This resource has 2 operations associated with it:

$questionnaireBuild Questionnaire
$generateGenerate Snapshot

For more information about operations, including how they are invoked, see Operations.

Generates a Questionnaire instance based on a specified StructureDefinition, creating questions for each core element or extension element found in the StructureDefinition. If the operation is not called at the instance level, one of the identifier, profile or url 'in' parameters must be provided. If more than one is specified, servers may raise an error or may resolve with the parameter of their choice. If called at the instance level, these parameters will be ignored. The response will contain a Questionnaire instance based on the specified StructureDefinition and/or an OperationOutcome resource with errors or warnings. Nested groups are used to handle complex structures and data types. If the 'supportedOnly' parameter is set to true, only those elements marked as "must support" will be included. This operation is intended to enable auto-generation of simple interfaces for arbitrary profiles. The 'questionnaire' approach to data entry has limitations that will make it less optimal than custom-defined interfaces. However, this function may be useful for simple applications or for systems that wish to support "non-core" resources with minimal development effort.

The official URL for this operation definition is

 http://hl7.org/fhir/OperationDefinition/StructureDefinition-questionnaire

Formal Definition (as a OperationDefinition).

URL: [base]/StructureDefinition/$questionnaire

URL: [base]/StructureDefinition/[id]/$questionnaire

This is an idempotent operation

In Parameters:
NameCardinalityTypeBindingProfileDocumentation
identifier0..1uri

A logical profile identifier (i.e. 'StructureDefinition.identifier''). The server must know the profile or be able to retrieve it from other known repositories.

profile0..1string(token)

The StructureDefinition is provided directly as part of the request. Servers may choose not to accept profiles in this fashion

url0..1uri

The profile's official URL (i.e. 'StructureDefinition.url'). The server must know the profile or be able to retrieve it from other known repositories.

supportedOnly0..1boolean

If true, the questionnaire will only include those elements marked as "mustSupport='true'" in the StructureDefinition.

Out Parameters:
NameCardinalityTypeBindingProfileDocumentation
return1..1Questionnaire

The questionnaire form generated based on the StructureDefinition.

Note: as this the only out parameter, it is a resource, and it has the name 'return', the result of this operation is returned directly as a resource

Open Issue: Ideally, extensions should be populated in the generated Questionnaire that will support taking QuestionnaireResponse resources generated from the Questionnaire and turning them back into the appropriate resources.

Request:

GET /fhir/StructureDefinition/daf-patient/$questionnaire

Response:

HTTP/1.1 200 OK
[other headers]

See DAF Patient Questionnaire 

 

Generates a StructureDefinition instance with a snapshot, based on a differential in a specified StructureDefinition. If the operation is not called at the instance level, either definition or url 'in' parameters must be provided. If more than one is specified, servers may raise an error or may resolve with the parameter of their choice. If called at the instance level, these parameters will be ignored.

The official URL for this operation definition is

 http://hl7.org/fhir/OperationDefinition/StructureDefinition-generate

Formal Definition (as a OperationDefinition).

URL: [base]/StructureDefinition/$generate

URL: [base]/StructureDefinition/[id]/$generate

This is not an idempotent operation

In Parameters:
NameCardinalityTypeBindingProfileDocumentation
definition0..1StructureDefinition

The StructureDefinition is provided directly as part of the request. Servers may choose not to accept profiles in this fashion

url0..1string(token)

The profile's canonical URL (i.e. 'StructureDefinition.url'). The server must know the structure definition, or be able to retrieve it from other known repositories.

Out Parameters:
NameCardinalityTypeBindingProfileDocumentation
return1..1StructureDefinition

The structure definition with a snapshot

Note: as this the only out parameter, it is a resource, and it has the name 'return', the result of this operation is returned directly as a resource

Request:

GET /fhir/StructureDefinition/daf-patient/$generate
Accept: application/json+fhir

Response:

HTTP/1.1 200 OK
Content-Type: application/json+fhir
[other headers]

{
  "ResourceType" : "StructureDefinition",
  ... (including snapshot) ...
}