PHP Class Episode

This class has been auto-generated by the Doctrine ORM Framework
Author: Tom Doggett
Inheritance: extends BaseEpisode
Mostrar archivo Open project: openeyes/openeyes Class Usage Examples

Public Methods

Method Description
attributeLabels ( ) : array
audit ( $target, $action, $data = null, $log = false, $properties = [] )
defaultScope ( ) : array Sets default scope for events such that we never pull back any rows that have deleted set to 1.
disableDefaultScope ( )
getAllEventsByType ( $event_type_id ) : Event[] Get all the events of the given type for this episode.
getBySubspecialtyAndPatient ( integer $subspecialtyId, integer $patientId, $onlyReturnOpen = true ) : object Returns the episode for a patient and subspecialty if there is one.
getCurrentEpisodeByFirm ( $patient_id, $firm, $include_closed = false ) get the current episode for the given firm, based on the firm subspecialty - if firm has no subspecialty, will return a support services episode.
getCurrentEpisodeBySubspecialtyId ( $patient_id, $subspecialty_id, $include_closed = false ) get the current episode for the patient id and subspecialty_id (if this is null, looking for support services episode).
getElementsOfType ( $element_type, integer $exclude_event_id = null ) : BaseEventTypeElement[] Get all elements of the given type from this Episode.
getHidden ( )
getLatestEvent ( ) : Event get the latest event for this episode.
getMostRecentEventByType ( $event_type_id ) : Event Get the most recent event by the given type in this episode.
getOpen ( )
getPrincipalDiagnosisDisorderTerm ( )
getSubspecialty ( ) : Subspecialty get the subspecialty for this episode.
getSubspecialtyID ( ) : integer | null get the subspecialty id for this episode.
getSubspecialtyText ( ) : string get the subspecialty text for the episode.
hasEventOfType ( integer $eventTypeId, Event $currentEvent = null ) : boolean Returns true if an event of the given type exists within this episode.
model ( $className = __CLASS__ ) : Episode Returns the static model of the specified AR class.
relations ( ) : array
rules ( ) : array
save ( $runValidation = true, $attributes = null, $allow_overriding = false, $save_version = false )
search ( ) : CActiveDataProvider Retrieves a list of models based on the current search/filter conditions.
setPrincipalDiagnosis ( $disorder_id, $eye_id )
tableName ( ) : string

Protected Methods

Method Description
afterSave ( )

Method Details

afterSave() protected method

protected afterSave ( )

attributeLabels() public method

public attributeLabels ( ) : array
return array customized attribute labels (name=>label)

audit() public method

public audit ( $target, $action, $data = null, $log = false, $properties = [] )

defaultScope() public method

Sets default scope for events such that we never pull back any rows that have deleted set to 1.
public defaultScope ( ) : array
return array of mandatory conditions

disableDefaultScope() public method

public disableDefaultScope ( )

getAllEventsByType() public method

Get all the events of the given type for this episode.
public getAllEventsByType ( $event_type_id ) : Event[]
$event_type_id
return Event[]

getBySubspecialtyAndPatient() public method

Returns the episode for a patient and subspecialty if there is one.
Deprecation: - since 1.4 use getCurrentEpisodeByFirm instead
public getBySubspecialtyAndPatient ( integer $subspecialtyId, integer $patientId, $onlyReturnOpen = true ) : object
$subspecialtyId integer id of the subspecialty
$patientId integer id of the patient
return object $episode if found, null otherwise

getCurrentEpisodeByFirm() public static method

wrapper for getCurrentEpisodeBySubspecialtyId($patient_id, $subspecialty_id, $include_closed)
public static getCurrentEpisodeByFirm ( $patient_id, $firm, $include_closed = false )

getCurrentEpisodeBySubspecialtyId() public static method

get the current episode for the patient id and subspecialty_id (if this is null, looking for support services episode).
public static getCurrentEpisodeBySubspecialtyId ( $patient_id, $subspecialty_id, $include_closed = false )

getElementsOfType() public method

Get all elements of the given type from this Episode.
public getElementsOfType ( $element_type, integer $exclude_event_id = null ) : BaseEventTypeElement[]
$element_type
$exclude_event_id integer
return BaseEventTypeElement[]

getHidden() public method

public getHidden ( )

getLatestEvent() public method

get the latest event for this episode.
public getLatestEvent ( ) : Event
return Event

getMostRecentEventByType() public method

Get the most recent event by the given type in this episode.
public getMostRecentEventByType ( $event_type_id ) : Event
$event_type_id
return Event

getOpen() public method

public getOpen ( )

getPrincipalDiagnosisDisorderTerm() public method

getSubspecialty() public method

get the subspecialty for this episode.
public getSubspecialty ( ) : Subspecialty
return Subspecialty

getSubspecialtyID() public method

get the subspecialty id for this episode.
public getSubspecialtyID ( ) : integer | null
return integer | null

getSubspecialtyText() public method

get the subspecialty text for the episode.
public getSubspecialtyText ( ) : string
return string

hasEventOfType() public method

Returns true if an event of the given type exists within this episode.
public hasEventOfType ( integer $eventTypeId, Event $currentEvent = null ) : boolean
$eventTypeId integer
$currentEvent Event
return boolean

model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : Episode
return Episode the static model class

relations() public method

public relations ( ) : array
return array relational rules.

rules() public method

public rules ( ) : array
return array validation rules for model attributes.

save() public method

public save ( $runValidation = true, $attributes = null, $allow_overriding = false, $save_version = false )

setPrincipalDiagnosis() public method

public setPrincipalDiagnosis ( $disorder_id, $eye_id )

tableName() public method

public tableName ( ) : string
return string the associated database table name