@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BahmniObservation that = (BahmniObservation) o; if (conceptSortWeight != that.conceptSortWeight) return false; if (duration != null ? !duration.equals(that.duration) : that.duration != null) return false; if (encounterDateTime != null ? !encounterDateTime.equals(that.encounterDateTime) : that.encounterDateTime != null) return false; if (encounterTransactionObservation != null ? !encounterTransactionObservation.equals(that.encounterTransactionObservation) : that.encounterTransactionObservation != null) return false; if (groupMembers != null ? !groupMembers.equals(that.groupMembers) : that.groupMembers != null) return false; if (isAbnormal != null ? !isAbnormal.equals(that.isAbnormal) : that.isAbnormal != null) return false; if (providers != null ? !providers.equals(that.providers) : that.providers != null) return false; if (targetObsRelation != null ? !targetObsRelation.equals(that.targetObsRelation) : that.targetObsRelation != null) return false; if (type != null ? !type.equals(that.type) : that.type != null) return false; if (visitStartDateTime != null ? !visitStartDateTime.equals(that.visitStartDateTime) : that.visitStartDateTime != null) return false; return true; }
@Override public int hashCode() { int result = encounterDateTime != null ? encounterDateTime.hashCode() : 0; result = 31 * result + (visitStartDateTime != null ? visitStartDateTime.hashCode() : 0); result = 31 * result + (targetObsRelation != null ? targetObsRelation.hashCode() : 0); result = 31 * result + (encounterTransactionObservation != null ? encounterTransactionObservation.hashCode() : 0); result = 31 * result + (groupMembers != null ? groupMembers.hashCode() : 0); result = 31 * result + (providers != null ? providers.hashCode() : 0); result = 31 * result + (isAbnormal != null ? isAbnormal.hashCode() : 0); result = 31 * result + (duration != null ? duration.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); result = 31 * result + conceptSortWeight; return result; }
public boolean hasTargetObsRelation() { return targetObsRelation != null && targetObsRelation.getTargetObs() != null; }