Difference between revisions of "FieldWorkManagement class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=<nowiki>FieldWorkManagement</nowiki> |Description=<nowiki>Manage cati questionnaire.</nowiki> |Constructors= {{CGscriptConstructors_Template|Par...")
 
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
|Name=<nowiki>FieldWorkManagement</nowiki>
 
|Name=<nowiki>FieldWorkManagement</nowiki>
 
|Description=<nowiki>Manage cati questionnaire.</nowiki>
 
|Description=<nowiki>Manage cati questionnaire.</nowiki>
|Constructors=
+
|InheritsFrom=object|Constructors=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>Resource id of the questionnaire</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>interviewerResourceId</nowiki>|Description=<nowiki>Resource id of the user that is interviewing. 0 to use current user</nowiki>}}
 
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>Resource id of the questionnaire</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>interviewerResourceId</nowiki>|Description=<nowiki>Resource id of the user that is interviewing. 0 to use current user</nowiki>}}
Line 10: Line 10:
 
{{CGscriptParameters_Template|Type=SampleRule|Name=<nowiki>sr</nowiki>|Description=<nowiki>Samplerule to restrict to.</nowiki>}}
 
{{CGscriptParameters_Template|Type=SampleRule|Name=<nowiki>sr</nowiki>|Description=<nowiki>Samplerule to restrict to.</nowiki>}}
 
|Description=<nowiki>Restrict interviewer to only allow access to a specific sample. Return false if already restricted.</nowiki>}}
 
|Description=<nowiki>Restrict interviewer to only allow access to a specific sample. Return false if already restricted.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Array of QAS|Name=<nowiki>AppointmentList</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=int|Name=<nowiki>pageSize</nowiki>|Description=<nowiki>How many items to fetch</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>page</nowiki>|Description=<nowiki>Which page to fetch records for</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>forInterviewer</nowiki>|Description=<nowiki>Show only those for specified interviewer. Also returns the value in the order they will be called</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Unknown|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
 
|Description=<nowiki>Get list of qas on the given list.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>AppointmentListCount</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=bool|Name=<nowiki>forInterviewer</nowiki>|Description=<nowiki>Show only those for specified interviewer. Also returns the value in the order they will be called</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Unknown|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
 
|Description=<nowiki>Get count of qas on the given list.</nowiki>}}
 
 
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>EnsureEmployeeAssignmentRecord</nowiki>|Description=<nowiki>Ensure current interviewer has an active Employee Assignment record for today. Startdate will be set to now, if none exists. Return true when made new record.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>EnsureEmployeeAssignmentRecord</nowiki>|Description=<nowiki>Ensure current interviewer has an active Employee Assignment record for today. Startdate will be set to now, if none exists. Return true when made new record.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Array of QAS|Name=<nowiki>FinishedList</nowiki>|Parameters=
+
{{CGscriptMethods_Template|ReturnType=Array of ints|Name=<nowiki>ListOfInterviewers</nowiki>|Description=<nowiki>Get list of interviewers user resource ids with active Employee Assignment records today.</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>pageSize</nowiki>|Description=<nowiki>How many items to fetch</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>page</nowiki>|Description=<nowiki>Which page to fetch records for</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>forInterviewer</nowiki>|Description=<nowiki>Show only those for specified interviewer. Also returns the value in the order they will be called</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Unknown|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
 
|Description=<nowiki>Get list of qas on the given list.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>FinishedListCount</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=bool|Name=<nowiki>forInterviewer</nowiki>|Description=<nowiki>Show only those for specified interviewer. Also returns the value in the order they will be called</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Unknown|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
 
|Description=<nowiki>Get count of qas on the given list.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Array of numbers|Name=<nowiki>ListOfInterviewers</nowiki>|Description=<nowiki>Get list of interviewers user resource ids with active Employee Assignment records today.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Array of QAS|Name=<nowiki>MainList</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=int|Name=<nowiki>pageSize</nowiki>|Description=<nowiki>How many items to fetch</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>page</nowiki>|Description=<nowiki>Which page to fetch records for</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>forInterviewer</nowiki>|Description=<nowiki>Show only those for specified interviewer. Also returns the value in the order they will be called</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Unknown|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
 
|Description=<nowiki>Get list of qas on the given list.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>MainListCount</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=bool|Name=<nowiki>forInterviewer</nowiki>|Description=<nowiki>Show only those for specified interviewer. Also returns the value in the order they will be called</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Unknown|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
 
|Description=<nowiki>Get count of qas on the given list.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Array of QAS|Name=<nowiki>OngoingList</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=int|Name=<nowiki>pageSize</nowiki>|Description=<nowiki>How many items to fetch</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>page</nowiki>|Description=<nowiki>Which page to fetch records for</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>forInterviewer</nowiki>|Description=<nowiki>Show only those for specified interviewer. Also returns the value in the order they will be called</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Unknown|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
 
|Description=<nowiki>Get list of qas on the given list.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>OngoingListCount</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=bool|Name=<nowiki>forInterviewer</nowiki>|Description=<nowiki>Show only those for specified interviewer. Also returns the value in the order they will be called</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Unknown|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
 
|Description=<nowiki>Get count of qas on the given list.</nowiki>}}
 
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>RemoveRestrictSampleTo</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>RemoveRestrictSampleTo</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=SampleRule|Name=<nowiki>sr</nowiki>|Description=<nowiki>Samplerule to remove restrict to.</nowiki>}}
 
