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)
mixedTrack Id or array containing reps2track record
__get(string $name) : Callable
string
Callable_checkTrackCount(integer $userId) : integer
integerId of the user who takes the action (for logging)
integer1 if the track was changed by this code_fixFieldData()
addSurveyToTrack(\type $surveyId, \type $surveyData, integer $userId, boolean $checkTrack = true) : \Gems_Tracker_Token
\typethe gsu_id of the survey to add
\type
integer
booleanShould the track be checked? Set to false when adding more then one and check manually
\Gems_Tracker_TokenaddTokenToTrack(\Gems_Tracker_Token $token, $tokenData, integer $userId, boolean $checkTrack = true) : \Gems_Tracker_Token
integer
booleanShould the track be checked? Set to false when adding more then one and check manually
\Gems_Tracker_TokenapplyToMenuSource(\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.
integerNumber 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.
stringor nullcheckRegistryRequestsAnswers() : boolean
booleanFalse if required are missing.checkTrackTokens(integer $userId, \Gems_Tracker_Token $fromToken= null, \Gems_Tracker_Token $skipToken= null) : integer
integerId of the user who takes the action (for logging)
\Gems_Tracker_TokenOptional token to start from
\Gems_Tracker_TokenOptional token to skip in the recalculation when $fromToken is used
integerThe number of tokens changed by this codegetActiveRoundToken(\type $roundId, \Gems_Tracker_Token $token = null) : \Gems_Tracker_Token
\typeGems round id
\Gems_Tracker_TokenOptional token to add as a round (for speed optimization)
\Gems_Tracker_TokengetCode() : string
stringInternal code of the trackgetCodeFields() : array
array[prefix]code => valuegetComment() : string
stringComment fieldgetCompleted() : integer
integerThe number of rounds completedgetCount() : integer
integerThe number of roundsgetCurrentRound() : string
stringRound description or Stopped/Completed if not found.getDate(string $fieldName) : \MUtil_Date
string
\MUtil_DategetDeleteSnippets() : array
arrayof snippet names for deleting the trackgetEditSnippets() : array
| deprecated | since version 1.7.1 Snippets defined TrackAction |
|---|
arrayof snippet names for editing this respondent trackgetEndDate() : \MUtil_Date
\MUtil_Dateor nullgetFieldData() : array
arrayof the existing field values for this respondent trackgetFieldsInfo() : string
stringgetFirstToken() : \Gems_Tracker_Token
\Gems_Tracker_TokengetLastToken() : \Gems_Tracker_Token
\Gems_Tracker_TokengetOrganizationId() : integer
integerThe organization idgetPatientNumber() : string
stringThe respondents patient numbergetReceptionCode() : \Gems_Util_ReceptionCode
\Gems_Util_ReceptionCodereception codegetRespondent() : \Gems_Tracker_Respondent
\Gems_Tracker_RespondentgetRespondentId() : integer
integerThe respondent idgetRespondentLanguage() : string
stringTwo letter language codegetRespondentName() : string
stringThe respondents namegetRespondentTrackId() : integer
integerThe 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
stringnullNull when RoundId not foundgetStartDate() : \MUtil_Date
\MUtil_DategetTokens(boolean $refresh = false) : array
booleanWhen true, always reload
arrayof \Gems_Tracker_TokengetTrackEngine() : \Gems_Tracker_Engine_TrackEngineInterface
\Gems_Tracker_Engine_TrackEngineInterfacegetTrackId() : integer
integerThe track idhandleFieldUpdate(integer $userId)
integer
handleRoundCompletion(mixed $token, integer $userId) : integer
mixed
integerThe current user
integerThe number of tokens changed by this eventhandleTrackCalculation(integer $userId)
integer
handleTrackCompletion(array $values, integer $userId)
arrayThe values changed before entering this event
integer
hasSuccesCode() : boolean
booleanisOpen() : boolean
booleanrecalculateFields(integer $userId, $fieldsChanged = false) : integer
integerThe current user or null if a recalculation should not be performed
integerThe number of tokens changed as a result of this updaterefresh(array $gemsData = null) : \Gems_Tracker_RespondentTrack
arrayOptional, 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_ReceptionCodeThe old reception code
\Gems_Util_ReceptionCodethe new reception code
integerThe number of restored tokenssetEndDate(mixed $endDate, integer $userId) : integer
mixedThe new end date for this track
integerThe current user
integer1 if the token has changed, 0 otherwisesetFieldData(array $data, integer $userId = null) : array
Return the complete set of fielddata
array
integerThe current user, when passed the track_info is recalculated and saved
arraysetReceptionCode(string $code, string $comment, integer $userId) : integer
stringThe new (non-success) reception code or a \Gems_Util_ReceptionCode object
stringComment for tokens. False values leave value unchanged
integerThe current user
integer1 if the token has changed, 0 otherwise_ensureRespondentData()
_ensureRounds(boolean $reload = false)
boolean
_ensureFieldData(boolean $reload = false)
booleanOptional 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