Fix for NPEs
This commit is contained in:
parent
30290b9567
commit
7339d0ae1d
|
@ -113,6 +113,9 @@ public class Manager {
|
|||
}
|
||||
|
||||
public static ParserBase makeParser(IWorkerContext context, FhirFormat format) {
|
||||
if (format == null) {
|
||||
throw new Error("Programming logic error: no format known");
|
||||
}
|
||||
switch (format) {
|
||||
case JSON : return new JsonParser(context);
|
||||
case XML : return new XmlParser(context);
|
||||
|
|
|
@ -1413,12 +1413,17 @@ public class ElementDefinition extends BackboneType implements ICompositeType {
|
|||
, ordered, rules);
|
||||
}
|
||||
|
||||
public String fhirType() {
|
||||
return "ElementDefinition.slicing";
|
||||
public String fhirType() {
|
||||
return "ElementDefinition.slicing";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return (ordered == null ? "??" : "true".equals(ordered.asStringValue()) ? "ordered" : "unordered")+"/"+
|
||||
(rules == null ? "??" : rules.asStringValue())+" "+discriminator.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@Block()
|
||||
public static class ElementDefinitionSlicingDiscriminatorComponent extends Element implements IBaseDatatypeElement {
|
||||
|
@ -1671,6 +1676,11 @@ public class ElementDefinition extends BackboneType implements ICompositeType {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (type == null ? "??" : type.getCode()) + "="+(path == null ? "??" : path.asStringValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Block()
|
||||
|
|
|
@ -167,7 +167,7 @@ public class ElementWrappers {
|
|||
Property family = b.getChildByName("family");
|
||||
Property given = wrapped.getChildByName("given");
|
||||
String s = given != null && given.hasValues() ? given.getValues().get(0).primitiveValue() : "";
|
||||
if (family != null && family.hasValues())
|
||||
if (family != null && family.hasValues() && family.getValues().get(0).primitiveValue() != null)
|
||||
s = s + " " + family.getValues().get(0).primitiveValue().toUpperCase();
|
||||
return s;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue