PHP 클래스 WorklistManager

Class WorklistManager
상속: extends CComponent
파일 보기 프로젝트 열기: openeyes/openeyes 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$AUDIT_TARGET_AUTO
$AUDIT_TARGET_MANUAL

보호된 프로퍼티들

프로퍼티 타입 설명
$DEFAULT_DASHBOARD_FUTURE_DAYS string The interval between now and the future used for determining which Automatic Worklists should be rendered on the dashboard.
$DEFAULT_DASHBOARD_SKIP_DAYS array Array of 3 letter days of the week that should be skipped for picking dates to render worklist dashboards for.
$DEFAULT_DUPLICATE_PATIENTS boolean Whether patients can be added to the same automatic worklist more than once.
$DEFAULT_GENERATION_LIMIT string
$DEFAULT_SHOW_EMPTY boolean Whether worklists with no patient assignments should be displayed or not.
$DEFAULT_WORKLIST_END_TIME string
$DEFAULT_WORKLIST_PAGE_SIZE integer
$DEFAULT_WORKLIST_START_TIME string
$do_audit boolean Flag to turn off auditing.
$errors array Internal store of error messages.
$yii CApplication

공개 메소드들

메소드 설명
__construct ( CApplication $yii = null )
addPatientToWorklist ( Patient $patient, Worklist $worklist, DateTime $when = null, array $attributes = [] ) : WorklistPatient | null If the given Patient is successfully added to the given Worklist, returns true. false otherwise.
addWorklistToUserDisplay ( $worklist, $user, null $display_order = null ) : mixed
allowDuplicatePatients ( ) : boolean
canUpdateWorklistDefinition ( WorklistDefinition $definition ) : integer
createWorklistForUser ( Worklist $worklist, null $user = null, boolean $display = true ) : boolean
deleteWorklistDefinitionInstances ( WorklistDefinition $definition ) : boolean
disableAudit ( ) Simple function for use during bulk procesess.
enableAudit ( ) Re-enable after disabling auditing.
generateAllAutomaticWorklists ( DateTime $date_limit = null ) : boolean | integer Iterate through all the worklist definitions and generate the instances up until the given date limit.
generateAutomaticWorklists ( WorklistDefinition $definition, DateTime $date_limit = null ) : boolean Generate worklist instances for the given definition up until the given date limit If false is returned, getErrors should be used to determine the issue.
generateWorklistName ( $definition, DateTime $date ) : string Generates a Worklist instance name from the given definition and date.
getAvailableManualWorklistsForUser ( $user ) : mixed
getCurrentAutomaticWorklistsForUserContext ( $user, Site $site, Firm $firm, DateTime $when ) : array
getCurrentManualWorklistsForUser ( $user ) : array
getDashboardRenderDates ( DateTime $date ) : array Works out the dates we should retrieve Worklists for rendering.
getDefaultEndTime ( ) : string Wrapper for managing default end time for scheduled worklists.
getDefaultStartTime ( ) : string Wrapper for managing default start time for scheduled worklists.
getErrors ( ) : array
getGenerationTimeLimitDate ( ) : DateTime
getPatientsForWorklist ( $worklist ) : CActiveDataProvider
getWorklist ( $id ) : Worklist
getWorklistDefinition ( null $id = null ) : WorklistDefinition | null
getWorklistDefinitions ( ) : WorklistDefinition[]
getWorklistIgnoreDate ( ) : DateTime The time before which we are relaxed about appointments not finding matches.
getWorklistPageSize ( ) : integer
getWorklistPatient ( Worklist $worklist, Patient $patient ) : array | CActiveRecord | mixed | null
hasErrors ( ) : boolean
mapPatientToWorklistDefinition ( Patient $patient, DateTime $when, array $attributes = [] ) : WorklistPatient | null
renderAutomaticDashboard ( CWebUser $user = null ) : array | null Render the automatic dashboard for the given user.
renderManualDashboard ( User | null $user = null ) : array | null
renderWorklistForDashboard ( $worklist ) : mixed
saveWorklistDefinition ( WorklistDefinition $definition ) : boolean
setAttributesForWorklistPatient ( WorklistPatient $worklist_patient, array $attributes = [] ) : boolean
setDateLimitOnRrule ( string $rrule, DateTime $limit ) : string Manipulates the given RRULE string so that it finishes on the given date.
setWorklistDefinitionDisplayOrder ( array $ids = [], null $start = null, null $end = null ) : boolean Set the display order for the worklist definitions The start and end values will support a re-ordering request from a paginated list.
setWorklistDefinitionMappingDisplayOrder ( WorklistDefinition $definition, array $ids = [] ) : boolean
setWorklistDisplayOrderForUser ( $user, array $worklist_ids = [] ) : boolean
shouldDisplayWorklistForContext ( Worklist $worklist, Site $site, Firm $firm )
shouldRenderEmptyWorklist ( ) : boolean
updateWorklistDefinitionMapping ( WorklistDefinitionMapping $mapping, $key, string $values, $display = true ) : boolean Update the mapping specification for an automatic worklist definition.
updateWorklistPatientFromMapping ( WorklistPatient $worklist_patient, DateTime $when, array $attributes = [], boolean $allow_worklist_change = false ) : WorklistPatient | null

