PHP Class OphTrOperationbooking_API

(C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 (C) OpenEyes Foundation, 2011-2013 This file is part of OpenEyes. OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see .
Author: OpenEyes ([email protected])
Inheritance: extends BaseAPI
Show file Open project: openeyes/openeyes Class Usage Examples

Public Methods

Method Description
canUpdate ( $event_id )
findBookingByEventID ( $event_id )
findSiteForBookingEvent ( $event )
findTheatreForBookingEvent ( $event )
generateSessions ( $args = [] ) * TODO: this should be refactored at some point
getAdmissionDate ( $patient )
getBookingsForEpisode ( $episode_id )
getEyeForOperation ( $event_id )
getLatestCompletedOperationBookingDiagnosis ( $patient ) : string Gets latest booking diagnosis from completed operation booking or defaults to episode diagnosis.
getLetterProcedures ( Patient $patient ) : string get the procedures for this patient and episode as a string for use in correspondence.
getMostRecentBookingForEpisode ( Episode $episode ) : OphTrOperationbooking_Operation_Booking Get the most recent booking for the patient in the given episode.
getOpenBookingsForEpisode ( $episode_id ) : OphTrOperationbooking_Operation_Booking[] Gets 'open' bookings for the specified episode A booking is deemed open if it has no operation note linked to it.
getOperationForEvent ( $event_id )
getOperationProcedures ( $operation_id )
getOperationsForEpisode ( $episode_id )
getProceduresForOperation ( $event_id )
setOperationStatus ( $event_id, $status_name )
showDeleteIcon ( $event_id )

Method Details

canUpdate() public method

public canUpdate ( $event_id )

findBookingByEventID() public method

public findBookingByEventID ( $event_id )

findSiteForBookingEvent() public method

public findSiteForBookingEvent ( $event )

findTheatreForBookingEvent() public method

public findTheatreForBookingEvent ( $event )

generateSessions() public method

* TODO: this should be refactored at some point
public generateSessions ( $args = [] )

getAdmissionDate() public method

public getAdmissionDate ( $patient )

getBookingsForEpisode() public method

public getBookingsForEpisode ( $episode_id )

getEyeForOperation() public method

public getEyeForOperation ( $event_id )

getLatestCompletedOperationBookingDiagnosis() public method

Gets latest booking diagnosis from completed operation booking or defaults to episode diagnosis.

getLetterProcedures() public method

get the procedures for this patient and episode as a string for use in correspondence.
public getLetterProcedures ( Patient $patient ) : string
$patient Patient
return string

getMostRecentBookingForEpisode() public method

Get the most recent booking for the patient in the given episode.
public getMostRecentBookingForEpisode ( Episode $episode ) : OphTrOperationbooking_Operation_Booking
$episode Episode
return OphTrOperationbooking_Operation_Booking

getOpenBookingsForEpisode() public method

Gets 'open' bookings for the specified episode A booking is deemed open if it has no operation note linked to it.
public getOpenBookingsForEpisode ( $episode_id ) : OphTrOperationbooking_Operation_Booking[]
return OphTrOperationbooking_Operation_Booking[]

getOperationForEvent() public method

public getOperationForEvent ( $event_id )

getOperationProcedures() public method

public getOperationProcedures ( $operation_id )

getOperationsForEpisode() public method

public getOperationsForEpisode ( $episode_id )

getProceduresForOperation() public method

public getProceduresForOperation ( $event_id )

setOperationStatus() public method

public setOperationStatus ( $event_id, $status_name )

showDeleteIcon() public method

public showDeleteIcon ( $event_id )