Medical.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <?php
  2. namespace AppBundle\Entity\Person;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Dunglas\ApiBundle\Annotation\Iri;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use AppBundle\Entity\Traits\TimestampableEntity;
  8. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  9. /**
  10. * Informations médicales associées à une Person
  11. *
  12. * @Iri("http://schema.org/Medical")
  13. */
  14. #[ORM\Entity]
  15. class Medical
  16. {
  17. use TimestampableEntity;
  18. use CreatorUpdaterEntity;
  19. /**
  20. * @var int
  21. */
  22. #[ORM\Column(type: 'integer')]
  23. #[ORM\Id]
  24. #[ORM\GeneratedValue(strategy: 'AUTO')]
  25. #[Groups(['medical', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
  26. private $id;
  27. /**
  28. * @var string
  29. */
  30. #[ORM\Column(type: 'string', length: 100, nullable: true)]
  31. #[Assert\Type(type: 'string')]
  32. #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
  33. private $doctor;
  34. /**
  35. * @var string
  36. */
  37. #[ORM\Column(type: 'string', length: 20, nullable: true)]
  38. #[Assert\Type(type: 'string')]
  39. #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
  40. private $doctorePhone;
  41. /**
  42. * @var string
  43. */
  44. #[ORM\Column(type: 'text', nullable: true)]
  45. #[Assert\Type(type: 'string')]
  46. #[Groups(['medical', 'access_mass_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person', 'online_registration_access_details_person'])]
  47. private $comments;
  48. /**
  49. * @var bool
  50. */
  51. #[ORM\Column(type: 'boolean', nullable: true)]
  52. #[Assert\Type(type: 'boolean')]
  53. #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
  54. private $certificate;
  55. /**
  56. * @var bool
  57. */
  58. #[ORM\Column(type: 'boolean', nullable: true)]
  59. #[Assert\Type(type: 'boolean')]
  60. #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person', 'online_registration_access_details_person'])]
  61. private $insuranceCertificate;
  62. /**
  63. * @var string
  64. */
  65. #[ORM\Column(type: 'string', length: 100, nullable: true)]
  66. #[Assert\Type(type: 'string')]
  67. #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
  68. private $insuranceName;
  69. /**
  70. * @var string
  71. */
  72. #[ORM\Column(type: 'string', length: 100, nullable: true)]
  73. #[Assert\Type(type: 'string')]
  74. #[Groups(['medical', 'access_mass_person', 'access_details_person', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person'])]
  75. private $insuranceNumber;
  76. /**
  77. * @var bool
  78. */
  79. #[ORM\Column(type: 'boolean', nullable: true)]
  80. #[Assert\Type(type: 'boolean')]
  81. #[Groups(['medical'])]
  82. private $healthPass;
  83. /**
  84. * @var Person
  85. */
  86. #[Assert\Valid]
  87. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Person\Person', mappedBy: 'medical', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
  88. private $person;
  89. /**
  90. * Sets id.
  91. *
  92. * @param int $id
  93. *
  94. * @return $this
  95. */
  96. public function setId($id)
  97. {
  98. $this->id = $id;
  99. return $this;
  100. }
  101. /**
  102. * Gets id.
  103. *
  104. * @return int
  105. */
  106. public function getId()
  107. {
  108. return $this->id;
  109. }
  110. /**
  111. * Sets doctor.
  112. *
  113. * @param string $doctor
  114. *
  115. * @return $this
  116. */
  117. public function setDoctor($doctor)
  118. {
  119. $this->doctor = $doctor;
  120. return $this;
  121. }
  122. /**
  123. * Gets doctor.
  124. *
  125. * @return string
  126. */
  127. public function getDoctor()
  128. {
  129. return $this->doctor;
  130. }
  131. /**
  132. * Sets doctorePhone.
  133. *
  134. * @param string $doctorePhone
  135. *
  136. * @return $this
  137. */
  138. public function setDoctorePhone($doctorePhone)
  139. {
  140. $this->doctorePhone = $doctorePhone;
  141. return $this;
  142. }
  143. /**
  144. * Gets doctorePhone.
  145. *
  146. * @return string
  147. */
  148. public function getDoctorePhone()
  149. {
  150. return $this->doctorePhone;
  151. }
  152. /**
  153. * Sets comments.
  154. *
  155. * @param string $comments
  156. *
  157. * @return $this
  158. */
  159. public function setComments($comments)
  160. {
  161. $this->comments = $comments;
  162. return $this;
  163. }
  164. /**
  165. * Gets comments.
  166. *
  167. * @return string
  168. */
  169. public function getComments()
  170. {
  171. return $this->comments;
  172. }
  173. /**
  174. * Sets certificate.
  175. *
  176. * @param bool $certificate
  177. *
  178. * @return $this
  179. */
  180. public function setCertificate($certificate)
  181. {
  182. $this->certificate = $certificate;
  183. return $this;
  184. }
  185. /**
  186. * Gets certificate.
  187. *
  188. * @return bool
  189. */
  190. public function getCertificate()
  191. {
  192. return $this->certificate;
  193. }
  194. /**
  195. * Sets insuranceCertificate.
  196. *
  197. * @param bool $insuranceCertificate
  198. *
  199. * @return $this
  200. */
  201. public function setInsuranceCertificate($insuranceCertificate)
  202. {
  203. $this->insuranceCertificate = $insuranceCertificate;
  204. return $this;
  205. }
  206. /**
  207. * Gets insuranceCertificate.
  208. *
  209. * @return bool
  210. */
  211. public function getInsuranceCertificate()
  212. {
  213. return $this->insuranceCertificate;
  214. }
  215. /**
  216. * Set insuranceName
  217. *
  218. * @param string $insuranceName
  219. *
  220. * @return Medical
  221. */
  222. public function setInsuranceName($insuranceName)
  223. {
  224. $this->insuranceName = $insuranceName;
  225. return $this;
  226. }
  227. /**
  228. * Get insuranceName
  229. *
  230. * @return string
  231. */
  232. public function getInsuranceName()
  233. {
  234. return $this->insuranceName;
  235. }
  236. /**
  237. * Set insuranceNumber
  238. *
  239. * @param string $insuranceNumber
  240. *
  241. * @return Medical
  242. */
  243. public function setInsuranceNumber($insuranceNumber)
  244. {
  245. $this->insuranceNumber = $insuranceNumber;
  246. return $this;
  247. }
  248. /**
  249. * Get insuranceNumber
  250. *
  251. * @return string
  252. */
  253. public function getInsuranceNumber()
  254. {
  255. return $this->insuranceNumber;
  256. }
  257. /**
  258. * Get person
  259. * @return Person
  260. */
  261. public function getPerson()
  262. {
  263. return $this->person;
  264. }
  265. /**
  266. * Set healthPass
  267. *
  268. * @param boolean $healthPass
  269. *
  270. * @return Medical
  271. */
  272. public function setHealthPass($healthPass)
  273. {
  274. $this->healthPass = $healthPass;
  275. return $this;
  276. }
  277. /**
  278. * Get healthPass
  279. *
  280. * @return boolean
  281. */
  282. public function getHealthPass()
  283. {
  284. return $this->healthPass;
  285. }
  286. }