mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-07 21:38:15 +00:00
fix bug with type at root of statement
This commit is contained in:
parent
232f1ff8ff
commit
d6ee58d47a
@ -2329,8 +2329,21 @@ public class FHIRPathEngine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (atEntry && Character.isUpperCase(exp.getName().charAt(0))) {// special case for start up
|
if (atEntry && Character.isUpperCase(exp.getName().charAt(0))) {// special case for start up
|
||||||
if (item.isResource() && item.fhirType().equals(exp.getName()))
|
StructureDefinition sd = worker.fetchTypeDefinition(item.fhirType());
|
||||||
result.add(item);
|
if (sd == null) {
|
||||||
|
// logical model
|
||||||
|
if (exp.getName().equals(item.fhirType())) {
|
||||||
|
result.add(item);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
while (sd != null) {
|
||||||
|
if (sd.getType().equals(exp.getName())) {
|
||||||
|
result.add(item);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sd = worker.fetchResource(StructureDefinition.class, sd.getBaseDefinition());
|
||||||
|
}
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
getChildrenByName(item, exp.getName(), result);
|
getChildrenByName(item, exp.getName(), result);
|
||||||
if (atEntry && context.appInfo != null && hostServices != null && result.isEmpty()) {
|
if (atEntry && context.appInfo != null && hostServices != null && result.isEmpty()) {
|
||||||
@ -2344,6 +2357,11 @@ public class FHIRPathEngine {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getParent(String rn) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private TypeDetails executeContextType(ExecutionTypeContext context, String name) throws PathEngineException, DefinitionException {
|
private TypeDetails executeContextType(ExecutionTypeContext context, String name) throws PathEngineException, DefinitionException {
|
||||||
if (hostServices == null)
|
if (hostServices == null)
|
||||||
throw new PathEngineException("Unable to resolve context reference since no host services are provided");
|
throw new PathEngineException("Unable to resolve context reference since no host services are provided");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user