Standard Respondent model.
When a project defines its own sub-class of this class and names
it
package | Gems |
---|---|
subpackage | Model |
copyright | Copyright (c) 2011 Erasmus MC |
license | New BSD License |
since | Class available since version 1.0 |
inherited_from | \Gems_Model_HiddenOrganizationModel |
_(string $text, string|\Zend_Locale $locale = null
) : string
Translates the given string returns the translation
string
Translation string
string
\Zend_Locale
(optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information
string
__construct()
__construct(string $name, string $startTable, string $fieldPrefix= null
, mixed $saveable= null
)
string
A name for the model
string
The base table for the model
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
addLeftTable(mixed $table, array $joinFields, string $fieldPrefix= null
, mixed $saveable= null
) : \Gems_Model_JoinModel
mixed
The name of the table to join or a table object or an array(corr_name => tablename) or array(int => tablename, corr_name)
array
Array of source->dest primary keys for this join
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
\Gems_Model_JoinModel
addLoginCheck() : \Gems_Model_RespondentModel
\Gems_Model_RespondentModel
(continuation pattern)addNameToModel(\Gems_Model_JoinModel $model, string $label)
\Gems_Model_JoinModel
string
addRightTable(mixed $table, array $joinFields, string $fieldPrefix= null
, mixed $saveable= null
) : \Gems_Model_JoinModel
mixed
The name of the table to join or a table object or an array(corr_name => tablename) or array(int => tablename, corr_name)
array
Array of source->dest primary keys for this join
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
\Gems_Model_JoinModel
addTable(mixed $table, array $joinFields, string $fieldPrefix= null
, mixed $saveable= null
) : \Gems_Model_JoinModel
mixed
The name of the table to join or a table object or an array(corr_name => tablename) or array(int => tablename, corr_name)
array
Array of source->dest primary keys for this join
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
\Gems_Model_JoinModel
afterRegistry() : void
afterRegistry() : void
This function is no needed if the classes are setup correctly
applyBrowseSettings() : \Gems_Model_RespondentModel
\Gems_Model_RespondentModel
applyDetailSettings() : \Gems_Model_RespondentModel
\Gems_Model_RespondentModel
applyEditSettings(boolean $create = false
) : \Gems_Model_RespondentModel
boolean
True when creating
\Gems_Model_RespondentModel
applyHash(string $filterValue, string $filterKey)
applyParameters(array $parameters, boolean $includeNumericFilters = false
) : array
array
boolean
When true numeric filter keys (0, 1, 2...) are added to the filter as well
array
The $parameters minus the sort & textsearch keyscheckRegistryRequestsAnswers() : boolean
boolean
False if required are missing.copyKeys($reset = false
)
countTracks(string $patientId, integer $organizationId, integer $respondentId= null
, boolean $active= false
) : boolean
string
Can be empty if $respondentId is passed
integer
When null looks at all organizations
integer
Pass when at hand, is looked up otherwise
boolean
When true only tracks with a success code are returned
boolean
getCurrentOrganization() : integer
integer
getKeyRef(mixed $forData, array $href= array()
, $organizationInKey= null
) : array
basically transforms the fieldnames ointo oan IDn => value array
mixed
Array value to vilter on
array
Or \ArrayObject
array
That can by used as hrefgetReceptionCode(string $patientId, integer $organizationId, integer $respondentId = null
) : string
string
Can be empty if $respondentId is passed
integer
integer
Pass when at hand, is looked up otherwise
string
The current reception codegetRespondentTracksModel() : \Gems_Model_JoinModel
\Gems_Model_JoinModel
A NEW JoinModel, not a continuation pattern returnhasTracks(string $patientId, integer $organizationId, integer $respondentId= null
, boolean $active= false
) : boolean
string
Can be empty if $respondentId is passed
integer
When null looks at all organizations
integer
Pass when at hand, is looked up otherwise
boolean
When true we look only for tracks with a success code
boolean
hideSSN(mixed $value, boolean $isNew= false
, string $name= null
, array $context= array()
, $isPost= false
) : string
mixed
The value being saved
boolean
True when a new item is being saved
string
The name of the current field
array
Optional, the other values being saved
string
The output to displayisMultiOrganization() : boolean
boolean
plural(string $singular, string $plural, integer $number, string|\Zend_Locale $locale = null
) : string
Translates the given string using plural notations Returns the translated string
see |
---|
string
Singular translation string
string
Plural translation string
integer
Number for detecting the correct plural
string
\Zend_Locale
(Optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information
string
save(array $newValues, array $filter= null
, array $saveTables= null
) : array
array
The values to store for a single model item.
array
If the filter contains old key values these are used to decide on update versus insert.
array
The values as they are after saving (they may change).saveSSN(mixed $value, boolean $isNew= false
, string $name= null
, array $context= array()
) : string
mixed
The value being saved
boolean
True when a new item is being saved
string
The name of the current field
array
Optional, the other values being saved
string
The salted hash as a 32-character hexadecimal number.setReceptionCode(string $patientId, integer $organizationId, string $newCode, integer $respondentId= null
, string $oldCode= null
) : \Gems_Util_ReceptionCode
string
Can be empty if $respondentId is passed
integer
string
String or \Gems_Util_ReceptionCode
integer
Pass when at hand, is looked up otherwise
string
Pass when at hand as tring or \Gems_Util_ReceptionCode, is looked up otherwise
\Gems_Util_ReceptionCode
The new code reception code object for further processingsetTableSaveable(string $table_name, string $fieldPrefix= null
, mixed $saveable= null
) : \Gems_Model_JoinModel
string
Does not test for existence
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
\Gems_Model_JoinModel
whenSSN(mixed $value, boolean $isNew= false
, string $name= null
, array $context= array()
) : boolean
mixed
The value being saved
boolean
True when a new item is being saved
string
The name of the current field
array
Optional, the other values being saved
boolean
_checkFilterUsed(mixed $filter) : array
Checks the filter on sematic correctness and replaces the text seacrh filter with the real filter.
mixed
True for the filter stored in this model or a filter array
array
The filter to use_checkSaveable(mixed $saveable, string $fieldPrefix) : mixed
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
The saveable setting to usegetChangersList() : array
array
id => namegetTranslateAdapter() : \Zend_Translate_Adapter
\Zend_Translate_Adapter
initTranslateable()
This function is not needed if the variables have been defined correctly in the source for this object and theose variables have been applied.
return @void
$hashAlgorithm : integer
'sha512'
Can be changed is derived classes, set to null to use old md5() method
$hashSsn : integer
self::SSN_HASH
Can be changed is derived classes.
$view : \Zend_View
$currentUser : \Gems_User_User
$db : \Zend_Db_Adapter_Abstract
$loader : \Gems_Loader
$loginCheck : boolean
false
$project : \Gems_Project_ProjectSettings
$translate : \Zend_Translate
$translateAdapter : \Zend_Translate_Adapter
$util : \Gems_Util
SSN_HASH = 1
SSN_HIDE = 2
SSN_OPEN = 4