PHP Class OEModule\OphCoCvi\controllers\DefaultController

Inheritance: extends BaseEventTypeController
ファイルを表示 Open project: openeyes/openeyes

Public Properties

Property Type Description
$cvi_limit
$demographicsData
$event_prompt

Protected Properties

Property Type Description
$FILTER_LIST_KEY label used in session storage for the list filter values
$action_types
$cvi_manager

Public Methods

Method Description
actionConsentSignature ( $id ) Generate a version of the certificate for signing by the patient/representative for consent.
actionCreate ( ) Create Form with check for the cvi existing events count
actionDisplayConsentSignature ( $id )
actionIssue ( $id )
actionLabelPDFprint ( $id )
actionList ( ) Generate a list of all the CVI events for clerical use.
actionPDFPrint ( $id )
actionRemoveConsentSignature ( $id )
actionRetrieveConsentSignature ( $id )
actionSignCVI ( $id )
canIssue ( ) : boolean Determine if the current event can be issued
checkClericalEditAccess ( ) : boolean This is a granular permission check, and should be used in conjunection with checkEditAcess
checkClinicalEditAccess ( ) : boolean This is a granular permission check, and should be used in conjunection with checkEditAcess
checkCreateAccess ( ) : boolean
checkEditAccess ( ) : boolean
checkLabelPrintAccess ( )
checkListAccess ( ) : boolean Currently uses the OprnEditCvi operation to check for access
checkPrintAccess ( ) : boolean
checkRequestDeleteAccess ( ) : boolean Ensure we invoke the CVI RBAC rules around requesting deletion.
getDisorderSections ( ) : mixed Simple wrapper to get the disorder sections that should be rendered in the event form.
getManager ( ) : OphCoCvi_Manager
getOptionalElements ( ) : null Override as the optional elements should not be rendered until completed through the appropriate access levels.
getPatientFactors ( ) : mixed Simple abstraction wrapper to get the patient factors that should be rendered in the event form.
initActionConsentSignature ( )
initActionDisplayConsentSignature ( )
initActionIssue ( )
initActionLabelPDFprint ( )
initActionPDFPrint ( ) Ensure the event is setup on the controller
initActionRemoveConsentSignature ( )
initActionRetrieveConsentSignature ( )
initActionSignCVI ( )
initActionView ( ) Sets the title for the event display.
isListFiltered ( ) : boolean
isRequiredInUI ( BaseEventTypeElement $element ) : boolean Override because we don't want elements removed from the UI if we have rendered them Optionality is in place to support granular permission structure.
saveComplexAttributes_Element_OphCoCvi_ClericalInfo ( Element_OphCoCvi_ClericalInfo $element, $data, $index )

Protected Methods

Method Description
checkUserSigned ( ) : boolean
getElementsForElementType ( ElementType $element_type, $data ) : array Override to support the fact that users might not have permission to edit specific event elements.
getEventElements ( ) : array Sister method to the getElementsForEventType method, this loads up event elements for rendering (whether viewing or editing).
getListFilter ( ) : array
saveComplexAttributes_Element_OphCoCvi_ClinicalInfo ( Element_OphCoCvi_ClinicalInfo $element, $data, $index )
setComplexAttributes_Element_OphCoCvi_ClericalInfo ( Element_OphCoCvi_ClericalInfo $element, $data, $index )
setComplexAttributes_Element_OphCoCvi_ClinicalInfo ( Element_OphCoCvi_ClinicalInfo $element, $data, $index ) <<< * This just sets assignments for validation and the re-use in forms if a form submit does not validate
setElementDefaultOptions_Element_OphCoCvi_ClericalInfo ( Element_OphCoCvi_ClericalInfo $element, $action )
setElementDefaultOptions_Element_OphCoCvi_ClinicalInfo ( Element_OphCoCvi_ClinicalInfo $element, $action )
setElementDefaultOptions_Element_OphCoCvi_Demographics ( Element_OphCoCvi_Demographics $element ) Sets the default values for the element from the patient
setElementDefaultOptions_Element_OphCoCvi_EventInfo ( Element_OphCoCvi_EventInfo $element, $action )
setValidationScenarioForElement ( $element ) We set the validation scenario for the models based on whether the user is saving as draft or performing a full save
updateEventInfo ( ) Use the manager status for the event info text.

