<?php

namespace RxConnexionBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use RxConnexionBundle\Entity\Base\BaseEntity;
use JMS\Serializer\Annotation\Groups;
use JMS\Serializer\Annotation\MaxDepth;
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer;

/**
 * @ORM\Entity(repositoryClass="RxConnexionBundle\Repository\PatientLetterAdherenceRepository")
 * @ORM\Table(name="patient_letter_adherence")
 */

class PatientLetterAdherenceEntity extends BaseEntity
{
    /**
     * @ORM\Column(name="clinician", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $clinician;

    /**
     * @ORM\Column(name="ahi_untreated", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $ahiUntreated;

    /**
     * @ORM\Column(name="ahi_treated", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $ahiTreated;

    /**
     * @ORM\Column(name="average_hours_usage_per_night", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $averageHoursUsagePerNight;

    /**
     * @ORM\Column(name="length_of_time_on_therapy", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $lengthOfTimeOnTherapy;

    /**
     * @ORM\Column(name="epworth_score_pre", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $epworthScorePre;

    /**
     * @ORM\Column(name="epworth_score_post", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $epworthScorePost;

    /**
     * @ORM\Column(name="notes", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $notes;

    /**
     * @ORM\Column(name="plan", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $plan;

    /**
     * @ORM\Column(name="next_follow_up_date", type="datetime", nullable=true)
     * @Groups("forAudit")
     */
    protected $nextFollowUpDate;

    /**
     * @ORM\Column(name="is_snoring_gasping_choking", type="boolean", nullable=true)
     * @Groups("forAudit")
     */
    protected $isSnoringGaspingChoking;

    /**
     * @ORM\Column(name="is_fatigue_daytime_sleepness", type="boolean", nullable=true)
     * @Groups("forAudit")
     */
    protected $isFatigueDaytimeSleepiness;

    /**
     * @ORM\Column(name="is_morning_headache", type="boolean", nullable=true)
     * @Groups("forAudit")
     */
    protected $isMorningHeadache;

    /**
     * @ORM\Column(name="is_increase_frequency_of_urination_at_night", type="boolean", nullable=true)
     * @Groups("forAudit")
     */
    protected $isIncreaseFrequencyOfUrinationAtNight;

    /**
     * @ORM\Column(name="is_poor_memory_or_concentration", type="boolean", nullable=true)
     * @Groups("forAudit")
     */
    protected $isPoorMemoryOrConcentration;

    /**
     * @ORM\Column(name="is_high_blood_pressure", type="boolean", nullable=true)
     * @Groups("forAudit")
     */
    protected $isHighBloodPressure;

    /**
     * @ORM\ManyToOne(targetEntity="PatientLetterEntity", inversedBy="patientLetterAdherences")
     * @ORM\JoinColumn(name="patient_letter_id", referencedColumnName="id")
     */
    protected $patientLetter;

    /**
     * Set createdAt
     *
     * @ORM\PrePersist
     */
    public function setCreatedAtValue()
    {
        parent::setCreatedAtValue();
    }

    public function __construct()
    {

    }

    /*--------------------------------------------------------------------------------------------------------*/
    /*					User Defined Setters and Getters													  */
    /*--------------------------------------------------------------------------------------------------------*/

    /**
     * get nextFollowUpDateAsString
     *
     * @return string
     */
    public function getNextFollowUpDateAsString() {

        $dttst = new DateTimeToStringTransformer();

        return !empty($this->nextFollowUpDate) ? date('m/d/Y', strtotime($dttst->transform($this->nextFollowUpDate))) : '';
    }

    /*--------------------------------------------------------------------------------------------------------*/
    /*					Setters and Getters																	  */
    /*--------------------------------------------------------------------------------------------------------*/


    /**
     * Set ahiUntreated
     *
     * @param string $ahiUntreated
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setAhiUntreated($ahiUntreated)
    {
        $this->ahiUntreated = $ahiUntreated;

        return $this;
    }

    /**
     * Get ahiUntreated
     *
     * @return string
     */
    public function getAhiUntreated()
    {
        return $this->ahiUntreated;
    }

    /**
     * Set ahiTreated
     *
     * @param string $ahiTreated
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setAhiTreated($ahiTreated)
    {
        $this->ahiTreated = $ahiTreated;

        return $this;
    }

    /**
     * Get ahiTreated
     *
     * @return string
     */
    public function getAhiTreated()
    {
        return $this->ahiTreated;
    }

    /**
     * Set averageHoursUsagePerNight
     *
     * @param string $averageHoursUsagePerNight
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setAverageHoursUsagePerNight($averageHoursUsagePerNight)
    {
        $this->averageHoursUsagePerNight = $averageHoursUsagePerNight;

        return $this;
    }

    /**
     * Get averageHoursUsagePerNight
     *
     * @return string
     */
    public function getAverageHoursUsagePerNight()
    {
        return $this->averageHoursUsagePerNight;
    }

    /**
     * Set lengthOfTimeOnTherapy
     *
     * @param string $lengthOfTimeOnTherapy
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setLengthOfTimeOnTherapy($lengthOfTimeOnTherapy)
    {
        $this->lengthOfTimeOnTherapy = $lengthOfTimeOnTherapy;

        return $this;
    }

    /**
     * Get lengthOfTimeOnTherapy
     *
     * @return string
     */
    public function getLengthOfTimeOnTherapy()
    {
        return $this->lengthOfTimeOnTherapy;
    }

