<?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;

/**
 * @ORM\Entity(repositoryClass="RxConnexionBundle\Repository\HealthFacilityRepository")
 * @ORM\Table(name="health_facility", indexes={@ORM\Index(name="IDX_SEARCH_000", columns={"description"})})
 */

class HealthFacilityEntity extends BaseEntity
{
    const SCHEDULE_TYPE_TIMED = 'Timed';
    const SCHEDULE_TYPE_QUEUED = 'Queued';
    const OPENING_TIME_PERIOD_AM = 'AM';
    const OPENING_TIME_PERIOD_PM = 'PM';
    const CLOSING_TIME_PERIOD_AM = 'AM';
    const CLOSING_TIME_PERIOD_PM = 'PM';

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

    /**
     * @ORM\Column(type="string")
     * @Groups("forAudit")
     */
    protected $description;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @ORM\Column(name="opening_time_minute", type="integer", nullable=true)
     */
    protected $openingTimeMinute;

    /**
     * @ORM\Column(name="opening_time_period", type="string", nullable=true)
     */
    protected $openingTimePeriod;

    /**
     * @ORM\Column(name="closing_time", type="string", nullable=true)
     */
    protected $closingTime;

    /**
     * @ORM\Column(name="closing_time_hour", type="integer", nullable=true)
     */
    protected $closingTimeHour;

    /**
     * @ORM\Column(name="closing_time_minute", type="integer", nullable=true)
     */
    protected $closingTimeMinute;

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

    /**
     * @ORM\Column(name="queueing_start_time", type="string", nullable=true)
     */
    protected $queueingStartTime;

    /**
     * @ORM\Column(name="queueing_start_time_hour", type="integer", nullable=true)
     */
    protected $queueingStartTimeHour;

    /**
     * @ORM\Column(name="queueing_start_time_minute", type="integer", nullable=true)
     */
    protected $queueingStartTimeMinute;

    /**
     * @ORM\Column(name="queueing_start_time_period", type="string", nullable=true)
     */
    protected $queueingStartTimePeriod;

    /**
     * @ORM\Column(name="queueing_end_time", type="string", nullable=true)
     */
    protected $queueingEndTime;

    /**
     * @ORM\Column(name="queueing_end_time_hour", type="integer", nullable=true)
     */
    protected $queueingEndTimeHour;

    /**
     * @ORM\Column(name="queueing_end_time_minute", type="integer", nullable=true)
     */
    protected $queueingEndTimeMinute;

    /**
     * @ORM\Column(name="queueing_end_time_period", type="string", nullable=true)
     */
    protected $queueingEndTimePeriod;

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

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

    /**
     * @ORM\Column(name="old_sys_id", type="string", nullable=true)
     */
    protected $oldSysId;

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

    /**
     * @ORM\Column(name="is_marketing", type="boolean")
     * @Groups("forAudit")
     */
    protected $isMarketing;

    /**
     * @ORM\Column(name="is_active", type="boolean", options={"default":"1"})
     * @Groups("forAudit")
     */
    protected $isActive;

    /**
     * @ORM\Column(name="is_deleted", type="boolean")
     */
    protected $isDeleted;

    /**
     * @ORM\ManyToOne(targetEntity="HealthFacilityTypeEntity", inversedBy="healthFacilities")
     * @ORM\JoinColumn(name="health_facility_type_id", referencedColumnName="id")
     * @Groups("forAudit")
     * @MaxDepth(1)
     */
    protected $healthFacilityType;

    /**
     * @ORM\ManyToOne(targetEntity="CityEntity", inversedBy="healthFacilities")
     * @ORM\JoinColumn(name="city_id", referencedColumnName="id")
     * @Groups("forAudit")
     * @MaxDepth(1)
     */
    protected $city;

    /**
     * @ORM\ManyToOne(targetEntity="PostalCodeEntity", inversedBy="healthFacilities")
     * @ORM\JoinColumn(name="postal_code_id", referencedColumnName="id")
     * @Groups("forAudit")
     * @MaxDepth(1)
     */
    protected $postalCode;

    /**
     * @ORM\ManyToOne(targetEntity="AccountEntity", inversedBy="healthFacilities")
     * @ORM\JoinColumn(name="account_id", referencedColumnName="id")
     * @Groups("forAudit")
     * @MaxDepth(1)
     */
    protected $account;

    /**
     * @ORM\ManyToOne(targetEntity="CompanyEntity", inversedBy="healthFacilities")
     * @ORM\JoinColumn(name="company_id", referencedColumnName="id")
     * @Groups("forAudit")
     * @MaxDepth(1)
     */
    protected $company;


    /**
     * @ORM\ManyToOne(targetEntity="GeneralUserEntity", inversedBy="healthFacilities")
     * @ORM\JoinColumn(name="general_user_id", referencedColumnName="id")
     * @Groups("forAudit")
     * @MaxDepth(1)
     */
    protected $generalUser;

    /**
     * @ORM\OneToMany(targetEntity="ScheduleEntity", mappedBy="healthFacility")
     */
    protected $schedules;

    /**
     * @ORM\OneToMany(targetEntity="ScheduleQueuedEntity", mappedBy="healthFacility")
     */
    protected $schedulesQueued;

    /**
     * @ORM\OneToMany(targetEntity="ScheduleRequestEntity", mappedBy="healthFacility")
     */
    protected $scheduleRequests;

    /**
     * @ORM\OneToMany(targetEntity="PatientChartEntity", mappedBy="healthFacility")
     */
    protected $patientCharts;

    /**
     * @ORM\OneToMany(targetEntity="HealthFacilityPhotoEntity", mappedBy="healthFacility", cascade={"remove"})
     */
    protected $photos;

    /**
     * @ORM\OneToMany(targetEntity="ProviderHealthFacilityEntity", mappedBy="healthFacility")
     */
    protected $providerHealthFacilities;

    /**
     * @ORM\OneToMany(targetEntity="GeneralUserHealthFacilityEntity", mappedBy="healthFacility")
     */
    protected $generalUserHealthFacilities;

    /**
     * @ORM\OneToMany(targetEntity="ProviderWorkScheduleEntity", mappedBy="healthFacility", cascade={"remove"})
     */
    protected $providerWorkSchedules;

    /**
     * @ORM\OneToMany(targetEntity="ReferralEntity", mappedBy="healthFacility")
     */
    protected $referrals;

    /**
     * @ORM\OneToMany(targetEntity="FaxTranEntity", mappedBy="healthFacility")
     */
    protected $faxTrans;

