<?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\PatientLetterSpecialistReferralRepository")
 * @ORM\Table(name="patient_letter_specialist_referral")
 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @ORM\ManyToOne(targetEntity="PatientLetterEntity", inversedBy="patientLetterSpecialistReferrals")
     * @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 hsatCompletedDateAsString
     *
     * @return string
     */
    public function getHsatCompletedDateAsString() {

        $dttst = new DateTimeToStringTransformer();

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

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



    /**
     * Set isAssessment
     *
     * @param boolean $isAssessment
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsAssessment($isAssessment)
    {
        $this->isAssessment = $isAssessment;

        return $this;
    }

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

    /**
     * Set isResult
     *
     * @param boolean $isResult
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsResult($isResult)
    {
        $this->isResult = $isResult;

        return $this;
    }

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

    /**
     * Set isRecommendation
     *
     * @param boolean $isRecommendation
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsRecommendation($isRecommendation)
    {
        $this->isRecommendation = $isRecommendation;

        return $this;
    }

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

    /**
     * Set isHsatCompleted
     *
     * @param boolean $isHsatCompleted
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsHsatCompleted($isHsatCompleted)
    {
        $this->isHsatCompleted = $isHsatCompleted;

        return $this;
    }

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

    /**
     * Set hsatCompletedDate
     *
     * @param \DateTime $hsatCompletedDate
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setHsatCompletedDate($hsatCompletedDate)
    {
        $this->hsatCompletedDate = empty($hsatCompletedDate) ? NULL : new \DateTime($hsatCompletedDate);

        return $this;
    }

    /**
     * Get hsatCompletedDate
     *
     * @return \DateTime
     */
    public function getHsatCompletedDate()
    {
        return $this->hsatCompletedDate;
    }

    /**
     * Set isLevelOnePsgCompleted
     *
     * @param boolean $isLevelOnePsgCompleted
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsLevelOnePsgCompleted($isLevelOnePsgCompleted)
    {
        $this->isLevelOnePsgCompleted = $isLevelOnePsgCompleted;

        return $this;
    }

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

    /**
     * Set note
     *
     * @param string $note
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setNote($note)
    {
        $this->note = $note;

        return $this;
    }

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

    /**
     * Set isOsa
     *
     * @param boolean $isOsa
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsOsa($isOsa)
    {
        $this->isOsa = $isOsa;

        return $this;
    }

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

    /**
     * Set isRefusedCpap
     *
     * @param boolean $isRefusedCpap
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsRefusedCpap($isRefusedCpap)
    {
        $this->isRefusedCpap = $isRefusedCpap;

        return $this;
    }

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

    /**
     * Set isMildOsa
     *
     * @param boolean $isMildOsa
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsMildOsa($isMildOsa)
    {
        $this->isMildOsa = $isMildOsa;

        return $this;
    }

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

    /**
     * Set isNormalHsat
     *
     * @param boolean $isNormalHsat
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsNormalHsat($isNormalHsat)
    {
        $this->isNormalHsat = $isNormalHsat;

        return $this;
    }

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

    /**
     * Set isReassess
     *
     * @param boolean $isReassess
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsReassess($isReassess)
    {
        $this->isReassess = $isReassess;

        return $this;
    }

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

    /**
     * Set isComplexSleep
     *
     * @param boolean $isComplexSleep
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsComplexSleep($isComplexSleep)
    {
        $this->isComplexSleep = $isComplexSleep;

        return $this;
    }

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

    /**
     * Set isComplexTitration
     *
     * @param boolean $isComplexTitration
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsComplexTitration($isComplexTitration)
    {
        $this->isComplexTitration = $isComplexTitration;

        return $this;
    }

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

    /**
     * Set isIncreaseBmChfOcpd
     *
     * @param boolean $isIncreaseBmChfOcpd
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsIncreaseBmChfOcpd($isIncreaseBmChfOcpd)
    {
        $this->isIncreaseBmChfOcpd = $isIncreaseBmChfOcpd;

        return $this;
    }

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

    /**
     * Set isNonRespiratorySleepDisorder
     *
     * @param boolean $isNonRespiratorySleepDisorder
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsNonRespiratorySleepDisorder($isNonRespiratorySleepDisorder)
    {
        $this->isNonRespiratorySleepDisorder = $isNonRespiratorySleepDisorder;

        return $this;
    }

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

    /**
     * Set isRequestingOralAppliance
     *
     * @param boolean $isRequestingOralAppliance
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsRequestingOralAppliance($isRequestingOralAppliance)
    {
        $this->isRequestingOralAppliance = $isRequestingOralAppliance;

        return $this;
    }

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

    /**
     * Set isSleepPhysician
     *
     * @param boolean $isSleepPhysician
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsSleepPhysician($isSleepPhysician)
    {
        $this->isSleepPhysician = $isSleepPhysician;

        return $this;
    }

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

    /**
     * Set isRespirologist
     *
     * @param boolean $isRespirologist
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsRespirologist($isRespirologist)
    {
        $this->isRespirologist = $isRespirologist;

        return $this;
    }

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

    /**
     * Set isInternalMedicine
     *
     * @param boolean $isInternalMedicine
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsInternalMedicine($isInternalMedicine)
    {
        $this->isInternalMedicine = $isInternalMedicine;

        return $this;
    }

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

    /**
     * Set isDentalConsultation
     *
     * @param boolean $isDentalConsultation
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setIsDentalConsultation($isDentalConsultation)
    {
        $this->isDentalConsultation = $isDentalConsultation;

        return $this;
    }

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

    /**
     * Set comment
     *
     * @param string $comment
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setComment($comment)
    {
        $this->comment = $comment;

        return $this;
    }

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

    /**
     * Set patientLetter
     *
     * @param \RxConnexionBundle\Entity\PatientLetterEntity $patientLetter
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    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 contactNo
     *
     * @param string $contactNo
     *
     * @return PatientLetterSpecialistReferralEntity
     */
    public function setContactNo($contactNo)
    {
        $this->contactNo = $contactNo;

        return $this;
    }

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