PHP Class Element_OphTrOperationbooking_Operation

The followings are the available columns in table:
Inheritance: extends BaseEventTypeElement
ファイルを表示 Open project: openeyes/openeyes Class Usage Examples

Public Properties

Property Type Description
$count
$service

Protected Properties

Property Type Description
$_has_bookings
$_original_referral_id

Public Methods

Method 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.

Protected Methods

Method Description
afterValidate ( )
beforeSave ( ) : boolean Sets flags based on element properties.

Method Details

afterFind() public method

public afterFind ( )

afterValidate() protected method

protected afterValidate ( )

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 = [] )

beforeSave() protected method

Sets flags based on element properties.
protected beforeSave ( ) : boolean
return boolean

calculateEROD() public method

(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
return OphTrOperationbooking_Operation_EROD | null

canChangeReferral() public method

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

cancel() public method

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

confirmLetterPrinted() public method

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

delete() public method

public delete ( )

fixCalendarDateOrdering() public method

public fixCalendarDateOrdering ( $sessions )

getContainer_view_view() public method

getDiagnosis() public method

public getDiagnosis ( )

getDisorderText() public method

public getDisorderText ( )

getDueLetter() public method

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
return integer | null

getFirm() public method

Wrapper function to get the element firm.
public getFirm ( ) : Firm
return Firm

getFirmCalendarForMonth() public method

public getFirmCalendarForMonth ( $firm, $timestamp, Element_OphTrOperationbooking_ScheduleOperation $schedule_options = null ) : array
$firm
$timestamp
$schedule_options Element_OphTrOperationbooking_ScheduleOperation
return array

getHas_address() public method

public getHas_address ( )

getHas_gp() public method

public getHas_gp ( )

getHealthContact() public method

public getHealthContact ( )

getLastLetter() public method

public getLastLetter ( )

getLetterContact() public method

public getLetterContact ( )

getLetterOptions() public static method

public static getLetterOptions ( )

getLetterType() public method

public getLetterType ( )

getMinDate() public method

public getMinDate ( )

getNextLetter() public method

public getNextLetter ( )

getPatient() public method

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

getProcedureCount() public method

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

getProceduresCommaSeparated() public method

public getProceduresCommaSeparated ( $field = 'term' )

getRTT() public method

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

getRTTBreach() public method

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
return string 'Y-m-d'|null

getRefuseContact() public method

public getRefuseContact ( )

getSchedule_timeframe() public method

getTextOperationName() public method

getTheatres() public method

public getTheatres ( $date, $firm_id = false )

getTransportColour() public method

public getTransportColour ( )

getTransportStatus() public method

public getTransportStatus ( )

getWaitingListContact() public method

getWaitingListLetterStatus() public method

getWaitingListStatus() public method

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 method

public getWardOptions ( $session )

getproc_defaults() public method

public getproc_defaults ( )

isEditable() public method

public isEditable ( )

model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : the
return 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.

schedule() public method

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
return array | boolean

sent1stReminder() public method

public sent1stReminder ( )

sent2ndReminder() public method

public sent2ndReminder ( )

sentGPLetter() public method

public sentGPLetter ( )

sentInvitation() public method

public sentInvitation ( )

setDefaultOptions() public method

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

setStatus() public method

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 method

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

updateProcedures() public method

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

validateDuration() public method

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

validateReferral() public method

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