Private Methods

Method Description
getElementsForClerical ( ) : Element_OphCoCvi_ClericalInfo | boolean | null Because form elements won't be submitted when editing without this access, we need to return the current event element if it exists
getElementsForClinical ( ) : Element_OphCoCvi_ClinicalInfo[] | boolean | null Because form elements won't be submitted when editing without this access, we need to return the current event element if it exists
getElementsForEventInfo ( ) : Element_OphCoCvi_EventInfo[]

Method Details

actionConsentSignature() public method

Generate a version of the certificate for signing by the patient/representative for consent.
public actionConsentSignature ( $id )
$id

actionCreate() public method

Create Form with check for the cvi existing events count
public actionCreate ( )

actionDisplayConsentSignature() public method

public actionDisplayConsentSignature ( $id )
$id

actionIssue() public method

public actionIssue ( $id )
$id

actionLabelPDFprint() public method

public actionLabelPDFprint ( $id )
$id

actionList() public method

Generate a list of all the CVI events for clerical use.
public actionList ( )

actionPDFPrint() public method

public actionPDFPrint ( $id )
$id

actionRemoveConsentSignature() public method

public actionRemoveConsentSignature ( $id )
$id

actionRetrieveConsentSignature() public method

public actionRetrieveConsentSignature ( $id )
$id

actionSignCVI() public method

public actionSignCVI ( $id )
$id

canIssue() public method

Determine if the current event can be issued
public canIssue ( ) : boolean
return boolean

checkClericalEditAccess() public method

This is a granular permission check, and should be used in conjunection with checkEditAcess

checkClinicalEditAccess() public method

This is a granular permission check, and should be used in conjunection with checkEditAcess

checkCreateAccess() public method

public checkCreateAccess ( ) : boolean
return boolean

checkEditAccess() public method

public checkEditAccess ( ) : boolean
return boolean

checkLabelPrintAccess() public method

checkListAccess() public method

Currently uses the OprnEditCvi operation to check for access
public checkListAccess ( ) : boolean
return boolean

checkPrintAccess() public method

public checkPrintAccess ( ) : boolean
return boolean

checkRequestDeleteAccess() public method

Ensure we invoke the CVI RBAC rules around requesting deletion.

checkUserSigned() protected method

protected checkUserSigned ( ) : boolean
return boolean

getDisorderSections() public method

Simple wrapper to get the disorder sections that should be rendered in the event form.
public getDisorderSections ( ) : mixed
return mixed

getElementsForElementType() protected method

Override to support the fact that users might not have permission to edit specific event elements.
protected getElementsForElementType ( ElementType $element_type, $data ) : array
$element_type ElementType
$data
return array

getEventElements() protected method

Because of the permissioning behaviours, need to be able to filter out clinical/clerical elements as appropriate.
protected getEventElements ( ) : array
return array

getListFilter() protected method

protected getListFilter ( ) : array
return array

getManager() public method

public getManager ( ) : OphCoCvi_Manager
return OEModule\OphCoCvi\components\OphCoCvi_Manager

getOptionalElements() public method

Override as the optional elements should not be rendered until completed through the appropriate access levels.
public getOptionalElements ( ) : null
return null

getPatientFactors() public method

Simple abstraction wrapper to get the patient factors that should be rendered in the event form.
public getPatientFactors ( ) : mixed
return mixed

initActionConsentSignature() public method

initActionDisplayConsentSignature() public method

initActionIssue() public method

public initActionIssue ( )

initActionLabelPDFprint() public method

initActionPDFPrint() public method

Ensure the event is setup on the controller
public initActionPDFPrint ( )

