Fix NPE rendering code systems with some kinds of properties
This commit is contained in:
parent
435e0261e0
commit
7d512d6ed0
|
@ -256,7 +256,7 @@ public abstract class TerminologyRenderer extends ResourceRenderer {
|
||||||
if (cs == null) {
|
if (cs == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ConceptDefinitionComponent cc = CodeSystemUtilities.getCode(cs, code);
|
ConceptDefinitionComponent cc = code == null ? null : CodeSystemUtilities.getCode(cs, code);
|
||||||
return cc == null ? null : cc.getDisplay();
|
return cc == null ? null : cc.getDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -430,6 +430,9 @@ public class CodeSystemUtilities {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ConceptDefinitionComponent getCode(CodeSystem cs, String code) {
|
public static ConceptDefinitionComponent getCode(CodeSystem cs, String code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
for (ConceptDefinitionComponent cc : cs.getConcept()) {
|
for (ConceptDefinitionComponent cc : cs.getConcept()) {
|
||||||
ConceptDefinitionComponent cd = getCode(cc, code);
|
ConceptDefinitionComponent cd = getCode(cc, code);
|
||||||
if (cd != null) {
|
if (cd != null) {
|
||||||
|
|
Loading…
Reference in New Issue