Advertisement
Guest User

Untitled

a guest
Jun 10th, 2015
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. public class Patient
  2. {
  3. [Key]//primary key
  4. public int PatientID { get; set; }
  5. public int Height { get; set; }
  6. public int Age { get; set; }
  7. public string Name { get; set; }
  8. public virtual ICollection<PatientAllergy>PatientAllergies { get; set; }
  9. public virtual PatientWeight Weight { get; set; }
  10. public virtual ICollection<Operation> Operation{ get; set; }
  11. public virtual ICollection<HealthCondition>ConditionName { get; set; }
  12. public virtual ICollection<PatientBloodTest> test { get; set; }
  13. public virtual ICollection<PatientExercises> exercise { get; set; }
  14. public virtual ICollection<PatientJab> jab { get; set; }
  15. }
  16.  
  17. public class PatientWeight
  18. {
  19. [key]
  20. public int PatientWeightID { get; set; }
  21.  
  22. [ForeignKey("PatientID")]
  23. public int PatientID { get; set; }
  24.  
  25. public DateTime DateChecked { get; set; }
  26. public double Weight { get; set; }
  27.  
  28. public virtual Patient patient { get; set; }
  29. }
  30.  
  31.  
  32. public class PatientJab
  33. {
  34. [key]
  35. public int PatientJabID { get; set; }
  36.  
  37. [ForeignKey("PatientID")]
  38. public int PatientID { get; set; }
  39.  
  40. public string Type { get; set; }
  41. public DateTime DateDone { get; set; }
  42. public virtual ICollection<Patient> Patient { get; set; }
  43. }
  44.  
  45.  
  46. public class PatientExercises
  47. {
  48. [key]
  49. public int PatientExercisesID { get; set; }
  50.  
  51. [ForeignKey("PatientID")]
  52. public int PatientID { get; set; }
  53.  
  54. public int Swimming { get; set; }
  55. public int Walking { get; set; }
  56. public int Gym { get; set; }
  57. public string Month { get; set; }
  58. public virtual ICollection<Patient> Patient { get; set; }
  59. }
  60.  
  61. public class PatientBloodTest
  62. {
  63. [key]
  64. public int PatientBloodTestID { get; set; }
  65.  
  66. [ForeignKey("PatientID")]
  67. public int PatientID { get; set; }
  68.  
  69. public string TestType { get; set; }
  70. public DateTime DateTaken { get; set; }
  71. public virtual ICollection<Patient> Patient { get; set; }
  72.  
  73. }
  74.  
  75. public class PatientOperation
  76. {
  77. [key]
  78. public int OperationID { get; set; }
  79.  
  80. [ForeignKey("PatientID")]
  81. public int PatientID { get; set; }
  82.  
  83. public string Name { get; set; }
  84. public virtual ICollection<Patient> Patient { get; set; }
  85. }
  86.  
  87. public class PatientAllergy
  88. {
  89. [Key]
  90. public int PatientAllergyID { get; set; }
  91.  
  92. [ForeignKey("PatientID")]
  93. public int PatientID { get; set; }
  94.  
  95. public string AllergyType { get; set; }
  96.  
  97. public virtual ICollection<Patient> Patient { get; set; }
  98. }
  99.  
  100. public class PatientHealthCondition
  101. {
  102. [key]
  103. public int PatientHealthConditionID { get; set; }
  104. [ForeignKey("PatientID")]
  105. public int PatientID { get; set; }
  106.  
  107. public string Name { get; set; }
  108. public virtual ICollection<Patient> Patient { get; set; }
  109. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement