fix so UTG can ignore FHIR core terminology resources
This commit is contained in:
parent
7bc95ade09
commit
219e4acbbd
|
@ -43,7 +43,11 @@ import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
|
|||
import org.hl7.fhir.r5.model.UriType;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
|
||||
public class R2016MayToR5Loader implements IContextResourceLoader, VersionConvertorAdvisor50 {
|
||||
public class R2016MayToR5Loader extends BaseLoader implements IContextResourceLoader, VersionConvertorAdvisor50 {
|
||||
|
||||
public R2016MayToR5Loader(String[] types) {
|
||||
super(types);
|
||||
}
|
||||
|
||||
private List<CodeSystem> cslist = new ArrayList<>();
|
||||
private boolean patchUrls;
|
||||
|
|
|
@ -42,7 +42,12 @@ import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
|
|||
import org.hl7.fhir.r5.model.UriType;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
|
||||
public class R2ToR5Loader implements IContextResourceLoader, VersionConvertorAdvisor50 {
|
||||
public class R2ToR5Loader extends BaseLoader implements IContextResourceLoader, VersionConvertorAdvisor50 {
|
||||
|
||||
|
||||
public R2ToR5Loader(String[] types) {
|
||||
super(types);
|
||||
}
|
||||
|
||||
private List<CodeSystem> cslist = new ArrayList<>();
|
||||
private boolean patchUrls;
|
||||
|
|
|
@ -45,7 +45,11 @@ import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
|
|||
import org.hl7.fhir.r5.model.UriType;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
|
||||
public class R3ToR5Loader implements IContextResourceLoader, VersionConvertorAdvisor50 {
|
||||
public class R3ToR5Loader extends BaseLoader implements IContextResourceLoader, VersionConvertorAdvisor50 {
|
||||
|
||||
public R3ToR5Loader(String[] types) {
|
||||
super(types);
|
||||
}
|
||||
|
||||
private List<CodeSystem> cslist = new ArrayList<>();
|
||||
private boolean patchUrls;
|
||||
|
|
|
@ -45,7 +45,11 @@ import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
|
|||
import org.hl7.fhir.r5.model.UriType;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
|
||||
public class R4ToR5Loader implements IContextResourceLoader, VersionConvertorAdvisor50 {
|
||||
public class R4ToR5Loader extends BaseLoader implements IContextResourceLoader, VersionConvertorAdvisor50 {
|
||||
|
||||
public R4ToR5Loader(String[] types) {
|
||||
super(types);
|
||||
}
|
||||
|
||||
private List<CodeSystem> cslist = new ArrayList<>();
|
||||
private boolean patchUrls;
|
||||
|
|
|
@ -98,6 +98,8 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
|||
|
||||
public interface IContextResourceLoader {
|
||||
Bundle loadBundle(InputStream stream, boolean isJson) throws FHIRException, IOException;
|
||||
|
||||
String[] getTypes();
|
||||
}
|
||||
|
||||
public interface IValidatorFactory {
|
||||
|
@ -292,15 +294,18 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
|||
Resource r = json.parse(stream);
|
||||
if (r instanceof Bundle)
|
||||
f = (Bundle) r;
|
||||
else if (filter == null || filter.isOkToLoad(f))
|
||||
else if (filter == null || filter.isOkToLoad(f)) {
|
||||
cacheResource(r);
|
||||
}
|
||||
}
|
||||
} catch (FHIRFormatError e1) {
|
||||
throw new org.hl7.fhir.exceptions.FHIRFormatError(e1.getMessage(), e1);
|
||||
}
|
||||
if (f != null)
|
||||
for (BundleEntryComponent e : f.getEntry()) {
|
||||
cacheResource(e.getResource());
|
||||
if (filter == null || filter.isOkToLoad(e.getResource())) {
|
||||
cacheResource(e.getResource());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -312,7 +317,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
|||
if (progress) {
|
||||
System.out.println("Load Package "+pi.name()+"#"+pi.version());
|
||||
}
|
||||
for (String s : pi.listResources()) {
|
||||
for (String s : pi.listResources(loader.getTypes())) {
|
||||
loadDefinitionItem(s, pi.load("package", s), loader, filter);
|
||||
}
|
||||
for (String s : pi.list("other")) {
|
||||
|
|
Loading…
Reference in New Issue