mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-06 03:19:15 +00:00
fix FHIRPath .is(type) to handle abstract types
This commit is contained in:
parent
21848fc9af
commit
ae8bc3502f
@ -4503,7 +4503,18 @@ public class FHIRPathEngine {
|
||||
return makeBoolean(false);
|
||||
}
|
||||
} else if (ns.equals("FHIR")) {
|
||||
return makeBoolean(n.equals(focus.get(0).fhirType()));
|
||||
if (n.equals(focus.get(0).fhirType())) {
|
||||
return makeBoolean(true);
|
||||
} else {
|
||||
StructureDefinition sd = worker.fetchTypeDefinition(focus.get(0).fhirType());
|
||||
while (sd != null) {
|
||||
if (n.equals(sd.getType())) {
|
||||
return makeBoolean(true);
|
||||
}
|
||||
sd = worker.fetchResource(StructureDefinition.class, sd.getBaseDefinition());
|
||||
}
|
||||
return makeBoolean(false);
|
||||
}
|
||||
} else {
|
||||
return makeBoolean(false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user