PHP Class OphCoTherapyapplication_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

Public Methods

Method Description
canUpdate ( integer $event_id ) : boolean Therapy applications have no locking at the moment.
getLatestApplicationDrug ( Patient $patient, Episode $episode, string $side ) : OphTrIntravitrealinjection_Treatment_Drug Gets the last drug that was applied for for the given patient, episode and side.
getLatestApplicationSide ( unknown $patient, unknown $episode ) : integer returns the side of the most recent application (see Eye for definition of constants that indicate side or both).
getLetterApplicationDiagnosisBoth ( Patient $patient ) : string get the therapy application diagnosis description for all sides that have one for this patient.
getLetterApplicationDiagnosisForSide ( $patient, $episode, $side ) return the diagnosis string for the patient on the given side.
getLetterApplicationDiagnosisLeft ( Patient $patient ) : mixed get the therapy application diagnosis description for the left.
getLetterApplicationDiagnosisRight ( Patient $patient ) : mixed get the therapy application diagnosis description for the right if there is one.
getLetterApplicationTreatmentBoth ( Patient $patient ) : string get the therapy application treatment for all sides that have one for this patient.
getLetterApplicationTreatmentForSide ( $patient, $episode, $side ) : mixed Get the therapy application treatment for the given side if there is one.
getLetterApplicationTreatmentLeft ( $patient ) : mixed get the left side therapy application treatment if there is one.
getLetterApplicationTreatmentRight ( $patient ) : mixed get the right side therapy application treatment if there is one.
getLevel1Disorders ( ) : Disorder[] return all the disorders for level 1.
getLevel2Disorders ( integer $disorder_id ) : Disorder[] return all the disorders that are level 2 for the given $disorder_id.

Method Details

canUpdate() public method

Therapy applications have no locking at the moment.
public canUpdate ( integer $event_id ) : boolean
$event_id integer
return boolean

getLatestApplicationDrug() public method

Gets the last drug that was applied for for the given patient, episode and side.
public getLatestApplicationDrug ( Patient $patient, Episode $episode, string $side ) : OphTrIntravitrealinjection_Treatment_Drug
$patient Patient
$episode Episode
$side string
return OphTrIntravitrealinjection_Treatment_Drug

getLatestApplicationSide() public method

returns the side of the most recent application (see Eye for definition of constants that indicate side or both).
public getLatestApplicationSide ( unknown $patient, unknown $episode ) : integer
$patient unknown
$episode unknown
return integer $side

getLetterApplicationDiagnosisBoth() public method

get the therapy application diagnosis description for all sides that have one for this patient.
public getLetterApplicationDiagnosisBoth ( Patient $patient ) : string
$patient Patient
return string

getLetterApplicationDiagnosisForSide() public method

return the diagnosis string for the patient on the given side.
public getLetterApplicationDiagnosisForSide ( $patient, $episode, $side )
$patient
$episode
$side

getLetterApplicationDiagnosisLeft() public method

get the therapy application diagnosis description for the left.
public getLetterApplicationDiagnosisLeft ( Patient $patient ) : mixed
$patient Patient
return mixed

getLetterApplicationDiagnosisRight() public method

get the therapy application diagnosis description for the right if there is one.
public getLetterApplicationDiagnosisRight ( Patient $patient ) : mixed
$patient Patient
return mixed

getLetterApplicationTreatmentBoth() public method

get the therapy application treatment for all sides that have one for this patient.
public getLetterApplicationTreatmentBoth ( Patient $patient ) : string
$patient Patient
return string

getLetterApplicationTreatmentForSide() public method

Get the therapy application treatment for the given side if there is one.
public getLetterApplicationTreatmentForSide ( $patient, $episode, $side ) : mixed
$patient
$episode
$side
return mixed

getLetterApplicationTreatmentLeft() public method

get the left side therapy application treatment if there is one.
public getLetterApplicationTreatmentLeft ( $patient ) : mixed
$patient
return mixed

getLetterApplicationTreatmentRight() public method

get the right side therapy application treatment if there is one.
public getLetterApplicationTreatmentRight ( $patient ) : mixed
$patient
return mixed

getLevel1Disorders() public method

return all the disorders for level 1.
public getLevel1Disorders ( ) : Disorder[]
return Disorder[]

getLevel2Disorders() public method

return all the disorders that are level 2 for the given $disorder_id.
public getLevel2Disorders ( integer $disorder_id ) : Disorder[]
$disorder_id integer
return Disorder[]