private static boolean matchesName(String n, List<StructureMapGroupRuleSourceComponent> source) { if (source.size() != 1) return false; if (!source.get(0).hasElement()) return false; String s = source.get(0).getElement(); if (n.equals(s) || n.equals("\""+s+"\"")) return true; if (source.get(0).hasType()) { s = source.get(0).getElement()+"-"+source.get(0).getType(); if (n.equals(s) || n.equals("\""+s+"\"")) return true; } return false; }
if (rs.getContext().equals("@search")) { b.append('('); b.append(rs.getElement()); b.append(')'); } else if (rs.hasElement()) { b.append('.'); b.append(rs.getElement());
ExpressionNode expr = (ExpressionNode) src.getUserData(MAP_SEARCH_EXPRESSION); if (expr == null) { expr = fpe.parse(src.getElement()); src.setUserData(MAP_SEARCH_EXPRESSION, expr); items.add(b); else { getChildrenByName(b, src.getElement(), items); if (items.size() == 0 && src.hasDefaultValue()) items.add(src.getDefaultValue());
ExpressionNode expr = (ExpressionNode) src.getUserData(MAP_SEARCH_EXPRESSION); if (expr == null) { expr = fpe.parse(src.getElement()); src.setUserData(MAP_SEARCH_EXPRESSION, expr); items.add(b); else { getChildrenByName(b, src.getElement(), items); if (items.size() == 0 && src.hasDefaultValue()) items.add(src.getDefaultValue());
throw lexer.error("Complex rules must have an explicit name"); if (rule.getSourceFirstRep().hasType()) rule.setName(rule.getSourceFirstRep().getElement()+"-"+rule.getSourceFirstRep().getType()); else rule.setName(rule.getSourceFirstRep().getElement());
if (rs.getContext().equals("@search")) { b.append('('); b.append(rs.getElement()); b.append(')'); } else if (rs.hasElement()) { b.append('.'); b.append(rs.getElement());
Property element = prop.getBaseProperty().getChild(prop.types.getType(), src.getElement()); if (element == null) throw new Exception("Rule \""+ruleId+"\": Unknown element name "+src.getElement()); if (element.getDefinition().getMin() == 0) optional = true; type.addType(pt); td.addText(prop.getPath()+"."+src.getElement()); if (src.hasVariable()) result.add(VariableMode.INPUT, src.getVariable(), new PropertyWithType(prop.getPath()+"."+src.getElement(), element, null, type)); return result; } else {
public static org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent convertStructureMapGroupRuleSourceComponent(org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleSourceComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent(); copyElement(src, tgt); tgt.setContextType(StructureMapContextType.TYPE); tgt.setContext(src.getContext()); if (src.hasElement()) tgt.setElement(src.getElement()); if (src.hasListMode()) tgt.setListMode(convertStructureMapSourceListMode(src.getListMode())); if (src.hasVariable()) tgt.setVariable(src.getVariable()); if (src.hasCondition()) tgt.setCondition(src.getCondition()); if (src.hasCheck()) tgt.setCheck(src.getCheck()); return tgt; }
private static boolean matchesName(String n, List<StructureMapGroupRuleSourceComponent> source) { if (source.size() != 1) return false; if (!source.get(0).hasElement()) return false; String s = source.get(0).getElement(); if (n.equals(s) || n.equals("\""+s+"\"")) return true; if (source.get(0).hasType()) { s = source.get(0).getElement()+"-"+source.get(0).getType(); if (n.equals(s) || n.equals("\""+s+"\"")) return true; } return false; }
throw lexer.error("Complex rules must have an explicit name"); if (rule.getSourceFirstRep().hasType()) rule.setName(rule.getSourceFirstRep().getElement()+"-"+rule.getSourceFirstRep().getType()); else rule.setName(rule.getSourceFirstRep().getElement());
Property element = prop.getBaseProperty().getChild(prop.types.getType(), src.getElement()); if (element == null) throw new Exception("Rule \""+ruleId+"\": Unknown element name "+src.getElement()); if (element.getDefinition().getMin() == 0) optional = true; type.addType(pt); td.addText(prop.getPath()+"."+src.getElement()); if (src.hasVariable()) result.add(VariableMode.INPUT, src.getVariable(), new PropertyWithType(prop.getPath()+"."+src.getElement(), element, null, type)); return result; } else {
public static org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent convertStructureMapGroupRuleSourceComponent(org.hl7.fhir.r4.model.StructureMap.StructureMapGroupRuleSourceComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent tgt = new org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapGroupRuleSourceComponent(); copyElement(src, tgt); tgt.setContextType(StructureMapContextType.TYPE); tgt.setContext(src.getContext()); if (src.hasElement()) tgt.setElement(src.getElement()); if (src.hasListMode()) tgt.setListMode(convertStructureMapSourceListMode(src.getListMode())); if (src.hasVariable()) tgt.setVariable(src.getVariable()); if (src.hasCondition()) tgt.setCondition(src.getCondition()); if (src.hasCheck()) tgt.setCheck(src.getCheck()); return tgt; }