PHP Class OEModule\OphCiExamination\controllers\DefaultController

Inheritance: extends BaseEventTypeController
Show file Open project: openeyes/openeyes

Protected Properties

Property Type Description
$action_types
$allergies
$deletedAllergies
$mandatoryElements
$set

Public Methods

Method Description
actionCreate ( )
actionDismissCVIalert ( integer $element_id ) Setting the CVI alert flag to dismiss
actionGetDisorder ( ) Ajax function for quick disorder lookup.
actionGetPostOpComplicationAutocopleteList ( )
actionGetPostOpComplicationList ( )
actionGetPreviousIOPAverage ( )
actionGetScaleForInstrument ( )
actionLoadInjectionQuestions ( ) Ajax action to load the questions for a side and disorder_id.
actionStep ( $id ) Action to move the workflow forward a step on the given event.
getAttributes ( BaseEventTypeElement $element, integer $subspecialty_id = null ) : OphCiExamination_Attribute[] Get all the attributes for an element.
getChildOptionalElements ( $parent_type ) extends standard method to filter elements.
getOptionalElements ( )
getPupilliaryAbnormalitiesList ( $selected_id )
initActionCreate ( ) Call editInit to set up jsVars.
initActionStep ( )
initActionUpdate ( ) Call editInit to setup jsVars.
isRequiredInUI ( BaseEventTypeElement $element ) : boolean Is this element required in the UI? (Prevents the user from being able to remove the element.).
renderChildOptionalElements ( BaseEventTypeElement $parent_element, string $action, BaseCActiveBaseEventTypeCActiveForm $form = null, array $data = null ) Render the optional child elements for the given parent element type.

Protected Methods

Method Description
afterCreateElements ( $event )
afterUpdateElements ( Event $event ) Advance the workflow step for the event if requested.
beforeAction ( CAction $action ) : boolean Need split event files.
filterElements ( BaseEventTypeElement[] $elements ) : BaseEventTypeElement[] Filters elements based on coded dependencies.
getElementsByWorkflow ( OphCiExamination_ElementSet $set = null, Episode $episode = null, integer $parent_id = null ) : BaseEventTypeElement[] Get the array of elements for the current site, subspecialty, episode status and workflow position If $parent_id is provided, restrict to children of that element_type id.
getEventElements ( ) : BaseEventTypeElement[] Applies workflow and filtering to the element retrieval.
getFirstStep ( ) : OphCiExamination_ElementSet Get the first workflow step using rules.
getNextStep ( Event $event = null ) : OphCiExamination_ElementSet Get the next workflow step.
initEdit ( ) Sets up jsvars for editing.
mergeNextStep ( array $elements, ElementType $parent = null ) : array Merge workflow next step elements into existing elements.
renderElement ( BaseEventTypeElement $element, string $action, BaseCActiveBaseEventTypeCActiveForm $form, array $data, array $view_data = [], boolean $return = false, boolean $processOutput = false ) Override action value when action is step to be update.
saveComplexAttributes_Element_OphCiExamination_ClinicOutcome ( $element, $data, $index ) Actually handles the processing of patient ticketing if the module is present and a referral has been selected.
saveComplexAttributes_Element_OphCiExamination_ColourVision ( Element_OphCiExamination_ColourVision $element, $data, $index ) Save Colour Vision readings.
saveComplexAttributes_Element_OphCiExamination_Diagnoses ( $element, $data, $index ) Save diagnoses.
saveComplexAttributes_Element_OphCiExamination_Dilation ( OEModule\OphCiExamination\models\Element_OphCiExamination_Dilation $element, $data, $index ) Save the dilation treatments.
saveComplexAttributes_Element_OphCiExamination_FurtherFindings ( $element, $data, $index )
saveComplexAttributes_Element_OphCiExamination_History ( $element, $data, $index ) Save allergies - because it's part of the History element it need to be saved from that element.
saveComplexAttributes_Element_OphCiExamination_HistoryRisk ( $element, $data, $index ) Save Risks - because it's part of the History Risk element it need to be saved from that element.
saveComplexAttributes_Element_OphCiExamination_InjectionManagementComplex ( $element, $data, $index ) Save question answers and risks.
saveComplexAttributes_Element_OphCiExamination_IntraocularPressure ( Element_OphCiExamination_IntraocularPressure $element, $data )
setAndValidateElementsFromData ( array $data ) : array custom validation for virtual clinic referral.
setComplexAttributes_Element_OphCiExamination_ColourVision ( Element_OphCiExamination_ColourVision $element, $data, $index ) Set the colour vision readings against the Element_OphCiExamination_ColourVision element.
setComplexAttributes_Element_OphCiExamination_DRGrading ( $element, $data, $index ) Wrapper to set validation rules on DR Grading element.
setComplexAttributes_Element_OphCiExamination_Diagnoses ( Element_OphCiExamination_Diagnoses $element, $data, $index ) Set the diagnoses against the Element_OphCiExamination_Diagnoses element.
setComplexAttributes_Element_OphCiExamination_Dilation ( OEModule\OphCiExamination\models\Element_OphCiExamination_Dilation $element, $data, $index ) set the dilation treatments against the element from the provided data.
setComplexAttributes_Element_OphCiExamination_FurtherFindings ( $element, $data, $index )
setComplexAttributes_Element_OphCiExamination_History ( Element_OphCiExamination_History $element, $data, $index ) Set the allergies against the Element_OphCiExamination_Allergy element It's a child element of History.
setComplexAttributes_Element_OphCiExamination_InjectionManagementComplex ( Element_OphCiExamination_InjectionManagementComplex $element, array $data, $index ) associate the answers and risks from the data with the Element_OphCiExamination_InjectionManagementComplex element for validation.
setComplexAttributes_Element_OphCiExamination_IntraocularPressure ( Element_OphCiExamination_IntraocularPressure $element, $data )
setCurrentSet ( )
setElementDefaultOptions_Element_OphCiExamination_Allergy ( $element, $action ) Set the allergies against the Element_OphCiExamination_Allergy element.
setElementDefaultOptions_Element_OphCiExamination_Diagnoses ( $element, $action ) Pulls in the diagnosis from the episode and ophthalmic diagnoses from the patient, and sets an appropriate list of unique diagnoses.
setElementDefaultOptions_Element_OphCiExamination_History ( Element_OphCiExamination_History $element, $action ) Set the allergies against the Element_OphCiExamination_Allergy element It's a child element of History.
setElementDefaultOptions_Element_OphCiExamination_OverallManagementPlan ( Element_OphCiExamination_OverallManagementPlan $element, $action )
setElementDefaultOptions_Element_OphCiExamination_Refraction ( Element_OphCiExamination_Refraction $element, $action )
updateRisk ( type $risk_name, type $risk_value ) Updating Patient Risk details.