    /**
     * Set epworthScorePre
     *
     * @param string $epworthScorePre
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setEpworthScorePre($epworthScorePre)
    {
        $this->epworthScorePre = $epworthScorePre;

        return $this;
    }

    /**
     * Get epworthScorePre
     *
     * @return string
     */
    public function getEpworthScorePre()
    {
        return $this->epworthScorePre;
    }

    /**
     * Set epworthScorePost
     *
     * @param string $epworthScorePost
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setEpworthScorePost($epworthScorePost)
    {
        $this->epworthScorePost = $epworthScorePost;

        return $this;
    }

    /**
     * Get epworthScorePost
     *
     * @return string
     */
    public function getEpworthScorePost()
    {
        return $this->epworthScorePost;
    }

    /**
     * Set notes
     *
     * @param string $notes
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setNotes($notes)
    {
        $this->notes = $notes;

        return $this;
    }

    /**
     * Get notes
     *
     * @return string
     */
    public function getNotes()
    {
        return $this->notes;
    }

    /**
     * Set plan
     *
     * @param string $plan
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setPlan($plan)
    {
        $this->plan = $plan;

        return $this;
    }

    /**
     * Get plan
     *
     * @return string
     */
    public function getPlan()
    {
        return $this->plan;
    }

    /**
     * Set nextFollowUpDate
     *
     * @param string $nextFollowUpDate
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setNextFollowUpDate($nextFollowUpDate)
    {
        $this->nextFollowUpDate = empty($date) ? NULL : new \DateTime($nextFollowUpDate);

        return $this;
    }

    /**
     * Get nextFollowUpDate
     *
     * @return string
     */
    public function getNextFollowUpDate()
    {
        return $this->nextFollowUpDate;
    }

    /**
     * Set patientLetter
     *
     * @param \RxConnexionBundle\Entity\PatientLetterEntity $patientLetter
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setPatientLetter(\RxConnexionBundle\Entity\PatientLetterEntity $patientLetter = null)
    {
        $this->patientLetter = $patientLetter;

        return $this;
    }

    /**
     * Get patientLetter
     *
     * @return \RxConnexionBundle\Entity\PatientLetterEntity
     */
    public function getPatientLetter()
    {
        return $this->patientLetter;
    }

    /**
     * Set isSnoringGaspingChoking
     *
     * @param boolean $isSnoringGaspingChoking
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setIsSnoringGaspingChoking($isSnoringGaspingChoking)
    {
        $this->isSnoringGaspingChoking = $isSnoringGaspingChoking;

        return $this;
    }

    /**
     * Get isSnoringGaspingChoking
     *
     * @return boolean
     */
    public function getIsSnoringGaspingChoking()
    {
        return $this->isSnoringGaspingChoking;
    }

    /**
     * Set isFatigueDaytimeSleepiness
     *
     * @param boolean $isFatigueDaytimeSleepiness
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setIsFatigueDaytimeSleepiness($isFatigueDaytimeSleepiness)
    {
        $this->isFatigueDaytimeSleepiness = $isFatigueDaytimeSleepiness;

        return $this;
    }

    /**
     * Get isFatigueDaytimeSleepiness
     *
     * @return boolean
     */
    public function getIsFatigueDaytimeSleepiness()
    {
        return $this->isFatigueDaytimeSleepiness;
    }

    /**
     * Set isMorningHeadache
     *
     * @param boolean $isMorningHeadache
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setIsMorningHeadache($isMorningHeadache)
    {
        $this->isMorningHeadache = $isMorningHeadache;

        return $this;
    }

    /**
     * Get isMorningHeadache
     *
     * @return boolean
     */
    public function getIsMorningHeadache()
    {
        return $this->isMorningHeadache;
    }

    /**
     * Set isIncreaseFrequencyOfUrinationAtNight
     *
     * @param boolean $isIncreaseFrequencyOfUrinationAtNight
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setIsIncreaseFrequencyOfUrinationAtNight($isIncreaseFrequencyOfUrinationAtNight)
    {
        $this->isIncreaseFrequencyOfUrinationAtNight = $isIncreaseFrequencyOfUrinationAtNight;

        return $this;
    }

    /**
     * Get isIncreaseFrequencyOfUrinationAtNight
     *
     * @return boolean
     */
    public function getIsIncreaseFrequencyOfUrinationAtNight()
    {
        return $this->isIncreaseFrequencyOfUrinationAtNight;
    }

    /**
     * Set isPoorMemoryOrConcentration
     *
     * @param boolean $isPoorMemoryOrConcentration
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setIsPoorMemoryOrConcentration($isPoorMemoryOrConcentration)
    {
        $this->isPoorMemoryOrConcentration = $isPoorMemoryOrConcentration;

        return $this;
    }

    /**
     * Get isPoorMemoryOrConcentration
     *
     * @return boolean
     */
    public function getIsPoorMemoryOrConcentration()
    {
        return $this->isPoorMemoryOrConcentration;
    }

    /**
     * Set isHighBloodPressure
     *
     * @param boolean $isHighBloodPressure
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setIsHighBloodPressure($isHighBloodPressure)
    {
        $this->isHighBloodPressure = $isHighBloodPressure;

        return $this;
    }

    /**
     * Get isHighBloodPressure
     *
     * @return boolean
     */
    public function getIsHighBloodPressure()
    {
        return $this->isHighBloodPressure;
    }

    /**
     * Set clinician
     *
     * @param string $clinician
     *
     * @return PatientLetterAdherenceEntity
     */
    public function setClinician($clinician)
    {
        $this->clinician = $clinician;

        return $this;
    }

    /**
     * Get clinician
     *
     * @return string
     */
    public function getClinician()
    {
        return $this->clinician;
    }
}
