PHP Class OEModule\OphCiExamination\models\Element_OphCiExamination_InjectionManagementComplex

The followings are the available columns in table:
Inheritance: extends SplitEventTypeElement
Show file Open project: openeyes/openeyes Class Usage Examples

Protected Properties

Property Type Description
$_injection_installed

Public Methods

Method Description
answerValidation ( unknown $attribute, array $params ) validate that all the questions for the set diagnosis have been answered.
attributeLabels ( ) : array
canCopy ( )
delete ( ) extends standard delete method to remove any risk assignments made to it.
getAllDisorders ( )
getInjectionQuestionsForDisorderId ( integer $disorder_id, array $answered_question_ids = null ) return the questions for a given disorder id.
getInjectionQuestionsForSide ( string $side ) : OphCiExamination_InjectionManagementComplex_Question[] get the relevant questions for the given side.
getInjectionSide ( ) : integer | null return the side (Eye::BOTH, \Eye::LEFT or \Eye::RIGHT) that should be injected if one should be. null otherwise.
getInjectionTreatments ( $side ) : OphTrIntravitrealinjection_Treatment_Drug[] | null get the treatments list to select from for this element on the given side.
getLeftDiagnosisString ( ) : string get the diagnosis string for the left.
getLeftNoTreatmentReasonName ( ) : string get the no treatment reason name for the left side.
getLetter_string ( ) : string get the string of this element for use in correspondence.
getLevel1Disorders ( ) : Disorder[] Get a list of level 1 disorders for this element (appends any level 1 disorder that has been selected for this element but aren't part of the default list).
getLevel2Disorders ( $disorder ) : Disorder[] retrieve a list of disorders that are defined as level 2 disorders for the given disorder.
getNoTreatmentReasons ( ) : OphCiExamination_InjectionManagementComplex_NoTreatmentReason[] get the list of no treatment reasons that should be used for this element.
getQuestionAnswer ( unknown $side, unknown $question_id ) get the answer that has been set for the $side and $question_id.
getRightDiagnosisString ( ) : string get the diagnosis string for the right.
getRightNoTreatmentReasonName ( ) : string get the no treatment reason name for the right side.
getRiskValues ( ) get the risk ids currently in use by the element.
getRisksForSide ( $side ) : array get the risk options for a given side.
getleft_treatment ( ) : OphTrIntravitrealinjection_Treatment_Drug | null return the treatment drug for the left side if defined.
getright_treatment ( ) : OphTrIntravitrealinjection_Treatment_Drug | null return the treatment drug for the right side if defined.
ifInjectionInstalled ( $attribute, $params ) pass through validation function that will run the 'check' attribute method if the injection module is installed.
injectionInstalled ( ) : boolean returns boolean to indicate if the injection module is installed (and therefore whether we can pick treatments from that module).
model ( $className = __CLASS__ ) : the Returns the static model of the specified AR class.
relations ( ) : array
requiredIfNoTreatment ( $attribute, $params ) checks value defined when no treatment is set on the element.
requiredIfNoTreatmentOther ( $attribute, $params ) checks $attribute defined when the no treatment reason is an 'other' type.
requiredIfSecondary ( $attribute, $params ) check a level 2 diagnosis is provided for level 1 diagnoses that require it (need to check the side as well though).
requiredIfTreatment ( string $attribute, array $params ) simple wrapper around requiredIfSide that checks the no treatment status flag before checking the side required attribute.
rules ( ) : array
search ( ) : CActiveDataProvider Retrieves a list of models based on the current search/filter conditions.
sidedFields ( )
tableName ( ) : string
updateQuestionAnswers ( string $side, array $update_answers ) store the answers for the questions asked for the $side diagnosis.
updateRisks ( string $side, int[] $risk_ids ) update the risks for the given side.

Protected Methods

Method Description
getDiagnosisString ( string $side ) : string get the diagnosis string for the give side.
getLetterStringForSide ( $side ) : string gets a string of the information contained in this element for the given side.
getNoTreatmentReasonName ( string $side ) : string get the reason for no treatment as a string for given side.

Method Details

answerValidation() public method

validate that all the questions for the set diagnosis have been answered.
public answerValidation ( unknown $attribute, array $params )
$attribute unknown
$params array

attributeLabels() public method

public attributeLabels ( ) : array
return array customized attribute labels (name=>label)

canCopy() public method

public canCopy ( )

delete() public method

(non-PHPdoc)
See also: CActiveRecord::delete()
public delete ( )

getAllDisorders() public method

public getAllDisorders ( )

getDiagnosisString() protected method

get the diagnosis string for the give side.
protected getDiagnosisString ( string $side ) : string
$side string - left or right
return string string

getInjectionQuestionsForDisorderId() public method

return the questions for a given disorder id.
public getInjectionQuestionsForDisorderId ( integer $disorder_id, array $answered_question_ids = null )
$disorder_id integer
$answered_question_ids array

getInjectionQuestionsForSide() public method

get the relevant questions for the given side.
public getInjectionQuestionsForSide ( string $side ) : OphCiExamination_InjectionManagementComplex_Question[]
$side string - 'left' or 'right'
return OphCiExamination_InjectionManagementComplex_Question[]

getInjectionSide() public method

return the side (Eye::BOTH, \Eye::LEFT or \Eye::RIGHT) that should be injected if one should be. null otherwise.
public getInjectionSide ( ) : integer | null
return integer | null

getInjectionTreatments() public method

get the treatments list to select from for this element on the given side.
public getInjectionTreatments ( $side ) : OphTrIntravitrealinjection_Treatment_Drug[] | null
$side
return OphTrIntravitrealinjection_Treatment_Drug[] | null

getLeftDiagnosisString() public method

get the diagnosis string for the left.
public getLeftDiagnosisString ( ) : string
return string

getLeftNoTreatmentReasonName() public method

get the no treatment reason name for the left side.

getLetterStringForSide() protected method

gets a string of the information contained in this element for the given side.
protected getLetterStringForSide ( $side ) : string
$side
return string

getLetter_string() public method

get the string of this element for use in correspondence.
public getLetter_string ( ) : string
return string

getLevel1Disorders() public method

Get a list of level 1 disorders for this element (appends any level 1 disorder that has been selected for this element but aren't part of the default list).
public getLevel1Disorders ( ) : Disorder[]
return Disorder[]

getLevel2Disorders() public method

retrieve a list of disorders that are defined as level 2 disorders for the given disorder.
public getLevel2Disorders ( $disorder ) : Disorder[]
return Disorder[]

getNoTreatmentReasonName() protected method

get the reason for no treatment as a string for given side.
protected getNoTreatmentReasonName ( string $side ) : string
$side string
return string

getNoTreatmentReasons() public method

get the list of no treatment reasons that should be used for this element.
public getNoTreatmentReasons ( ) : OphCiExamination_InjectionManagementComplex_NoTreatmentReason[]
return OphCiExamination_InjectionManagementComplex_NoTreatmentReason[]

getQuestionAnswer() public method

get the answer that has been set for the $side and $question_id.
public getQuestionAnswer ( unknown $side, unknown $question_id )
$side unknown
$question_id unknown

getRightDiagnosisString() public method

get the diagnosis string for the right.
public getRightDiagnosisString ( ) : string
return string

getRightNoTreatmentReasonName() public method

get the no treatment reason name for the right side.

getRiskValues() public method

get the risk ids currently in use by the element.
public getRiskValues ( )

getRisksForSide() public method

get the risk options for a given side.
public getRisksForSide ( $side ) : array
$side
return array

getleft_treatment() public method

defines relation to external model, hence not using the yii magic relations definition
public getleft_treatment ( ) : OphTrIntravitrealinjection_Treatment_Drug | null
return OphTrIntravitrealinjection_Treatment_Drug | null

getright_treatment() public method

defines relation to external model, hence not using the yii magic relations definition
public getright_treatment ( ) : OphTrIntravitrealinjection_Treatment_Drug | null
return OphTrIntravitrealinjection_Treatment_Drug | null

ifInjectionInstalled() public method

pass through validation function that will run the 'check' attribute method if the injection module is installed.
public ifInjectionInstalled ( $attribute, $params )
$attribute
$params

injectionInstalled() public method

returns boolean to indicate if the injection module is installed (and therefore whether we can pick treatments from that module).
public injectionInstalled ( ) : boolean
return boolean

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.

requiredIfNoTreatment() public method

checks value defined when no treatment is set on the element.
public requiredIfNoTreatment ( $attribute, $params )
$attribute
$params

requiredIfNoTreatmentOther() public method

checks $attribute defined when the no treatment reason is an 'other' type.
public requiredIfNoTreatmentOther ( $attribute, $params )
$attribute
$params

requiredIfSecondary() public method

check a level 2 diagnosis is provided for level 1 diagnoses that require it (need to check the side as well though).
public requiredIfSecondary ( $attribute, $params )

requiredIfTreatment() public method

simple wrapper around requiredIfSide that checks the no treatment status flag before checking the side required attribute.
public requiredIfTreatment ( string $attribute, array $params )
$attribute string
$params array

rules() public method

public rules ( ) : array
return array validation rules for model attributes.

sidedFields() public method

public sidedFields ( )

tableName() public method

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

updateQuestionAnswers() public method

store the answers for the questions asked for the $side diagnosis.
public updateQuestionAnswers ( string $side, array $update_answers )
$side string
$update_answers array - associate array of question id to answer value

updateRisks() public method

update the risks for the given side.
public updateRisks ( string $side, int[] $risk_ids )
$side string
$risk_ids int[] - array of risk ids to assign to the element

Property Details

$_injection_installed protected property

protected $_injection_installed