Search in sources :

Example 66 with ImplementationGuide

use of org.hl7.fhir.r4b.model.ImplementationGuide in project org.hl7.fhir.core by hapifhir.

the class DataRenderer method isCanonical.

private boolean isCanonical(String path) {
    if (!path.endsWith(".url"))
        return false;
    String t = path.substring(0, path.length() - 4);
    StructureDefinition sd = getContext().getWorker().fetchTypeDefinition(t);
    if (sd == null)
        return false;
    if (Utilities.existsInList(t, VersionUtilities.getCanonicalResourceNames(getContext().getWorker().getVersion()))) {
        return true;
    }
    if (Utilities.existsInList(t, "ActivityDefinition", "CapabilityStatement", "CapabilityStatement2", "ChargeItemDefinition", "Citation", "CodeSystem", "CompartmentDefinition", "ConceptMap", "ConditionDefinition", "EventDefinition", "Evidence", "EvidenceReport", "EvidenceVariable", "ExampleScenario", "GraphDefinition", "ImplementationGuide", "Library", "Measure", "MessageDefinition", "NamingSystem", "PlanDefinition"))
        return true;
    return sd.getBaseDefinitionElement().hasExtension("http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super");
}
Also used : StructureDefinition(org.hl7.fhir.r4b.model.StructureDefinition)

Aggregations

ImplementationGuide (org.hl7.fhir.r5.model.ImplementationGuide)16 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)13 StructureDefinition (org.hl7.fhir.r5.model.StructureDefinition)12 FHIRException (org.hl7.fhir.exceptions.FHIRException)11 DefinitionException (org.hl7.fhir.exceptions.DefinitionException)9 File (java.io.File)8 JsonObject (com.google.gson.JsonObject)7 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)7 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)7 XmlParser (org.hl7.fhir.r5.formats.XmlParser)6 SearchParameter (org.hl7.fhir.r5.model.SearchParameter)5 Gson (com.google.gson.Gson)4 GsonBuilder (com.google.gson.GsonBuilder)4 JsonArray (com.google.gson.JsonArray)4 FileInputStream (java.io.FileInputStream)4 FileOutputStream (java.io.FileOutputStream)4 IOException (java.io.IOException)4 ArrayList (java.util.ArrayList)4 CanonicalResource (org.hl7.fhir.r5.model.CanonicalResource)4 ValueSet (org.hl7.fhir.r5.model.ValueSet)4