Permalink
Browse files

Merge branch 'master' of github.com:CarlosZ/isolda

  • Loading branch information...
2 parents 02b0ad3 + 351406f commit b6425057ad17d9841d702a580ae7daa6b0bd8ef1 @CarlosZ committed Jul 26, 2011
View
@@ -1,10 +1,12 @@
#Grails Metadata file
+#Mon Jul 25 18:16:16 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.json-rest-api=1.0.8
plugins.searchable=0.6.1
plugins.spring-security-core=1.1.3
plugins.tomcat=1.3.7
@@ -11,6 +11,11 @@ class Address {
String phoneNumber3
static constraints = {
+ address1(maxSize: 200)
+ address2(nullable: true, maxSize: 200)
+ phoneNumber1(maxSize: 18)
+ phoneNumber2(nullable: true, maxSize: 18)
+ phoneNumber3(nullable: true, maxSize: 18)
}
@Override
@@ -6,6 +6,8 @@ import org.joda.time.contrib.hibernate.PersistentLocalDateTime
class Appointment {
+ static expose = 'appointment'
+
LocalDateTime date
AppointmentStatus status
String notes
@@ -16,6 +18,8 @@ class Appointment {
static belongsTo = [patient: Patient]
static constraints = {
+ notes(nullable: true, maxSize: 2000)
+ recommendations(nullable: true, maxSize: 2000)
}
static mapping = {
@@ -14,9 +14,6 @@ class DietaryProgram {
static hasMany = [possibleRecipes: Recipe]
- static constraints = {
- }
-
static mapping = {
startDate(type: PersistentLocalDate, lazy: false)
endDate(type: PersistentLocalDate, lazy: false)
@@ -9,6 +9,9 @@ class Measurement {
String value
static constraints = {
+ name(maxSize: 100)
+ unit(maxSize: 10)
+ value(maxSize: 10)
}
@Override
@@ -12,8 +12,18 @@ class MeasurementSet {
Measurement belly
Measurement arms
Measurement legs
+ Measurement bloodPressure
+
static constraints = {
+ bodyMassIndex(nullable: true)
+ fat(nullable: true)
+ chest(nullable: true)
+ waist(nullable: true)
+ belly(nullable: true)
+ arms(nullable: true)
+ legs(nullable: true)
+ bloodPressure(nullable: true)
}
@Override
@@ -31,6 +41,7 @@ class MeasurementSet {
if (legs != that.legs) return false
if (waist != that.waist) return false
if (weight != that.weight) return false
+ if (bloodPressure != that.bloodPressure) return false
return true
}
@@ -46,6 +57,7 @@ class MeasurementSet {
result = 31 * result + (belly != null ? belly.hashCode() : 0)
result = 31 * result + (arms != null ? arms.hashCode() : 0)
result = 31 * result + (legs != null ? legs.hashCode() : 0)
+ result = 31 * result + (bloodPressure != null ? bloodPressure.hashCode() : 0)
return result
}
@@ -61,6 +73,7 @@ class MeasurementSet {
append("waist", waist).
append("belly", belly).
append("legs", legs).
+ append("bloodPressure", bloodPressure).
toString()
}
}
@@ -9,6 +9,8 @@ class Nutrient {
Map<String, Double> equivalences
static constraints = {
+ name(maxSize: 100)
+ description(maxSize: 2000)
}
@Override
@@ -10,9 +10,6 @@ class Objective {
LocalDate completed
MeasurementSet targetMeasurements
- static constraints = {
- }
-
static mapping = {
proposed(type: PersistentLocalDate, lazy: false)
completed(type: PersistentLocalDate, lazy: false)
@@ -6,6 +6,8 @@ import org.joda.time.contrib.hibernate.PersistentLocalDate
class Patient extends User {
+ static expose = 'patient'
+
LocalDate programStart
LocalDate programEnd
Physician secondaryPhysician
@@ -18,6 +20,7 @@ class Patient extends User {
static constraints = {
secondaryPhysician(nullable: true)
programEnd(nullable: true)
+ initialMeasurements(nullable: true)
}
static mapping = {
@@ -4,6 +4,8 @@ import org.apache.commons.lang.builder.ToStringBuilder
class Physician extends User {
+ static expose = 'physician'
+
static hasMany = [patients: Patient]
static constraints = {
@@ -12,6 +12,8 @@ class Recipe {
static belongsTo = [dietaryProgram: DietaryProgram]
static constraints = {
+ name(maxSize: 100)
+ description(maxSize: 5000)
}
@Override
@@ -10,9 +10,12 @@ class User {
String firstName
String lastName
LocalDate birthDate
- File image
+ File picture
static constraints = {
+ firstName(maxSize: 25)
+ lastName(maxSize: 25)
+ picture(nullable: true)
}
static mapping = {
@@ -29,7 +32,7 @@ class User {
if (address != user.address) return false
if (birthDate != user.birthDate) return false
if (firstName != user.firstName) return false
- if (image != user.image) return false
+ if (picture != user.picture) return false
if (lastName != user.lastName) return false
return true
@@ -42,7 +45,7 @@ class User {
result = 31 * result + (firstName != null ? firstName.hashCode() : 0)
result = 31 * result + (lastName != null ? lastName.hashCode() : 0)
result = 31 * result + (birthDate != null ? birthDate.hashCode() : 0)
- result = 31 * result + (image != null ? image.hashCode() : 0)
+ result = 31 * result + (picture != null ? picture.hashCode() : 0)
return result
}
@@ -53,7 +56,7 @@ class User {
append("firstName", firstName).
append("lastName", lastName).
append("birthDate", birthDate).
- append("image", image).
+ append("picture", picture).
toString()
}
}
View
@@ -17,6 +17,21 @@
<excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/hibernate-1.3.7/target/test-classes" />
<excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/hibernate-1.3.7/web-app/plugins" />
</content>
+ <content url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/joda-time-1.2">
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/joda-time-1.2/src/java" isTestSource="false" />
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/joda-time-1.2/src/groovy" isTestSource="false" />
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/joda-time-1.2/grails-app/taglib" isTestSource="false" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/joda-time-1.2/target/classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/joda-time-1.2/target/test-classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/joda-time-1.2/web-app/plugins" />
+ </content>
+ <content url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/json-rest-api-1.0.8">
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/json-rest-api-1.0.8/src/groovy" isTestSource="false" />
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/json-rest-api-1.0.8/grails-app/controllers" isTestSource="false" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/json-rest-api-1.0.8/target/classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/json-rest-api-1.0.8/target/test-classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/json-rest-api-1.0.8/web-app/plugins" />
+ </content>
<content url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/searchable-0.6.1">
<sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/searchable-0.6.1/src/java" isTestSource="false" />
<sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/isolda/plugins/searchable-0.6.1/src/groovy" isTestSource="false" />

0 comments on commit b642505

Please sign in to comment.