PHP Class OphTrIntravitrealinjection_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
ファイルを表示 Open project: openeyes/openeyes

Public Methods

Method Description
getLetterPostInjectionDrops ( $patient ) : string get the text string describing the post injection drops needed for the last injection event in the episode.
getLetterTreatmentDrugBoth ( $patient ) : string get the most recent drug for both sides in the current subspecialty episode for the patient.
getLetterTreatmentDrugForSide ( $patient, $episode, $side ) : mixed get the drug name for the patient, episode and side from the most recent injection event, if it exists.
getLetterTreatmentDrugLeft ( $patient ) : mixed get the most recent drug for the left side in the current subspecialty episode for the patient.
getLetterTreatmentDrugRight ( $patient ) : mixed get the most recent drug for the right side in the current subspecialty episode for the patient.
getLetterTreatmentNumberBoth ( Patient $patient ) get the most recent treatment number for both eyes in the current subspecialty episode for the patient.
getLetterTreatmentNumberForSide ( $patient, $episode, $side ) : mixed get the most recent treatment number for the patient, episode and side.
getLetterTreatmentNumberLeft ( $patient ) : mixed get the most recent treatment number for the left side in the current subspecialty episode for the patient.
getLetterTreatmentNumberRight ( $patient ) : mixed get the most recent treatment number for the right side in the current subspecialty episode for the patient.
previousInjections ( Patient $patient, Episode $episode, string $side, Drug $drug = null ) : array return the set of treatment elements from previous injection events in descending order.
previousInjectionsByEvent ( $event_id, $side, $drug ) return only previous injections given a starting event id.

Protected Methods

Method Description
getLegacyAPI ( ) : mixed cache and return a legacy injection api instance.
getPreviousTreatmentForSide ( $patient, $episode, $side ) : Element_OphTrIntravitrealinjection_Treatment get the most recent treatment element that has data for the given eye side.
previousInjectionsForPatientEpisode ( Patient $patient, Episode $episode ) : Element_OphTrIntravitrealinjection_Treatment[] caching method for previous injections store.

Method Details

getLegacyAPI() protected method

cache and return a legacy injection api instance.
protected getLegacyAPI ( ) : mixed
return mixed

getLetterPostInjectionDrops() public method

get the text string describing the post injection drops needed for the last injection event in the episode.
public getLetterPostInjectionDrops ( $patient ) : string
$patient
return string

getLetterTreatmentDrugBoth() public method

get the most recent drug for both sides in the current subspecialty episode for the patient.
public getLetterTreatmentDrugBoth ( $patient ) : string
$patient
return string

getLetterTreatmentDrugForSide() public method

get the drug name for the patient, episode and side from the most recent injection event, if it exists.
public getLetterTreatmentDrugForSide ( $patient, $episode, $side ) : mixed
$patient
$episode
$side
return mixed

getLetterTreatmentDrugLeft() public method

get the most recent drug for the left side in the current subspecialty episode for the patient.
public getLetterTreatmentDrugLeft ( $patient ) : mixed
$patient
return mixed

getLetterTreatmentDrugRight() public method

get the most recent drug for the right side in the current subspecialty episode for the patient.
public getLetterTreatmentDrugRight ( $patient ) : mixed
$patient
return mixed

getLetterTreatmentNumberBoth() public method

get the most recent treatment number for both eyes in the current subspecialty episode for the patient.
public getLetterTreatmentNumberBoth ( Patient $patient )
$patient Patient

getLetterTreatmentNumberForSide() public method

get the most recent treatment number for the patient, episode and side.
public getLetterTreatmentNumberForSide ( $patient, $episode, $side ) : mixed
$patient
$episode
$side
return mixed

getLetterTreatmentNumberLeft() public method

get the most recent treatment number for the left side in the current subspecialty episode for the patient.
public getLetterTreatmentNumberLeft ( $patient ) : mixed
$patient
return mixed

getLetterTreatmentNumberRight() public method

get the most recent treatment number for the right side in the current subspecialty episode for the patient.
public getLetterTreatmentNumberRight ( $patient ) : mixed
$patient
return mixed

getPreviousTreatmentForSide() protected method

get the most recent treatment element that has data for the given eye side.
protected getPreviousTreatmentForSide ( $patient, $episode, $side ) : Element_OphTrIntravitrealinjection_Treatment
$patient
$episode
$side
return Element_OphTrIntravitrealinjection_Treatment

previousInjections() public method

return the set of treatment elements from previous injection events in descending order.
public previousInjections ( Patient $patient, Episode $episode, string $side, Drug $drug = null ) : array
$patient Patient
$episode Episode
$side string
$drug Drug
return array {$side . '_drug_id' => integer, $side . '_number' => integer, 'date' => datetime}[] - array of treatment elements for the eye and optional drug

previousInjectionsByEvent() public method

return only previous injections given a starting event id.
public previousInjectionsByEvent ( $event_id, $side, $drug )

previousInjectionsForPatientEpisode() protected method

caching method for previous injections store.
protected previousInjectionsForPatientEpisode ( Patient $patient, Episode $episode ) : Element_OphTrIntravitrealinjection_Treatment[]
$patient Patient
$episode Episode
return Element_OphTrIntravitrealinjection_Treatment[]