{{CGscriptParameters_Template|Type=SampleRule|Name=<nowiki>sr</nowiki>|Description=<nowiki>Samplerule to remove restrict to.</nowiki>}}
 
|Description=<nowiki>Remove restrict interviewer to only allow access to a specific sample.</nowiki>}}
 
|Description=<nowiki>Remove restrict interviewer to only allow access to a specific sample.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Array of SampleRule|Name=<nowiki>RestrictSampleToList</nowiki>|Description=<nowiki>List of samples interviewer is restricted to. None means access to all.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Array of SampleRule|Name=<nowiki>RestrictSampleToList</nowiki>|Description=<nowiki>List of samples interviewer is restricted to. None means access to all.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Array of QAS|Name=<nowiki>RetryList</nowiki>|Parameters=
+
{{CGscriptMethods_Template|ReturnType=CatiQasSearchQuery|Name=<nowiki>SearchQuery</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>pageSize</nowiki>|Description=<nowiki>How many items to fetch</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>page</nowiki>|Description=<nowiki>Which page to fetch records for</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>forInterviewer</nowiki>|Description=<nowiki>Show only those for specified interviewer. Also returns the value in the order they will be called</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Unknown|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
+
{{CGscriptParameters_Template|Type=CatiListType constant|Name=<nowiki>catiList</nowiki>|Description=<nowiki>Which list to return</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
 
|Description=<nowiki>Get list of qas on the given list.</nowiki>}}
 
|Description=<nowiki>Get list of qas on the given list.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>RetryListCount</nowiki>|Parameters=
+
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
{{CGscriptParameters_Template|Type=bool|Name=<nowiki>forInterviewer</nowiki>|Description=<nowiki>Show only those for specified interviewer. Also returns the value in the order they will be called</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Unknown|Name=<nowiki>restrictToSampleIds</nowiki>|Description=<nowiki>Restrict the search to the given list of samples. May be empty</nowiki>}}
 
|Description=<nowiki>Get count of qas on the given list.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}}
 
 
|Properties=
 
|Properties=
 
{{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=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|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 +
|StaticMethods=
 +
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>FieldWorkManagement_listOfCurrentInterviewersAllProjects</nowiki>|Description=<nowiki>Get list of interviewers user resource ids with active Employee Assignment records currently active (+-2hours) grouped by questionnaire resource id.</nowiki>}}
 
}}
 
}}

Latest revision as of 04:50, 6 July 2021

FieldWorkManagement



Manage cati questionnaire.

Parent class

Inherits from object

Constructors

  • (int questionnaireResourceId "Resource id of the questionnaire", int interviewerResourceId "Resource id of the user that is interviewing. 0 to use current user") - Manage the given questionnaire and interviewer.

Methods

  • bool AddRestrictSampleTo(SampleRule sr "Samplerule to restrict to.") - Restrict interviewer to only allow access to a specific sample. Return false if already restricted.
  • bool EnsureEmployeeAssignmentRecord() - Ensure current interviewer has an active Employee Assignment record for today. Startdate will be set to now, if none exists. Return true when made new record.
  • Array of int ListOfInterviewers() - Get list of interviewers user resource ids with active Employee Assignment records today.
  • Empty RemoveRestrictSampleTo(SampleRule sr "Samplerule to remove restrict to.") - Remove restrict interviewer to only allow access to a specific sample.
  • Array of SampleRule RestrictSampleToList() - List of samples interviewer is restricted to. None means access to all.
  • CatiQasSearchQuery SearchQuery(CatiListType constant catiList "Which list to return", Array of int restrictToSampleIds "Restrict the search to the given list of samples. May be empty") - Get list of qas on the given list.
  • (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.

Static Methods

  • Dictionary FieldWorkManagement_listOfCurrentInterviewersAllProjects() - Get list of interviewers user resource ids with active Employee Assignment records currently active (+-2hours) grouped by questionnaire resource id.