FHIRCLEAN Library

The FHIRCLEAN Library is an importable library which contains a function, FHIRCLEANjson, which is used to clean FHIR JSON templates that were generated by the FHIR Profiling Tool.

This function iterates through a parsed JSON object and removes any json.NULLs, empty strings (''), and empty tables. As shown in the workflow in FHIR Resource Creator , it allows you to create a FHIR Resource using the template generated from the FHIR Profiling Tool, map data to the parsed JSON template, and then remove any unpopulated fields before serializing and sending the FHIR resource downstream. An example is shown below of the populated template before and after cleaning:

Before Cleaning

image-20240617-200631.png

After Cleaning

image-20240617-200712.png

 

Related pages