Class IgProfileSource

java.lang.Object
org.fhirfrog.frog.profilecompiler.IgProfileSource

public class IgProfileSource extends Object
Loads one IG package plus its full transitive dependency closure and exposes canonical-URL lookups against it - the compiler's one and only source of profile/datatype-profile/ValueSet/ CodeSystem data.

Deliberately reuses IgPackageLoader (widened from package-private to public in fhir-frog-library for exactly this purpose) rather than re-walking FilesystemPackageCacheManager/NpmPackage independently - see that class's javadoc and this change's design.md for why.

Deliberately does not fall back to a remote terminology server when a ValueSet isn't locally enumerable (contrast ProfileValidator's optional RemoteTerminologyServiceValidationSupport hookup) - design.md's Decisions record this as a deliberate v1 scope line, not an oversight: requiredBinding discriminator resolution (algorithm.md §3.2.1) either resolves from packages already on disk, or fails loudly via ValueSetNotLocallyEnumerableException.

  • Method Details

    • load

      public static IgProfileSource load(ca.uhn.fhir.context.FhirContext fhirContext, String igPackage)
      Parameters:
      igPackage - "<id>#<version>", e.g. "hl7.fhir.au.core#2.0.0"
    • fetchStructureDefinition

      public org.hl7.fhir.r4.model.StructureDefinition fetchStructureDefinition(String canonicalUrl)
      Returns:
      the StructureDefinition for canonicalUrl (any |version suffix stripped first), or null if not found anywhere in the loaded package closure.
    • fetchValueSet

      public org.hl7.fhir.r4.model.ValueSet fetchValueSet(String canonicalUrl)
    • fetchCodeSystem

      public org.hl7.fhir.r4.model.CodeSystem fetchCodeSystem(String canonicalUrl)