Skip to content

Commit

Permalink
[schema] StructureDefinitionNormalizer - remove snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
clickout committed Jul 14, 2023
1 parent 7722964 commit db27070
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static Map<String, Object> normalize(Map<String, Object> structureDefinit
))
);
}

newMap.remove("snapshot");
return newMap;
}

Expand All @@ -85,8 +85,7 @@ private static ArrayList<ElementDefinition> getFixedElements(
if (imported.getDifferential() == null) {
return null;
}
return imported.getDifferential().getElement().stream()
.map(element -> {
return imported.getDifferential().getElement().stream().map(element -> {
ArrayList<ElementDefinitionType> fixedTypes = new ArrayList<>();
if (element.getType() != null) {
fixedTypes = element.getType().stream()
Expand Down Expand Up @@ -149,10 +148,14 @@ private static ArrayList<Map<String, Object>> getFixedElements(
""
)
);
fixedType.put("codeRef", fixedCode);
fixedType.put("codeRef", new UniqueIdentifier(fixedCode));
} else {
fixedType.put("codeRef", new UniqueIdentifier(code));
}
var targetProfile = (List<String>) type.get("targetProfile");
fixedType.put("targetProfileRef", fixTargetProfile(targetProfile));
if (targetProfile != null) {
fixedType.put("targetProfileRef", fixTargetProfile(targetProfile));
}
return fixedType;
}).collect(Collectors.toCollection(ArrayList::new));
}
Expand Down

0 comments on commit db27070

Please sign in to comment.