<commit_before><?php

namespace MillerVein\CalendarBundle\Entity\Appointment;

use Doctrine\ORM\Mapping as ORM;
use MillerVein\CalendarBundle\Entity\AppointmentStatus;
use MillerVein\EMRBundle\Entity\PatientData;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Description of Patient
 *
 * @author <NAME> <<EMAIL>>
 * @ORM\Entity
 * @ORM\HasLifecycleCallbacks()
 */
class PatientAppointment extends Appointment {

// <editor-fold defaultstate="collapsed" desc="Properties">
    /**
     * @var EMRPatient
     * @Assert\NotBlank()
     * @ORM\ManyToOne(targetEntity="MillerVein\EMRBundle\Entity\PatientData")
     * @ORM\JoinColumn(name="patient_id", referencedColumnName="pid")
     * */
    protected $patient;

    /**
     * @var int 
     * @ORM\Column(type="integer")
     */
    protected $encounter_id;

    /**
     *
     * @var string
     * @ORM\Column(length=10)
     */
    protected $leg;

    /**
     * This gets set on appointments that created a new encounter.
     * This is so that later on doctrine listeners can know.
     */
    protected $creatingAnEncounterFlag = false;

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Getters">

    public function getType() {
        return "patient";
    }

    public function getPatient() {
        return $this->patient;
    }

    public function getLeg() {
        return $this->leg;
    }

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Setters">
    public function setPatient(PatientData $patient) {
        $this->patient = $patient;
    }

    public function setLeg($leg) {
        $this->leg = $leg;
    }

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Encounter Creation">
    protected function createEncounterCondition() {
        return (
                (null === $this->encounter_id && $this->start->format('Y-m-d') === date('Y-m-d') && $this->status->isAutoCreateEncounter()) || $this->creatingAnEncounterFlag<commit_msg>made create encounter condition public<commit_after><?php

namespace MillerVein\CalendarBundle\Entity\Appointment;

use Doctrine\ORM\Mapping as ORM;
use MillerVein\CalendarBundle\Entity\AppointmentStatus;
use MillerVein\EMRBundle\Entity\PatientData;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Description of Patient
 *
 * @author <NAME> <<EMAIL>>
 * @ORM\Entity
 * @ORM\HasLifecycleCallbacks()
 */
class PatientAppointment extends Appointment {

// <editor-fold defaultstate="collapsed" desc="Properties">
    /**
     * @var EMRPatient
     * @Assert\NotBlank()
     * @ORM\ManyToOne(targetEntity="MillerVein\EMRBundle\Entity\PatientData")
     * @ORM\JoinColumn(name="patient_id", referencedColumnName="pid")
     * */
    protected $patient;

    /**
     * @var int 
     * @ORM\Column(type="integer")
     */
    protected $encounter_id;

    /**
     *
     * @var string
     * @ORM\Column(length=10)
     */
    protected $leg;

    /**
     * This gets set on appointments that created a new encounter.
     * This is so that later on doctrine listeners can know.
     */
    protected $creatingAnEncounterFlag = false;

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Getters">

    public function getType() {
        return "patient";
    }

    public function getPatient() {
        return $this->patient;
    }

    public function getLeg() {
        return $this->leg;
    }

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Setters">
    public function setPatient(PatientData $patient) {
        $this->patient = $patient;
    }

    public function setLeg($leg) {
        $this->leg = $leg;
    }

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Encounter Creation">
    public function createEncounterCondition() {
        return (
                (null === $this->encounter_id && $this->start->format('Y-m-d') === date('Y-m-d') && $this->status->isAutoCreateEncounter()) || $this->creatingAnEncounterFlag
{'fraction_non_alphanumeric': 0.14415322580645162, 'fraction_numerical': 0.0010080645161290322, 'mean_word_length': 3.079136690647482, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3021913', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1190, 'n_words': 243}