use of org.hisp.dhis.smscompression.models.GeoPoint in project dhis2-core by dhis2.
the class SimpleEventSMSListenerTest method createSimpleEventSubmission.
private SimpleEventSmsSubmission createSimpleEventSubmission() {
SimpleEventSmsSubmission subm = new SimpleEventSmsSubmission();
subm.setUserId(user.getUid());
subm.setOrgUnit(organisationUnit.getUid());
subm.setEventProgram(program.getUid());
subm.setAttributeOptionCombo(categoryOptionCombo.getUid());
subm.setEvent(programStageInstance.getUid());
subm.setEventStatus(SmsEventStatus.COMPLETED);
subm.setEventDate(new Date());
subm.setDueDate(new Date());
subm.setCoordinates(new GeoPoint(59.9399586f, 10.7195609f));
ArrayList<SmsDataValue> values = new ArrayList<>();
values.add(new SmsDataValue(categoryOptionCombo.getUid(), dataElement.getUid(), "true"));
subm.setValues(values);
subm.setSubmissionId(1);
return subm;
}
use of org.hisp.dhis.smscompression.models.GeoPoint in project dhis2-core by dhis2.
the class TrackerEventSMSListenerTest method createTrackerEventSubmission.
private TrackerEventSmsSubmission createTrackerEventSubmission() {
TrackerEventSmsSubmission subm = new TrackerEventSmsSubmission();
subm.setUserId(user.getUid());
subm.setOrgUnit(organisationUnit.getUid());
subm.setProgramStage(programStage.getUid());
subm.setAttributeOptionCombo(categoryOptionCombo.getUid());
subm.setEnrollment(programInstance.getUid());
subm.setEvent(programStageInstance.getUid());
subm.setEventStatus(SmsEventStatus.COMPLETED);
subm.setEventDate(new Date());
subm.setDueDate(new Date());
subm.setCoordinates(new GeoPoint(59.9399586f, 10.7195609f));
ArrayList<SmsDataValue> values = new ArrayList<>();
values.add(new SmsDataValue(categoryOptionCombo.getUid(), dataElement.getUid(), "10"));
subm.setValues(values);
subm.setSubmissionId(1);
return subm;
}
use of org.hisp.dhis.smscompression.models.GeoPoint in project dhis2-core by dhis2.
the class EnrollmentSMSListenerTest method createEnrollmentSubmissionNoEvents.
private EnrollmentSmsSubmission createEnrollmentSubmissionNoEvents() {
EnrollmentSmsSubmission subm = new EnrollmentSmsSubmission();
subm.setUserId(user.getUid());
subm.setOrgUnit(organisationUnit.getUid());
subm.setTrackerProgram(program.getUid());
subm.setTrackedEntityType(trackedEntityType.getUid());
subm.setTrackedEntityInstance(trackedEntityInstance.getUid());
subm.setEnrollment(programInstance.getUid());
subm.setEnrollmentDate(new Date());
subm.setIncidentDate(new Date());
subm.setEnrollmentStatus(SmsEnrollmentStatus.ACTIVE);
subm.setCoordinates(new GeoPoint(59.9399586f, 10.7195609f));
ArrayList<SmsAttributeValue> values = new ArrayList<>();
values.add(new SmsAttributeValue(trackedEntityAttribute.getUid(), ATTRIBUTE_VALUE));
subm.setValues(values);
subm.setSubmissionId(1);
return subm;
}
use of org.hisp.dhis.smscompression.models.GeoPoint in project dhis2-core by dhis2.
the class EnrollmentSMSListenerTest method createEvent.
private SmsEvent createEvent() {
SmsEvent event = new SmsEvent();
event.setOrgUnit(organisationUnit.getUid());
event.setProgramStage(programStage.getUid());
event.setAttributeOptionCombo(categoryOptionCombo.getUid());
event.setEvent(programStageInstance.getUid());
event.setEventStatus(SmsEventStatus.COMPLETED);
event.setEventDate(new Date());
event.setDueDate(new Date());
event.setCoordinates(new GeoPoint(59.9399586f, 10.7195609f));
ArrayList<SmsDataValue> eventValues = new ArrayList<>();
eventValues.add(new SmsDataValue(categoryOptionCombo.getUid(), dataElement.getUid(), "10"));
event.setValues(eventValues);
return event;
}
Aggregations