Fix problem with 'is' not working in FHIRPath for CDA types

This commit is contained in:
Grahame Grieve 2024-04-12 22:10:49 +10:00
parent e89f44725f
commit 3d62e098c2
1 changed files with 7 additions and 1 deletions

View File

@ -286,9 +286,15 @@ public abstract class Base implements Serializable, IBase, IElement {
public boolean hasType(String... name) {
String t = fhirType();
for (String n : name)
for (String n : name) {
if (n.equalsIgnoreCase(t))
return true;
if (n.contains(".")) {
String[] p = n.split("\\.");
if (p.length == 2 && Utilities.existsInList(p[0], "FHIR", "CDA") && p[1].equalsIgnoreCase(t))
return true;
}
}
return false;
}