示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
 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;
 }
示例#4
0
 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");
 }
示例#5
0
 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());
 }
示例#6
0
 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;
 }
示例#7
0
 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());
 }
示例#8
0
 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());
 }
示例#9
0
 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;
 }
示例#10
0
 public boolean hasCategory() {
   if (this.category == null) return false;
   for (CodeableConcept item : this.category) if (!item.isEmpty()) return true;
   return false;
 }
示例#11
0
 public boolean hasType() {
   if (this.type == null) return false;
   for (CodeableConcept item : this.type) if (!item.isEmpty()) return true;
   return false;
 }
示例#12
0
 public boolean isEmpty() {
   return super.isEmpty()
       && (role == null || role.isEmpty())
       && (member == null || member.isEmpty())
       && (period == null || period.isEmpty());
 }