<?php
namespace App\Entity;
use App\Repository\PatientRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PatientRepository::class)
*/
class Patient
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=32, nullable=true)
*/
private $name;
/**
* @ORM\Column(type="string", length=32, nullable=true)
*/
private $surname;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $alexaId;
/**
* @ORM\OneToMany(targetEntity=ExerciseSimpleAnswerResult::class, mappedBy="patient")
*/
private $exerciseSimpleAnswerResults;
/**
* @ORM\OneToMany(targetEntity=ExerciseResult::class, mappedBy="patient")
*/
private $exerciseResults;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $questionnaire;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $diagnosis;
/**
* @ORM\ManyToMany(targetEntity=User::class, inversedBy="patients")
*/
private $caregiver;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $scheduling = [];
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $patientKey;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $sdsQuestionnaireMark;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $sdsQuesstionnaireCreatedAt;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $sdsQuestionnaireAnswers;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $mocaQuestionnaireMarks;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $mocaQuesstionnaireCreatedAt;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $mocaQuestionnaireAnswers;
/**
* @ORM\Column(type="string", length=8, nullable=true)
*/
private $gender;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $dateOfBirth;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $medicalInfo;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $habitsInfo;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $fitnessInfo;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $exercisePreferences;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $solvedExercises;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $chatbotConfiguration;
public function __construct()
{
$this->setDiagnosis(0);
$this->setSdsQuestionnaireMark(null);
$this->setmocaQuestionnaireMarks(null);
$this->exerciseSimpleAnswerResults = new ArrayCollection();
$this->exerciseResults = new ArrayCollection();
$this->caregiver = new ArrayCollection();
$this->patientKey = rand(1000,9999);
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getSurname(): ?string
{
return $this->surname;
}
public function setSurname(?string $surname): self
{
$this->surname = $surname;
return $this;
}
public function getAlexaId(): ?string
{
return $this->alexaId;
}
public function setAlexaId(string $alexaId): self
{
$this->alexaId = $alexaId;
return $this;
}
/**
* @return Collection|ExerciseSimpleAnswerResult[]
*/
public function getExerciseSimpleAnswerResults(): Collection
{
return $this->exerciseSimpleAnswerResults;
}
public function addExerciseSimpleAnswerResult(ExerciseSimpleAnswerResult $exerciseSimpleAnswerResult): self
{
if (!$this->exerciseSimpleAnswerResults->contains($exerciseSimpleAnswerResult)) {
$this->exerciseSimpleAnswerResults[] = $exerciseSimpleAnswerResult;
$exerciseSimpleAnswerResult->setPatient($this);
}
return $this;
}
public function removeExerciseSimpleAnswerResult(ExerciseSimpleAnswerResult $exerciseSimpleAnswerResult): self
{
if ($this->exerciseSimpleAnswerResults->removeElement($exerciseSimpleAnswerResult)) {
// set the owning side to null (unless already changed)
if ($exerciseSimpleAnswerResult->getPatient() === $this) {
$exerciseSimpleAnswerResult->setPatient(null);
}
}
return $this;
}
/**
* @return Collection|ExerciseResult[]
*/
public function getExerciseResults(): Collection
{
return $this->exerciseResults;
}
public function addExerciseResult(ExerciseResult $exerciseResult): self
{
if (!$this->exerciseResults->contains($exerciseResult)) {
$this->exerciseResults[] = $exerciseResult;
$exerciseResult->setPatient($this);
}
return $this;
}
public function removeExerciseResult(ExerciseResult $exerciseResult): self
{
if ($this->exerciseResults->removeElement($exerciseResult)) {
// set the owning side to null (unless already changed)
if ($exerciseResult->getPatient() === $this) {
$exerciseResult->setPatient(null);
}
}
return $this;
}
public function getQuestionnaire(): ?string
{
return $this->questionnaire;
}
public function setQuestionnaire(?string $questionnaire): self
{
$this->questionnaire = $questionnaire;
return $this;
}
public function getDiagnosis(): ?int
{
return $this->diagnosis;
}
public function setDiagnosis(?int $diagnosis): self
{
$this->diagnosis = $diagnosis;
return $this;
}
/**
* @return Collection|User[]
*/
public function getCaregiver(): Collection
{
return $this->caregiver;
}
public function addCaregiver(User $caregiver): self
{
if (!$this->caregiver->contains($caregiver)) {
$this->caregiver[] = $caregiver;
}
return $this;
}
public function removeCaregiver(User $caregiver): self
{
$this->caregiver->removeElement($caregiver);
return $this;
}
public function __toString()
{
return $this->getName().' '.$this->getSurname();
}
public function getScheduling(): ?string
{
return $this->scheduling;
}
public function setScheduling(?string $scheduling): self
{
$this->scheduling = $scheduling;
return $this;
}
public function getPatientKey(): ?int
{
return $this->patientKey;
}
public function setPatientKey(?int $patientKey): self
{
$this->patientKey = $patientKey;
return $this;
}
public function getSdsQuestionnaireMark(): ?int
{
return $this->sdsQuestionnaireMark;
}
public function setSdsQuestionnaireMark(?int $sdsQuestionnaireMark): self
{
$this->sdsQuestionnaireMark = $sdsQuestionnaireMark;
return $this;
}
public function getSdsQuesstionnaireCreatedAt(): ?\DateTimeImmutable
{
return $this->sdsQuesstionnaireCreatedAt;
}
public function setSdsQuesstionnaireCreatedAt(?\DateTimeImmutable $sdsQuesstionnaireCreatedAt): self
{
$this->sdsQuesstionnaireCreatedAt = $sdsQuesstionnaireCreatedAt;
return $this;
}
public function getSdsQuestionnaireAnswers(): ?string
{
return $this->sdsQuestionnaireAnswers;
}
public function setSdsQuestionnaireAnswers(?string $sdsQuestionnaireAnswers): self
{
$this->sdsQuestionnaireAnswers = $sdsQuestionnaireAnswers;
return $this;
}
public function getmocaQuestionnaireMarks(): ?string
{
return $this->mocaQuestionnaireMarks;
}
public function setmocaQuestionnaireMarks(?string $mocaQuestionnaireMarks): self
{
$this->mocaQuestionnaireMarks = $mocaQuestionnaireMarks;
return $this;
}
public function getMocaQuesstionnaireCreatedAt(): ?\DateTimeImmutable
{
return $this->mocaQuesstionnaireCreatedAt;
}
public function setMocaQuesstionnaireCreatedAt(?\DateTimeImmutable $mocaQuesstionnaireCreatedAt): self
{
$this->mocaQuesstionnaireCreatedAt = $mocaQuesstionnaireCreatedAt;
return $this;
}
public function getMocaQuestionnaireAnswers(): ?string
{
return $this->mocaQuestionnaireAnswers;
}
public function setMocaQuestionnaireAnswers(?string $mocaQuestionnaireAnswers): self
{
$this->mocaQuestionnaireAnswers = $mocaQuestionnaireAnswers;
return $this;
}
public function getGender(): ?string
{
return $this->gender;
}
public function setGender(?string $gender): self
{
$this->gender = $gender;
return $this;
}
public function getDateOfBirth(): ?\DateTime
{
return $this->dateOfBirth;
}
public function setDateOfBirth(?\DateTime $dateOfBirth): self
{
$this->dateOfBirth = $dateOfBirth;
return $this;
}
public function getMedicalInfo(): ?string
{
return $this->medicalInfo;
}
public function setMedicalInfo(?string $medicalInfo): self
{
$this->medicalInfo = $medicalInfo;
return $this;
}
public function getHabitsInfo(): ?string
{
return $this->habitsInfo;
}
public function setHabitsInfo(?string $habitsInfo): self
{
$this->habitsInfo = $habitsInfo;
return $this;
}
public function getFitnessInfo(): ?string
{
return $this->fitnessInfo;
}
public function setFitnessInfo(?string $fitnessInfo): self
{
$this->fitnessInfo = $fitnessInfo;
return $this;
}
public function getExercisePreferences(): ?string
{
return $this->exercisePreferences;
}
public function setExercisePreferences(?string $exercisePreferences): self
{
$this->exercisePreferences = $exercisePreferences;
return $this;
}
public function getSolvedExercises(): ?string
{
return $this->solvedExercises;
}
public function setSolvedExercises(?string $solvedExercises): self
{
$this->solvedExercises = $solvedExercises;
return $this;
}
public function getChatbotConfiguration(): ?string
{
return $this->chatbotConfiguration;
}
public function setChatbotConfiguration(?string $chatbotConfiguration): self
{
$this->chatbotConfiguration = $chatbotConfiguration;
return $this;
}
}