Fix using wrong resource type when validating constraints in data type definitions (R6)

This commit is contained in:
Grahame Grieve 2023-12-13 09:07:48 -05:00
parent 78669add28
commit ff81c16aeb
1 changed files with 1 additions and 1 deletions

View File

@ -574,7 +574,7 @@ public class StructureDefinitionValidator extends BaseValidator {
fpe.checkOnTypes(vc, rootPath, types, fpe.parse(exp), warnings);
} else {
StructureDefinition sd = context.fetchTypeDefinition(rootPath);
if (sd != null) {
if (sd != null && sd.getKind() == StructureDefinitionKind.RESOURCE) {
fpe.checkOnTypes(vc, rootPath, types, fpe.parse(exp), warnings);
} else {
fpe.checkOnTypes(vc, "DomainResource", types, fpe.parse(exp), warnings);