use of org.hl7.fhir.r4b.model.ImplementationGuide in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImplementationGuide.
protected void composeImplementationGuide(Complex parent, String parentType, String name, ImplementationGuide element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "ImplementationGuide", name, element, index);
if (element.hasUrlElement())
composeUri(t, "ImplementationGuide", "url", element.getUrlElement(), -1);
if (element.hasVersionElement())
composeString(t, "ImplementationGuide", "version", element.getVersionElement(), -1);
if (element.hasNameElement())
composeString(t, "ImplementationGuide", "name", element.getNameElement(), -1);
if (element.hasStatusElement())
composeEnum(t, "ImplementationGuide", "status", element.getStatusElement(), -1);
if (element.hasExperimentalElement())
composeBoolean(t, "ImplementationGuide", "experimental", element.getExperimentalElement(), -1);
if (element.hasDateElement())
composeDateTime(t, "ImplementationGuide", "date", element.getDateElement(), -1);
if (element.hasPublisherElement())
composeString(t, "ImplementationGuide", "publisher", element.getPublisherElement(), -1);
for (int i = 0; i < element.getContact().size(); i++) composeContactDetail(t, "ImplementationGuide", "contact", element.getContact().get(i), i);
if (element.hasDescriptionElement())
composeMarkdown(t, "ImplementationGuide", "description", element.getDescriptionElement(), -1);
for (int i = 0; i < element.getUseContext().size(); i++) composeUsageContext(t, "ImplementationGuide", "useContext", element.getUseContext().get(i), i);
for (int i = 0; i < element.getJurisdiction().size(); i++) composeCodeableConcept(t, "ImplementationGuide", "jurisdiction", element.getJurisdiction().get(i), i);
if (element.hasCopyrightElement())
composeMarkdown(t, "ImplementationGuide", "copyright", element.getCopyrightElement(), -1);
if (element.hasFhirVersionElement())
composeId(t, "ImplementationGuide", "fhirVersion", element.getFhirVersionElement(), -1);
for (int i = 0; i < element.getDependency().size(); i++) composeImplementationGuideImplementationGuideDependencyComponent(t, "ImplementationGuide", "dependency", element.getDependency().get(i), i);
for (int i = 0; i < element.getPackage().size(); i++) composeImplementationGuideImplementationGuidePackageComponent(t, "ImplementationGuide", "package", element.getPackage().get(i), i);
for (int i = 0; i < element.getGlobal().size(); i++) composeImplementationGuideImplementationGuideGlobalComponent(t, "ImplementationGuide", "global", element.getGlobal().get(i), i);
for (int i = 0; i < element.getBinary().size(); i++) composeUri(t, "ImplementationGuide", "binary", element.getBinary().get(i), i);
if (element.hasPage())
composeImplementationGuideImplementationGuidePageComponent(t, "ImplementationGuide", "page", element.getPage(), -1);
}
use of org.hl7.fhir.r4b.model.ImplementationGuide in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImplementationGuideImplementationGuideGlobalComponent.
protected void composeImplementationGuideImplementationGuideGlobalComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuideGlobalComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "global", name, element, index);
if (element.hasTypeElement())
composeCode(t, "ImplementationGuide", "type", element.getTypeElement(), -1);
if (element.hasProfile())
composeReference(t, "ImplementationGuide", "profile", element.getProfile(), -1);
}
use of org.hl7.fhir.r4b.model.ImplementationGuide in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImplementationGuideImplementationGuideDefinitionGroupingComponent.
protected void composeImplementationGuideImplementationGuideDefinitionGroupingComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuideDefinitionGroupingComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "grouping", name, element, index);
if (element.hasNameElement())
composeString(t, "ImplementationGuide", "name", element.getNameElement(), -1);
if (element.hasDescriptionElement())
composeString(t, "ImplementationGuide", "description", element.getDescriptionElement(), -1);
}
use of org.hl7.fhir.r4b.model.ImplementationGuide in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImplementationGuideImplementationGuideDefinitionParameterComponent.
protected void composeImplementationGuideImplementationGuideDefinitionParameterComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuideDefinitionParameterComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "parameter", name, element, index);
if (element.hasCodeElement())
composeString(t, "ImplementationGuide", "code", element.getCodeElement(), -1);
if (element.hasValueElement())
composeString(t, "ImplementationGuide", "value", element.getValueElement(), -1);
}
use of org.hl7.fhir.r4b.model.ImplementationGuide in project org.hl7.fhir.core by hapifhir.
the class BaseWorkerContext method cacheResourceFromPackage.
public void cacheResourceFromPackage(Resource r, PackageVersion packageInfo) throws FHIRException {
synchronized (lock) {
Map<String, ResourceProxy> map = allResourcesById.get(r.fhirType());
if (map == null) {
map = new HashMap<String, ResourceProxy>();
allResourcesById.put(r.fhirType(), map);
}
if ((packageInfo == null || !packageInfo.isExamplesPackage()) || !map.containsKey(r.getId())) {
map.put(r.getId(), new ResourceProxy(r));
} else {
System.out.println("Ignore " + r.fhirType() + "/" + r.getId() + " from package " + packageInfo.toString());
}
if (r instanceof CodeSystem || r instanceof NamingSystem) {
oidCache.clear();
}
if (r instanceof CanonicalResource) {
CanonicalResource m = (CanonicalResource) r;
String url = m.getUrl();
if (!allowLoadingDuplicates && hasResource(r.getClass(), url)) {
// spcial workaround for known problems with existing packages
if (Utilities.existsInList(url, "http://hl7.org/fhir/SearchParameter/example")) {
return;
}
throw new DefinitionException(formatMessage(I18nConstants.DUPLICATE_RESOURCE_, url));
}
if (r instanceof StructureDefinition) {
StructureDefinition sd = (StructureDefinition) m;
if ("1.4.0".equals(version)) {
fixOldSD(sd);
}
structures.see(sd, packageInfo);
} else if (r instanceof ValueSet) {
valueSets.see((ValueSet) m, packageInfo);
} else if (r instanceof CodeSystem) {
CodeSystemUtilities.crossLinkCodeSystem((CodeSystem) r);
codeSystems.see((CodeSystem) m, packageInfo);
} else if (r instanceof ImplementationGuide) {
guides.see((ImplementationGuide) m, packageInfo);
} else if (r instanceof CapabilityStatement) {
capstmts.see((CapabilityStatement) m, packageInfo);
} else if (r instanceof Measure) {
measures.see((Measure) m, packageInfo);
} else if (r instanceof Library) {
libraries.see((Library) m, packageInfo);
} else if (r instanceof SearchParameter) {
searchParameters.see((SearchParameter) m, packageInfo);
} else if (r instanceof PlanDefinition) {
plans.see((PlanDefinition) m, packageInfo);
} else if (r instanceof OperationDefinition) {
operations.see((OperationDefinition) m, packageInfo);
} else if (r instanceof Questionnaire) {
questionnaires.see((Questionnaire) m, packageInfo);
} else if (r instanceof ConceptMap) {
maps.see((ConceptMap) m, packageInfo);
} else if (r instanceof StructureMap) {
transforms.see((StructureMap) m, packageInfo);
} else if (r instanceof NamingSystem) {
systems.see((NamingSystem) m, packageInfo);
}
}
}
}
Aggregations