Question on Using the FHIR Validator

I am currently evaluating the FHIR validator tool:
https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator

I have some questions regarding the validation tool and hope this community can help answer.

Questions:

  1. What JSON schema definition does the tool use if schema validation is enabled (via the -native flag)? I am currently experimenting with R4 Json resource inputs. For instance, for evaluating a JSON R4 patient resource, is the tool referencing the HL7 R4 JSON schema patient definition?
  2. Where is the source code for the FHIR validation tool? Is it publicly available?
  3. What is the difference between the -ig and -profile flag? The -ig flag also accepts a profile definition for the tool to load.

Thank you.

  1. it uses the published schema in the FHIR spec. but there’s no value add for using -native, it’s mainly for testing the schema itself
  2. it’s in fhir hapi core: GitHub - hapifhir/org.hl7.fhir.core
  3. -ig loads the source. It can be a profile, yes. -profile asks the validator to check the resource against the profile. And it will try to auto-load the profile, so just sometimes, the -ig and the -profile parameters do the same thing. But very often, not so