Private Methods

Method Description
_set_DiabeticDiagnosis ( BaseEventTypeElement $element, array $data ) If the Patient does not currently have a diabetic diagnosis, specify that it's required so the validation rules can check for it being set in the given element (currently only DR Grading).

Method Details

actionCreate() public method

public actionCreate ( )

actionDismissCVIalert() public method

Setting the CVI alert flag to dismiss
public actionDismissCVIalert ( integer $element_id )
$element_id integer

actionGetDisorder() public method

Used when eyedraw elements have doodles that are associated with disorders
public actionGetDisorder ( )

actionGetPostOpComplicationAutocopleteList() public method

actionGetPostOpComplicationList() public method

actionGetPreviousIOPAverage() public method

actionGetScaleForInstrument() public method

actionLoadInjectionQuestions() public method

Ajax action to load the questions for a side and disorder_id.

actionStep() public method

Action to move the workflow forward a step on the given event.
public actionStep ( $id )
$id

afterCreateElements() protected method

protected afterCreateElements ( $event )

afterUpdateElements() protected method

Advance the workflow step for the event if requested.
protected afterUpdateElements ( Event $event )
$event Event

beforeAction() protected method

Need split event files.
protected beforeAction ( CAction $action ) : boolean
$action CAction
return boolean

filterElements() protected method

Filters elements based on coded dependencies.
protected filterElements ( BaseEventTypeElement[] $elements ) : BaseEventTypeElement[]
$elements BaseEventTypeElement[]
return BaseEventTypeElement[]

getAttributes() public method

Get all the attributes for an element.
public getAttributes ( BaseEventTypeElement $element, integer $subspecialty_id = null ) : OphCiExamination_Attribute[]
$element BaseEventTypeElement
$subspecialty_id integer
return OphCiExamination_Attribute[]

getChildOptionalElements() public method

(non-PHPdoc)
See also: NestedElementsEventTypeController::getChildOptionalElements()
public getChildOptionalElements ( $parent_type )

getElementsByWorkflow() protected method

Get the array of elements for the current site, subspecialty, episode status and workflow position If $parent_id is provided, restrict to children of that element_type id.
protected getElementsByWorkflow ( OphCiExamination_ElementSet $set = null, Episode $episode = null, integer $parent_id = null ) : BaseEventTypeElement[]
$set OphCiExamination_ElementSet
$episode Episode
$parent_id integer
return BaseEventTypeElement[]

