> 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-validation.md).

# FHIR Validation

## Description

The LogicNets system can consume and generate Fast Healthcare Interoperability Resources (FHIR) messages, including Questionnaires, Question Responses, Procedures, Service Requests, and Diagnostic Reports. These messages must comply with the HL7 FHIR Standard, and you can use our FHIR Validator Tool to ensure that your generated and consumed messages comply with this standard.

## Details

Different organizations and companies provide tools to perform FHIR validation, and you can customize FHIR messages with extensions and profiles. You must publish custom extension and profiles online using HL7-approved websites and make them accessible for those validation tools. For more information on each, see these sites:

* Validation: <https://hl7.org/fhir/validation.html>
* Extensions: <https://www.hl7.org/fhir/extensibility.html>
* Profiles: <https://www.hl7.org/fhir/profiling.html>

As an alternative to publishing and making your FHIR messages publicly available, you can use the LogicNets FHIR Validator Tool and create a custom implementation guide based on the official HL7 FHIR validator. This LogicNets-based tool does not require you to publish your custom extensions and profiles online. You can also use the LogicNets FHIR Validation API or Test Manager to validate your FHIR messages.

## Create a Custom Implementation Guide

You can create a custom FHIR implementation guide using the definitions of custom extensions and profiles created by external tools and storing and publishing them in a LogicNets package that stays on a local server. The following image shows the project of the LogicNets Implementation Guide with all LogicNets extensions and profiles.

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-d83102c4feb3861bcc1cd204e9818eaa5c52d8a4%2F0ff360ed-b056-4e8b-adce-f7a462a4b1ed.png?alt=media)

If you create an implementation guide project in your Designer and publish it, you can configure it as *ImplementationGuide* on the *General* tab in the System Configuration module. We also recommend that you configure the LogicNets Implementation Guide (FhirImplementationGuide) as well.

## Configure the FHIR Validator

To use the FHIR Validator, LogicNets requires you to install the official HL7 Validator library and a compatible Java runtime. Once you have both items installed on the server, you configure the Java executable through the LogicNets System Configuration module on the *General* tab.

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-6d10339f5d292f843407792e5385ef108d67bb19%2Fb7391f2b-3e00-431a-9382-c860b07757c6.png?alt=media)

By default, LogicNets does not always validate generated FHIR messages. You can enable automatic validation using the *Auto Validate FHIR Messages* configuration dropdown. However, be aware that running FHIR validation is time consuming and will delay all API calls producing FHIR messages.

Download the HL7 Validator at <https://github.com/hapifhir/org.hl7.fhir.core/releases>. This is also where you can find the Java release to install. For more information, see <https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator>. Please contact your LogicNets representative if you want to use a LogicNets-hosted solution.

## Use the FHIR Validator Tool

Start the LogicNets FHIR Validator Tool by entering the following URL: *https\://\[hostname/company]/FhirValidator*, making sure that you grant access to the FhirValidator package.

The tool opens and displays an input box where you can paste an FHIR message. Click ***Validate*** to start the validator. The system displays the results on the *Details* pane and any potential execution errors on the *Console* pane.

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-76e043f06c9a8450676994050f2d5e25fe9baedd%2F9e17bd8a-298a-4a98-9986-7f7110029c20.png?alt=media)

## FHIR Validator API

In addition to the LogicNets Validator Tool, LogicNets also provides an API you can call to validate a FHIR message. To use the FHIR Validator API, call the API at this address: *https\://\[hostname/company]/FhirValidatorAPI/v1/resource/validate* and post the FHIR message you want to validate.


---

# 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-validation.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.
