RecruitmentChannelStatistics class

From Catglobe Wiki
Jump to: navigation, search

RecruitmentChannelStatistics



The statistics about recruitment via channels.

Parent class

Inherits from object

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 CountFinishedSubPanelRecruitment(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 DetailsFinishedSubPanelRecruitment(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}
  • (From object) string ToString() - The string representation of the object.

Properties

  • string ObjectTypeName { get; } - The name of the type of object.
  • (From 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}