Difference between revisions of "RecruitmentChannelStatistics class"
Nguyenduyan (talk | contribs) (Tag: visualeditor) |
Nguyenduyan (talk | contribs) |
||
Line 14: | Line 14: | ||
|Description=<nowiki>Number of those attempted recruited started the recruitment questionnaire.</nowiki>}} | |Description=<nowiki>Number of those attempted recruited started the recruitment questionnaire.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountFinishedGotAskedAboutRecruitment</nowiki>|Description=<nowiki>Number of potential recruited finished questionnaire.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountFinishedGotAskedAboutRecruitment</nowiki>|Description=<nowiki>Number of potential recruited finished questionnaire.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountFinishedRecruitment</nowiki>|Description=<nowiki>Number of those attempted recruited | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountFinishedRecruitment</nowiki>|Description=<nowiki>Number of those attempted recruited finished the recruitment questionnaire.</nowiki>}} |
+ | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountFinishedRecruitment</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Question that contains date of recruitment</nowiki>}} | ||
+ | |Description=<nowiki>Number of those already recruited that were recruited for a subpanel.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountStartedGotAskedAboutRecruitment</nowiki>|Description=<nowiki>Number of potential recruited.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountStartedGotAskedAboutRecruitment</nowiki>|Description=<nowiki>Number of potential recruited.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountStartedRecruitment</nowiki>|Description=<nowiki>Number of those attempted recruited started the recruitment questionnaire.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountStartedRecruitment</nowiki>|Description=<nowiki>Number of those attempted recruited started the recruitment questionnaire.</nowiki>}} | ||
Line 24: | Line 27: | ||
|Description=<nowiki>Who was of those attempted recruited started the recruitment questionnaire.</nowiki>}} | |Description=<nowiki>Who was of those attempted recruited started the recruitment questionnaire.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsFinishedGotAskedAboutRecruitment</nowiki>|Description=<nowiki>Who was asked to be recruited finished questionnaire.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsFinishedGotAskedAboutRecruitment</nowiki>|Description=<nowiki>Who was asked to be recruited finished questionnaire.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsFinishedRecruitment</nowiki>|Description=<nowiki>Who was of those attempted recruited | + | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsFinishedRecruitment</nowiki>|Description=<nowiki>Who was of those attempted recruited finished the recruitment questionnaire.</nowiki>}} |
+ | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsFinishedRecruitment</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Question that contains date of recruitment</nowiki>}} | ||
+ | |Description=<nowiki>Who was of those already recruited that were recruited for a subpanel.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsStartedGotAskedAboutRecruitment</nowiki>|Description=<nowiki>Who was asked to be recruited.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsStartedGotAskedAboutRecruitment</nowiki>|Description=<nowiki>Who was asked to be recruited.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsStartedRecruitment</nowiki>|Description=<nowiki>Who was of those attempted recruited started the recruitment questionnaire.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsStartedRecruitment</nowiki>|Description=<nowiki>Who was of those attempted recruited started the recruitment questionnaire.</nowiki>}} | ||
Line 33: | Line 39: | ||
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}} | ||
}} | }} | ||
+ | |||
=== <span style="color:#DF8621">'''Examples'''</span> === | === <span style="color:#DF8621">'''Examples'''</span> === |
Revision as of 05:38, 12 July 2017
RecruitmentChannelStatistics
The statistics about recruitment via channels.
Constructors
- (int originQuestionnaireResourceId "Resource id of the questionnaire the recruitment starts in", int recruitmentQuestionnaireResourceId "Resource id of the questionnaire the recruited must start and finish to be considered recruited", array from "From date", array to "To date", int groupBy "Return results in these groupings. 1=Week, 2=Month, 3=Quarter, 4=Year") - Create new statistics
Methods
- array CountAcceptedInitialRecruitment(string recruitmentQuestion "If origin questionnaire asks if respondent wants to participate, specify question label", Range recruitmentRange "If origin questionnaire asks if respondent wants to participate, specify question range for success") - Number of potential recruited that finished questionnaire and agreed to be recruited.
- array CountFinishedAtleast1QuestionnaireOfTypeAfter(array panelQuestionnaireResourceTemplateIds "Resource template ids of questionnaires the recruited gets after being successfully recruited") - Number of those attempted recruited started the recruitment questionnaire.
- array CountFinishedGotAskedAboutRecruitment() - Number of potential recruited finished questionnaire.
- array CountFinishedRecruitment() - Number of those attempted recruited finished the recruitment questionnaire.
- array CountFinishedRecruitment(string questionLabel "Question that contains date of recruitment") - Number of those already recruited that were recruited for a subpanel.
- array CountStartedGotAskedAboutRecruitment() - Number of potential recruited.
- array CountStartedRecruitment() - Number of those attempted recruited started the recruitment questionnaire.
- Dictionary DetailsAcceptedInitialRecruitment(string recruitmentQuestion "If origin questionnaire asks if respondent wants to participate, specify question label", Range recruitmentRange "If origin questionnaire asks if respondent wants to participate, specify question range for success") - Who was asked to be recruited that finished questionnaire and agreed to be recruited.
- Dictionary DetailsFinishedAtleast1QuestionnaireOfTypeAfter(array panelQuestionnaireResourceTemplateIds "Resource template ids of questionnaires the recruited gets after being successfully recruited") - Who was of those attempted recruited started the recruitment questionnaire.
- Dictionary DetailsFinishedGotAskedAboutRecruitment() - Who was asked to be recruited finished questionnaire.
- Dictionary DetailsFinishedRecruitment() - Who was of those attempted recruited finished the recruitment questionnaire.
- Dictionary DetailsFinishedRecruitment(string questionLabel "Question that contains date of recruitment") - Who was of those already recruited that were recruited for a subpanel.
- Dictionary DetailsStartedGotAskedAboutRecruitment() - Who was asked to be recruited.
- Dictionary DetailsStartedRecruitment() - Who was of those attempted recruited started the recruitment questionnaire.
- array GetGroupings() - The grouping values. E.g. week 32 in 2014 is returned as {32,2014}. Grouping by year is returned as {2014,2014}
- string ToString() - The string representation of the object.
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- TypeInformation TypeInformation { get; } - Get information about this class.
Examples
number originQuestionnaireResourceId = 15569407;
number recruitmentQuestionnaireResourceId = 15569412;
array From = DateTime_getByYMD(2017,6,19);
array To = DateTime_getByYMD(2017,7,3);
number groupBy = 1;//1=Week, 2=Month, 3=Quarter, 4=Year
RecruitmentChannelStatistics r = new RecruitmentChannelStatistics(originQuestionnaireResourceId, recruitmentQuestionnaireResourceId, From, To, groupBy);
print(r.GetGroupings());//{{24,2017},{25,2017},{26,2017}}
//---------------COUNT---------------//
//CountStartedGotAskedAboutRecruitment: number respondent start original qnaire
array startedGotAskedAboutRecruitment = r.CountStartedGotAskedAboutRecruitment();
print(startedGotAskedAboutRecruitment);//{Empty,Empty,15}
//CountFinishedGotAskedAboutRecruitment: number respondent completed (status: Normal or Interview success) original qnaire
array finishedGotAskedAboutRecruitment = r.CountFinishedGotAskedAboutRecruitment();
print(finishedGotAskedAboutRecruitment);//{Empty,Empty,7}
//CountAcceptedInitialRecruitment: number respondent answer accept on recruit question AND completed (status: Normal or Interview success) both on original qnaire
string recruitmentQuestion = "Q2";
Range recruitmentRange = new Range ("[1]");
array acceptedInitialRecruitment = r.CountAcceptedInitialRecruitment(recruitmentQuestion, recruitmentRange);
print(acceptedInitialRecruitment);//{Empty,Empty,5}
//CountStartedRecruitment: number respondent start recuit qnaire
array startedRecruitment = r.CountStartedRecruitment();
print(startedRecruitment);//{Empty,Empty,5}
//CountFinishedRecruitment: number respondent completed recruit qnaire(Normal or Interview success)
array finishedRecruitment = r. CountFinishedRecruitment();
print(finishedRecruitment);//{Empty,Empty,3}
//CountFinishedAtleast1QuestionnaireOfTypeAfter: number respondent finished atleast one qnaire on a pecified qnaire resource template
array qnaireResourceTemplateRIds = {15569453};
array finishedAtleast1Questionnaire = r.CountFinishedAtleast1QuestionnaireOfTypeAfter(qnaireResourceTemplateRIds);
print(finishedAtleast1Questionnaire);//{Empty,Empty,3}
//-------------Details----------------//
//DetailsStartedGotAskedAboutRecruitment
Dictionary detailsStartedGotAskedAboutRecruitment = r.DetailsStartedGotAskedAboutRecruitment();
print(detailsStartedGotAskedAboutRecruitment);
//{"4125467": 1, "4125468": 1, "4125469": 1, "4125470": 1, "4125471": 1, "4125472": 1, "4125473": 1, "4125474": 1, "4125475": 1, "4125476": 1, "4133328": 1, "4133330": 1, "4133333": 1, "4133335": 1, "4133336": 1}
//DetailsFinishedGotAskedAboutRecruitment
Dictionary detailsFinishedGotAskedAboutRecruitment = r.DetailsFinishedGotAskedAboutRecruitment();
print(detailsFinishedGotAskedAboutRecruitment);//{"4125471": 1, "4125474": 1, "4125476": 1, "4133330": 1, "4133333": 1, "4133335": 1, "4133336": 1}
//DetailsAcceptedInitialRecruitment
//string recruitmentQuestion = "Q2";
//Range recruitmentRange = new Range ("[1]");
Dictionary detailsAcceptedInitialRecruitment = r.DetailsAcceptedInitialRecruitment(recruitmentQuestion, recruitmentRange);
print(detailsAcceptedInitialRecruitment);//{"4125471": 1, "4133330": 1, "4133333": 1, "4133335": 1, "4133336": 1}
//DetailsStartedRecruitment
Dictionary detailsStartedRecruitment = r.DetailsStartedRecruitment();
print(detailsStartedRecruitment);//{"4125471": 1, "4133330": 1, "4133333": 1, "4133335": 1, "4133336": 1}
//DetailsFinishedRecruitment()
Dictionary detailsFinishedRecruitment = r. DetailsFinishedRecruitment();
print(detailsFinishedRecruitment);//{"4133333": 1, "4133335": 1, "4133336": 1}
//DetailsFinishedAtleast1QuestionnaireOfTypeAfter
//array qnaireResourceTemplateRIds = {15569453};
Dictionary detailsFinishedAtleast1Questionnaire = r.DetailsFinishedAtleast1QuestionnaireOfTypeAfter(qnaireResourceTemplateRIds);
print(detailsFinishedAtleast1Questionnaire);//{"4133333": 1, "4133335": 1, "4133336": 1}
array userRId = detailsFinishedAtleast1Questionnaire.Keys;
print(userRId);//{4133333,4133335,4133336}