보호된 메소드들

메소드 설명
addError ( string $message )
addModelErrors ( $errors )
audit ( $target, $action, null $data = null, null $log_message = null, array $properties = [] ) Audit Wrapper.
checkWorklistMappingMatch ( Worklist $wl, $attributes ) : boolean
createAutomaticWorklist ( WorklistDefinition $definition, DateTime $date ) : boolean Create a worklist instance from the given definition for the given date.
getAppParam ( $name ) : array | string | null Wrapper for retrieve app parameters.
getCurrentFirm ( ) : Firm | null
getCurrentSite ( ) : Site | null
getCurrentUser ( ) : mixed Wrapper for retrieving current active User.
getInstanceForClass ( $class, $args = [] ) : mixed Abstraction for getting instance of class.
getModelForClass ( $class ) : mixed Abstraction for getting model instance of class.
getWorklistForMapping ( DateTime $when, array $attributes = [] ) : Worklist | null
renderPartial ( $view, array $parameters = [] ) : mixed Wrapper for partial rendering to encapsulate the call out to the static app for retrieving the controller object.
reset ( ) Internal method to reset state for error tracking.
startTransaction ( ) : CDbTransaction | null Wrapper for starting a transaction.

메소드 상세

__construct() 공개 메소드

public __construct ( CApplication $yii = null )
$yii CApplication

addError() 보호된 메소드

protected addError ( string $message )
$message string

addModelErrors() 보호된 메소드

protected addModelErrors ( $errors )
$errors

addPatientToWorklist() 공개 메소드

If the given Patient is successfully added to the given Worklist, returns true. false otherwise.
public addPatientToWorklist ( Patient $patient, Worklist $worklist, DateTime $when = null, array $attributes = [] ) : WorklistPatient | null
$patient Patient
$worklist Worklist
$when DateTime
$attributes array
리턴 WorklistPatient | null

addWorklistToUserDisplay() 공개 메소드

public addWorklistToUserDisplay ( $worklist, $user, null $display_order = null ) : mixed
$worklist
$user
$display_order null
리턴 mixed

allowDuplicatePatients() 공개 메소드

public allowDuplicatePatients ( ) : boolean
리턴 boolean

audit() 보호된 메소드

Audit Wrapper.
protected audit ( $target, $action, null $data = null, null $log_message = null, array $properties = [] )
$target
$action
$data null
$log_message null
$properties array

canUpdateWorklistDefinition() 공개 메소드

public canUpdateWorklistDefinition ( WorklistDefinition $definition ) : integer
$definition WorklistDefinition
리턴 integer

checkWorklistMappingMatch() 보호된 메소드

protected checkWorklistMappingMatch ( Worklist $wl, $attributes ) : boolean
$wl Worklist
$attributes
리턴 boolean

createAutomaticWorklist() 보호된 메소드

Create a worklist instance from the given definition for the given date.
protected createAutomaticWorklist ( WorklistDefinition $definition, DateTime $date ) : boolean
$definition WorklistDefinition
$date DateTime
리턴 boolean - indicate whether the instance was created (true) or if it already existed (false)

createWorklistForUser() 공개 메소드

public createWorklistForUser ( Worklist $worklist, null $user = null, boolean $display = true ) : boolean
$worklist Worklist
$user null
$display boolean
리턴 boolean

deleteWorklistDefinitionInstances() 공개 메소드

public deleteWorklistDefinitionInstances ( WorklistDefinition $definition ) : boolean
$definition WorklistDefinition
리턴 boolean

disableAudit() 공개 메소드

Simple function for use during bulk procesess.
public disableAudit ( )

enableAudit() 공개 메소드

Re-enable after disabling auditing.
public enableAudit ( )

generateAllAutomaticWorklists() 공개 메소드

Returns false for errors, otherwise a total count of worklist instances that have been created.
public generateAllAutomaticWorklists ( DateTime $date_limit = null ) : boolean | integer
$date_limit DateTime
리턴 boolean | integer

generateAutomaticWorklists() 공개 메소드

Generate worklist instances for the given definition up until the given date limit If false is returned, getErrors should be used to determine the issue.
public generateAutomaticWorklists ( WorklistDefinition $definition, DateTime $date_limit = null ) : boolean
$definition WorklistDefinition
$date_limit DateTime
리턴 boolean - true if the process had no failures, false otherwise.

generateWorklistName() 공개 메소드

Generates a Worklist instance name from the given definition and date.
public generateWorklistName ( $definition, DateTime $date ) : string
$definition
$date DateTime
리턴 string

getAppParam() 보호된 메소드

Wrapper for retrieve app parameters.
protected getAppParam ( $name ) : array | string | null
$name
리턴 array | string | null

getAvailableManualWorklistsForUser() 공개 메소드

public getAvailableManualWorklistsForUser ( $user ) : mixed
$user
리턴 mixed

getCurrentAutomaticWorklistsForUserContext() 공개 메소드

public getCurrentAutomaticWorklistsForUserContext ( $user, Site $site, Firm $firm, DateTime $when ) : array
$user
$site Site
$firm Firm
$when DateTime
리턴 array

getCurrentFirm() 보호된 메소드

protected getCurrentFirm ( ) : Firm | null
리턴 Firm | null

getCurrentManualWorklistsForUser() 공개 메소드

public getCurrentManualWorklistsForUser ( $user ) : array
$user
리턴 array

getCurrentSite() 보호된 메소드

protected getCurrentSite ( ) : Site | null
리턴 Site | null

getCurrentUser() 보호된 메소드

Wrapper for retrieving current active User.
protected getCurrentUser ( ) : mixed
리턴 mixed

getDashboardRenderDates() 공개 메소드

Works out the dates we should retrieve Worklists for rendering.
public getDashboardRenderDates ( DateTime $date ) : array
$date DateTime
리턴 array

getDefaultEndTime() 공개 메소드

Wrapper for managing default end time for scheduled worklists.
public getDefaultEndTime ( ) : string
리턴 string

getDefaultStartTime() 공개 메소드

Wrapper for managing default start time for scheduled worklists.
public getDefaultStartTime ( ) : string
리턴 string

getErrors() 공개 메소드

public getErrors ( ) : array
리턴 array

getGenerationTimeLimitDate() 공개 메소드

public getGenerationTimeLimitDate ( ) : DateTime
리턴 DateTime

getInstanceForClass() 보호된 메소드

Abstraction for getting instance of class.
protected getInstanceForClass ( $class, $args = [] ) : mixed
$class
리턴 mixed

getModelForClass() 보호된 메소드

Abstraction for getting model instance of class.
protected getModelForClass ( $class ) : mixed
$class
리턴 mixed

getPatientsForWorklist() 공개 메소드

public getPatientsForWorklist ( $worklist ) : CActiveDataProvider
$worklist
리턴 CActiveDataProvider

getWorklist() 공개 메소드

public getWorklist ( $id ) : Worklist
$id
리턴 Worklist

getWorklistDefinition() 공개 메소드

public getWorklistDefinition ( null $id = null ) : WorklistDefinition | null
$id null
리턴 WorklistDefinition | null

getWorklistDefinitions() 공개 메소드

public getWorklistDefinitions ( ) : WorklistDefinition[]
리턴 WorklistDefinition[]

getWorklistForMapping() 보호된 메소드

protected getWorklistForMapping ( DateTime $when, array $attributes = [] ) : Worklist | null
$when DateTime
$attributes array
리턴 Worklist | null

getWorklistIgnoreDate() 공개 메소드

The time before which we are relaxed about appointments not finding matches.
public getWorklistIgnoreDate ( ) : DateTime
리턴 DateTime

getWorklistPageSize() 공개 메소드

public getWorklistPageSize ( ) : integer
리턴 integer

getWorklistPatient() 공개 메소드

public getWorklistPatient ( Worklist $worklist, Patient $patient ) : array | CActiveRecord | mixed | null
$worklist Worklist
$patient Patient
리턴 array | CActiveRecord | mixed | null

hasErrors() 공개 메소드

public hasErrors ( ) : boolean
리턴 boolean

mapPatientToWorklistDefinition() 공개 메소드

public mapPatientToWorklistDefinition ( Patient $patient, DateTime $when, array $attributes = [] ) : WorklistPatient | null
$patient Patient
$when DateTime
$attributes array
리턴 WorklistPatient | null

renderAutomaticDashboard() 공개 메소드

Render the automatic dashboard for the given user.
public renderAutomaticDashboard ( CWebUser $user = null ) : array | null
$user CWebUser
리턴 array | null

renderManualDashboard() 공개 메소드

public renderManualDashboard ( User | null $user = null ) : array | null
$user User | null
리턴 array | null

renderPartial() 보호된 메소드

Wrapper for partial rendering to encapsulate the call out to the static app for retrieving the controller object.
protected renderPartial ( $view, array $parameters = [] ) : mixed
$view
$parameters array
리턴 mixed

renderWorklistForDashboard() 공개 메소드

public renderWorklistForDashboard ( $worklist ) : mixed
$worklist
리턴 mixed

reset() 보호된 메소드

Internal method to reset state for error tracking.
protected reset ( )

saveWorklistDefinition() 공개 메소드

public saveWorklistDefinition ( WorklistDefinition $definition ) : boolean
$definition WorklistDefinition
리턴 boolean

setAttributesForWorklistPatient() 공개 메소드

public setAttributesForWorklistPatient ( WorklistPatient $worklist_patient, array $attributes = [] ) : boolean
$worklist_patient WorklistPatient
$attributes array
리턴 boolean

setDateLimitOnRrule() 공개 메소드

Manipulates the given RRULE string so that it finishes on the given date.
public setDateLimitOnRrule ( string $rrule, DateTime $limit ) : string
$rrule string
$limit DateTime
리턴 string

setWorklistDefinitionDisplayOrder() 공개 메소드

Set the display order for the worklist definitions The start and end values will support a re-ordering request from a paginated list.
public setWorklistDefinitionDisplayOrder ( array $ids = [], null $start = null, null $end = null ) : boolean
$ids array
$start null
$end null
리턴 boolean

setWorklistDefinitionMappingDisplayOrder() 공개 메소드

public setWorklistDefinitionMappingDisplayOrder ( WorklistDefinition $definition, array $ids = [] ) : boolean
$definition WorklistDefinition
$ids array
리턴 boolean

setWorklistDisplayOrderForUser() 공개 메소드

public setWorklistDisplayOrderForUser ( $user, array $worklist_ids = [] ) : boolean
$user
$worklist_ids array
리턴 boolean

shouldDisplayWorklistForContext() 공개 메소드

public shouldDisplayWorklistForContext ( Worklist $worklist, Site $site, Firm $firm )
$worklist Worklist
$site Site
$firm Firm

shouldRenderEmptyWorklist() 공개 메소드

startTransaction() 보호된 메소드

Wrapper for starting a transaction.
protected startTransaction ( ) : CDbTransaction | null
리턴 CDbTransaction | null

updateWorklistDefinitionMapping() 공개 메소드

Update the mapping specification for an automatic worklist definition.
public updateWorklistDefinitionMapping ( WorklistDefinitionMapping $mapping, $key, string $values, $display = true ) : boolean
$mapping WorklistDefinitionMapping
$key
$values string
리턴 boolean

updateWorklistPatientFromMapping() 공개 메소드

public updateWorklistPatientFromMapping ( WorklistPatient $worklist_patient, DateTime $when, array $attributes = [], boolean $allow_worklist_change = false ) : WorklistPatient | null
$worklist_patient WorklistPatient
$when DateTime
$attributes array
$allow_worklist_change boolean - only allow values to change that don't affect which worklist is mapped
리턴 WorklistPatient | null

프로퍼티 상세

$AUDIT_TARGET_AUTO 공개적으로 정적으로 프로퍼티

public static $AUDIT_TARGET_AUTO

$AUDIT_TARGET_MANUAL 공개적으로 정적으로 프로퍼티

public static $AUDIT_TARGET_MANUAL

$DEFAULT_DASHBOARD_FUTURE_DAYS 보호되어 있는 정적으로 프로퍼티

The interval between now and the future used for determining which Automatic Worklists should be rendered on the dashboard.
protected static string $DEFAULT_DASHBOARD_FUTURE_DAYS
리턴 string

$DEFAULT_DASHBOARD_SKIP_DAYS 보호되어 있는 정적으로 프로퍼티

Array of 3 letter days of the week that should be skipped for picking dates to render worklist dashboards for.
protected static array $DEFAULT_DASHBOARD_SKIP_DAYS
리턴 array

$DEFAULT_DUPLICATE_PATIENTS 보호되어 있는 정적으로 프로퍼티

Whether patients can be added to the same automatic worklist more than once.
protected static bool $DEFAULT_DUPLICATE_PATIENTS
리턴 boolean

$DEFAULT_GENERATION_LIMIT 보호되어 있는 정적으로 프로퍼티

protected static string $DEFAULT_GENERATION_LIMIT
리턴 string

$DEFAULT_SHOW_EMPTY 보호되어 있는 정적으로 프로퍼티

Whether worklists with no patient assignments should be displayed or not.
protected static bool $DEFAULT_SHOW_EMPTY
리턴 boolean

$DEFAULT_WORKLIST_END_TIME 보호되어 있는 정적으로 프로퍼티

protected static string $DEFAULT_WORKLIST_END_TIME
리턴 string

$DEFAULT_WORKLIST_PAGE_SIZE 보호되어 있는 정적으로 프로퍼티

protected static int $DEFAULT_WORKLIST_PAGE_SIZE
리턴 integer

$DEFAULT_WORKLIST_START_TIME 보호되어 있는 정적으로 프로퍼티

protected static string $DEFAULT_WORKLIST_START_TIME
리턴 string

$do_audit 보호되어 있는 프로퍼티

Flag to turn off auditing.
protected bool $do_audit
리턴 boolean

$errors 보호되어 있는 프로퍼티

Internal store of error messages.
protected array $errors
리턴 array

$yii 보호되어 있는 프로퍼티

protected CApplication $yii
리턴 CApplication