    /**
     * @ORM\OneToMany(targetEntity="AccountUserHealthFacilityEntity", mappedBy="healthFacility")
     */
    protected $accountUserHealthFacilities;

    /**
     * @ORM\OneToMany(targetEntity="PatientHealthFacilityEntity", mappedBy="healthFacility")
     */
    protected $patientHealthFacilities;

    /**
     * @ORM\OneToMany(targetEntity="PatientEntity", mappedBy="healthFacility")
     */
    protected $patients;

    /**
     * @ORM\OneToMany(targetEntity="PatientBillingEntity", mappedBy="healthFacility")
     */
    protected $patientBillings;

    /**
     * @ORM\OneToMany(targetEntity="PatientRentalEntity", mappedBy="healthFacility")
     */
    protected $patientRentals;

    /**
     * @ORM\OneToMany(targetEntity="PatientBillingEntity", mappedBy="healthFacilityForAddress")
     */
    protected $addressForPatientBillings;

    /**
     * @ORM\OneToMany(targetEntity="PatientRentalEntity", mappedBy="healthFacilityRentalForAddress")
     */
    protected $addressForPatientRentals;

    /**
     * @ORM\OneToMany(targetEntity="PatientServiceEntity", mappedBy="healthFacility")
     */
    protected $serviceHealthFacilities;

//    /**
//     * @ORM\OneToMany(targetEntity="RxConnexionBundle\Entity\LocationEntity", mappedBy="healthFacility", cascade="remove")
//     */
//    protected $locations;

    /**
     * @ORM\OneToMany(targetEntity="RxConnexionBundle\Entity\InventoryEntity", mappedBy="healthFacility")
     */
    protected $inventories;

    /**
     * @ORM\OneToMany(targetEntity="RxConnexionBundle\Entity\AddInventoryEntity", mappedBy="healthFacility")
     */
    protected $addInventories;

    /**
     * @ORM\OneToMany(targetEntity="RxConnexionBundle\Entity\TransferInventoryEntity", mappedBy="branchFrom")
     */
    protected $transferInventoriesFrom;

    /**
     * @ORM\OneToMany(targetEntity="RxConnexionBundle\Entity\TransferInventoryEntity", mappedBy="branchTo")
     */
    protected $transferInventoriesTo;


    public function __construct()
    {

        $this->schedules = new ArrayCollection();
        $this->schedulesQueued = new ArrayCollection();
        $this->scheduleRequests = new ArrayCollection();
        $this->patientCharts = new ArrayCollection();
        $this->photos = new ArrayCollection();
        $this->providerHealthFacilities = new ArrayCollection();
        $this->generalUserHealthFacilities = new ArrayCollection();
        $this->providerWorkSchedules = new ArrayCollection();
        $this->referrals = new ArrayCollection();
        $this->patientHealthFacilities = new ArrayCollection();
        $this->patients = new ArrayCollection();
        $this->serviceHealthFacilities = new ArrayCollection();
        $this->inventories = new ArrayCollection();
        $this->addInventories = new ArrayCollection();
//        $this->transferInventoryLocationsFrom = new ArrayCollection();
        $this->transferInventoriesTo = new ArrayCollection();
        $this->addInventories = new ArrayCollection();
//        $this->locations = new ArrayCollection();
    }

    /**
     * Set createdAt
     *
     * @ORM\PrePersist
     */
    public function setCreatedAtValue()
    {
        parent::setCreatedAtValue();
        $this->isDeleted = 0;;
        $this->updateAddress();
        $this->updateTimeFields();
    }

    /**
     * Set updatedAt
     *
     * @ORM\PreUpdate
     */
    public function setUpdatedAtValue()
    {
        parent::setUpdatedAtValue();
        $this->updateAddress();
        $this->updateTimeFields();
    }

    /**
     * Concatenate opening and closing time
     */
    public function updateTimeFields() {

        $this->openingTime = sprintf('%002d', $this->openingTimeHour) . ':' . sprintf('%002d', $this->openingTimeMinute) . ' ' . $this->openingTimePeriod;
        $this->closingTime = sprintf('%002d', $this->closingTimeHour) . ':' . sprintf('%002d', $this->closingTimeMinute) . ' ' . $this->closingTimePeriod;
        $this->queueingStartTime = sprintf('%002d', $this->queueingStartTimeHour) . ':' . sprintf('%002d', $this->queueingStartTimeMinute) . ' ' . $this->queueingStartTimePeriod;
        $this->queueingEndTime = sprintf('%002d', $this->queueingEndTimeHour) . ':' . sprintf('%002d', $this->queueingEndTimeMinute) . ' ' . $this->queueingEndTimePeriod;

        return $this;
    }

    /**
     * Remove the photo from the disk
     *
     * @ORM\PreRemove
     */
    public function removePhotoFile() {

        $file = $this->getUploadRootDir() . '/' . $this->parsedPhotoDescription;
        if(!empty($this->parsedPhotoDescription) && file_exists($file)) unlink($file);
    }

    /**
     * Concatenate address
     */
    public function updateAddress() {
        $this->address = $this->street . ' ' . ($this->city ? $this->city->getDescription() . ', ' . ($this->city->getProvince() != null ? $this->city->getProvince()->getDescription() : '') . ' ' . ($this->city->getProvince() != null ? $this->city->getProvince()->getCountry()->getDescription() : '')  . ' ' : '') . ($this->getPostalCode() ? $this->getPostalCode()->getDescription() : '');
    }

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

    /**
     * Get uploadDir
     *
     * @return string
     */
    public function getUploadDir() {

        return 'uploads/health_facility/photo';
    }

    /**
     * Get uploadRootDir
     *
     * @return string
     */
    public function getUploadRootDir() {

        return __DIR__ . '/../../../web/' . $this->getUploadDir();
    }

    /**
     * get photoWebPath
     *
     * @return string
     */
    public function getPhotoWebPath() {

        $parsedDesc = $this->parsedPhotoDescription;
        $file = $this->getUploadRootDir() . '/' . $parsedDesc;

        if(!empty($parsedDesc) && file_exists($file)) {
            return '/' . $this->getUploadDir() . '/' . $parsedDesc;
        } else {
            return '';
        }
    }

    /**
     * Get concatenatedMobileNo
     *
     * return string
     */
    public function getConcatenatedMobileNo() {

        $mobileNos = '';
        if(!empty($this->mobileNo)) $mobileNos .= (!empty($mobileNos) ? ', ' : '') . $this->mobileNo;
        if(!empty($this->mobileNoTwo)) $mobileNos .= (!empty($mobileNos) ? ', ' : '') . $this->mobileNoTwo;
        if(!empty($this->mobileNoThree)) $mobileNos .= (!empty($mobileNos) ? ', ' : '') . $this->mobileNoThree;

        return $mobileNos;
    }