initActionRemoveConsentSignature() public method

initActionRetrieveConsentSignature() public method

initActionSignCVI() public method

public initActionSignCVI ( )

initActionView() public method

Sets the title for the event display.
public initActionView ( )

isListFiltered() public method

public isListFiltered ( ) : boolean
return boolean

isRequiredInUI() public method

Override because we don't want elements removed from the UI if we have rendered them Optionality is in place to support granular permission structure.
public isRequiredInUI ( BaseEventTypeElement $element ) : boolean
$element BaseEventTypeElement
return boolean

saveComplexAttributes_Element_OphCoCvi_ClericalInfo() public method

public saveComplexAttributes_Element_OphCoCvi_ClericalInfo ( Element_OphCoCvi_ClericalInfo $element, $data, $index )
$element OEModule\OphCoCvi\models\Element_OphCoCvi_ClericalInfo
$data
$index

saveComplexAttributes_Element_OphCoCvi_ClinicalInfo() protected method

protected saveComplexAttributes_Element_OphCoCvi_ClinicalInfo ( Element_OphCoCvi_ClinicalInfo $element, $data, $index )
$element OEModule\OphCoCvi\models\Element_OphCoCvi_ClinicalInfo
$data
$index

setComplexAttributes_Element_OphCoCvi_ClericalInfo() protected method

protected setComplexAttributes_Element_OphCoCvi_ClericalInfo ( Element_OphCoCvi_ClericalInfo $element, $data, $index )
$element OEModule\OphCoCvi\models\Element_OphCoCvi_ClericalInfo
$data
$index

setComplexAttributes_Element_OphCoCvi_ClinicalInfo() protected method

<<< * This just sets assignments for validation and the re-use in forms if a form submit does not validate
protected setComplexAttributes_Element_OphCoCvi_ClinicalInfo ( Element_OphCoCvi_ClinicalInfo $element, $data, $index )
$element OEModule\OphCoCvi\models\Element_OphCoCvi_ClinicalInfo
$data
$index

setElementDefaultOptions_Element_OphCoCvi_ClericalInfo() protected method

protected setElementDefaultOptions_Element_OphCoCvi_ClericalInfo ( Element_OphCoCvi_ClericalInfo $element, $action )
$element OEModule\OphCoCvi\models\Element_OphCoCvi_ClericalInfo
$action

setElementDefaultOptions_Element_OphCoCvi_ClinicalInfo() protected method

protected setElementDefaultOptions_Element_OphCoCvi_ClinicalInfo ( Element_OphCoCvi_ClinicalInfo $element, $action )
$element OEModule\OphCoCvi\models\Element_OphCoCvi_ClinicalInfo
$action

setElementDefaultOptions_Element_OphCoCvi_Demographics() protected method

Sets the default values for the element from the patient
protected setElementDefaultOptions_Element_OphCoCvi_Demographics ( Element_OphCoCvi_Demographics $element )
$element OEModule\OphCoCvi\models\Element_OphCoCvi_Demographics

setElementDefaultOptions_Element_OphCoCvi_EventInfo() protected method

protected setElementDefaultOptions_Element_OphCoCvi_EventInfo ( Element_OphCoCvi_EventInfo $element, $action )
$element OEModule\OphCoCvi\models\Element_OphCoCvi_EventInfo

setValidationScenarioForElement() protected method

We set the validation scenario for the models based on whether the user is saving as draft or performing a full save
protected setValidationScenarioForElement ( $element )
$element

updateEventInfo() protected method

Use the manager status for the event info text.
protected updateEventInfo ( )

Property Details

$FILTER_LIST_KEY protected_oe static_oe property

label used in session storage for the list filter values
protected static $FILTER_LIST_KEY

$action_types protected_oe static_oe property

protected static $action_types

$cvi_limit public_oe property

public $cvi_limit

$cvi_manager protected_oe property

protected $cvi_manager

$demographicsData public_oe property

public $demographicsData

$event_prompt public_oe property

public $event_prompt