mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-01 17:09:08 +00:00
extension related validation fixes
This commit is contained in:
parent
107fa0e3a2
commit
2cc8ff5e23
@ -326,6 +326,8 @@ public class CanonicalResourceManager<T extends CanonicalResource> {
|
|||||||
|
|
||||||
public void drop(CachedCanonicalResource<T> cr) {
|
public void drop(CachedCanonicalResource<T> cr) {
|
||||||
while (map.values().remove(cr));
|
while (map.values().remove(cr));
|
||||||
|
while (listForId.values().remove(cr));
|
||||||
|
while (listForUrl.values().remove(cr));
|
||||||
list.remove(cr);
|
list.remove(cr);
|
||||||
List<CachedCanonicalResource<T>> set = listForUrl.get(cr.getUrl());
|
List<CachedCanonicalResource<T>> set = listForUrl.get(cr.getUrl());
|
||||||
if (set != null) { // it really should be
|
if (set != null) { // it really should be
|
||||||
|
@ -561,7 +561,7 @@ public class StructureDefinitionValidator extends BaseValidator {
|
|||||||
} else if (!VersionUtilities.isR5Ver(context.getVersion())) {
|
} else if (!VersionUtilities.isR5Ver(context.getVersion())) {
|
||||||
ok = rule(errors, NO_RULE_DATE, IssueType.EXCEPTION, stack.getLiteralPath(), VersionUtilities.getCanonicalResourceNames(context.getVersion()).contains(t.getType()) || "Resource".equals(t.getType()), I18nConstants.SD_ED_TYPE_PROFILE_WRONG_TARGET, p, t, code, path, "Canonical Resource") && ok;
|
ok = rule(errors, NO_RULE_DATE, IssueType.EXCEPTION, stack.getLiteralPath(), VersionUtilities.getCanonicalResourceNames(context.getVersion()).contains(t.getType()) || "Resource".equals(t.getType()), I18nConstants.SD_ED_TYPE_PROFILE_WRONG_TARGET, p, t, code, path, "Canonical Resource") && ok;
|
||||||
} else {
|
} else {
|
||||||
ok = rule(errors, NO_RULE_DATE, IssueType.EXCEPTION, stack.getLiteralPath(), VersionUtilities.getCanonicalResourceNames(context.getVersion()).contains(t.getType()), I18nConstants.SD_ED_TYPE_PROFILE_WRONG_TARGET, p, t, code, path, "Canonical Resource") && ok;
|
ok = rule(errors, NO_RULE_DATE, IssueType.EXCEPTION, stack.getLiteralPath(), "CanonicalResource".equals(t.getType()) || VersionUtilities.getCanonicalResourceNames(context.getVersion()).contains(t.getType()), I18nConstants.SD_ED_TYPE_PROFILE_WRONG_TARGET, p, t, code, path, "Canonical Resource") && ok;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -47,9 +47,9 @@ public class FHIRPathExpressionFixer {
|
|||||||
if (expr.equals("url.matches('([^|#])*')")) {
|
if (expr.equals("url.matches('([^|#])*')")) {
|
||||||
return ("$this.matches('([^|#])*')");
|
return ("$this.matches('([^|#])*')");
|
||||||
}
|
}
|
||||||
|
if (expr.equals("((kind in 'resource' | 'complex-type') and (specialization = 'derivation')) implies differential.element.where((min != 0 and min != 1) or (max != '1' and max != '*')).empty()")) {
|
||||||
|
return "((kind in 'resource' | 'complex-type') and (derivation = 'specialization')) implies differential.element.where((min.exists() and min != 0 and min != 1) or (max.exists() and max != '1' and max != '*')).empty()";
|
||||||
|
}
|
||||||
|
|
||||||
// clarification in FHIRPath spec
|
// clarification in FHIRPath spec
|
||||||
if ("eld-19".equals(key)) {
|
if ("eld-19".equals(key)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user