PHP Class Element_OphTrOperationbooking_Operation

The followings are the available columns in table:
Inheritance: extends BaseEventTypeElement
Afficher le fichier Open project: openeyes/openeyes Class Usage Examples

Méthodes publiques

Свойство Type Description
$count
$service

Protected Properties

Свойство Type Description
$_has_bookings
$_original_referral_id

Méthodes publiques

Méthode Description
afterFind ( )
attributeLabels ( ) : array
audit ( $target, $action, $data = null, $log = false, $properties = [] )
calculateEROD ( Firm $firm = null ) : OphTrOperationbooking_Operation_EROD | null Calculate the EROD for this operation - the firm used to determine the service can be overridden by providing a firm.
canChangeReferral ( ) : boolean Whether the referral for the operation is still changeable - simple wrapper at the moment.
cancel ( $reason_id, $comment = null, $cancellation_user_id = false )
confirmLetterPrinted ( $confirmto = null, $confirmdate = null )
delete ( )
fixCalendarDateOrdering ( $sessions )
getContainer_view_view ( )
getDiagnosis ( )
getDisorderText ( )
getDueLetter ( ) : integer | null get the code for the letter that is due on this operation, based on the current status will return null if in an unknown state.
getFirm ( ) : Firm Wrapper function to get the element firm.
getFirmCalendarForMonth ( $firm, $timestamp, Element_OphTrOperationbooking_ScheduleOperation $schedule_options = null ) : array
getHas_address ( )
getHas_gp ( )
getHealthContact ( )
getLastLetter ( )
getLetterContact ( )
getLetterOptions ( )
getLetterType ( )
getMinDate ( )
getNextLetter ( )
getPatient ( ) : null | Patient Wrapper function to get the element patient.
getProcedureCount ( ) : integer Calculates the total number of procedures this operation requires.
getProceduresCommaSeparated ( $field = 'term' )
getRTT ( ) : RTT | null returns the RTT for the operation booking if there is one available.
getRTTBreach ( ) : string Get the RTT breach for this operation (if either an RTT is set, or if there is a psuedo-breach based on a week count from DTA).
getRefuseContact ( )
getSchedule_timeframe ( )
getTextOperationName ( )
getTheatres ( $date, $firm_id = false )
getTransportColour ( )
getTransportStatus ( )
getWaitingListContact ( )
getWaitingListLetterStatus ( )
getWaitingListStatus ( ) Returns the letter status for an operation.
getWardOptions ( $session )
getproc_defaults ( )
isEditable ( )
model ( $className = __CLASS__ ) : the Returns the static model of the specified AR class.
relations ( ) : array
rules ( ) : array
schedule ( OphTrOperationbooking_Operation_Booking $booking, $operation_comments, $session_comments, $operation_comments_rtt, boolean $reschedule = false, null $cancellation_data = null, Element_OphTrOperationbooking_ScheduleOperation $schedule_op = null ) : array | boolean
search ( ) : CActiveDataProvider Retrieves a list of models based on the current search/filter conditions.
sent1stReminder ( )
sent2ndReminder ( )
sentGPLetter ( )
sentInvitation ( )
setDefaultOptions ( ) Set default values for forms on create.
setStatus ( $name, boolean $save = true ) Set the status based on the name passed in. If $save is false, we don't save and it is the responsibility of the caller to ensure the instance is saved.
tableName ( ) : string
updateProcedures ( array $procedure_ids ) Stores procedures identified by the given procedure ids against this element.
validateDuration ( $attribute ) : boolean Validate a duration only if a procedure exists so we don't have messages for non existent elements.
validateReferral ( $attribute, $params ) Ensure that referral assigned to the element is for the correct patient.

Méthodes protégées

Méthode Description
afterValidate ( )
beforeSave ( ) : boolean Sets flags based on element properties.

Method Details

afterFind() public méthode

public afterFind ( )

afterValidate() protected méthode

protected afterValidate ( )

attributeLabels() public méthode

public attributeLabels ( ) : array
Résultat array customized attribute labels (name=>label)

audit() public méthode

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

beforeSave() protected méthode

Sets flags based on element properties.
protected beforeSave ( ) : boolean
Résultat boolean

calculateEROD() public méthode

(Note that this handles the emergency list by having a firm placeholder object that does not have an id - at this time, no sessions are assigned to A&E firms, having the effect that no EROD can be calculated for emergency bookings).
public calculateEROD ( Firm $firm = null ) : OphTrOperationbooking_Operation_EROD | null
$firm Firm
Résultat OphTrOperationbooking_Operation_EROD | null

canChangeReferral() public méthode

Whether the referral for the operation is still changeable - simple wrapper at the moment.
public canChangeReferral ( ) : boolean
Résultat boolean

cancel() public méthode

public cancel ( $reason_id, $comment = null, $cancellation_user_id = false )

confirmLetterPrinted() public méthode

public confirmLetterPrinted ( $confirmto = null, $confirmdate = null )

delete() public méthode

public delete ( )