    /**
     * Get concatenatedPhoneNo
     *
     * return string
     */
    public function getConcatenatedPhoneNo() {

        $phoneNos = '';
        if(!empty($this->phoneNo)) $phoneNos .= (!empty($phoneNos) ? ', ' : '') . $this->phoneNo;
        if(!empty($this->phoneNoTwo)) $phoneNos .= (!empty($phoneNos) ? ', ' : '') . $this->phoneNoTwo;
        if(!empty($this->phoneNoThree)) $phoneNos .= (!empty($phoneNos) ? ', ' : '') . $this->phoneNoThree;

        return $phoneNos;
    }

    /**
     * Get concatenatedEmail
     *
     * return string
     */
    public function getConcatenatedEmail() {

        $emails = '';
        if(!empty($this->email)) $emails .= (!empty($emails) ? ', ' : '') . $this->email;
        if(!empty($this->emailTwo)) $emails .= (!empty($emails) ? ', ' : '') . $this->emailTwo;
        if(!empty($this->emailThree)) $emails .= (!empty($emails) ? ', ' : '') . $this->emailThree;

        return $emails;
    }

    /**
     * Get nowServingQueueNo
     *
     * @param string $scheduleDate
     * @param \RxConnexionBundle\Entity\ProviderEntity $provider
     * @return string
     */
    public function getNowServingQueueNo($scheduleDate, \RxConnexionBundle\Entity\ProviderEntity $provider) {

        $queueNo = 0;

        foreach($this->scheduleRequests as $scheduleRequest) {

            if($scheduleRequest->getScheduleDateAsString() === date('m/d/Y', strtotime($scheduleDate)) && $scheduleRequest->getProvider() === $provider && $scheduleRequest->getStatus() === 'Queued' && $queueNo < $scheduleRequest->getQueueNo()) {

                $queueNo = $scheduleRequest->getQueueNo();
                break;
            }
        }

        return $queueNo;
    }

    /**
     * Get scheduleRequestsForLive
     *
     * @return array
     */
    public function getScheduleRequestsForLive() {

        $returnRecords = array();
        $scheduleDate = date('m/d/Y');

        $lastKey = 0;

        foreach($this->providerHealthFacilities as $providerHealthFacility) {

            foreach($this->scheduleRequests as $scheduleRequest) {

                if($scheduleRequest->getScheduleDateAsString() === $scheduleDate && $scheduleRequest->getProvider() === $providerHealthFacility->getProvider() && $scheduleRequest->getStatus() === 'Queued') {

                    if(count($returnRecords)) {

                        if(count($returnRecords[$lastKey]) === 2) {

                            $returnRecords[] = array($scheduleRequest);
                            $lastKey++;

                        } else {

                            $returnRecords[$lastKey][] = $scheduleRequest;
                        }

                    } else {

                        $returnRecords[] = array($scheduleRequest);
                    }

                    break;
                }
            }
        }

        return $returnRecords;
    }

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


    /**
     * Set branchDescription
     *
     * @param string $branchDescription
     *
     * @return HealthFacilityEntity
     */
    public function setBranchDescription($branchDescription)
    {
        $this->branchDescription = $branchDescription;

        return $this;
    }

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

    /**
     * Set description
     *
     * @param string $description
     *
     * @return HealthFacilityEntity
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

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

    /**
     * Set address
     *
     * @param string $address
     *
     * @return HealthFacilityEntity
     */
    public function setAddress($address)
    {
        $this->address = $address;

        return $this;
    }

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

    /**
     * Set geoLatitude
     *
     * @param string $geoLatitude
     *
     * @return HealthFacilityEntity
     */
    public function setGeoLatitude($geoLatitude)
    {
        $this->geoLatitude = $geoLatitude;

        return $this;
    }

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

    /**
     * Set geoLongitude
     *
     * @param string $geoLongitude
     *
     * @return HealthFacilityEntity
     */
    public function setGeoLongitude($geoLongitude)
    {
        $this->geoLongitude = $geoLongitude;

        return $this;
    }

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

    /**
     * Set street
     *
     * @param string $street
     *
     * @return HealthFacilityEntity
     */
    public function setStreet($street)
    {
        $this->street = $street;

        return $this;
    }

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

    /**
     * Set scheduleType
     *
     * @param string $scheduleType
     *
     * @return HealthFacilityEntity
     */
    public function setScheduleType($scheduleType)
    {
        $this->scheduleType = $scheduleType;

        return $this;
    }

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

    /**
     * Set mobileNo
     *
     * @param string $mobileNo
     *
     * @return HealthFacilityEntity
     */
    public function setMobileNo($mobileNo)
    {
        $this->mobileNo = $mobileNo;

        return $this;
    }

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

    /**
     * Set mobileNoTwo
     *
     * @param string $mobileNoTwo
     *
     * @return HealthFacilityEntity
     */
    public function setMobileNoTwo($mobileNoTwo)
    {
        $this->mobileNoTwo = $mobileNoTwo;

        return $this;
    }

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

    /**
     * Set mobileNoThree
     *
     * @param string $mobileNoThree
     *
     * @return HealthFacilityEntity
     */
    public function setMobileNoThree($mobileNoThree)
    {
        $this->mobileNoThree = $mobileNoThree;

        return $this;
    }

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

    /**
     * Set phoneNo
     *
     * @param string $phoneNo
     *
     * @return HealthFacilityEntity
     */
    public function setPhoneNo($phoneNo)
    {
        $this->phoneNo = $phoneNo;

        return $this;
    }

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

    /**
     * Set phoneNoTwo
     *
     * @param string $phoneNoTwo
     *
     * @return HealthFacilityEntity
     */
    public function setPhoneNoTwo($phoneNoTwo)
    {
        $this->phoneNoTwo = $phoneNoTwo;

        return $this;
    }

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

    /**
     * Set phoneNoThree
     *
     * @param string $phoneNoThree
     *
     * @return HealthFacilityEntity
     */
    public function setPhoneNoThree($phoneNoThree)
    {
        $this->phoneNoThree = $phoneNoThree;

        return $this;
    }

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

    /**
     * Set email
     *
     * @param string $email
     *
     * @return HealthFacilityEntity
     */
    public function setEmail($email)
    {
        $this->email = $email;

        return $this;
    }

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

