> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/platform-documentation/fhir-support/fhir-extensions.md).

# FHIR Extensions

LogicNets uses additional defined FHIR extensions to map some LogicNets-supported concepts to FHIR Questionnaire concepts. These extensions are LogicNets specific, but they also support customer-specific extensions to export customer-specific attributes.

### Standard Extensions Used

Besides the LogicNets- and customer-specific extensions the generated FHIRQuestionnaire also relies on standard FHIR (Questionnaire) extensions described in <http://build.fhir.org/ig/HL7/sdc/behavior.html>. The following standard extensions are used (this may change in the future):

* <http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction>
* <http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression>
* <http://hl7.org/fhir/StructureDefinition/questionnaire-hidden>
* <http://hl7.org/fhir/StructureDefinition/questionnaire-optionExclusive>
* <http://hl7.org/fhir/StructureDefinition/variable>
* <http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs>
* <http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs>
* <http://hl7.org/fhir/StructureDefinition/questionnaire-unit>
* <http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces>
* <http://hl7.org/fhir/StructureDefinition/questionnaire-constraint>
* <http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl>
* <http://hl7.org/fhir/StructureDefinition/cqf-expression>

### LogicNets Extensions Used

The following chapters describe the LogicNets extensions used in this solution.

#### ExtensionInResponse Extension

| URL                  | <http://logicnets.info/fhir/StructureDefinition/ExtensionInResponse>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Description**      | The FHIRQuestionnaire (items) can contain several (custom) extensions. By default, the extensions are not copied to the FHIRQuestionnaireResponse. In some cases, it may be useful to copy these extensions to the FHIRQuestionnaireResponse. For example, a conclusion item does contain extensions to describe additional attributes of the conclusion (e.g., priority). The client can create a conclusion overview by using the response, but it requires the additional attributes to order the conclusion.                                                                                                                                                                                             |
| **Value-type**       | uri (<https://build.fhir.org/datatypes.html#uri>)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Multiplicity**     | 0..\*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Location**         | questionnaire                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Child-extensions** | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Example**          | <p><code>{</code><br><code>"extension": \[</code><br><code>{ "url": "<http://logicnets.info/fhir/StructureDefinition/ExtensionInResponse>",</code><br><code>"valueUri": "<http://customer.info/fhir/StructureDefinition/Recommendation.Subpoints>"</code><br><code>},</code><br><code>{ "url": "<http://logicnets.info/fhir/StructureDefinition/ExtensionInResponse>",</code><br><code>"valueUri": "<http://customer.info/fhir/StructureDefinition/Recommendation.Endpoint>"</code><br><code>}</code><br><code>],</code><br><code>"item": \[],</code><br><code>"name": "Example Guideline",</code><br><code>"resourceType": "Questionnaire",</code><br><code>"status": "active"</code><br><code>}</code></p> |

#### Coding Extension

| URL                  | <http://logicnets.info/fhir/StructureDefinition/Coding>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description**      | The LogicNets system supports coding of questions and individual answer options. Every question can have zero or more codes (of one or more code systems) attached. Every answer option can also have zero or more codes attached. The FHIRQuestionnaire does support coding of items (<https://www.hl7.org/fhir/questionnaire-definitions.html#Questionnaire.item.code>) and coding of answerOptions (<https://www.hl7.org/fhir/questionnaire-definitions.html#Questionnaire.item.answerOption.value_x_>); however, it does not support define multiple codes to one answerOption. This extension is used to express multiple codes of an individual answerOption. |
| **Value-type**       | coding (<https://build.fhir.org/datatypes.html#coding>)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Multiplicity**     | 0..\*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Location**         | Questionnaire.item.answerOption                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Child-extensions** | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **Example**          | <p><code>{</code><br><code>"answerOption": \[</code><br><code>{ "valueString": "Fever",</code><br><code>"extension": \[</code><br><code>{</code><br><code>"url": "<http://logicnets.info/fhir/StructureDefinition/Coding>",</code><br><code>"valueCoding": {</code><br><code>"code": "R50.9",</code><br><code>"display": "Fever, unspecified",</code><br><code>"system": "<http://hl7.org/fhir/sid/icd-10>"</code><br><code>}</code><br><code>}</code><br><code>]</code><br><code>}]</code><br><code>}</code></p>                                                                                                                                                   |

#### NodeType Extension

| URL                  | <http://logicnets.info/fhir/StructureDefinition/NodeType>                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Description**      | The LogicNets system supports multiple node types, such as form-part, conclusion, process, rule, and switch. In the Designer, the shape and styling of the nodes is based on the node type. Nodes in LogicNets are translated to questionnaire items in the export of type group. With this extension the fhirquestionnaire item is labeled with the node type of the original node. This extension can be used in the client runtime, for example, to style the questionnaire item differently. |
| **Value-type**       | string (<https://build.fhir.org/datatypes.html#string>)                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Multiplicity**     | 0..1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Location**         | Questionnaire.item                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Child-extensions** |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Example**          | <p><code>{</code><br><code>"id": "6#1680~~1:node",</code><br><code>"item": \[],</code><br><code>"extension": \[ {</code><br><code>"url": "<http://logicnets.info/fhir/StructureDefinition/NodeType>", "valueString": "conclusion"</code><br><code>}</code><br>\`\`<br><code>],</code><br><code>"linkId": "6#1680~~1",</code><br><code>"type": "group"</code><br><code>}</code></p>                                                                                                               |

#### Description Extension

| URL                  | <http://logicnets.info/fhir/StructureDefinition/Description>                                                                                                                                                                                                                                                                                                  |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description**      | Some parts/nodes in LogicNets, such as the conclusion part, have a description field. This value of this field is exported via this extension.                                                                                                                                                                                                                |
| **Value-type**       | string (<https://build.fhir.org/datatypes.html#string>)                                                                                                                                                                                                                                                                                                       |
| **Multiplicity**     | 0..1                                                                                                                                                                                                                                                                                                                                                          |
| **Location**         | Questionnaire.item                                                                                                                                                                                                                                                                                                                                            |
| **Child-extensions** |                                                                                                                                                                                                                                                                                                                                                               |
| **Example**          | <p><code>{</code><br><code>\<br>` "id": "6#1680~1:node",`\<br>` "item": [],`\<br>` "extension": [ {`\<br>` "url": "http://logicnets.info/fhir/StructureDefinition/Description", "valueString": "conclusion description"`\<br>` }`\<br></code><br><code>],</code><br><code>"linkId": "6#1680\~1",</code><br><code>"type": "group"</code><br><code>}</code></p> |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/platform-documentation/fhir-support/fhir-extensions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
