fix version converter for code systems

This commit is contained in:
Grahame Grieve 2022-12-05 13:38:17 +11:00
parent cd8c970045
commit 21102fa8d7
6 changed files with 44 additions and 3 deletions

View File

@ -151,4 +151,10 @@ public class R2016MayToR5Loader extends BaseLoaderR5 {
}
}
}
@Override
public List<CodeSystem> getCodeSystems() {
return new ArrayList<>();
}
}

View File

@ -122,9 +122,6 @@ public class R2ToR5Loader extends BaseLoaderR5 implements IContextResourceLoader
r2 = new XmlParser().parse(stream);
org.hl7.fhir.r5.model.Resource r5 = VersionConvertorFactory_10_50.convertResource(r2, advisor);
setPath(r5);
if (!advisor.getCslist().isEmpty()) {
throw new FHIRException("Error: Cannot have included code systems");
}
if (killPrimitives) {
throw new FHIRException("Cannot kill primitives when using deferred loading");
}
@ -152,4 +149,15 @@ public class R2ToR5Loader extends BaseLoaderR5 implements IContextResourceLoader
}
}
}
@Override
public List<CodeSystem> getCodeSystems() {
List<CodeSystem> list = new ArrayList<>();
if (!advisor.getCslist().isEmpty()) {
list.addAll(advisor.getCslist());
advisor.getCslist().clear();
}
return list;
}
}

View File

@ -153,4 +153,10 @@ public class R3ToR5Loader extends BaseLoaderR5 implements IContextResourceLoader
}
}
}
@Override
public List<CodeSystem> getCodeSystems() {
return new ArrayList<>();
}
}

View File

@ -160,4 +160,11 @@ public class R4BToR5Loader extends BaseLoaderR5 implements IContextResourceLoade
}
}
}
@Override
public List<CodeSystem> getCodeSystems() {
return new ArrayList<>();
}
}

View File

@ -160,4 +160,11 @@ public class R4ToR5Loader extends BaseLoaderR5 implements IContextResourceLoader
}
}
}
@Override
public List<CodeSystem> getCodeSystems() {
return new ArrayList<>();
}
}

View File

@ -151,4 +151,11 @@ public class R5ToR5Loader extends BaseLoaderR5 {
}
}
}
@Override
public List<CodeSystem> getCodeSystems() {
return new ArrayList<>();
}
}