Validating resources based on custom FHIR IG

24 views
Skip to first unread message

Esteban Hebel

unread,
Aug 7, 2025, 4:36:06 PMAug 7
to GCP Healthcare Discuss

I am testing the Google Healthcare FHIR data store validation of resources based on a custom Implementation Guide using a straightforward IG that does the following on the Patient resource:

* name 1..1 MS

* birthDate 0..0

  • I generated the JSON specification files from SUSHI
  • Deleted the examples from the FSH-Generated/Resources folder
  • Compiled a bundle using the bundler Python tool
  • Uploaded the resulting bundle.json to a bucket associated with the dataset, trying to create a dataset with this custom IG, which works ok because I can now select the ExampleIG as a custom IG.

My problem is that every time I try to POST a Patient resource that does not comply with the profile I defined, I can create it without a problem. However, when I perform the Patient/$validate operation, I only get a warning.

I tried it using the available IG, specifically the USCORE 6.1, and the validation works fine.

Is there any additional step that I have to take to activate the proper validation of resources against my custom IG?

Thanks!

Ning Zhang

unread,
Aug 7, 2025, 5:20:14 PMAug 7
to GCP Healthcare Discuss

Hi,

Thanks for reaching out!

My first guess would be that you didn't configure the IG properly. You need to add the profile into the "global" field of your ImplementationGuide resource and re-upload it as part of the workflow. We have a guide here on how to do that: https://cloud.google.com/healthcare-api/docs/how-tos/fhir-profiles#configure_your_implementation_guide  $validate works because you have provided the target profile when calling it.

If this is not the case, could you please provide an example of the ImplementationGuide, the StructureDefinition of the profile and your FHIR store's config?

Best,
Ning

Esteban Hebel

unread,
Aug 11, 2025, 12:24:25 PMAug 11
to GCP Healthcare Discuss
Ok, I have found the solution.
Sushi outputs the Differential profiles by default, but the API requires the Snapshot version of each StructureDefinition resource. 
The solution was to add the -s option to the sushi command like:
  • sushi . -s
I haven't found a step-by-step tutorial on how to go from FSH-Sushi to GCP Healthcare API. I might be considering writing one.
Best regards and thanks for all your inputs.
 
Esteban

Maico Bernal

unread,
Aug 11, 2025, 2:27:02 PMAug 11
to GCP Healthcare Discuss

Hey Esteban!

I’d follow this tutorial to run the IG Publisher after your SUSHI build: https://fshschool.org/docs/sushi/running/#running-the-ig-publisher
That step generates the final StructureDefinitions (and other FHIR artifacts from SUSHI), runs validations, and builds the IG website via Jekyll. It uses Java (publisher) and Ruby (Jekyll), so make sure those deps are installed first.

Ways to run it:


After that you would need to upload all the .json files to a Cloud Storage bucket, and make an import operation, and then enable the Implementation Guide on that specific FHIR store.

Hope that helps!
Cheers,
Maico

Reply all
Reply to author
Forward
0 new messages