PHP Class OEModule\OphCoCvi\components\OphCoCvi_Manager

Inheritance: extends CComponent
Afficher le fichier Open project: openeyes/openeyes

Méthodes publiques

Свойство Type Description
$CLERICAL_COMPLETE
$CLINICAL_COMPLETE
$CONSENTED
$CONSULTANT_SIGNED
$DEMOGRAPHICS_COMPLETE
$ISSUED

Protected Properties

Свойство Type Description
$event_type EventType
$info_el_for_events
$yii

Méthodes publiques

Méthode Description
__construct ( CApplication $yii = null, EventType $event_type = null )
calculateStatus ( Event $event ) : mixed
canCreateEventForPatient ( Patient $patient ) : boolean
canEditEvent ( Event $event ) : boolean
canIssueCvi ( Event $event ) : boolean
generateConsentForm ( Event $event ) : ODTTemplateManager Generate the CVI Consent Form for the patient to sign.
getClericalElementForEvent ( Event $event ) : null | Element_OphCoCvi_ClericalInfo
getClinicalConsultant ( Element_OphCoCvi_EventInfo $event_info ) : User | null
getClinicalElementForEvent ( Event $event ) : null | Element_OphCoCvi_ClinicalInfo
getConsentSignatureElementForEvent ( Event $event ) : null | Element_OphCoCvi_ConsentSignature
getDemographicsElementForEvent ( Event $event ) : Element_OphCoCvi_Demographics | null
getDisplayStatusDateForEvent ( Event $event ) : string | null
getDisplayStatusForEvent ( Event $event ) : string
getDisplayStatusFromEventInfo ( Element_OphCoCvi_EventInfo $element ) : string
getEventElements ( Event $event, boolean $for_editing = false ) : array | BaseEventTypeElement[] Wrapper to insert missing elements for a CVI event if they haven't been created (due to access restrictions)
getEventInfoElementForEvent ( Event $event ) : null | Element_OphCoCvi_EventInfo
getEventViewUri ( Event $event ) : string
getEventsForPatient ( Patient $patient ) : Event[]
getListDataProvider ( array $filter = [] ) : CActiveDataProvider Abstraction of the list provider
getStatusText ( $status ) : string
getTitle ( Event $event ) : string
isIssued ( Event $event ) : boolean
issueCvi ( Event $event, $user_id ) : boolean Issue the CVI for the given event (recording it as an action performed by the given user id).
removeConsentSignature ( Event $event, User $user, $signature_file_id ) : boolean
saveUserSignature ( $signatureFile, Event $event )
signCvi ( Event $event, User $user, $pin ) : boolean
updateEventInfo ( $event )

Méthodes protégées

Méthode Description
buildFilterCriteria ( array $filter = [] ) : CDbCriteria
determineEventType ( ) : EventType
generateCviCertificate ( Event $event ) : ProtectedFile Create the CVI Certificate and store it as a ProtectedFile.
getDisplayStatus ( Element_OphCoCvi_ClinicalInfo $clinical = null, Element_OphCoCvi_EventInfo $info ) : string Generate the text display of the status of the CVI
getElementForEvent ( $event, $element_class ) : CActiveRecord | null
getModuleClass ( ) : mixed Returns the non-namespaced module class of the module API Instance
getPatientForEvent ( Event $event ) : Patient
getStructuredDataForPrintPDF ( Event $event ) : array Element based name and value pair.
populateCviCertificate ( Event $event, boolean $ignore_portal = false ) : ODTTemplateManager Prepare the Certificate template with the data available from the given event.
resetElementStore ( Event $event = null ) Convenience wrapper to clear out element data when put into specific states that we don't want to keep
startTransaction ( ) : CDbTransaction | null Wrapper for starting a transaction.

Private Methods