    /**
     * Set emailTwo
     *
     * @param string $emailTwo
     *
     * @return HealthFacilityEntity
     */
    public function setEmailTwo($emailTwo)
    {
        $this->emailTwo = $emailTwo;

        return $this;
    }

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

    /**
     * Set emailThree
     *
     * @param string $emailThree
     *
     * @return HealthFacilityEntity
     */
    public function setEmailThree($emailThree)
    {
        $this->emailThree = $emailThree;

        return $this;
    }

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

    /**
     * Set website
     *
     * @param string $website
     *
     * @return HealthFacilityEntity
     */
    public function setWebsite($website)
    {
        $this->website = $website;

        return $this;
    }

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

    /**
     * Set twitter
     *
     * @param string $twitter
     *
     * @return HealthFacilityEntity
     */
    public function setTwitter($twitter)
    {
        $this->twitter = $twitter;

        return $this;
    }

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

    /**
     * Set facebook
     *
     * @param string $facebook
     *
     * @return HealthFacilityEntity
     */
    public function setFacebook($facebook)
    {
        $this->facebook = $facebook;

        return $this;
    }

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

    /**
     * Set services
     *
     * @param string $services
     *
     * @return HealthFacilityEntity
     */
    public function setServices($services)
    {
        $this->services = $services;

        return $this;
    }

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

    /**
     * Set photoDescription
     *
     * @param string $photoDescription
     *
     * @return HealthFacilityEntity
     */
    public function setPhotoDescription($photoDescription)
    {
        $this->photoDescription = $photoDescription;

        return $this;
    }

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

    /**
     * Set parsedPhotoDescription
     *
     * @param string $parsedPhotoDescription
     *
     * @return HealthFacilityEntity
     */
    public function setParsedPhotoDescription($parsedPhotoDescription)
    {
        $this->parsedPhotoDescription = $parsedPhotoDescription;

        return $this;
    }

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

    /**
     * Set openingTime
     *
     * @param string $openingTime
     *
     * @return HealthFacilityEntity
     */
    public function setOpeningTime($openingTime)
    {
        $this->openingTime = $openingTime;

        return $this;
    }

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

    /**
     * Set openingTimeHour
     *
     * @param integer $openingTimeHour
     *
     * @return HealthFacilityEntity
     */
    public function setOpeningTimeHour($openingTimeHour)
    {
        $this->openingTimeHour = $openingTimeHour;

        return $this;
    }

    /**
     * Get openingTimeHour
     *
     * @return integer
     */
    public function getOpeningTimeHour()
    {
        return $this->openingTimeHour;
    }

    /**
     * Set openingTimeMinute
     *
     * @param integer $openingTimeMinute
     *
     * @return HealthFacilityEntity
     */
    public function setOpeningTimeMinute($openingTimeMinute)
    {
        $this->openingTimeMinute = $openingTimeMinute;

        return $this;
    }

    /**
     * Get openingTimeMinute
     *
     * @return integer
     */
    public function getOpeningTimeMinute()
    {
        return $this->openingTimeMinute;
    }

    /**
     * Set openingTimePeriod
     *
     * @param string $openingTimePeriod
     *
     * @return HealthFacilityEntity
     */
    public function setOpeningTimePeriod($openingTimePeriod)
    {
        $this->openingTimePeriod = $openingTimePeriod;

        return $this;
    }

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

    /**
     * Set closingTime
     *
     * @param string $closingTime
     *
     * @return HealthFacilityEntity
     */
    public function setClosingTime($closingTime)
    {
        $this->closingTime = $closingTime;

        return $this;
    }

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

    /**
     * Set closingTimeHour
     *
     * @param integer $closingTimeHour
     *
     * @return HealthFacilityEntity
     */
    public function setClosingTimeHour($closingTimeHour)
    {
        $this->closingTimeHour = $closingTimeHour;

        return $this;
    }

    /**
     * Get closingTimeHour
     *
     * @return integer
     */
    public function getClosingTimeHour()
    {
        return $this->closingTimeHour;
    }

    /**
     * Set closingTimeMinute
     *
     * @param integer $closingTimeMinute
     *
     * @return HealthFacilityEntity
     */
    public function setClosingTimeMinute($closingTimeMinute)
    {
        $this->closingTimeMinute = $closingTimeMinute;

        return $this;
    }

    /**
     * Get closingTimeMinute
     *
     * @return integer
     */
    public function getClosingTimeMinute()
    {
        return $this->closingTimeMinute;
    }

    /**
     * Set closingTimePeriod
     *
     * @param string $closingTimePeriod
     *
     * @return HealthFacilityEntity
     */
    public function setClosingTimePeriod($closingTimePeriod)
    {
        $this->closingTimePeriod = $closingTimePeriod;

        return $this;
    }

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

    /**
     * Set queueingStartTime
     *
     * @param string $queueingStartTime
     *
     * @return HealthFacilityEntity
     */
    public function setQueueingStartTime($queueingStartTime)
    {
        $this->queueingStartTime = $queueingStartTime;

        return $this;
    }

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

    /**
     * Set queueingStartTimeHour
     *
     * @param integer $queueingStartTimeHour
     *
     * @return HealthFacilityEntity
     */
    public function setQueueingStartTimeHour($queueingStartTimeHour)
    {
        $this->queueingStartTimeHour = $queueingStartTimeHour;

        return $this;
    }

    /**
     * Get queueingStartTimeHour
     *
     * @return integer
     */
    public function getQueueingStartTimeHour()
    {
        return $this->queueingStartTimeHour;
    }

    /**
     * Set queueingStartTimeMinute
     *
     * @param integer $queueingStartTimeMinute
     *
     * @return HealthFacilityEntity
     */
    public function setQueueingStartTimeMinute($queueingStartTimeMinute)
    {
        $this->queueingStartTimeMinute = $queueingStartTimeMinute;

        return $this;
    }

    /**
     * Get queueingStartTimeMinute
     *
     * @return integer
     */
    public function getQueueingStartTimeMinute()
    {
        return $this->queueingStartTimeMinute;
    }

    /**
     * Set queueingStartTimePeriod
     *
     * @param string $queueingStartTimePeriod
     *
     * @return HealthFacilityEntity
     */
    public function setQueueingStartTimePeriod($queueingStartTimePeriod)
    {
        $this->queueingStartTimePeriod = $queueingStartTimePeriod;

        return $this;
    }

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

