private void checkAddress(List<ValidationMessage> errors, String path, Element focus, Address fixed) { checkFixedValue(errors, path + ".use", focus.getNamedChild("use"), fixed.getUseElement(), "use", focus); checkFixedValue(errors, path + ".text", focus.getNamedChild("text"), fixed.getTextElement(), "text", focus); checkFixedValue(errors, path + ".city", focus.getNamedChild("city"), fixed.getCityElement(), "city", focus); checkFixedValue(errors, path + ".state", focus.getNamedChild("state"), fixed.getStateElement(), "state", focus); checkFixedValue(errors, path + ".country", focus.getNamedChild("country"), fixed.getCountryElement(), "country", focus); checkFixedValue(errors, path + ".zip", focus.getNamedChild("zip"), fixed.getPostalCodeElement(), "postalCode", focus); List<Element> lines = new ArrayList<Element>(); focus.getNamedChildren("line", lines); if (rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, lines.size() == fixed.getLine().size(), "Expected " + Integer.toString(fixed.getLine().size()) + " but found " + Integer.toString(lines.size()) + " line elements")) { for (int i = 0; i < lines.size(); i++) checkFixedValue(errors, path + ".coding", lines.get(i), fixed.getLine().get(i), "coding", focus); } }
allNames.add(nextAddress.getStateElement()); allNames.add(nextAddress.getCountryElement()); allNames.add(nextAddress.getPostalCodeElement()); for (StringType nextName : allNames) { addSearchTerm(theEntity, retVal, nextSpName, nextName.getValue());
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 116103: return getUseElement(); case 3575610: return getTypeElement(); case 3556653: return getTextElement(); case 3321844: return addLineElement(); case 3053931: return getCityElement(); case 288961422: return getDistrictElement(); case 109757585: return getStateElement(); case 2011152728: return getPostalCodeElement(); case 957831062: return getCountryElement(); case -991726143: return getPeriod(); default: return super.makeProperty(hash, name); } }
private void checkAddress(List<ValidationMessage> errors, String path, Element focus, Address fixed) { checkFixedValue(errors, path + ".use", focus.getNamedChild("use"), fixed.getUseElement(), "use", focus); checkFixedValue(errors, path + ".text", focus.getNamedChild("text"), fixed.getTextElement(), "text", focus); checkFixedValue(errors, path + ".city", focus.getNamedChild("city"), fixed.getCityElement(), "city", focus); checkFixedValue(errors, path + ".state", focus.getNamedChild("state"), fixed.getStateElement(), "state", focus); checkFixedValue(errors, path + ".country", focus.getNamedChild("country"), fixed.getCountryElement(), "country", focus); checkFixedValue(errors, path + ".zip", focus.getNamedChild("zip"), fixed.getPostalCodeElement(), "postalCode", focus); List<Element> lines = new ArrayList<Element>(); focus.getNamedChildren("line", lines); if (rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, lines.size() == fixed.getLine().size(), "Expected " + Integer.toString(fixed.getLine().size()) + " but found " + Integer.toString(lines.size()) + " line elements")) { for (int i = 0; i < lines.size(); i++) checkFixedValue(errors, path + ".coding", lines.get(i), fixed.getLine().get(i), "coding", focus); } }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 116103: return getUseElement(); case 3575610: return getTypeElement(); case 3556653: return getTextElement(); case 3321844: return addLineElement(); case 3053931: return getCityElement(); case 288961422: return getDistrictElement(); case 109757585: return getStateElement(); case 2011152728: return getPostalCodeElement(); case 957831062: return getCountryElement(); case -991726143: return getPeriod(); default: return super.makeProperty(hash, name); } }