DEV Community

InterSystems Developer for InterSystems

Posted on • Originally published at community.intersystems.com

Creating and Validating Any HL7 FHIR Resource by using FHIR schema

Healthcare interoperability is instrumental in improving patient care, decreasing healthcare provider costs, and providing a more accurate picture to providers. However, with so many different systems, data is formatted in many different ways. There are many standards that have been created to try to solve this problem, including HL7v2, HL7v3, and CDA but each one has its drawbacks.

FHIR, or Fast Healthcare Interoperability Resources, is a new format for healthcare data that aims at solving these problems. It is developed by Health Level Seven International (HL7), an organization that also developed HL7v2, HL7v3 and CDA.

Today we will explore how to Create and Validate FHIR Resource by using FHIR schema with the help of IntelliSense and auto complete functionality in VS Code.

Step 1 : Download JSON schema file for Resource validation from FHIR offical website https://www.hl7.org/fhir/

Image description

Image description

Step 2: Create folder (in this example I am using Patient folder and Patient Resource) and copy extracted fhir.schema.json file to same folder, then open folder from VS Code 

Image description
 

Step 3: Setup the VS code to recognize FHIR schema by modifying setting.json file.

Press CTRL+SHIFT+P and type workspace settings JSON

Image description
 

Step 4: Create a new file patient.fhir.json in the same folder.

Press Ctrl+Space and you will get all the attributes of the FHIR resources through IntelliSense

Image description

Add Resource type Patient and all the attributes related to patient resource will start appearing in the IntelliSense.

Image description

VS Code will automatically validate structure and syntax of the Resource.

Image description

 

By the help of IntelliSense and auto complete we have created and validated our patient resource.

Image description

Step 5: Post the create resource in InterSystems FHIR server using Rest API from postman

Image description

Retrieve the Created Patient Resource by using Get method

Image description

Congratulations!, We have created, validated our Patient Resource and successfully posted and retrieved to InterSystems FHIR Server using postman.

In this way we can easily create and validate any FHIR Resource.

 

 

 

Top comments (0)