Quick intro to server setup
Setup V2 server as described here.
Open schedule-config.xls file in assets/schedules and edit according to your scheduling requirements
Fields configurable are file explained below:
Field | Purpose |
---|---|
action | What action type is bing defined by this row. Options are enroll: to enroll when this field evaluates to true unenroll: unenroll entity from schedule when this happens fulfill: mark schedule`s current milestone as fulfilled and stop future alerts |
schedule | Json schedule name as defined here |
milestone | Json schedule milestone name as defined above |
form | form name that would trigger this schedule. (Can be comma separated list of form names if multiple forms trigger this schedule) |
triggerDateField | date field name in form submission that would be used as a reference date for generating alerts on proper timings. (Can be comma separated list of field names if multiple fields can trigger this schedule, first field takes the precedence and next field would be evaluated only if first field is null or empty) |
passLogic | Additional logic your want to add filter for : the FormSubmisison in passlogic can be referred as fs. |
entityType | entity type or bind type in your form mapping (also found in form_definition.json). Note that if schedule has to be generated for subforms entiity type should be bind type of subform, not from main FormSubmisison |
EXAMPLE |
If your scheduling logic can not be fulfilled by configuring file above, download source code
Add a Custom handler in module opensrp-register in package org.opensrp.register.service.handler like this.
Register handler in FormZiggyMapper as defined here (line 70 to 86).
If you like old V1 ziggy approach follow this . (Note: packages could be different from V1, and All constant references have been moved to register module itself)
This site is no longer maintained. Please visit docs.opensrp.io for current documentation.