DhisWebService¶
-
public interface
DhisWebService
¶ Handles HTTP requests and responses to and from DHIS2.
Methods¶
createEnrollment¶
-
DhisStatusResponse
createEnrollment
(EnrollmentDto enrollmentDto)¶ Attempts to create an enrollment in DHIS2 via an HTTP post request.
Parameters: - enrollmentDto –
Returns: a
org.motechproject.dhis2.rest.domain.DhisStatusResponse
indicating success or failure
createEvent¶
-
DhisStatusResponse
createEvent
(DhisEventDto event)¶ Attempts to create a DHIS2 event in DHIS2 via an HTTP post request.
Parameters: - event –
Returns: a
org.motechproject.dhis2.rest.domain.DhisStatusResponse
indicating success or failure
createTrackedEntityInstance¶
-
DhisStatusResponse
createTrackedEntityInstance
(TrackedEntityInstanceDto trackedEntity)¶ Attempts to create a tracked entity instance in DHIS2 via an HTTP post request.
Parameters: - trackedEntity –
getDataElementByHref¶
-
DataElementDto
getDataElementByHref
(String href)¶ Gets the Data Element specified in the URL.
Parameters: - href –
Returns:
getDataElementById¶
-
DataElementDto
getDataElementById
(String id)¶ Gets the Data Element specified by ID.
Parameters: - id –
Returns:
getDataElements¶
-
List<DataElementDto>
getDataElements
()¶ Gets a list of all the Data Elements from DHIS2.
Returns: a list of org.motechproject.dhis2.rest.domain.DataElementDto
getDataSets¶
-
List<DataSetDto>
getDataSets
()¶ Gets a list of all the Data Sets from DHIS2.
Returns: a list of DataSetDto
s
getDhisServerInfo¶
-
DhisServerInfo
getDhisServerInfo
()¶ Retrieves DHIS2 server specific information, such as its version via HTTP GET request.
Returns: DHIS2 server specific information
getOrganisationUnitByHref¶
-
OrganisationUnitDto
getOrganisationUnitByHref
(String href)¶ Gets the Organisation Unit specified in the URL.
Parameters: - href –
Returns:
getOrganisationUnitById¶
-
OrganisationUnitDto
getOrganisationUnitById
(String id)¶ Gets the Organisation Unit specified by ID.
Parameters: - id –
Returns:
getOrganisationUnits¶
-
List<OrganisationUnitDto>
getOrganisationUnits
()¶ Gets a list of all the Organisation Units from DHIS2.
Returns: a list of org.motechproject.dhis2.rest.domain.OrganisationUnitDto
getProgramByHref¶
-
ProgramDto
getProgramByHref
(String href)¶ Gets the program specified in the URL.
Parameters: - href –
Returns:
getProgramById¶
-
ProgramDto
getProgramById
(String id)¶ Gets the program specified by ID.
Parameters: - id –
Returns:
getProgramStageByHref¶
-
ProgramStageDto
getProgramStageByHref
(String href)¶ Gets the program Stage specified in the URL.
Parameters: - href –
Returns:
getProgramStageById¶
-
ProgramStageDto
getProgramStageById
(String id)¶ Gets the program Stage specified by ID.
Parameters: - id –
Returns:
getProgramStageDataElementByHref¶
-
ProgramStageDataElementDto
getProgramStageDataElementByHref
(String href)¶ Gets the program Stage Data Element specified in the URL.
Parameters: - href –
Returns: the
org.motechproject.dhis2.rest.domain.ProgramStageDataElementDto
getProgramStageDataElementById¶
-
ProgramStageDataElementDto
getProgramStageDataElementById
(String id)¶ Gets the program Stage Data Element specified by ID.
Parameters: - id –
Returns: the
org.motechproject.dhis2.rest.domain.ProgramStageDataElementDto
getProgramStages¶
-
List<ProgramStageDto>
getProgramStages
()¶ Gets a list of all the program Stages from DHIS2.
Returns: a list of :java:ref:`org.motechproject.dhis2.rest.domain.ProgramStageDto`
getProgramTrackedEntityAttributeByHref¶
-
ProgramTrackedEntityAttributeDto
getProgramTrackedEntityAttributeByHref
(String href)¶ Gets the tracked entity attribute specified in the URL.
Parameters: - href –
Returns: the
org.motechproject.dhis2.rest.domain.TrackedEntityAttributeDto
getProgramTrackedEntityAttributeById¶
-
ProgramTrackedEntityAttributeDto
getProgramTrackedEntityAttributeById
(String id)¶ Gets the tracked entity attribute specified by ID.
Parameters: - id –
Returns: the
org.motechproject.dhis2.rest.domain.TrackedEntityAttributeDto
getPrograms¶
-
List<ProgramDto>
getPrograms
()¶ Gets a list of all the programs from DHIS2.
Returns: a list of org.motechproject.dhis2.rest.domain.ProgramDto
getServerVersion¶
-
ServerVersion
getServerVersion
()¶ Returns DHIS server version, as returned by the DHIS instance. The version is cached and refreshed when the DHIS settings are changed.
Returns: DHIS server version
getTrackedEntities¶
-
List<TrackedEntityDto>
getTrackedEntities
()¶ Gets a list of all the tracked entity types in DHIS2.
Returns: a list of org.motechproject.dhis2.rest.domain.TrackedEntityDto
getTrackedEntityAttributeByHref¶
-
TrackedEntityAttributeDto
getTrackedEntityAttributeByHref
(String href)¶ Gets the tracked entity attribute specified in the URL.
Parameters: - href –
Returns: the
org.motechproject.dhis2.rest.domain.TrackedEntityAttributeDto
getTrackedEntityAttributeById¶
-
TrackedEntityAttributeDto
getTrackedEntityAttributeById
(String id)¶ Gets the tracked entity attribute specified by ID.
Parameters: - id –
Returns: the
org.motechproject.dhis2.rest.domain.TrackedEntityAttributeDto
getTrackedEntityAttributes¶
-
List<TrackedEntityAttributeDto>
getTrackedEntityAttributes
()¶ Gets a list of all the tracked entity attributes from DHIS2.
Returns: a list of org.motechproject.dhis2.rest.domain.TrackedEntityInstanceDto
getTrackedEntityByHref¶
-
TrackedEntityDto
getTrackedEntityByHref
(String href)¶ Gets the tracked entity specified in the URL.
Parameters: - href –
Returns:
getTrackedEntityById¶
-
TrackedEntityDto
getTrackedEntityById
(String id)¶ Gets the tracked entity specified by ID.
Parameters: - id –
Returns:
sendDataValueSet¶
-
DhisDataValueStatusResponse
sendDataValueSet
(DataValueSetDto dataValueSetDto)¶ Attempts to send a data value set to DHIS2 via an HTTP post request.
Parameters: - dataValueSetDto –