### FHIR QuestionnaireResponse Resource JSON Example
Source: https://github.com/trifork/thp-context7-2/blob/main/questionnaireresponse-example.json.html
A complete QuestionnaireResponse resource instance demonstrating the structure of a questionnaire response with contained Patient, ServiceRequest, and Practitioner resources. The example shows nested questionnaire items with answers containing coded values and hierarchical item references. This resource is used to capture answers to a questionnaire, typically related to clinical assessment or survey data collection.
```json
{
"resourceType": "QuestionnaireResponse",
"id": "3141",
"text": {
"status": "generated",
"div": "
\n Birth details - To be completed by health professional\n Name of child: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Sex: \_\_\n \n Neonatal Information\n Birth Weight (kg): \_\_\_\_\_\_\_\_\_\_\_\_\_
Birth Length (cm): \_\_\_\_\_\_\_\_\_\_\_\_\_
Vitamin K given : \_\_
1st dose: \_\_\_\_\_\_\_\_\_\_\_\_\_
2nd dose: \_\_\_\_\_\_\_\_\_\_\_\_\_
Hep B given : \_\_
Date given : \_\_\_\_\_\_\_\_\_\_\_\_\_
Abnormalities noted at birth:\n \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
\n
"
},
"url": "http://hl7.org/fhir/Questionnaire/bb",
"title": "NSW Government My Personal Health Record",
"status": "draft",
"subjectType": [
"Patient"
],
"date": "2013-02-19",
"publisher": "New South Wales Department of Health",
"jurisdiction": [
{
"coding": [
{
"system": "urn:iso:std:iso:3166",
"code": "AU"
}
]
}
],
"item": [
{
"linkId": "birthDetails",
"text": "Birth details - To be completed by health professional",
"type": "group",
"item": [
{
"linkId": "group",
"type": "group",
"item": [
{
"linkId": "nameOfChild",
"text": "Name of child",
"type": "string"
},
{
"linkId": "sex",
"text": "Sex",
"type": "choice",
"answerOption": [
{
"valueCoding": {
"code": "F"
}
},
{
"valueCoding": {
"code": "M"
}
}
]
}
]
},
{
"linkId": "neonatalInformation",
"text": "Neonatal Information",
"type": "group",
"item": [
{
"linkId": "birthWeight",
"text": "Birth weight (kg)",
"type": "decimal"
},
{
"linkId": "birthLength",
"text": "Birth length (cm)",
"type": "decimal"
},
{
"linkId": "vitaminKgiven",
"text": "Vitamin K given",
"type": "choice",
"answerOption": [
{
"valueCoding": {
```
--------------------------------
### FHIR R4 QuestionnaireResponse Example (Blue Book) - JSON
Source: https://github.com/trifork/thp-context7-2/blob/main/questionnaireresponse-example-bluebook.json.html
A JSON representation of a FHIR R4 QuestionnaireResponse resource. This example includes details about immunizations, birth abnormalities, and other patient-related information collected via a questionnaire. It's often used in healthcare data exchange scenarios.
```json
{
"resourceType": "QuestionnaireResponse",
"id": "answering-about-blue-book",
"identifier": [
{
"value": "1500Health"
}
],
"questionnaire": "http://hl7.org/fhir/Questionnaire/1500",
"status": "completed",
"authored": "2013-03-11T14:30:00+10:00",
"source": {
"reference": "Patient/example"
},
"item": [
{
"linkId": "1",
"text": "The name of the child is.",
"answer": [
{
"valueString": "Baby Boy – Johnson"
}
]
},
{
"linkId": "2",
"text": "The date of birth of the child is.",
"answer": [
{
"valueDate": "1972-11-30"
}
]
},
{
"linkId": "3",
"text": "The sex of the child is.",
"answer": [
{
"valueCoding": {
"system": "http://hl7.org/fhir/v3/AdministrativeGender",
"code": "male",
"display": "Male"
}
}
]
},
{
"linkId": "mothersName",
"text": "Mother's Name",
"answer": [
{
"valueString": "Martha Anne Johnson"
}
]
},
{
"linkId": "dateCompleted",
"text": "Date Form Completed",
"answer": [
{
"valueDate": "1972-12-11"
}
]
},
{
"linkId": "immunizations",
"text": "Immunizations",
"item": [
{
"linkId": "vitaminK",
"text": "Vitamin K given",
"answer": [
{
"valueBoolean": true
}
],
"item": [
{
"linkId": "vitaminKDose1",
"text": "1st dose",
"answer": [
{
"valueDate": "1972-11-30"
}
]
},
{
"linkId": "vitaminKDose2",
"text": "2nd dose",
"answer": [
{
"valueDate": "1972-12-11"
}
]
}
]
}
]
},
{
"linkId": "hepBgiven",
"text": "Hep B given y / n",
"answer": [
{
"valueBoolean": true,
"item": [
{
"linkId": "hepBgivenDate",
"text": "Date given",
"answer": [
{
"valueDate": "1972-12-04"
}
]
}
]
}
]
},
{
"linkId": "abnormalitiesAtBirth",
"text": "Abnormalities noted at birth",
"answer": [
{
"valueString": "Already able to speak Chinese"
}
]
}
]
}
```
--------------------------------
### PlanDefinition.action.documentation
Source: https://github.com/trifork/thp-context7-2/blob/main/plandefinition-definitions.html
Provides didactic or informational resources related to the action, including inline text and web links.
```APIDOC
## PlanDefinition.action.documentation
### Description
Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.
### Type
[RelatedArtifact](metadatatypes.html#RelatedArtifact)
### Cardinality
0..*
```
--------------------------------
### PlanDefinition $apply Operation Response - FHIR JSON
Source: https://context7.com/trifork/thp-context7-2/llms.txt
Example response from the $apply operation, illustrating the generated CarePlan resource. This plan outlines the proposed activities for the patient.
```json
{
"resourceType": "CarePlan",
"status": "draft",
"intent": "proposal",
"subject": {
"reference": "Patient/example"
},
"activity": [{
"reference": {
"reference": "MedicationRequest/generated-123"
}
}]
```
--------------------------------
### PlanDefinition.action
Source: https://github.com/trifork/thp-context7-2/blob/main/plandefinition-definitions.html
Represents an action or a group of actions to be taken as part of the plan. It includes elements for prefix, title, description, text equivalent, priority, code, and reason.
```APIDOC
## PlanDefinition.action
### Description
An action or group of actions to be taken as part of the plan.
### Method
N/A (Resource Element)
### Endpoint
N/A
### Parameters
#### Path Parameters
N/A
#### Query Parameters
N/A
#### Request Body
N/A
### Request Example
N/A
### Response
#### Success Response (200)
N/A
#### Response Example
N/A
### Elements
* **prefix** (string): A user-visible prefix for the action.
* **title** (string): The title of the action displayed to a user.
* **description** (string): A brief description of the action used to provide a summary to display to the user.
* **textEquivalent** (string): A text equivalent of the action to be performed.
* **priority** (code): Indicates how quickly the action should be addressed.
* **code** (CodeableConcept): A code that provides meaning for the action or action group.
* **reason** (CodeableConcept): A description of why this action is necessary or appropriate.
```
--------------------------------
### GET Request for PlanDefinition Data Requirements
Source: https://github.com/trifork/thp-context7-2/blob/main/Plandefinition-operation-data-requirements - FHIR v4.0.1.html
This is a GET request to retrieve the data requirements for a specific PlanDefinition, in this case, the 'zika-virus-intervention' plan. It is used to understand what data is needed for the intervention plan's evaluation.
```http
GET [base]/PlanDefinition/zika-virus-intervention/$data-requirements
```
--------------------------------
### API PUT Request Example
Source: https://github.com/trifork/thp-context7-2/blob/main/questionnaire-profile-example-ussg-fht.json.html
This snippet demonstrates an example of an HTTP PUT request to a FHIR ValueSet URL. It specifies the HTTP method and the target URL for the request, commonly used for updating or creating FHIR resources.
```json
{
"method": "PUT",
"url": "http://hl7.org/fhir/us/sdc/ValueSet/LL627-1"
}
```
--------------------------------
### PlanDefinition.action.input
Source: https://github.com/trifork/thp-context7-2/blob/main/plandefinition-definitions.html
Defines the input data requirements for the action.
```APIDOC
## PlanDefinition.action.input
### Description
Defines input data requirements for the action.
### Type
[DataRequirement](metadatatypes.html#DataRequirement)
### Cardinality
0..*
```
--------------------------------
### PlanDefinition.action.condition
Source: https://github.com/trifork/thp-context7-2/blob/main/plandefinition-definitions.html
Defines expressions that describe applicability criteria, or start/stop conditions for the action. Multiple conditions of the same kind are combined with AND semantics.
```APIDOC
## PlanDefinition.action.condition
### Description
An expression that describes applicability criteria or start/stop conditions for the action.
### Cardinality
0..*
### Comments
When multiple conditions of the same kind are present, the effects are combined using AND semantics, so the overall condition is true only if all the conditions are true.
```
--------------------------------
### FHIR R4 QuestionnaireResponse Example in JSON
Source: https://github.com/trifork/thp-context7-2/blob/main/questionnaireresponse-example.json.html
A JSON representation of a FHIR R4 QuestionnaireResponse. This structure is used to submit answers to a questionnaire. It includes 'linkId' to reference questions and 'answer' to provide the response, which can be a 'valueCoding' in this case.
```json
{
"resourceType": "QuestionnaireResponse",
"id": "ans1",
"questionnaire": "http://hl7.org/fhir/Questionnaire/qs1",
"status": "completed",
"subject": {
"reference": "Patient/patient-example-good",
"display": "John Smith"
},
"authored": "2017-01-01T10:00:00Z",
"item": [
{
"linkId": "1",
"text": "An example questionnaire response",
"answer": [
{
"valueCoding": {
"system": "http://cancer.questionnaire.org/system/code/yesno",
"code": "1"
}
}
],
"item": [
{
"linkId": "1.1",
"text": "Group 1",
"item": [
{
"linkId": "1.1.1",
"text": "Question 1",
"answer": [
{
"valueCoding": {
"system": "http://cancer.questionnaire.org/system/code/yesno",
"code": "1"
}
}
],
"item": [
{
"linkId": "1.1.1.1",
"text": "Sub-question 1",
"answer": [
{
"valueCoding": {
"system": "http://cancer.questionnaire.org/system/code/yesno",
"code": "1"
}
}
]
},
{
"linkId": "1.1.1.2",
"text": "Sub-question 2",
"answer": [
{
"valueCoding": {
"system": "http://cancer.questionnaire.org/system/code/yesno",
"code": "1"
}
}
]
},
{
"linkId": "1.1.1.3",
"text": "Sub-question 3",
"answer": [
{
"valueCoding": {
"system": "http://cancer.questionnaire.org/system/code/yesno",
"code": "0"
}
}
]
}
]
}
]
}
]
}
]
}
```
--------------------------------
### PlanDefinition.action.output
Source: https://github.com/trifork/thp-context7-2/blob/main/plandefinition-definitions.html
Defines the outputs generated by the action, if any.
```APIDOC
## PlanDefinition.action.output
### Description
Defines the outputs of the action, if any.
### Type
[DataRequirement](metadatatypes.html#DataRequirement)
### Cardinality
0..*
```
--------------------------------
### FHIR QuestionnaireResponse Example (JSON)
Source: https://github.com/trifork/thp-context7-2/blob/main/questionnaireresponse-example-ussg-fht-answers.json.html
This JSON object represents a FHIR QuestionnaireResponse resource. It details the answers to a specific questionnaire, including status, subject, and individual question items with their responses. This example is informative and part of the FHIR Specification.
```json
{
"resourceType": "QuestionnaireResponse",
"id": "ussg-fht-answers",
"text": {
"status": "generated",
"div": "
"
},
"questionnaire": "Questionnaire/ussg-fht",
"status": "in-progress",
"subject": {
"reference": "http://hl7.org/fhir/Patient/proband",
"type": "Patient"
},
"authored": "2008-01-17",
"item": [
{
"linkId": "0",
"item": [
{
"linkId": "0.1",
"text": "Date Done",
"answer": [
{
"valueDate": "2008-01-17"
}
]
}
]
},
{
"linkId": "1",
"definition": "http://loinc.org/fhir/DataElement/54126-8",
"text": "Your health information",
"item": [
{
"linkId": "1.1",
"item": [
{
"linkId": "1.1.1",
"definition": "http://loinc.org/fhir/DataElement/54125-0",
"text": "Name",
"answer": [
{
"valueString": "Annie Proband"
}
]
},
{
"linkId": "1.1.2",
"definition": "http://loinc.org/fhir/DataElement/54131-8",
"text": "Gender"
}
]
}
]
},
{
"linkId": "2",
"definition": "http://loinc.org/fhir/DataElement/54114-4",
"text": "Family member health information"
}
]
}
```
--------------------------------
### FHIR PlanDefinition $apply GET Request
Source: https://github.com/trifork/thp-context7-2/blob/main/Plandefinition-operation-apply - FHIR v4.0.1.html
HTTP GET request to apply a low suicide risk order set PlanDefinition to a specific patient. This operation triggers the generation of a clinical care plan based on the order set definition.
```http
GET [base]/PlanDefinition/example/$apply?subject=Patient/124
```
--------------------------------
### PlanDefinition Action Definition Reference
Source: https://github.com/trifork/thp-context7-2/blob/main/PlanDefinition - FHIR v4.0.1.html
Provides references to ActivityDefinition, PlanDefinition, or Questionnaire resources that describe the action in detail. Supports both canonical and URI-based references.
```APIDOC
## PlanDefinition.action.definition[x]
### Description
A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken. Choice of one representation.
### Parameters
#### Cardinality
- **0..1**: Optional single definition reference
#### Definition Canonical Reference (Option 1)
- **Field**: definitionCanonical
- **Type**: canonical
- **Referenced Resources**: ActivityDefinition | PlanDefinition | Questionnaire
- **Cardinality**: 0..1
- **Description**: A canonical URL reference to an ActivityDefinition, PlanDefinition, or Questionnaire that describes the action to be taken in detail
#### Definition URI Reference (Option 2)
- **Field**: definitionUri
- **Type**: uri
- **Cardinality**: 0..1
- **Description**: A URI reference to a resource that describes the action to be taken in detail
### Request Example
```json
{
"definition": {
"definitionCanonical": "http://example.com/ActivityDefinition/blood-pressure-monitoring|1.0"
}
}
```
### Alternative Example
```json
{
"definition": {
"definitionUri": "http://example.com/activity/medication-administration"
}
}
```
```
--------------------------------
### FHIR QuestionnaireResponse Example (JSON)
Source: https://github.com/trifork/thp-context7-2/blob/main/questionnaireresponse-example-f201-lifelines.json.html
This JSON snippet represents a FHIR QuestionnaireResponse resource. It captures patient answers to a set of questions, organized by linkId. This example specifically includes responses related to intoxications like smoking and alcohol usage.
```json
{
"resourceType": "QuestionnaireResponse",
"id": "f201",
"meta": {
"profile": [
"http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
]
},
"text": {
"status": "generated",
"div": "
A patient provided their lifeline information, including smoking habits and alcohol consumption.
"
},
"questionnaire": "http://example.org/fhir/Questionnaire/hpq",
"status": "completed",
"subject": {
"reference": "Patient/f201",
"display": "Mr. Donald Duck"
},
"authoredOn": "2013-02-20T10:30:00+01:00",
"item": [
{
"linkId": "1.1",
"text": "What is your gender?",
"answer": [
{
"valueCoding": {
"system": "http://hl7.org/fhir/gender-neutral-gender",
"code": "male",
"display": "Male"
}
}
]
},
{
"linkId": "3",
"text": "Intoxications",
"item": [
{
"linkId": "3.1",
"text": "Do you smoke?",
"answer": [
{
"valueString": "No"
}
]
},
{
"linkId": "3.2",
"text": "Do you drink alchohol?",
"answer": [
{
"valueString": "No, but I used to drink"
}
]
}
]
}
]
}
```
--------------------------------
### PlanDefinition Action Configuration
Source: https://github.com/trifork/thp-context7-2/blob/main/PlanDefinition - FHIR v4.0.1.html
This section details the configuration of a PlanDefinition action, including its inputs, outputs, related actions, timing, participants, and behavioral aspects.
```APIDOC
## PlanDefinition Action Configuration
### Description
This endpoint provides the structure for configuring a PlanDefinition action. It allows specification of data requirements for inputs and outputs, relationships with other actions, timing for execution, participant roles, and the overall behavior of the action.
### Method
POST (or PUT, depending on desired operation)
### Endpoint
/PlanDefinition/{id}/action
### Parameters
#### Request Body
- **input** (Array) - Optional - Defines input data requirements for the action.
- **output** (Array) - Optional - Defines the outputs of the action.
- **relatedAction** (Array