-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:CarlosZ/isolda
- Loading branch information
Showing
21 changed files
with
600 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
#Grails Metadata file | ||
#Mon Jul 25 17:35:30 CST 2011 | ||
app.grails.version=1.3.7 | ||
app.name=isolda | ||
app.servlet.version=2.4 | ||
app.version=0.1 | ||
plugins.hibernate=1.3.7 | ||
plugins.joda-time=1.2 | ||
plugins.searchable=0.6.1 | ||
plugins.spring-security-core=1.1.3 | ||
plugins.tomcat=1.3.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,54 @@ | ||
package com.clm.isolda | ||
|
||
import org.apache.commons.lang.builder.ToStringBuilder | ||
|
||
class Address { | ||
|
||
String address1 | ||
String address2 | ||
String phoneNumber1 | ||
String phoneNumber2 | ||
String phoneNumber3 | ||
|
||
static constraints = { | ||
} | ||
|
||
@Override | ||
def boolean equals(o) { | ||
if (this.is(o)) return true | ||
if (!o instanceof Address) return false | ||
|
||
Address address = (Address) o | ||
|
||
if (address1 != address.address1) return false | ||
if (address2 != address.address2) return false | ||
if (phoneNumber1 != address.phoneNumber1) return false | ||
if (phoneNumber2 != address.phoneNumber2) return false | ||
if (phoneNumber3 != address.phoneNumber3) return false | ||
|
||
return true | ||
} | ||
|
||
@Override | ||
def int hashCode() { | ||
int result = 17 | ||
result = 31 * result + (address1 != null ? address1.hashCode() : 0) | ||
result = 31 * result + (address2 != null ? address2.hashCode() : 0) | ||
result = 31 * result + (phoneNumber1 != null ? phoneNumber1.hashCode() : 0) | ||
result = 31 * result + (phoneNumber2 != null ? phoneNumber2.hashCode() : 0) | ||
result = 31 * result + (phoneNumber3 != null ? phoneNumber3.hashCode() : 0) | ||
return result | ||
} | ||
|
||
@Override | ||
def String toString() { | ||
return new ToStringBuilder(this). | ||
append("address1", address1). | ||
append("address2", address2). | ||
append("phoneNumber1", phoneNumber1). | ||
append("phoneNumber2", phoneNumber2). | ||
append("phoneNumber3", phoneNumber3). | ||
toString() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,70 @@ | ||
package com.clm.isolda | ||
|
||
import org.apache.commons.lang.builder.ToStringBuilder | ||
import org.joda.time.LocalDateTime | ||
import org.joda.time.contrib.hibernate.PersistentLocalDateTime | ||
|
||
class Appointment { | ||
|
||
LocalDateTime date | ||
AppointmentStatus status | ||
String notes | ||
MeasurementSet measurements | ||
String recommendations | ||
Objective objective | ||
|
||
static belongsTo = [patient: Patient] | ||
|
||
static constraints = { | ||
} | ||
|
||
static mapping = { | ||
date(type: PersistentLocalDateTime, lazy: false) | ||
} | ||
|
||
@Override | ||
def boolean equals(o) { | ||
if (this.is(o)) return true | ||
if (getClass() != o.class) return false | ||
|
||
Appointment that = (Appointment) o | ||
|
||
if (date != that.date) return false | ||
if (measurements != that.measurements) return false | ||
if (notes != that.notes) return false | ||
if (objective != that.objective) return false | ||
if (recommendations != that.recommendations) return false | ||
if (status != that.status) return false | ||
if (patient != that.patient) return false | ||
|
||
return true | ||
} | ||
|
||
@Override | ||
def int hashCode() { | ||
int result = 17 | ||
result = 31 + result + (date != null ? date.hashCode() : 0) | ||
result = 31 * result + (status != null ? status.hashCode() : 0) | ||
result = 31 * result + (notes != null ? notes.hashCode() : 0) | ||
result = 31 * result + (measurements != null ? measurements.hashCode() : 0) | ||
result = 31 * result + (recommendations != null ? recommendations.hashCode() : 0) | ||
result = 31 * result + (objective != null ? objective.hashCode() : 0) | ||
result = 31 * result + (patient != null ? patient.hashCode() : 0) | ||
return result | ||
} | ||
|
||
|
||
@Override | ||
def String toString() { | ||
return new ToStringBuilder(this). | ||
append("date", date). | ||
append("status", status). | ||
append("notes", notes). | ||
append("measurements", measurements). | ||
append("recommendations", recommendations). | ||
append("objective", objective). | ||
append("patient", patient). | ||
toString() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,64 @@ | ||
package com.clm.isolda | ||
|
||
import org.apache.commons.lang.builder.ToStringBuilder | ||
import org.joda.time.LocalDate | ||
import org.joda.time.contrib.hibernate.PersistentLocalDate | ||
|
||
class DietaryProgram { | ||
|
||
LocalDate startDate | ||
LocalDate endDate | ||
Map<Nutrient, String> nutrientToQuantity | ||
|
||
static belongsTo = [patient: Patient] | ||
|
||
static hasMany = [possibleRecipes: Recipe] | ||
|
||
static constraints = { | ||
} | ||
|
||
static mapping = { | ||
startDate(type: PersistentLocalDate, lazy: false) | ||
endDate(type: PersistentLocalDate, lazy: false) | ||
} | ||
|
||
@Override | ||
def boolean equals(o) { | ||
if (this.is(o)) return true | ||
if (getClass() != o.class) return false | ||
|
||
DietaryProgram that = (DietaryProgram) o | ||
|
||
if (endDate != that.endDate) return false | ||
if (nutrientToQuantity != that.nutrientToQuantity) return false | ||
if (possibleRecipes != that.possibleRecipes) return false | ||
if (startDate != that.startDate) return false | ||
if (patient != that.patient) return false | ||
|
||
return true | ||
} | ||
|
||
@Override | ||
def int hashCode() { | ||
int result | ||
result = (startDate != null ? startDate.hashCode() : 0) | ||
result = 31 * result + (endDate != null ? endDate.hashCode() : 0) | ||
result = 31 * result + (nutrientToQuantity != null ? nutrientToQuantity.hashCode() : 0) | ||
result = 31 * result + (possibleRecipes != null ? possibleRecipes.hashCode() : 0) | ||
result = 31 * result + (patient != null ? patient.hashCode() : 0) | ||
return result | ||
} | ||
|
||
|
||
@Override | ||
def String toString() { | ||
return new ToStringBuilder(this). | ||
append("endDate", endDate). | ||
append("startDate", startDate). | ||
append("nutrientToQuantity", nutrientToQuantity). | ||
append("possibleRecipes", possibleRecipes). | ||
append("patient", patient). | ||
toString() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,47 @@ | ||
package com.clm.isolda | ||
|
||
import org.apache.commons.lang.builder.ToStringBuilder | ||
|
||
class Measurement { | ||
|
||
String name | ||
String unit | ||
String value | ||
|
||
static constraints = { | ||
} | ||
|
||
@Override | ||
def boolean equals(o) { | ||
if (this.is(o)) return true | ||
if (getClass() != o.class) return false | ||
|
||
Measurement that = (Measurement) o | ||
|
||
if (name != that.name) return false | ||
if (unit != that.unit) return false | ||
if (value != that.value) return false | ||
|
||
return true | ||
} | ||
|
||
@Override | ||
def int hashCode() { | ||
int result = 17 | ||
result = 31 * result + (name != null ? name.hashCode() : 0) | ||
result = 31 * result + (unit != null ? unit.hashCode() : 0) | ||
result = 31 * result + (value != null ? value.hashCode() : 0) | ||
return result | ||
} | ||
|
||
|
||
@Override | ||
def String toString() { | ||
return new ToStringBuilder(this). | ||
append("name", name). | ||
append("unit", unit). | ||
append("value", value). | ||
toString() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,66 @@ | ||
package com.clm.isolda | ||
|
||
import org.apache.commons.lang.builder.ToStringBuilder | ||
|
||
class MeasurementSet { | ||
|
||
Measurement weight | ||
Measurement bodyMassIndex | ||
Measurement fat | ||
Measurement chest | ||
Measurement waist | ||
Measurement belly | ||
Measurement arms | ||
Measurement legs | ||
|
||
static constraints = { | ||
} | ||
|
||
@Override | ||
def boolean equals(o) { | ||
if (this.is(o)) return true | ||
if (getClass() != o.class) return false | ||
|
||
MeasurementSet that = (MeasurementSet) o | ||
|
||
if (arms != that.arms) return false | ||
if (belly != that.belly) return false | ||
if (bodyMassIndex != that.bodyMassIndex) return false | ||
if (chest != that.chest) return false | ||
if (fat != that.fat) return false | ||
if (legs != that.legs) return false | ||
if (waist != that.waist) return false | ||
if (weight != that.weight) return false | ||
|
||
return true | ||
} | ||
|
||
@Override | ||
def int hashCode() { | ||
int result = 17 | ||
result = 31 * result + (weight != null ? weight.hashCode() : 0) | ||
result = 31 * result + (bodyMassIndex != null ? bodyMassIndex.hashCode() : 0) | ||
result = 31 * result + (fat != null ? fat.hashCode() : 0) | ||
result = 31 * result + (chest != null ? chest.hashCode() : 0) | ||
result = 31 * result + (waist != null ? waist.hashCode() : 0) | ||
result = 31 * result + (belly != null ? belly.hashCode() : 0) | ||
result = 31 * result + (arms != null ? arms.hashCode() : 0) | ||
result = 31 * result + (legs != null ? legs.hashCode() : 0) | ||
return result | ||
} | ||
|
||
|
||
@Override | ||
def String toString() { | ||
return new ToStringBuilder(this). | ||
append("arms", arms). | ||
append("weight", weight). | ||
append("bodyMassIndex", bodyMassIndex). | ||
append("fat", fat). | ||
append("chest", chest). | ||
append("waist", waist). | ||
append("belly", belly). | ||
append("legs", legs). | ||
toString() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,46 @@ | ||
package com.clm.isolda | ||
|
||
import org.apache.commons.lang.builder.ToStringBuilder | ||
|
||
class Nutrient { | ||
|
||
String name | ||
String description | ||
Map<String, Double> equivalences | ||
|
||
static constraints = { | ||
} | ||
|
||
@Override | ||
def boolean equals(o) { | ||
if (this.is(o)) return true | ||
if (getClass() != o.class) return false | ||
|
||
Nutrient nutrient = (Nutrient) o | ||
|
||
if (description != nutrient.description) return false | ||
if (equivalences != nutrient.equivalences) return false | ||
if (name != nutrient.name) return false | ||
|
||
return true | ||
} | ||
|
||
@Override | ||
def int hashCode() { | ||
int result = 17 | ||
result = 31 * result + (name != null ? name.hashCode() : 0) | ||
result = 31 * result + (description != null ? description.hashCode() : 0) | ||
result = 31 * result + (equivalences != null ? equivalences.hashCode() : 0) | ||
return result | ||
} | ||
|
||
@Override | ||
def String toString() { | ||
return new ToStringBuilder(this). | ||
append("description", description). | ||
append("name", name). | ||
append("equivalences", equivalences). | ||
toString() | ||
} | ||
|
||
} |
Oops, something went wrong.