Difference between revisions of "CatiStatistic class"
Nguyenduyan (talk | contribs) |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{CGscriptClass_Template | {{CGscriptClass_Template | ||
|Name=<nowiki>CatiStatistic</nowiki> | |Name=<nowiki>CatiStatistic</nowiki> | ||
− | |Description=<nowiki> | + | |Description=<nowiki>Statistic for interviewers in a cati questionnaire.</nowiki> |
− | |Methods= | + | |InheritsFrom=object|Methods= |
− | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}} | + | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}} |
|Properties= | |Properties= | ||
− | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>AverageSuccesTime</nowiki>|HasGetter=1| | + | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>AverageSuccessTime</nowiki>|HasGetter=1|Description=<nowiki>Get AverageSuccesTime in second</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki> | + | {{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>FirstCall</nowiki>|HasGetter=1|Description=<nowiki>Get when first call was started inside the time period</nowiki>}} |
+ | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>InterviewerName</nowiki>|HasGetter=1|Description=<nowiki>Get Interviewers user login name</nowiki>}} | ||
+ | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>InterviewerResourceId</nowiki>|HasGetter=1|Description=<nowiki>Get Interviewers user resource id</nowiki>}} | ||
+ | {{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>LastCall</nowiki>|HasGetter=1|Description=<nowiki>Get when last call was finished inside the time period</nowiki>}} | ||
+ | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ModifiedRealTime</nowiki>|HasGetter=1|Description=<nowiki>Get RealTime that respects max duration of the outcome</nowiki>}} | ||
+ | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>NumberOfContacts</nowiki>|HasGetter=1|Description=<nowiki>Get number of contacts called</nowiki>}} | ||
+ | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>NumberOfInterviewSucceeded</nowiki>|HasGetter=1|Description=<nowiki>Get number of success by qas status</nowiki>}} | ||
+ | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>NumberOfSuccess</nowiki>|HasGetter=1|Description=<nowiki>Get number of success by outcome status</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} | ||
− | {{CGscriptProperties_Template|ReturnType= | + | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>QuestionnaireName</nowiki>|HasGetter=1|Description=<nowiki>Get Questionnaire name</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType= | + | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>QuestionnaireResourceId</nowiki>|HasGetter=1|Description=<nowiki>Get Questionnaire resource id</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>TotalTime</nowiki>|HasGetter | + | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>RealTime</nowiki>|HasGetter=1|Description=<nowiki>Get RealTime in second</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}} | + | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>SuccessRate</nowiki>|HasGetter=1|Description=<nowiki>Get successrate in regards to ea records</nowiki>}} |
+ | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>TotalCallAttempts</nowiki>|HasGetter=1|Description=<nowiki>Get TotalCallAttempts</nowiki>}} | ||
+ | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>TotalTime</nowiki>|HasGetter=1|Description=<nowiki>Get TotalTime in second</nowiki>}} | ||
+ | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}} | ||
+ | |StaticMethods= | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of Array|Name=<nowiki>CatiStatistic_getBy</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=bool|Name=<nowiki>groupByInterviewer</nowiki>|Description=<nowiki>Return seperate results per interviewer</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>groupByQuestionnaire</nowiki>|Description=<nowiki>Return seperate results per questionnaire</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>groupBy</nowiki>|Description=<nowiki>Return results in these groupings. -1=Total, 0=Day, 1=Week, 2=Month, 3=Quarter, 4=Year</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>from</nowiki>|Description=<nowiki>Analyze from when. May be empty (default 72 months ago)</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>to</nowiki>|Description=<nowiki>Analyze to when. May be empty (default tomorrow)</nowiki>}} | ||
+ | |Description=<nowiki>Fetch all statistics, grouped by date group</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of CatiStatistic|Name=<nowiki>CatiStatistic_getByInterviewers</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>interviewerUserResourceIds</nowiki>|Description=<nowiki>Which interviewers to include. May be empty to detect all participating interviewers</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>Resource id of the questionnaire to search statistics for</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>from</nowiki>|Description=<nowiki>Analyze from when. May be empty</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>to</nowiki>|Description=<nowiki>Analyze to when. May be empty</nowiki>}} | ||
+ | |Description=<nowiki>Fetch all statistics by interviewers</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CatiStatistic_getGroupings</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>groupBy</nowiki>|Description=<nowiki>Return results in these groupings. 0=Day, 1=Week, 2=Month, 3=Quarter, 4=Year</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>from</nowiki>|Description=<nowiki>Analyze from when. May be empty</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>to</nowiki>|Description=<nowiki>Analyze to when. May be empty</nowiki>}} | ||
+ | |Description=<nowiki>The grouping values. E.g. week 32 in 2014 is returned as {32,2014}. Grouping by year is returned as {2014,2014}</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of CatiOutcomeStatistic|Name=<nowiki>CatiStatistic_getOutcomeStatistics</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>interviewerUserResourceIds</nowiki>|Description=<nowiki>Which interviewers to include. May be empty to detect all participating interviewers</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>Resource id of the questionnaire to search statistics for</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>from</nowiki>|Description=<nowiki>Analyze from when. May be empty</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>to</nowiki>|Description=<nowiki>Analyze to when. May be empty</nowiki>}} | ||
+ | |Description=<nowiki>Fetch all statistics by interviewers</nowiki>}} | ||
}} | }} | ||
− | |||
=== <span style="color:#DF8621">'''Examples'''</span> === | === <span style="color:#DF8621">'''Examples'''</span> === | ||
− | <span style="color:#DF8621"> CatiStatistic is returned when calling [[ | + | <span style="color:#DF8621">CatiStatistic is returned when calling</span> [[CatiStatistic_getByInterviewers]] |
<source lang="javascript"> | <source lang="javascript"> | ||
Array interviewers = {15620372, 15003004}; | Array interviewers = {15620372, 15003004}; | ||
number qnaireRid = 15629214; | number qnaireRid = 15629214; | ||
− | + | DateTime startDate = new DateTime ("2018/2/7"); | |
− | + | DateTime endDate = new DateTime ("2018/5/10"); | |
− | Array result = | + | Array result = CatiStatistic_getByInterviewers(interviewers, qnaireRid, startDate, endDate); |
print(result);//{CatiStatistic,CatiStatistic} | print(result);//{CatiStatistic,CatiStatistic} | ||
for(number i = 0; i<result.Count; i++ ) | for(number i = 0; i<result.Count; i++ ) | ||
{ | { | ||
− | CatiStatistic | + | CatiStatistic catiStat = result[i]; |
− | print( | + | print(catiStat.InterviewerResourceId);//15003004, 15620372 |
− | print( | + | print(catiStat.TotalTime);//95280, 16740 |
− | print( | + | print(catiStat.RealTime);//89294, 16372 |
− | print( | + | print(catiStat.AverageSuccessTime);//1725, 2962 |
− | print( | + | print(catiStat.TotalCallAttempts); //643, 116 |
} | } | ||
+ | |||
</source> | </source> |
Latest revision as of 10:30, 4 November 2020
CatiStatistic
Statistic for interviewers in a cati questionnaire.
Parent class
Inherits from object
Methods
- (From object) string ToString() - The string representation of the object.
Properties
- number AverageSuccessTime { get; } - Get AverageSuccesTime in second
- DateTime FirstCall { get; } - Get when first call was started inside the time period
- string InterviewerName { get; } - Get Interviewers user login name
- int InterviewerResourceId { get; } - Get Interviewers user resource id
- DateTime LastCall { get; } - Get when last call was finished inside the time period
- int ModifiedRealTime { get; } - Get RealTime that respects max duration of the outcome
- int NumberOfContacts { get; } - Get number of contacts called
- int NumberOfInterviewSucceeded { get; } - Get number of success by qas status
- int NumberOfSuccess { get; } - Get number of success by outcome status
- string ObjectTypeName { get; } - The name of the type of object.
- string QuestionnaireName { get; } - Get Questionnaire name
- int QuestionnaireResourceId { get; } - Get Questionnaire resource id
- int RealTime { get; } - Get RealTime in second
- number SuccessRate { get; } - Get successrate in regards to ea records
- int TotalCallAttempts { get; } - Get TotalCallAttempts
- number TotalTime { get; } - Get TotalTime in second
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
Static Methods
- Array of Array CatiStatistic_getBy(bool groupByInterviewer "Return seperate results per interviewer", bool groupByQuestionnaire "Return seperate results per questionnaire", int groupBy "Return results in these groupings. -1=Total, 0=Day, 1=Week, 2=Month, 3=Quarter, 4=Year", DateTime from "Analyze from when. May be empty (default 72 months ago)", DateTime to "Analyze to when. May be empty (default tomorrow)") - Fetch all statistics, grouped by date group
- Array of CatiStatistic CatiStatistic_getByInterviewers(Array of int interviewerUserResourceIds "Which interviewers to include. May be empty to detect all participating interviewers", int questionnaireResourceId "Resource id of the questionnaire to search statistics for", DateTime from "Analyze from when. May be empty", DateTime to "Analyze to when. May be empty") - Fetch all statistics by interviewers
- array CatiStatistic_getGroupings(int groupBy "Return results in these groupings. 0=Day, 1=Week, 2=Month, 3=Quarter, 4=Year", DateTime from "Analyze from when. May be empty", DateTime to "Analyze to when. May be empty") - The grouping values. E.g. week 32 in 2014 is returned as {32,2014}. Grouping by year is returned as {2014,2014}
- Array of CatiOutcomeStatistic CatiStatistic_getOutcomeStatistics(Array of int interviewerUserResourceIds "Which interviewers to include. May be empty to detect all participating interviewers", int questionnaireResourceId "Resource id of the questionnaire to search statistics for", DateTime from "Analyze from when. May be empty", DateTime to "Analyze to when. May be empty") - Fetch all statistics by interviewers
Examples
CatiStatistic is returned when calling CatiStatistic_getByInterviewers
Array interviewers = {15620372, 15003004};
number qnaireRid = 15629214;
DateTime startDate = new DateTime ("2018/2/7");
DateTime endDate = new DateTime ("2018/5/10");
Array result = CatiStatistic_getByInterviewers(interviewers, qnaireRid, startDate, endDate);
print(result);//{CatiStatistic,CatiStatistic}
for(number i = 0; i<result.Count; i++ )
{
CatiStatistic catiStat = result[i];
print(catiStat.InterviewerResourceId);//15003004, 15620372
print(catiStat.TotalTime);//95280, 16740
print(catiStat.RealTime);//89294, 16372
print(catiStat.AverageSuccessTime);//1725, 2962
print(catiStat.TotalCallAttempts); //643, 116
}