EventHandler¶
-
public class
EventHandler
¶ Event Handler for the DHIS2 module. The public methods listen for the event subjects listed in
org.motechproject.dhis2.event.EventSubjects
Methods¶
handleCreate¶
-
public void
handleCreate
(MotechEvent event)¶ Parses the MotechEvent and creates a
org.motechproject.dhis2.rest.domain.TrackedEntityInstanceDto
which is then sent to the DHIS2 server viaorg.motechproject.dhis2.rest.service.DhisWebService
Parameters: - event – MotechEvent pertaining to tracked entity instance creation.
handleCreateAndEnroll¶
-
public void
handleCreateAndEnroll
(MotechEvent event)¶ Parses the event and creates a
org.motechproject.dhis2.rest.domain.TrackedEntityInstanceDto
and aorg.motechproject.dhis2.rest.domain.EnrollmentDto
which is then sent to the DHIS2 server viaorg.motechproject.dhis2.rest.service.DhisWebService
Parameters: - event – pertaining to combined DHIS2 tracked entity instance creation and enrollment.
handleDataValue¶
-
public void
handleDataValue
(MotechEvent event)¶ Parses the event and creates a
org.motechproject.dhis2.rest.domain.DataValueDto
which is then sent to the DHIS2 server viaorg.motechproject.dhis2.rest.service.DhisWebService
Parameters: - event –
handleDataValueSet¶
-
public void
handleDataValueSet
(MotechEvent event)¶ Parses the event and creates a
org.motechproject.dhis2.rest.domain.DataValueSetDto
which is then sent to the DHIS2 server viaorg.motechproject.dhis2.rest.service.DhisWebService
Parameters: - event –
handleEnrollment¶
-
public void
handleEnrollment
(MotechEvent event)¶ Parses the MotechEvent and creates a
org.motechproject.dhis2.rest.domain.EnrollmentDto
which is then sent to the DHIS2 server viaorg.motechproject.dhis2.rest.service.DhisWebService
Parameters: - event – MotechEvent pertaining to enrolling a tracked entity instance in a program.
handleStageUpdate¶
-
public void
handleStageUpdate
(MotechEvent event)¶ Parses the MotechEvent and creates a
org.motechproject.dhis2.rest.domain.DhisEventDto
which is then sent to the DHIS2 server viaorg.motechproject.dhis2.rest.service.DhisWebService
Parameters: - event – MotechEvent pertaining to a DHIS2 program stage event.