Search in sources :

Example 6 with SmsDataValue

use of org.hisp.dhis.smscompression.models.SmsDataValue in project dhis2-core by dhis2.

the class AggregateDataSetSMSListenerTest method createAggregateDatasetSubmission.

private AggregateDatasetSmsSubmission createAggregateDatasetSubmission() {
    AggregateDatasetSmsSubmission subm = new AggregateDatasetSmsSubmission();
    subm.setUserId(user.getUid());
    subm.setOrgUnit(organisationUnit.getUid());
    subm.setDataSet(dataSet.getUid());
    subm.setComplete(true);
    subm.setAttributeOptionCombo(categoryOptionCombo.getUid());
    subm.setPeriod("2019W16");
    ArrayList<SmsDataValue> values = new ArrayList<>();
    values.add(new SmsDataValue(categoryOptionCombo.getUid(), dataElement.getUid(), "12345678"));
    subm.setValues(values);
    subm.setSubmissionId(1);
    return subm;
}
Also used : SmsDataValue(org.hisp.dhis.smscompression.models.SmsDataValue) ArrayList(java.util.ArrayList) AggregateDatasetSmsSubmission(org.hisp.dhis.smscompression.models.AggregateDatasetSmsSubmission)

Aggregations

ArrayList (java.util.ArrayList)6 SmsDataValue (org.hisp.dhis.smscompression.models.SmsDataValue)6 Date (java.util.Date)5 GeoPoint (org.hisp.dhis.smscompression.models.GeoPoint)3 DataElement (org.hisp.dhis.dataelement.DataElement)2 Uid (org.hisp.dhis.smscompression.models.Uid)2 HashMap (java.util.HashMap)1 CategoryOptionCombo (org.hisp.dhis.category.CategoryOptionCombo)1 IdentifiableObject (org.hisp.dhis.common.IdentifiableObject)1 DataValue (org.hisp.dhis.datavalue.DataValue)1 EventDataValue (org.hisp.dhis.eventdatavalue.EventDataValue)1 ProgramStageInstance (org.hisp.dhis.program.ProgramStageInstance)1 UserInfoSnapshot (org.hisp.dhis.program.UserInfoSnapshot)1 AggregateDatasetSmsSubmission (org.hisp.dhis.smscompression.models.AggregateDatasetSmsSubmission)1 SimpleEventSmsSubmission (org.hisp.dhis.smscompression.models.SimpleEventSmsSubmission)1 SmsEvent (org.hisp.dhis.smscompression.models.SmsEvent)1 TrackerEventSmsSubmission (org.hisp.dhis.smscompression.models.TrackerEventSmsSubmission)1