mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-08 05:48:12 +00:00
handle R3 encoding of primitive values when validating profiles
This commit is contained in:
parent
7ad4bd62c6
commit
bda3a74b40
@ -164,11 +164,11 @@ public class StructureDefinitionValidator extends BaseValidator {
|
|||||||
tc = type.getExtensionValue(ToolingExtensions.EXT_FHIR_TYPE).primitiveValue();
|
tc = type.getExtensionValue(ToolingExtensions.EXT_FHIR_TYPE).primitiveValue();
|
||||||
}
|
}
|
||||||
if (Utilities.noString(tc) && type.hasChild("code")) {
|
if (Utilities.noString(tc) && type.hasChild("code")) {
|
||||||
|
if (VersionUtilities.isR4Plus(context.getVersion())) {
|
||||||
throw new Error("Snapshot for " + sd.getId() +" element " + path + " has type.code without a value ");
|
throw new Error("Snapshot for " + sd.getId() +" element " + path + " has type.code without a value ");
|
||||||
// if (type.getNamedChild("code").hasExtension(" http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type")) {
|
|
||||||
// tc = "*";
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!Utilities.noString(tc)) {
|
||||||
typeCodes.add(tc);
|
typeCodes.add(tc);
|
||||||
Set<String> tcharacteristics = new HashSet<>();
|
Set<String> tcharacteristics = new HashSet<>();
|
||||||
StructureDefinition tsd = context.fetchTypeDefinition(tc);
|
StructureDefinition tsd = context.fetchTypeDefinition(tc);
|
||||||
@ -189,6 +189,7 @@ public class StructureDefinitionValidator extends BaseValidator {
|
|||||||
ok = validateElementType(errors, type, stack.push(type, -1, null, null), sd, path) && ok;
|
ok = validateElementType(errors, type, stack.push(type, -1, null, null), sd, path) && ok;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (typeMustSupport) {
|
if (typeMustSupport) {
|
||||||
if (snapshot) {
|
if (snapshot) {
|
||||||
ok = rule(errors, NO_RULE_DATE, IssueType.EXCEPTION, stack.getLiteralPath(), "true".equals(element.getChildValue("mustSupport")), I18nConstants.SD_NESTED_MUST_SUPPORT_SNAPSHOT, path) && ok;
|
ok = rule(errors, NO_RULE_DATE, IssueType.EXCEPTION, stack.getLiteralPath(), "true".equals(element.getChildValue("mustSupport")), I18nConstants.SD_NESTED_MUST_SUPPORT_SNAPSHOT, path) && ok;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user