public NamingSystemUniqueIdComponent addUniqueId() { //3 NamingSystemUniqueIdComponent t = new NamingSystemUniqueIdComponent(); if (this.uniqueId == null) this.uniqueId = new ArrayList<NamingSystemUniqueIdComponent>(); this.uniqueId.add(t); return t; }
static Function<NamingSystem, String> getValueOfType(NamingSystem.NamingSystemIdentifierType type) { return namingSystem -> namingSystem.getUniqueId().stream() .filter(uniqueId -> type == uniqueId.getType()) .findFirst() .map(NamingSystem.NamingSystemUniqueIdComponent::getValue) .orElse(null); } }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 3575610: // type value = new NamingSystemIdentifierTypeEnumFactory().fromType(castToCode(value)); this.type = (Enumeration) value; // Enumeration<NamingSystemIdentifierType> return value; case 111972721: // value this.value = castToString(value); // StringType return value; case -1294005119: // preferred this.preferred = castToBoolean(value); // BooleanType return value; case 950398559: // comment this.comment = castToString(value); // StringType return value; case -991726143: // period this.period = castToPeriod(value); // Period return value; default: return super.setProperty(hash, name, value); } }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) { value = new NamingSystemIdentifierTypeEnumFactory().fromType(castToCode(value)); this.type = (Enumeration) value; // Enumeration<NamingSystemIdentifierType> } else if (name.equals("value")) { this.value = castToString(value); // StringType } else if (name.equals("preferred")) { this.preferred = castToBoolean(value); // BooleanType } else if (name.equals("comment")) { this.comment = castToString(value); // StringType } else if (name.equals("period")) { this.period = castToPeriod(value); // Period } else return super.setProperty(name, value); return value; }
public org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent(); copyElement(src, tgt); tgt.setType(convertNamingSystemIdentifierType(src.getType())); tgt.setValue(src.getValue()); tgt.setPreferred(src.getPreferred()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 3575610: return getTypeElement(); case 111972721: return getValueElement(); case -1294005119: return getPreferredElement(); case 950398559: return getCommentElement(); case -991726143: return getPeriod(); default: return super.makeProperty(hash, name); } }
public org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent(); copyElement(src, tgt); tgt.setType(convertNamingSystemIdentifierType(src.getType())); tgt.setValue(src.getValue()); tgt.setPreferred(src.getPreferred()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public static org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent(); copyElement(src, tgt); tgt.setType(convertNamingSystemIdentifierType(src.getType())); tgt.setValue(src.getValue()); if (src.hasPreferred()) tgt.setPreferred(src.getPreferred()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public static org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent(); copyElement(src, tgt); tgt.setType(convertNamingSystemIdentifierType(src.getType())); tgt.setValue(src.getValue()); if (src.hasPreferred()) tgt.setPreferred(src.getPreferred()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public NamingSystemUniqueIdComponent copy() { NamingSystemUniqueIdComponent dst = new NamingSystemUniqueIdComponent(); copyValues(dst); dst.type = type == null ? null : type.copy(); dst.value = value == null ? null : value.copy(); dst.preferred = preferred == null ? null : preferred.copy(); dst.comment = comment == null ? null : comment.copy(); dst.period = period == null ? null : period.copy(); return dst; }
public boolean hasUniqueId() { if (this.uniqueId == null) return false; for (NamingSystemUniqueIdComponent item : this.uniqueId) if (!item.isEmpty()) return true; return false; }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof NamingSystemUniqueIdComponent)) return false; NamingSystemUniqueIdComponent o = (NamingSystemUniqueIdComponent) other_; return compareDeep(type, o.type, true) && compareDeep(value, o.value, true) && compareDeep(preferred, o.preferred, true) && compareDeep(comment, o.comment, true) && compareDeep(period, o.period, true); }
public static org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent(); copyElement(src, tgt); tgt.setType(convertNamingSystemIdentifierType(src.getType())); tgt.setValue(src.getValue()); if (src.hasPreferred()) tgt.setPreferred(src.getPreferred()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent(); copyElement(src, tgt); tgt.setType(convertNamingSystemIdentifierType(src.getType())); tgt.setValue(src.getValue()); tgt.setPreferred(src.getPreferred()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.instance.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent(); copyElement(src, tgt); tgt.setType(convertNamingSystemIdentifierType(src.getType())); tgt.setValue(src.getValue()); tgt.setPreferred(src.getPreferred()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public static org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent(); copyElement(src, tgt); tgt.setType(convertNamingSystemIdentifierType(src.getType())); tgt.setValue(src.getValue()); if (src.hasPreferred()) tgt.setPreferred(src.getPreferred()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }