Object representing a track assignment to a respondent.
package | Gems |
---|---|
subpackage | Tracker |
copyright | Copyright (c) 2011 Erasmus MC |
license | New BSD License |
since | Class available since version 1.4 |
inherited_from | \Gems_Registry_TargetAbstract |
__construct(mixed $respTracksData)
mixed
Track Id or array containing reps2track record
__get(string $name) : Callable
string
Callable
_checkTrackCount(integer $userId) : integer
integer
Id of the user who takes the action (for logging)
integer
1 if the track was changed by this code_fixFieldData()
addSurveyToTrack(\type $surveyId, \type $surveyData, integer $userId, boolean $checkTrack = true
) : \Gems_Tracker_Token
\type
the gsu_id of the survey to add
\type
integer
boolean
Should the track be checked? Set to false when adding more then one and check manually
\Gems_Tracker_Token
addTokenToTrack(\Gems_Tracker_Token $token, $tokenData, integer $userId, boolean $checkTrack = true
) : \Gems_Tracker_Token
integer
boolean
Should the track be checked? Set to false when adding more then one and check manually
\Gems_Tracker_Token
applyToMenuSource(\Gems_Menu_ParameterSource $source) : \Gems_Tracker_RespondentTrack
\Gems_Menu_ParameterSource
\Gems_Tracker_RespondentTrack
(continuation pattern)assignTokensToRelations() : integer
Only surveys that have not yet been answered will be assigned to the correct relation.
integer
Number of changes tokenscalculateEndDate() : string
The end date can be calculated when:
or the end date of the tokens is calculated using the end date
You can overrule this calculation at the project level.
string
or nullcheckRegistryRequestsAnswers() : boolean
boolean
False if required are missing.checkTrackTokens(integer $userId, \Gems_Tracker_Token $fromToken= null
, \Gems_Tracker_Token $skipToken= null
) : integer
integer
Id of the user who takes the action (for logging)
\Gems_Tracker_Token
Optional token to start from
\Gems_Tracker_Token
Optional token to skip in the recalculation when $fromToken is used
integer
The number of tokens changed by this codegetActiveRoundToken(\type $roundId, \Gems_Tracker_Token $token = null
) : \Gems_Tracker_Token
\type
Gems round id
\Gems_Tracker_Token
Optional token to add as a round (for speed optimization)
\Gems_Tracker_Token
getCode() : string
string
Internal code of the trackgetCodeFields() : array
array
[prefix]code => valuegetComment() : string
string
Comment fieldgetCompleted() : integer
integer
The number of rounds completedgetCount() : integer
integer
The number of roundsgetCurrentRound() : string
string
Round description or Stopped/Completed if not found.getDate(string $fieldName) : \MUtil_Date
string
\MUtil_Date
getDeleteSnippets() : array
array
of snippet names for deleting the trackgetEditSnippets() : array
deprecated | since version 1.7.1 Snippets defined TrackAction |
---|
array
of snippet names for editing this respondent trackgetEndDate() : \MUtil_Date
\MUtil_Date
or nullgetFieldData() : array
array
of the existing field values for this respondent trackgetFieldsInfo() : string
string
getFirstToken() : \Gems_Tracker_Token
\Gems_Tracker_Token
getLastToken() : \Gems_Tracker_Token
\Gems_Tracker_Token
getOrganizationId() : integer
integer
The organization idgetPatientNumber() : string
string
The respondents patient numbergetReceptionCode() : \Gems_Util_ReceptionCode
\Gems_Util_ReceptionCode
reception codegetRespondent() : \Gems_Tracker_Respondent
\Gems_Tracker_Respondent
getRespondentId() : integer
integer
The respondent idgetRespondentLanguage() : string
string
Two letter language codegetRespondentName() : string
string
The respondents namegetRespondentTrackId() : integer
integer
The respondent2track idgetRoundAfterAppointmentId(integer $roundId) : integer
integer
integer
| null | false False when RoundId not found or not an appointment otherwise appointment id or null when not setgetRoundCode(integer $roundId) : string | null
integer
string
null
Null when RoundId not foundgetStartDate() : \MUtil_Date
\MUtil_Date
getTokens(boolean $refresh = false
) : array
boolean
When true, always reload
array
of \Gems_Tracker_TokengetTrackEngine() : \Gems_Tracker_Engine_TrackEngineInterface
\Gems_Tracker_Engine_TrackEngineInterface
getTrackId() : integer
integer
The track idhandleFieldUpdate(integer $userId)
integer
handleRoundCompletion(mixed $token, integer $userId) : integer
mixed
integer
The current user
integer
The number of tokens changed by this eventhandleTrackCalculation(integer $userId)
integer
handleTrackCompletion(array $values, integer $userId)
array
The values changed before entering this event
integer
hasSuccesCode() : boolean
boolean
isOpen() : boolean
boolean
recalculateFields(integer $userId, $fieldsChanged = false
) : integer
integer
The current user or null if a recalculation should not be performed
integer
The number of tokens changed as a result of this updaterefresh(array $gemsData = null
) : \Gems_Tracker_RespondentTrack
array
Optional, the data refresh with, otherwise refresh from database.
\Gems_Tracker_RespondentTrack
(continuation pattern)restoreTokens(\Gems_Util_ReceptionCode $oldCode, \Gems_Util_ReceptionCode $newCode) : integer
Used when restoring a respondent or this tracks, and the restore tracks/tokens box is checked.
\Gems_Util_ReceptionCode
The old reception code
\Gems_Util_ReceptionCode
the new reception code
integer
The number of restored tokenssetEndDate(mixed $endDate, integer $userId) : integer
mixed
The new end date for this track
integer
The current user
integer
1 if the token has changed, 0 otherwisesetFieldData(array $data, integer $userId = null
) : array
Return the complete set of fielddata
array
integer
The current user, when passed the track_info is recalculated and saved
array
setReceptionCode(string $code, string $comment, integer $userId) : integer
string
The new (non-success) reception code or a \Gems_Util_ReceptionCode object
string
Comment for tokens. False values leave value unchanged
integer
The current user
integer
1 if the token has changed, 0 otherwise_ensureRespondentData()
_ensureRounds(boolean $reload = false
)
boolean
_ensureFieldData(boolean $reload = false
)
boolean
Optional parameter to force reload.
_updateTrack(array $values, $userId)
$_activeTokens : array
array()
$_checkStart : \Gems_Tracker_Token
$_fieldData : array
null
$_firstToken : \Gems_Tracker_Token
$_respTrackData : array
$_respTrackId : integer
$_respondentObject : \Gems_Tracker_Respondent
null
$_rounds : array
null
$_tokens : array
$currentUser : \Gems_User_User
$db : \Zend_Db_Adapter_Abstract
$loader : \Gems_Loader
$locale : \Zend_Locale
$tracker : \Gems_Tracker
$util : \Gems_Util