Search in sources :

Example 1 with SmsAttributeValue

use of org.hisp.dhis.smscompression.models.SmsAttributeValue 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;
}
Also used : GeoPoint(org.hisp.dhis.smscompression.models.GeoPoint) EnrollmentSmsSubmission(org.hisp.dhis.smscompression.models.EnrollmentSmsSubmission) SmsAttributeValue(org.hisp.dhis.smscompression.models.SmsAttributeValue) ArrayList(java.util.ArrayList) Date(java.util.Date)

Aggregations

ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 EnrollmentSmsSubmission (org.hisp.dhis.smscompression.models.EnrollmentSmsSubmission)1 GeoPoint (org.hisp.dhis.smscompression.models.GeoPoint)1 SmsAttributeValue (org.hisp.dhis.smscompression.models.SmsAttributeValue)1