public CareTeam copy() { CareTeam dst = new CareTeam(); copyValues(dst); if (identifier != null) { dst.identifier = new ArrayList<Identifier>(); for (Identifier i : identifier) dst.identifier.add(i.copy()); } ; dst.status = status == null ? null : status.copy(); if (type != null) { dst.type = new ArrayList<CodeableConcept>(); for (CodeableConcept i : type) dst.type.add(i.copy()); } ; dst.name = name == null ? null : name.copy(); dst.subject = subject == null ? null : subject.copy(); dst.period = period == null ? null : period.copy(); if (participant != null) { dst.participant = new ArrayList<CareTeamParticipantComponent>(); for (CareTeamParticipantComponent i : participant) dst.participant.add(i.copy()); } ; dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); return dst; }
public Substance copy() { Substance dst = new Substance(); copyValues(dst); if (identifier != null) { dst.identifier = new ArrayList<Identifier>(); for (Identifier i : identifier) dst.identifier.add(i.copy()); } ; if (category != null) { dst.category = new ArrayList<CodeableConcept>(); for (CodeableConcept i : category) dst.category.add(i.copy()); } ; dst.code = code == null ? null : code.copy(); dst.description = description == null ? null : description.copy(); if (instance != null) { dst.instance = new ArrayList<SubstanceInstanceComponent>(); for (SubstanceInstanceComponent i : instance) dst.instance.add(i.copy()); } ; if (ingredient != null) { dst.ingredient = new ArrayList<SubstanceIngredientComponent>(); for (SubstanceIngredientComponent i : ingredient) dst.ingredient.add(i.copy()); } ; return dst; }
public static CodeableConcept newCodeableConcept(String code, String system, String display) { CodeableConcept cc = new CodeableConcept(); Coding c = new Coding(); c.setCode(code); c.setSystem(system); c.setDisplay(display); cc.getCoding().add(c); return cc; }
public CodeableConcept castToCodeableConcept(Base b) throws FHIRException { if (b instanceof CodeableConcept) return (CodeableConcept) b; else if (b instanceof CodeType) { CodeableConcept cc = new CodeableConcept(); cc.addCoding().setCode(((CodeType) b).asStringValue()); return cc; } else throw new FHIRException( "Unable to convert a " + b.getClass().getName() + " to a CodeableConcept"); }
public boolean isEmpty() { return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty()) && (subject == null || subject.isEmpty()) && (author == null || author.isEmpty()) && (created == null || created.isEmpty()); }
public CareTeamParticipantComponent copy() { CareTeamParticipantComponent dst = new CareTeamParticipantComponent(); copyValues(dst); dst.role = role == null ? null : role.copy(); dst.member = member == null ? null : member.copy(); dst.period = period == null ? null : period.copy(); return dst; }
public boolean isEmpty() { return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty()) && (code == null || code.isEmpty()) && (description == null || description.isEmpty()) && (instance == null || instance.isEmpty()) && (ingredient == null || ingredient.isEmpty()); }
public boolean isEmpty() { return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) && (type == null || type.isEmpty()) && (name == null || name.isEmpty()) && (subject == null || subject.isEmpty()) && (period == null || period.isEmpty()) && (participant == null || participant.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty()); }
public Basic copy() { Basic dst = new Basic(); copyValues(dst); if (identifier != null) { dst.identifier = new ArrayList<Identifier>(); for (Identifier i : identifier) dst.identifier.add(i.copy()); } ; dst.code = code == null ? null : code.copy(); dst.subject = subject == null ? null : subject.copy(); dst.author = author == null ? null : author.copy(); dst.created = created == null ? null : created.copy(); return dst; }
public boolean hasCategory() { if (this.category == null) return false; for (CodeableConcept item : this.category) if (!item.isEmpty()) return true; return false; }
public boolean hasType() { if (this.type == null) return false; for (CodeableConcept item : this.type) if (!item.isEmpty()) return true; return false; }
public boolean isEmpty() { return super.isEmpty() && (role == null || role.isEmpty()) && (member == null || member.isEmpty()) && (period == null || period.isEmpty()); }