getEventElements() protected method

Applies workflow and filtering to the element retrieval.
protected getEventElements ( ) : BaseEventTypeElement[]
return BaseEventTypeElement[]

getFirstStep() protected method

Get the first workflow step using rules.
protected getFirstStep ( ) : OphCiExamination_ElementSet
return OphCiExamination_ElementSet

getNextStep() protected method

Get the next workflow step.
protected getNextStep ( Event $event = null ) : OphCiExamination_ElementSet
$event Event
return OphCiExamination_ElementSet

getOptionalElements() public method

public getOptionalElements ( )

getPupilliaryAbnormalitiesList() public method

public getPupilliaryAbnormalitiesList ( $selected_id )

initActionCreate() public method

Call editInit to set up jsVars.
public initActionCreate ( )

initActionStep() public method

public initActionStep ( )

initActionUpdate() public method

Call editInit to setup jsVars.
public initActionUpdate ( )

initEdit() protected method

Sets up jsvars for editing.
protected initEdit ( )

isRequiredInUI() public method

Is this element required in the UI? (Prevents the user from being able to remove the element.).
public isRequiredInUI ( BaseEventTypeElement $element ) : boolean
$element BaseEventTypeElement
return boolean

mergeNextStep() protected method

Merge workflow next step elements into existing elements.
protected mergeNextStep ( array $elements, ElementType $parent = null ) : array
$elements array
$parent ElementType
return array

renderChildOptionalElements() public method

Render the optional child elements for the given parent element type.
public renderChildOptionalElements ( BaseEventTypeElement $parent_element, string $action, BaseCActiveBaseEventTypeCActiveForm $form = null, array $data = null )
$parent_element BaseEventTypeElement
$action string
$form BaseCActiveBaseEventTypeCActiveForm
$data array

renderElement() protected method

Override action value when action is step to be update.
protected renderElement ( BaseEventTypeElement $element, string $action, BaseCActiveBaseEventTypeCActiveForm $form, array $data, array $view_data = [], boolean $return = false, boolean $processOutput = false )
$element BaseEventTypeElement
$action string
$form BaseCActiveBaseEventTypeCActiveForm
$data array
$view_data array
$return boolean
$processOutput boolean

saveComplexAttributes_Element_OphCiExamination_ClinicOutcome() protected method

Actually handles the processing of patient ticketing if the module is present and a referral has been selected.
protected saveComplexAttributes_Element_OphCiExamination_ClinicOutcome ( $element, $data, $index )
$element
$data
$index

saveComplexAttributes_Element_OphCiExamination_ColourVision() protected method

Save Colour Vision readings.
protected saveComplexAttributes_Element_OphCiExamination_ColourVision ( Element_OphCiExamination_ColourVision $element, $data, $index )
$element Element_OphCiExamination_ColourVision
$data
$index

saveComplexAttributes_Element_OphCiExamination_Diagnoses() protected method

Save diagnoses.
protected saveComplexAttributes_Element_OphCiExamination_Diagnoses ( $element, $data, $index )
$element
$data
$index

saveComplexAttributes_Element_OphCiExamination_Dilation() protected method

Save the dilation treatments.
protected saveComplexAttributes_Element_OphCiExamination_Dilation ( OEModule\OphCiExamination\models\Element_OphCiExamination_Dilation $element, $data, $index )
$element OEModule\OphCiExamination\models\Element_OphCiExamination_Dilation
$data
$index

saveComplexAttributes_Element_OphCiExamination_FurtherFindings() protected method

saveComplexAttributes_Element_OphCiExamination_History() protected method

Save allergies - because it's part of the History element it need to be saved from that element.
protected saveComplexAttributes_Element_OphCiExamination_History ( $element, $data, $index )
$element
$data
$index

saveComplexAttributes_Element_OphCiExamination_HistoryRisk() protected method

Save Risks - because it's part of the History Risk element it need to be saved from that element.
protected saveComplexAttributes_Element_OphCiExamination_HistoryRisk ( $element, $data, $index )
$element
$data
$index

saveComplexAttributes_Element_OphCiExamination_InjectionManagementComplex() protected method

Save question answers and risks.
protected saveComplexAttributes_Element_OphCiExamination_InjectionManagementComplex ( $element, $data, $index )
$element
$data
$index

saveComplexAttributes_Element_OphCiExamination_IntraocularPressure() protected method

protected saveComplexAttributes_Element_OphCiExamination_IntraocularPressure ( Element_OphCiExamination_IntraocularPressure $element, $data )
$element OEModule\OphCiExamination\models\Element_OphCiExamination_IntraocularPressure

