childcount.forms¶
Please see with ChildCount+ for information on what forms and commands are.
childcount.forms.CCForm¶
-
class
childcount.forms.CCForm.CCForm(message, date, chw, params, health_id)[source]¶ An abstract class to hold the logic for an SMS form.
Parameters: - message (
rapidsms.Message) – SMS message being processed by this form - date (
datetime.datetime) – Encounter date of this form - chw (
childcount.models.CHW) – CHW who submitted this form - params (list) – Parameters passed to this form (as in
sys.argv()) - health_id (str) – Health ID for the encounter’s patient
-
MULTIPLE_PATIENTS= True¶
-
PREFIX= '+'¶ The character prefix that should precede the form keyword. We use “+” everywhere to keep things standardized.
-
post_process(forms_list)[source]¶ Processing to be done after all
process()has been called on all submitted forms.Parameters: forms_list (list of instantiated childcount.forms.CCFormobjects) – List of successfully processed forms
- message (
Pre-Defined Forms¶
All ChildCount+ forms are defined in :file:’apps/childcount/forms/‘. Before writing a new form, check to see if someone has already written a form that suits your application.