Fix bug where expansions have empty onbjects

This commit is contained in:
Grahame Grieve 2022-04-07 00:20:11 +10:00
parent 404b4d4f79
commit cdef76bc6d
2 changed files with 11 additions and 2 deletions

View File

@ -320,8 +320,9 @@ public abstract class XmlParserBase extends ParserBase implements IParser {
protected void unknownContent(XmlPullParser xpp) throws FHIRFormatError, XmlPullParserException, IOException {
if (!isAllowUnknownContent())
if (!isAllowUnknownContent()) {
throw new FHIRFormatError("Unknown Content "+xpp.getName()+" @ "+pathForLocation(xpp));
}
// otherwise, read over whatever element this is
int count = 1;
do {

View File

@ -225,7 +225,15 @@ public class ValueSetExpanderSimple extends ValueSetWorker implements ValueSetEx
if (expParams.getParameterBool("includeDesignations") && designations != null) {
for (ConceptDefinitionDesignationComponent t : designations) {
ToolingExtensions.addLanguageTranslation(n, t.getLanguage(), t.getValue());
if (t.getLanguage() != null || t.getValue() != null) {
ConceptReferenceDesignationComponent d = n.addDesignation();
if (t.getLanguage() != null) {
d.setLanguage(t.getLanguage().trim());
}
if (t.getValue() != null) {
d.setValue(t.getValue().trim());
}
}
}
}
ConceptDefinitionDesignationComponent t = expParams.hasLanguage() ? getMatchingLang(designations, expParams.getLanguage()) : null;