    /**
     * Set queueingEndTime
     *
     * @param string $queueingEndTime
     *
     * @return HealthFacilityEntity
     */
    public function setQueueingEndTime($queueingEndTime)
    {
        $this->queueingEndTime = $queueingEndTime;

        return $this;
    }

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

    /**
     * Set queueingEndTimeHour
     *
     * @param integer $queueingEndTimeHour
     *
     * @return HealthFacilityEntity
     */
    public function setQueueingEndTimeHour($queueingEndTimeHour)
    {
        $this->queueingEndTimeHour = $queueingEndTimeHour;

        return $this;
    }

    /**
     * Get queueingEndTimeHour
     *
     * @return integer
     */
    public function getQueueingEndTimeHour()
    {
        return $this->queueingEndTimeHour;
    }

    /**
     * Set queueingEndTimeMinute
     *
     * @param integer $queueingEndTimeMinute
     *
     * @return HealthFacilityEntity
     */
    public function setQueueingEndTimeMinute($queueingEndTimeMinute)
    {
        $this->queueingEndTimeMinute = $queueingEndTimeMinute;

        return $this;
    }

    /**
     * Get queueingEndTimeMinute
     *
     * @return integer
     */
    public function getQueueingEndTimeMinute()
    {
        return $this->queueingEndTimeMinute;
    }

    /**
     * Set queueingEndTimePeriod
     *
     * @param string $queueingEndTimePeriod
     *
     * @return HealthFacilityEntity
     */
    public function setQueueingEndTimePeriod($queueingEndTimePeriod)
    {
        $this->queueingEndTimePeriod = $queueingEndTimePeriod;

        return $this;
    }

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

    /**
     * Set healthFacilityType
     *
     * @param \RxConnexionBundle\Entity\HealthFacilityTypeEntity $healthFacilityType
     *
     * @return HealthFacilityEntity
     */
    public function setHealthFacilityType(\RxConnexionBundle\Entity\HealthFacilityTypeEntity $healthFacilityType = null)
    {
        $this->healthFacilityType = $healthFacilityType;

        return $this;
    }

    /**
     * Get healthFacilityType
     *
     * @return \RxConnexionBundle\Entity\HealthFacilityTypeEntity
     */
    public function getHealthFacilityType()
    {
        return $this->healthFacilityType;
    }

    /**
     * Set city
     *
     * @param \RxConnexionBundle\Entity\CityEntity $city
     *
     * @return HealthFacilityEntity
     */
    public function setCity(\RxConnexionBundle\Entity\CityEntity $city = null)
    {
        $this->city = $city;

        return $this;
    }

    /**
     * Get city
     *
     * @return \RxConnexionBundle\Entity\CityEntity
     */
    public function getCity()
    {
        return $this->city;
    }

    /**
     * Set account
     *
     * @param \RxConnexionBundle\Entity\AccountEntity $account
     *
     * @return HealthFacilityEntity
     */
    public function setAccount(\RxConnexionBundle\Entity\AccountEntity $account = null)
    {
        $this->account = $account;

        return $this;
    }

    /**
     * Get account
     *
     * @return \RxConnexionBundle\Entity\AccountEntity
     */
    public function getAccount()
    {
        return $this->account;
    }

    /**
     * Add schedule
     *
     * @param \RxConnexionBundle\Entity\ScheduleEntity $schedule
     *
     * @return HealthFacilityEntity
     */
    public function addSchedule(\RxConnexionBundle\Entity\ScheduleEntity $schedule)
    {
        $this->schedules[] = $schedule;

        return $this;
    }

    /**
     * Remove schedule
     *
     * @param \RxConnexionBundle\Entity\ScheduleEntity $schedule
     */
    public function removeSchedule(\RxConnexionBundle\Entity\ScheduleEntity $schedule)
    {
        $this->schedules->removeElement($schedule);
    }

    /**
     * Get schedules
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getSchedules()
    {
        return $this->schedules;
    }

    /**
     * Add schedulesQueued
     *
     * @param \RxConnexionBundle\Entity\ScheduleQueuedEntity $schedulesQueued
     *
     * @return HealthFacilityEntity
     */
    public function addSchedulesQueued(\RxConnexionBundle\Entity\ScheduleQueuedEntity $schedulesQueued)
    {
        $this->schedulesQueued[] = $schedulesQueued;

        return $this;
    }

    /**
     * Remove schedulesQueued
     *
     * @param \RxConnexionBundle\Entity\ScheduleQueuedEntity $schedulesQueued
     */
    public function removeSchedulesQueued(\RxConnexionBundle\Entity\ScheduleQueuedEntity $schedulesQueued)
    {
        $this->schedulesQueued->removeElement($schedulesQueued);
    }

    /**
     * Get schedulesQueued
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getSchedulesQueued()
    {
        return $this->schedulesQueued;
    }

    /**
     * Add scheduleRequest
     *
     * @param \RxConnexionBundle\Entity\ScheduleRequestEntity $scheduleRequest
     *
     * @return HealthFacilityEntity
     */
    public function addScheduleRequest(\RxConnexionBundle\Entity\ScheduleRequestEntity $scheduleRequest)
    {
        $this->scheduleRequests[] = $scheduleRequest;

        return $this;
    }

    /**
     * Remove scheduleRequest
     *
     * @param \RxConnexionBundle\Entity\ScheduleRequestEntity $scheduleRequest
     */
    public function removeScheduleRequest(\RxConnexionBundle\Entity\ScheduleRequestEntity $scheduleRequest)
    {
        $this->scheduleRequests->removeElement($scheduleRequest);
    }

    /**
     * Get scheduleRequests
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getScheduleRequests()
    {
        return $this->scheduleRequests;
    }

    /**
     * Add patientChart
     *
     * @param \RxConnexionBundle\Entity\PatientChartEntity $patientChart
     *
     * @return HealthFacilityEntity
     */
    public function addPatientChart(\RxConnexionBundle\Entity\PatientChartEntity $patientChart)
    {
        $this->patientCharts[] = $patientChart;

        return $this;
    }

    /**
     * Remove patientChart
     *
     * @param \RxConnexionBundle\Entity\PatientChartEntity $patientChart
     */
    public function removePatientChart(\RxConnexionBundle\Entity\PatientChartEntity $patientChart)
    {
        $this->patientCharts->removeElement($patientChart);
    }

    /**
     * Get patientCharts
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getPatientCharts()
    {
        return $this->patientCharts;
    }

    /**
     * Add photo
     *
     * @param \RxConnexionBundle\Entity\HealthFacilityPhotoEntity $photo
     *
     * @return HealthFacilityEntity
     */
    public function addPhoto(\RxConnexionBundle\Entity\HealthFacilityPhotoEntity $photo)
    {
        $this->photos[] = $photo;

        return $this;
    }