fixCalendarDateOrdering() public méthode

public fixCalendarDateOrdering ( $sessions )

getContainer_view_view() public méthode

getDiagnosis() public méthode

public getDiagnosis ( )

getDisorderText() public méthode

public getDisorderText ( )

getDueLetter() public méthode

get the code for the letter that is due on this operation, based on the current status will return null if in an unknown state.
public getDueLetter ( ) : integer | null
Résultat integer | null

getFirm() public méthode

Wrapper function to get the element firm.
public getFirm ( ) : Firm
Résultat Firm

getFirmCalendarForMonth() public méthode

public getFirmCalendarForMonth ( $firm, $timestamp, Element_OphTrOperationbooking_ScheduleOperation $schedule_options = null ) : array
$firm
$timestamp
$schedule_options Element_OphTrOperationbooking_ScheduleOperation
Résultat array

getHas_address() public méthode

public getHas_address ( )

getHas_gp() public méthode

public getHas_gp ( )

getHealthContact() public méthode

public getHealthContact ( )

getLastLetter() public méthode

public getLastLetter ( )

getLetterContact() public méthode

public getLetterContact ( )

getLetterOptions() public static méthode

public static getLetterOptions ( )

getLetterType() public méthode

public getLetterType ( )

getMinDate() public méthode

public getMinDate ( )

getNextLetter() public méthode

public getNextLetter ( )

getPatient() public méthode

Wrapper function to get the element patient.
public getPatient ( ) : null | Patient
Résultat null | Patient

getProcedureCount() public méthode

Calculates the total number of procedures this operation requires.
public getProcedureCount ( ) : integer
Résultat integer

getProceduresCommaSeparated() public méthode

public getProceduresCommaSeparated ( $field = 'term' )

getRTT() public méthode

returns the RTT for the operation booking if there is one available.
public getRTT ( ) : RTT | null
Résultat RTT | null

getRTTBreach() public méthode

Get the RTT breach for this operation (if either an RTT is set, or if there is a psuedo-breach based on a week count from DTA).
public getRTTBreach ( ) : string
Résultat string 'Y-m-d'|null

getRefuseContact() public méthode

public getRefuseContact ( )

getSchedule_timeframe() public méthode

getTextOperationName() public méthode

getTheatres() public méthode

public getTheatres ( $date, $firm_id = false )

getTransportColour() public méthode

public getTransportColour ( )

getTransportStatus() public méthode

public getTransportStatus ( )

getWaitingListContact() public méthode

getWaitingListLetterStatus() public méthode

getWaitingListStatus() public méthode

Checks to see if it's an operation to be scheduled or an operation to be rescheduled. If it's the former it bases its calculation on the operation creation date. If it's the latter it bases it on the most recent cancelled_booking creation date. return int

getWardOptions() public méthode

public getWardOptions ( $session )

getproc_defaults() public méthode

public getproc_defaults ( )

isEditable() public méthode

public isEditable ( )

model() public static méthode

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : the
Résultat the static model class

relations() public méthode

public relations ( ) : array
Résultat array relational rules.

rules() public méthode

public rules ( ) : array
Résultat array validation rules for model attributes.

schedule() public méthode

public schedule ( OphTrOperationbooking_Operation_Booking $booking, $operation_comments, $session_comments, $operation_comments_rtt, boolean $reschedule = false, null $cancellation_data = null, Element_OphTrOperationbooking_ScheduleOperation $schedule_op = null ) : array | boolean
$booking OphTrOperationbooking_Operation_Booking
$operation_comments
$session_comments
$operation_comments_rtt
$reschedule boolean
$cancellation_data null
$schedule_op Element_OphTrOperationbooking_ScheduleOperation
Résultat array | boolean

sent1stReminder() public méthode

public sent1stReminder ( )

sent2ndReminder() public méthode

public sent2ndReminder ( )

sentGPLetter() public méthode

public sentGPLetter ( )

sentInvitation() public méthode

public sentInvitation ( )

setDefaultOptions() public méthode

Set default values for forms on create.
public setDefaultOptions ( )

setStatus() public méthode

Set the status based on the name passed in. If $save is false, we don't save and it is the responsibility of the caller to ensure the instance is saved.
public setStatus ( $name, boolean $save = true )
$name
$save boolean

tableName() public méthode

public tableName ( ) : string
Résultat string the associated database table name

updateProcedures() public méthode

Stores procedures identified by the given procedure ids against this element.
public updateProcedures ( array $procedure_ids )
$procedure_ids array

validateDuration() public méthode

Validate a duration only if a procedure exists so we don't have messages for non existent elements.
public validateDuration ( $attribute ) : boolean
$attribute
Résultat boolean

validateReferral() public méthode

Ensure that referral assigned to the element is for the correct patient.
public validateReferral ( $attribute, $params )
$attribute
$params

Property Details

$_has_bookings protected_oe property

protected $_has_bookings

$_original_referral_id protected_oe property

protected $_original_referral_id

$count public_oe property

public $count

$service public_oe property

public $service