Beispiel #1
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;
 }
Beispiel #2
0
 public SubstanceInstanceComponent copy() {
   SubstanceInstanceComponent dst = new SubstanceInstanceComponent();
   copyValues(dst);
   dst.identifier = identifier == null ? null : identifier.copy();
   dst.expiry = expiry == null ? null : expiry.copy();
   dst.quantity = quantity == null ? null : quantity.copy();
   return dst;
 }
Beispiel #3
0
 public boolean hasInstance() {
   if (this.instance == null) return false;
   for (SubstanceInstanceComponent item : this.instance) if (!item.isEmpty()) return true;
   return false;
 }