    /**
     * Remove photo
     *
     * @param \RxConnexionBundle\Entity\HealthFacilityPhotoEntity $photo
     */
    public function removePhoto(\RxConnexionBundle\Entity\HealthFacilityPhotoEntity $photo)
    {
        $this->photos->removeElement($photo);
    }

    /**
     * Get photos
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getPhotos()
    {
        return $this->photos;
    }

    /**
     * Add providerHealthFacility
     *
     * @param \RxConnexionBundle\Entity\ProviderHealthFacilityEntity $providerHealthFacility
     *
     * @return HealthFacilityEntity
     */
    public function addProviderHealthFacility(\RxConnexionBundle\Entity\ProviderHealthFacilityEntity $providerHealthFacility)
    {
        $this->providerHealthFacilities[] = $providerHealthFacility;

        return $this;
    }

    /**
     * Remove providerHealthFacility
     *
     * @param \RxConnexionBundle\Entity\ProviderHealthFacilityEntity $providerHealthFacility
     */
    public function removeProviderHealthFacility(\RxConnexionBundle\Entity\ProviderHealthFacilityEntity $providerHealthFacility)
    {
        $this->providerHealthFacilities->removeElement($providerHealthFacility);
    }

    /**
     * Get providerHealthFacilities
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getProviderHealthFacilities()
    {
        return $this->providerHealthFacilities;
    }

    /**
     * Add generalUserHealthFacility
     *
     * @param \RxConnexionBundle\Entity\GeneralUserHealthFacilityEntity $generalUserHealthFacility
     *
     * @return HealthFacilityEntity
     */
    public function addGeneralUserHealthFacility(\RxConnexionBundle\Entity\GeneralUserHealthFacilityEntity $generalUserHealthFacility)
    {
        $this->generalUserHealthFacilities[] = $generalUserHealthFacility;

        return $this;
    }

    /**
     * Remove generalUserHealthFacility
     *
     * @param \RxConnexionBundle\Entity\GeneralUserHealthFacilityEntity $generalUserHealthFacility
     */
    public function removeGeneralUserHealthFacility(\RxConnexionBundle\Entity\GeneralUserHealthFacilityEntity $generalUserHealthFacility)
    {
        $this->generalUserHealthFacilities->removeElement($generalUserHealthFacility);
    }

    /**
     * Get generalUserHealthFacilities
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getGeneralUserHealthFacilities()
    {
        return $this->generalUserHealthFacilities;
    }

    /**
     * Set postalCode
     *
     * @param \RxConnexionBundle\Entity\PostalCodeEntity $postalCode
     *
     * @return HealthFacilityEntity
     */
    public function setPostalCode(\RxConnexionBundle\Entity\PostalCodeEntity $postalCode = null)
    {
        $this->postalCode = $postalCode;

        return $this;
    }

    /**
     * Get postalCode
     *
     * @return \RxConnexionBundle\Entity\PostalCodeEntity
     */
    public function getPostalCode()
    {
        return $this->postalCode;
    }

    /**
     * Set company
     *
     * @param \RxConnexionBundle\Entity\CompanyEntity $company
     *
     * @return HealthFacilityEntity
     */
    public function setCompany(\RxConnexionBundle\Entity\CompanyEntity $company = null)
    {
        $this->company = $company;

        return $this;
    }

    /**
     * Get company
     *
     * @return \RxConnexionBundle\Entity\CompanyEntity
     */
    public function getCompany()
    {
        return $this->company;
    }

    /**
     * Set oldSysId
     *
     * @param string $oldSysId
     *
     * @return HealthFacilityEntity
     */
    public function setOldSysId($oldSysId)
    {
        $this->oldSysId = $oldSysId;

        return $this;
    }

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

    /**
     * Add providerWorkSchedule
     *
     * @param \RxConnexionBundle\Entity\ProviderWorkScheduleEntity $providerWorkSchedule
     *
     * @return HealthFacilityEntity
     */
    public function addProviderWorkSchedule(\RxConnexionBundle\Entity\ProviderWorkScheduleEntity $providerWorkSchedule)
    {
        $this->providerWorkSchedules[] = $providerWorkSchedule;

        return $this;
    }

    /**
     * Remove providerWorkSchedule
     *
     * @param \RxConnexionBundle\Entity\ProviderWorkScheduleEntity $providerWorkSchedule
     */
    public function removeProviderWorkSchedule(\RxConnexionBundle\Entity\ProviderWorkScheduleEntity $providerWorkSchedule)
    {
        $this->providerWorkSchedules->removeElement($providerWorkSchedule);
    }

    /**
     * Get providerWorkSchedules
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getProviderWorkSchedules()
    {
        return $this->providerWorkSchedules;
    }

    /**
     * Add faxTran
     *
     * @param \RxConnexionBundle\Entity\FaxTranEntity $faxTran
     *
     * @return HealthFacilityEntity
     */
    public function addFaxTran(\RxConnexionBundle\Entity\FaxTranEntity $faxTran)
    {
        $this->faxTrans[] = $faxTran;

        return $this;
    }

    /**
     * Remove faxTran
     *
     * @param \RxConnexionBundle\Entity\FaxTranEntity $faxTran
     */
    public function removeFaxTran(\RxConnexionBundle\Entity\FaxTranEntity $faxTran)
    {
        $this->faxTrans->removeElement($faxTran);
    }

    /**
     * Get faxTrans
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getFaxTrans()
    {
        return $this->faxTrans;
    }

    /**
     * Set geoLat
     *
     * @param string $geoLat
     *
     * @return HealthFacilityEntity
     */
    public function setGeoLat($geoLat)
    {
        $this->geoLat = $geoLat;

        return $this;
    }

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

    /**
     * Set geoLong
     *
     * @param string $geoLong
     *
     * @return HealthFacilityEntity
     */
    public function setGeoLong($geoLong)
    {
        $this->geoLong = $geoLong;

        return $this;
    }

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

    /**
     * Set generalUser
     *
     * @param \RxConnexionBundle\Entity\GeneralUserEntity $generalUser
     *
     * @return HealthFacilityEntity
     */
    public function setGeneralUser(\RxConnexionBundle\Entity\GeneralUserEntity $generalUser = null)
    {
        $this->generalUser = $generalUser;

        return $this;
    }