Méthode Description
handleConsultantListFilter ( CDbCriteria $criteria, array $filter = [] )
handleDateRangeFilter ( CDbCriteria $criteria, array $filter = [] )
handleIssuedFilter ( CDbCriteria $criteria, array $filter = [] )
handleSiteListFilter ( CDbCriteria $criteria, array $filter = [] )
handleSubspecialtyListFilter ( CDbCriteria $criteria, array $filter = [] )

Method Details

__construct() public méthode

public __construct ( CApplication $yii = null, EventType $event_type = null )
$yii CApplication
$event_type EventType

buildFilterCriteria() protected méthode

protected buildFilterCriteria ( array $filter = [] ) : CDbCriteria
$filter array
Résultat CDbCriteria

calculateStatus() public méthode

public calculateStatus ( Event $event ) : mixed
$event Event
Résultat mixed

canCreateEventForPatient() public méthode

public canCreateEventForPatient ( Patient $patient ) : boolean
$patient Patient
Résultat boolean

canEditEvent() public méthode

public canEditEvent ( Event $event ) : boolean
$event Event
Résultat boolean

canIssueCvi() public méthode

public canIssueCvi ( Event $event ) : boolean
$event Event
Résultat boolean

determineEventType() protected méthode

protected determineEventType ( ) : EventType
Résultat EventType

generateConsentForm() public méthode

Generate the CVI Consent Form for the patient to sign.
public generateConsentForm ( Event $event ) : ODTTemplateManager
$event Event
Résultat ODTTemplateManager

generateCviCertificate() protected méthode

Create the CVI Certificate and store it as a ProtectedFile.
protected generateCviCertificate ( Event $event ) : ProtectedFile
$event Event
Résultat ProtectedFile

getClericalElementForEvent() public méthode

public getClericalElementForEvent ( Event $event ) : null | Element_OphCoCvi_ClericalInfo
$event Event
Résultat null | OEModule\OphCoCvi\models\Element_OphCoCvi_ClericalInfo

getClinicalConsultant() public méthode

public getClinicalConsultant ( Element_OphCoCvi_EventInfo $event_info ) : User | null
$event_info OEModule\OphCoCvi\models\Element_OphCoCvi_EventInfo
Résultat User | null

getClinicalElementForEvent() public méthode

public getClinicalElementForEvent ( Event $event ) : null | Element_OphCoCvi_ClinicalInfo
$event Event
Résultat null | OEModule\OphCoCvi\models\Element_OphCoCvi_ClinicalInfo

getConsentSignatureElementForEvent() public méthode

public getConsentSignatureElementForEvent ( Event $event ) : null | Element_OphCoCvi_ConsentSignature
$event Event
Résultat null | OEModule\OphCoCvi\models\Element_OphCoCvi_ConsentSignature

getDemographicsElementForEvent() public méthode

public getDemographicsElementForEvent ( Event $event ) : Element_OphCoCvi_Demographics | null
$event Event
Résultat OEModule\OphCoCvi\models\Element_OphCoCvi_Demographics | null

getDisplayStatus() protected méthode

Generate the text display of the status of the CVI
protected getDisplayStatus ( Element_OphCoCvi_ClinicalInfo $clinical = null, Element_OphCoCvi_EventInfo $info ) : string
$clinical OEModule\OphCoCvi\models\Element_OphCoCvi_ClinicalInfo
$info OEModule\OphCoCvi\models\Element_OphCoCvi_EventInfo
Résultat string

getDisplayStatusDateForEvent() public méthode

public getDisplayStatusDateForEvent ( Event $event ) : string | null
$event Event
Résultat string | null

getDisplayStatusForEvent() public méthode

public getDisplayStatusForEvent ( Event $event ) : string
$event Event
Résultat string

getDisplayStatusFromEventInfo() public méthode

public getDisplayStatusFromEventInfo ( Element_OphCoCvi_EventInfo $element ) : string
$element OEModule\OphCoCvi\models\Element_OphCoCvi_EventInfo
Résultat string

getElementForEvent() protected méthode

protected getElementForEvent ( $event, $element_class ) : CActiveRecord | null
$event
$element_class
Résultat CActiveRecord | null