setAndValidateElementsFromData() protected method

custom validation for virtual clinic referral.
protected setAndValidateElementsFromData ( array $data ) : array
$data array
return array

setComplexAttributes_Element_OphCiExamination_ColourVision() protected method

Set the colour vision readings against the Element_OphCiExamination_ColourVision element.
protected setComplexAttributes_Element_OphCiExamination_ColourVision ( Element_OphCiExamination_ColourVision $element, $data, $index )
$element Element_OphCiExamination_ColourVision
$data
$index

setComplexAttributes_Element_OphCiExamination_DRGrading() protected method

Wrapper to set validation rules on DR Grading element.
protected setComplexAttributes_Element_OphCiExamination_DRGrading ( $element, $data, $index )

setComplexAttributes_Element_OphCiExamination_Diagnoses() protected method

Set the diagnoses against the Element_OphCiExamination_Diagnoses element.
protected setComplexAttributes_Element_OphCiExamination_Diagnoses ( Element_OphCiExamination_Diagnoses $element, $data, $index )
$element Element_OphCiExamination_Diagnoses
$data
$index

setComplexAttributes_Element_OphCiExamination_Dilation() protected method

set the dilation treatments against the element from the provided data.
protected setComplexAttributes_Element_OphCiExamination_Dilation ( OEModule\OphCiExamination\models\Element_OphCiExamination_Dilation $element, $data, $index )
$element OEModule\OphCiExamination\models\Element_OphCiExamination_Dilation
$data
$index

setComplexAttributes_Element_OphCiExamination_FurtherFindings() protected method

setComplexAttributes_Element_OphCiExamination_History() protected method

Set the allergies against the Element_OphCiExamination_Allergy element It's a child element of History.
protected setComplexAttributes_Element_OphCiExamination_History ( Element_OphCiExamination_History $element, $data, $index )
$element Element_OphCiExamination_History
$data
$index

setComplexAttributes_Element_OphCiExamination_InjectionManagementComplex() protected method

associate the answers and risks from the data with the Element_OphCiExamination_InjectionManagementComplex element for validation.
protected setComplexAttributes_Element_OphCiExamination_InjectionManagementComplex ( Element_OphCiExamination_InjectionManagementComplex $element, array $data, $index )
$element Element_OphCiExamination_InjectionManagementComplex
$data array
$index

setComplexAttributes_Element_OphCiExamination_IntraocularPressure() protected method

protected setComplexAttributes_Element_OphCiExamination_IntraocularPressure ( Element_OphCiExamination_IntraocularPressure $element, $data )
$element OEModule\OphCiExamination\models\Element_OphCiExamination_IntraocularPressure

setCurrentSet() protected method

protected setCurrentSet ( )

setElementDefaultOptions_Element_OphCiExamination_Allergy() protected method

Set the allergies against the Element_OphCiExamination_Allergy element.

setElementDefaultOptions_Element_OphCiExamination_Diagnoses() protected method

Pulls in the diagnosis from the episode and ophthalmic diagnoses from the patient, and sets an appropriate list of unique diagnoses.
protected setElementDefaultOptions_Element_OphCiExamination_Diagnoses ( $element, $action )
$element
$action

setElementDefaultOptions_Element_OphCiExamination_History() protected method

Set the allergies against the Element_OphCiExamination_Allergy element It's a child element of History.
protected setElementDefaultOptions_Element_OphCiExamination_History ( Element_OphCiExamination_History $element, $action )
$element Element_OphCiExamination_History

setElementDefaultOptions_Element_OphCiExamination_OverallManagementPlan() protected method

protected setElementDefaultOptions_Element_OphCiExamination_OverallManagementPlan ( Element_OphCiExamination_OverallManagementPlan $element, $action )
$element OEModule\OphCiExamination\models\Element_OphCiExamination_OverallManagementPlan

setElementDefaultOptions_Element_OphCiExamination_Refraction() protected method

protected setElementDefaultOptions_Element_OphCiExamination_Refraction ( Element_OphCiExamination_Refraction $element, $action )
$element OEModule\OphCiExamination\models\Element_OphCiExamination_Refraction

updateRisk() protected method

Updating Patient Risk details.
protected updateRisk ( type $risk_name, type $risk_value )
$risk_name type
$risk_value type

Property Details

$action_types protected static property

protected static $action_types

$allergies protected property

protected $allergies

$deletedAllergies protected property

protected $deletedAllergies

$mandatoryElements protected property

protected $mandatoryElements

$set protected property

protected $set