    /**
     * Get generalUser
     *
     * @return \RxConnexionBundle\Entity\GeneralUserEntity
     */
    public function getGeneralUser()
    {
        return $this->generalUser;
    }

    /**
     * Add referral
     *
     * @param \RxConnexionBundle\Entity\ReferralEntity $referral
     *
     * @return HealthFacilityEntity
     */
    public function addReferral(\RxConnexionBundle\Entity\ReferralEntity $referral)
    {
        $this->referrals[] = $referral;

        return $this;
    }

    /**
     * Remove referral
     *
     * @param \RxConnexionBundle\Entity\ReferralEntity $referral
     */
    public function removeReferral(\RxConnexionBundle\Entity\ReferralEntity $referral)
    {
        $this->referrals->removeElement($referral);
    }

    /**
     * Get referrals
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getReferrals()
    {
        return $this->referrals;
    }

    /**
     * Set isActive
     *
     * @param boolean $isActive
     *
     * @return HealthFacilityEntity
     */
    public function setIsActive($isActive)
    {
        $this->isActive = $isActive;

        return $this;
    }

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

    /**
     * Set accountUserHealthFacilities
     *
     * @param \RxConnexionBundle\Entity\AccountUserHealthFacilityEntity $accountUserHealthFacilities
     *
     * @return HealthFacilityEntity
     */
    public function setAccountUserHealthFacilities(\RxConnexionBundle\Entity\AccountUserHealthFacilityEntity $accountUserHealthFacilities = null)
    {
        $this->accountUserHealthFacilities = $accountUserHealthFacilities;

        return $this;
    }

    /**
     * Get accountUserHealthFacilities
     *
     * @return \RxConnexionBundle\Entity\AccountUserHealthFacilityEntity
     */
    public function getAccountUserHealthFacilities()
    {
        return $this->accountUserHealthFacilities;
    }

    /**
     * Set isDeleted
     *
     * @param boolean $isDeleted
     *
     * @return HealthFacilityEntity
     */
    public function setIsDeleted($isDeleted)
    {
        $this->isDeleted = $isDeleted;

        return $this;
    }

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

    /**
     * Add accountUserHealthFacility
     *
     * @param \RxConnexionBundle\Entity\AccountUserHealthFacilityEntity $accountUserHealthFacility
     *
     * @return HealthFacilityEntity
     */
    public function addAccountUserHealthFacility(\RxConnexionBundle\Entity\AccountUserHealthFacilityEntity $accountUserHealthFacility)
    {
        $this->accountUserHealthFacilities[] = $accountUserHealthFacility;

        return $this;
    }

    /**
     * Remove accountUserHealthFacility
     *
     * @param \RxConnexionBundle\Entity\AccountUserHealthFacilityEntity $accountUserHealthFacility
     */
    public function removeAccountUserHealthFacility(\RxConnexionBundle\Entity\AccountUserHealthFacilityEntity $accountUserHealthFacility)
    {
        $this->accountUserHealthFacilities->removeElement($accountUserHealthFacility);
    }

    /**
     * Add patientHealthFacility
     *
     * @param \RxConnexionBundle\Entity\PatientHealthFacilityEntity $patientHealthFacility
     *
     * @return HealthFacilityEntity
     */
    public function addPatientHealthFacility(\RxConnexionBundle\Entity\PatientHealthFacilityEntity $patientHealthFacility)
    {
        $this->patientHealthFacilities[] = $patientHealthFacility;

        return $this;
    }

    /**
     * Remove patientHealthFacility
     *
     * @param \RxConnexionBundle\Entity\PatientHealthFacilityEntity $patientHealthFacility
     */
    public function removePatientHealthFacility(\RxConnexionBundle\Entity\PatientHealthFacilityEntity $patientHealthFacility)
    {
        $this->patientHealthFacilities->removeElement($patientHealthFacility);
    }

    /**
     * Get patientHealthFacilities
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getPatientHealthFacilities()
    {
        return $this->patientHealthFacilities;
    }

    /**
     * Add patient
     *
     * @param \RxConnexionBundle\Entity\PatientEntity $patient
     *
     * @return HealthFacilityEntity
     */
    public function addPatient(\RxConnexionBundle\Entity\PatientEntity $patient)
    {
        $this->patients[] = $patient;

        return $this;
    }

    /**
     * Remove patient
     *
     * @param \RxConnexionBundle\Entity\PatientEntity $patient
     */
    public function removePatient(\RxConnexionBundle\Entity\PatientEntity $patient)
    {
        $this->patients->removeElement($patient);
    }

    /**
     * Get patients
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getPatients()
    {
        return $this->patients;
    }

    /**
     * Add patientBilling
     *
     * @param \RxConnexionBundle\Entity\PatientBillingEntity $patientBilling
     *
     * @return HealthFacilityEntity
     */
    public function addPatientBilling(\RxConnexionBundle\Entity\PatientBillingEntity $patientBilling)
    {
        $this->patientBillings[] = $patientBilling;

        return $this;
    }

    /**
     * Remove patientBilling
     *
     * @param \RxConnexionBundle\Entity\PatientBillingEntity $patientBilling
     */
    public function removePatientBilling(\RxConnexionBundle\Entity\PatientBillingEntity $patientBilling)
    {
        $this->patientBillings->removeElement($patientBilling);
    }

    /**
     * Get patientBillings
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getPatientBillings()
    {
        return $this->patientBillings;
    }

    /**
     * Set noOfClinician
     *
     * @param integer $noOfClinician
     *
     * @return HealthFacilityEntity
     */
    public function setNoOfClinician($noOfClinician)
    {
        $this->noOfClinician = $noOfClinician;

        return $this;
    }

    /**
     * Get noOfClinician
     *
     * @return integer
     */
    public function getNoOfClinician()
    {
        return $this->noOfClinician;
    }

    /**
     * Add serviceHealthFacility
     *
     * @param \RxConnexionBundle\Entity\PatientServiceEntity $serviceHealthFacility
     *
     * @return HealthFacilityEntity
     */
    public function addServiceHealthFacility(\RxConnexionBundle\Entity\PatientServiceEntity $serviceHealthFacility)
    {
        $this->serviceHealthFacilities[] = $serviceHealthFacility;

        return $this;
    }

    /**
     * Remove serviceHealthFacility
     *
     * @param \RxConnexionBundle\Entity\PatientServiceEntity $serviceHealthFacility
     */
    public function removeServiceHealthFacility(\RxConnexionBundle\Entity\PatientServiceEntity $serviceHealthFacility)
    {
        $this->serviceHealthFacilities->removeElement($serviceHealthFacility);
    }

