mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-09 06:14:45 +00:00
fix bug listing types when old versions are loaded
This commit is contained in:
parent
07a3962ac2
commit
753a90b463
@ -112,6 +112,7 @@ public abstract class BaseLoaderR5 implements IContextResourceLoader {
|
|||||||
// and we only patch URLs to support version transforms
|
// and we only patch URLs to support version transforms
|
||||||
// so we just patch sd/od -> vs -> cs
|
// so we just patch sd/od -> vs -> cs
|
||||||
protected void doPatchUrls(Resource resource) {
|
protected void doPatchUrls(Resource resource) {
|
||||||
|
resource.setUserData("old.load.mode", true);
|
||||||
if (resource instanceof CanonicalResource) {
|
if (resource instanceof CanonicalResource) {
|
||||||
CanonicalResource cr = (CanonicalResource) resource;
|
CanonicalResource cr = (CanonicalResource) resource;
|
||||||
cr.setUrl(patchUrl(cr.getUrl(), cr.fhirType()));
|
cr.setUrl(patchUrl(cr.getUrl(), cr.fhirType()));
|
||||||
|
@ -570,7 +570,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
|||||||
public List<String> getResourceNames() {
|
public List<String> getResourceNames() {
|
||||||
Set<String> result = new HashSet<String>();
|
Set<String> result = new HashSet<String>();
|
||||||
for (StructureDefinition sd : listStructures()) {
|
for (StructureDefinition sd : listStructures()) {
|
||||||
if (sd.getKind() == StructureDefinitionKind.RESOURCE && sd.getDerivation() == TypeDerivationRule.SPECIALIZATION)
|
if (sd.getKind() == StructureDefinitionKind.RESOURCE && sd.getDerivation() == TypeDerivationRule.SPECIALIZATION && !sd.hasUserData("old.load.mode"))
|
||||||
result.add(sd.getName());
|
result.add(sd.getName());
|
||||||
}
|
}
|
||||||
return Utilities.sorted(result);
|
return Utilities.sorted(result);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user