PHP Class OphCoTherapyapplication_DecisionTreeNode

Each node is a question for a given assessment flow. If it's parent is null, it is the root node for the related flow. There should only be one with a null parent for each flow.
Inheritance: extends BaseActiveRecordVersioned
Datei anzeigen Open project: openeyes/openeyes Class Usage Examples

Public Methods

Method Description
bestVisualAcuityForEye ( $side, $patient, $episode ) * returns the best visual acuity record for the given the $side of the given $patient
canAddChild ( ) * Can only have children for question nodes, not outcomes
canAddRule ( ) *
defaultsValidation ( $attribute ) * can only have one source for the default response for the node
getDefaultFunctions ( )
getDefaultValue ( $side, $patient, $episode ) * Works out the default value for this node, based on the provided $patient
getDefinition ( ) * Works out a full abstract definition of the node.
model ( $className = __CLASS__ ) : the Returns the static model of the specified AR class.
outcomeValidation ( $attribute ) * outcome being set implies that no other attributes should be set for the node
relations ( ) : array
requiredIfNotOutcomeValidation ( $attribute ) * if outcome is null then it implies this node should be a question node
rules ( ) : array
tableName ( ) : string

Method Details

bestVisualAcuityForEye() public method

* returns the best visual acuity record for the given the $side of the given $patient
public bestVisualAcuityForEye ( $side, $patient, $episode )

canAddChild() public method

* Can only have children for question nodes, not outcomes
public canAddChild ( )

canAddRule() public method

*
public canAddRule ( )

defaultsValidation() public method

* can only have one source for the default response for the node
public defaultsValidation ( $attribute )

getDefaultFunctions() public method

public getDefaultFunctions ( )

getDefaultValue() public method

* Works out the default value for this node, based on the provided $patient
public getDefaultValue ( $side, $patient, $episode )

getDefinition() public method

* Works out a full abstract definition of the node.
public getDefinition ( )

model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : the
return the static model class

outcomeValidation() public method

* outcome being set implies that no other attributes should be set for the node
public outcomeValidation ( $attribute )

relations() public method

public relations ( ) : array
return array relational rules.

requiredIfNotOutcomeValidation() public method

* if outcome is null then it implies this node should be a question node
public requiredIfNotOutcomeValidation ( $attribute )

rules() public method

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

tableName() public method

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