    /**
     * Get serviceHealthFacilities
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getServiceHealthFacilities()
    {
        return $this->serviceHealthFacilities;
    }

    /**
     * Add patientRental
     *
     * @param \RxConnexionBundle\Entity\PatientRentalEntity $patientRental
     *
     * @return HealthFacilityEntity
     */
    public function addPatientRental(\RxConnexionBundle\Entity\PatientRentalEntity $patientRental)
    {
        $this->patientRentals[] = $patientRental;

        return $this;
    }

    /**
     * Remove patientRental
     *
     * @param \RxConnexionBundle\Entity\PatientRentalEntity $patientRental
     */
    public function removePatientRental(\RxConnexionBundle\Entity\PatientRentalEntity $patientRental)
    {
        $this->patientRentals->removeElement($patientRental);
    }

    /**
     * Get patientRentals
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getPatientRentals()
    {
        return $this->patientRentals;
    }

    /**
     * Add addressForPatientBilling
     *
     * @param \RxConnexionBundle\Entity\PatientBillingEntity $addressForPatientBilling
     *
     * @return HealthFacilityEntity
     */
    public function addAddressForPatientBilling(\RxConnexionBundle\Entity\PatientBillingEntity $addressForPatientBilling)
    {
        $this->addressForPatientBillings[] = $addressForPatientBilling;

        return $this;
    }

    /**
     * Remove addressForPatientBilling
     *
     * @param \RxConnexionBundle\Entity\PatientBillingEntity $addressForPatientBilling
     */
    public function removeAddressForPatientBilling(\RxConnexionBundle\Entity\PatientBillingEntity $addressForPatientBilling)
    {
        $this->addressForPatientBillings->removeElement($addressForPatientBilling);
    }

    /**
     * Get addressForPatientBillings
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getAddressForPatientBillings()
    {
        return $this->addressForPatientBillings;
    }

    /**
     * Add addressForPatientRental
     *
     * @param \RxConnexionBundle\Entity\PatientRentalEntity $addressForPatientRental
     *
     * @return HealthFacilityEntity
     */
    public function addAddressForPatientRental(\RxConnexionBundle\Entity\PatientRentalEntity $addressForPatientRental)
    {
        $this->addressForPatientRentals[] = $addressForPatientRental;

        return $this;
    }

    /**
     * Remove addressForPatientRental
     *
     * @param \RxConnexionBundle\Entity\PatientRentalEntity $addressForPatientRental
     */
    public function removeAddressForPatientRental(\RxConnexionBundle\Entity\PatientRentalEntity $addressForPatientRental)
    {
        $this->addressForPatientRentals->removeElement($addressForPatientRental);
    }

    /**
     * Get addressForPatientRentals
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getAddressForPatientRentals()
    {
        return $this->addressForPatientRentals;
    }

    /**
     * Add inventory
     *
     * @param \RxConnexionBundle\Entity\InventoryEntity $inventory
     *
     * @return HealthFacilityEntity
     */
    public function addInventory(\RxConnexionBundle\Entity\InventoryEntity $inventory)
    {
        $this->inventories[] = $inventory;

        return $this;
    }

    /**
     * Remove inventory
     *
     * @param \RxConnexionBundle\Entity\InventoryEntity $inventory
     */
    public function removeInventory(\RxConnexionBundle\Entity\InventoryEntity $inventory)
    {
        $this->inventories->removeElement($inventory);
    }

    /**
     * Get inventories
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getInventories()
    {
        return $this->inventories;
    }

    /**
     * Add addInventory
     *
     * @param \RxConnexionBundle\Entity\AddInventoryEntity $addInventory
     *
     * @return HealthFacilityEntity
     */
    public function addAddInventory(\RxConnexionBundle\Entity\AddInventoryEntity $addInventory)
    {
        $this->addInventories[] = $addInventory;

        return $this;
    }

    /**
     * Remove addInventory
     *
     * @param \RxConnexionBundle\Entity\AddInventoryEntity $addInventory
     */
    public function removeAddInventory(\RxConnexionBundle\Entity\AddInventoryEntity $addInventory)
    {
        $this->addInventories->removeElement($addInventory);
    }

    /**
     * Get addInventories
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getAddInventories()
    {
        return $this->addInventories;
    }

    /**
     * Add transferInventoriesFrom
     *
     * @param \RxConnexionBundle\Entity\TransferInventoryEntity $transferInventoriesFrom
     *
     * @return HealthFacilityEntity
     */
    public function addTransferInventoriesFrom(\RxConnexionBundle\Entity\TransferInventoryEntity $transferInventoriesFrom)
    {
        $this->transferInventoriesFrom[] = $transferInventoriesFrom;

        return $this;
    }

    /**
     * Remove transferInventoriesFrom
     *
     * @param \RxConnexionBundle\Entity\TransferInventoryEntity $transferInventoriesFrom
     */
    public function removeTransferInventoriesFrom(\RxConnexionBundle\Entity\TransferInventoryEntity $transferInventoriesFrom)
    {
        $this->transferInventoriesFrom->removeElement($transferInventoriesFrom);
    }

    /**
     * Get transferInventoriesFrom
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getTransferInventoriesFrom()
    {
        return $this->transferInventoriesFrom;
    }

    /**
     * Add transferInventoriesTo
     *
     * @param \RxConnexionBundle\Entity\TransferInventoryEntity $transferInventoriesTo
     *
     * @return HealthFacilityEntity
     */
    public function addTransferInventoriesTo(\RxConnexionBundle\Entity\TransferInventoryEntity $transferInventoriesTo)
    {
        $this->transferInventoriesTo[] = $transferInventoriesTo;

        return $this;
    }

    /**
     * Remove transferInventoriesTo
     *
     * @param \RxConnexionBundle\Entity\TransferInventoryEntity $transferInventoriesTo
     */
    public function removeTransferInventoriesTo(\RxConnexionBundle\Entity\TransferInventoryEntity $transferInventoriesTo)
    {
        $this->transferInventoriesTo->removeElement($transferInventoriesTo);
    }

    /**
     * Get transferInventoriesTo
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getTransferInventoriesTo()
    {
        return $this->transferInventoriesTo;
    }

    /**
     * Set isMarketing
     *
     * @param boolean $isMarketing
     *
     * @return HealthFacilityEntity
     */
    public function setIsMarketing($isMarketing)
    {
        $this->isMarketing = $isMarketing;

        return $this;
    }

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