getEventElements() public méthode

NB The inserted elements may be removed in the view context if the user still doesn't have the right to manage the data for that specific element.
public getEventElements ( Event $event, boolean $for_editing = false ) : array | BaseEventTypeElement[]
$event Event
$for_editing boolean
Résultat array | BaseEventTypeElement[]

getEventInfoElementForEvent() public méthode

public getEventInfoElementForEvent ( Event $event ) : null | Element_OphCoCvi_EventInfo
$event Event
Résultat null | OEModule\OphCoCvi\models\Element_OphCoCvi_EventInfo

getEventViewUri() public méthode

public getEventViewUri ( Event $event ) : string
$event Event
Résultat string

getEventsForPatient() public méthode

public getEventsForPatient ( Patient $patient ) : Event[]
$patient Patient
Résultat Event[]

getListDataProvider() public méthode

Abstraction of the list provider
public getListDataProvider ( array $filter = [] ) : CActiveDataProvider
$filter array
Résultat CActiveDataProvider

getModuleClass() protected méthode

Returns the non-namespaced module class of the module API Instance
protected getModuleClass ( ) : mixed
Résultat mixed

getPatientForEvent() protected méthode

protected getPatientForEvent ( Event $event ) : Patient
$event Event
Résultat Patient

getStatusText() public méthode

public getStatusText ( $status ) : string
$status
Résultat string

getStructuredDataForPrintPDF() protected méthode

Element based name and value pair.
protected getStructuredDataForPrintPDF ( Event $event ) : array
$event Event
Résultat array

getTitle() public méthode

public getTitle ( Event $event ) : string
$event Event
Résultat string

isIssued() public méthode

public isIssued ( Event $event ) : boolean
$event Event
Résultat boolean

issueCvi() public méthode

Issue the CVI for the given event (recording it as an action performed by the given user id).
public issueCvi ( Event $event, $user_id ) : boolean
$event Event
$user_id
Résultat boolean

populateCviCertificate() protected méthode

Prepare the Certificate template with the data available from the given event.
protected populateCviCertificate ( Event $event, boolean $ignore_portal = false ) : ODTTemplateManager
$event Event
$ignore_portal boolean - if true, will force the signature box to be rendered rather than checking the portal
Résultat ODTTemplateManager

removeConsentSignature() public méthode

public removeConsentSignature ( Event $event, User $user, $signature_file_id ) : boolean
$event Event
$user User
$signature_file_id
Résultat boolean

resetElementStore() protected méthode

Convenience wrapper to clear out element data when put into specific states that we don't want to keep
protected resetElementStore ( Event $event = null )
$event Event

saveUserSignature() public méthode

public saveUserSignature ( $signatureFile, Event $event )
$signatureFile
$event Event

signCvi() public méthode

public signCvi ( Event $event, User $user, $pin ) : boolean
$event Event
$user User
$pin
Résultat boolean

startTransaction() protected méthode

Wrapper for starting a transaction.
protected startTransaction ( ) : CDbTransaction | null
Résultat CDbTransaction | null

updateEventInfo() public méthode

public updateEventInfo ( $event )
$event

Property Details

$CLERICAL_COMPLETE public_oe static_oe property

public static $CLERICAL_COMPLETE

$CLINICAL_COMPLETE public_oe static_oe property

public static $CLINICAL_COMPLETE

$CONSENTED public_oe static_oe property

public static $CONSENTED

$CONSULTANT_SIGNED public_oe static_oe property

public static $CONSULTANT_SIGNED

$DEMOGRAPHICS_COMPLETE public_oe static_oe property

public static $DEMOGRAPHICS_COMPLETE

$ISSUED public_oe static_oe property

public static $ISSUED

$event_type protected_oe property

protected EventType $event_type
Résultat EventType

$info_el_for_events protected_oe property

protected $info_el_for_events

$yii protected_oe property

protected $yii