@Override
 public int hashCode() {
   final int prime = 31;
   int result = super.hashCode();
   result = prime * result + ((approachBodySite == null) ? 0 : approachBodySite.hashCode());
   result = prime * result + ((deliveryMethod == null) ? 0 : deliveryMethod.hashCode());
   result = prime * result + ((deliveryRate == null) ? 0 : deliveryRate.hashCode());
   result = prime * result + ((deliveryRoute == null) ? 0 : deliveryRoute.hashCode());
   result = prime * result + ((doseQuantity == null) ? 0 : doseQuantity.hashCode());
   result = prime * result + ((dosingPeriod == null) ? 0 : dosingPeriod.hashCode());
   result =
       prime * result
           + ((dosingPeriodIntervalIsImportant == null)
               ? 0
               : dosingPeriodIntervalIsImportant.hashCode());
   result = prime * result + ((substance == null) ? 0 : substance.hashCode());
   result =
       prime * result
           + ((substanceAdministrationGeneralPurpose == null)
               ? 0
               : substanceAdministrationGeneralPurpose.hashCode());
   result = prime * result + ((targetBodySite == null) ? 0 : targetBodySite.hashCode());
   result = prime * result + ((doseType == null) ? 0 : doseType.hashCode());
   return result;
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!super.equals(obj)) return false;
   if (getClass() != obj.getClass()) return false;
   SubstanceAdministrationBase other = (SubstanceAdministrationBase) obj;
   if (approachBodySite == null) {
     if (other.approachBodySite != null) return false;
   } else if (!approachBodySite.equals(other.approachBodySite)) return false;
   if (deliveryMethod == null) {
     if (other.deliveryMethod != null) return false;
   } else if (!deliveryMethod.equals(other.deliveryMethod)) return false;
   if (deliveryRate == null) {
     if (other.deliveryRate != null) return false;
   } else if (!deliveryRate.equals(other.deliveryRate)) return false;
   if (deliveryRoute == null) {
     if (other.deliveryRoute != null) return false;
   } else if (!deliveryRoute.equals(other.deliveryRoute)) return false;
   if (doseQuantity == null) {
     if (other.doseQuantity != null) return false;
   } else if (!doseQuantity.equals(other.doseQuantity)) return false;
   if (dosingPeriod == null) {
     if (other.dosingPeriod != null) return false;
   } else if (!dosingPeriod.equals(other.dosingPeriod)) return false;
   if (dosingPeriodIntervalIsImportant == null) {
     if (other.dosingPeriodIntervalIsImportant != null) return false;
   } else if (!dosingPeriodIntervalIsImportant.equals(other.dosingPeriodIntervalIsImportant))
     return false;
   if (substance == null) {
     if (other.substance != null) return false;
   } else if (!substance.equals(other.substance)) return false;
   if (substanceAdministrationGeneralPurpose == null) {
     if (other.substanceAdministrationGeneralPurpose != null) return false;
   } else if (!substanceAdministrationGeneralPurpose.equals(
       other.substanceAdministrationGeneralPurpose)) return false;
   if (targetBodySite == null) {
     if (other.targetBodySite != null) return false;
   } else if (!targetBodySite.equals(other.targetBodySite)) return false;
   if (doseType == null) {
     if (other.doseType != null) return false;
   } else if (!doseType.equals(other.doseType)) return false;
   return true;
 }