← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22248: updated payload for PTEA testing (now inludes proper UIDs), also enables test again

 

------------------------------------------------------------
revno: 22248
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2016-03-11 14:05:57 +0700
message:
  updated payload for PTEA testing (now inludes proper UIDs), also enables test again
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceProgramTest.java
  dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/program_reg1.json


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceProgramTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceProgramTest.java	2016-03-11 06:49:53 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceProgramTest.java	2016-03-11 07:05:57 +0000
@@ -39,6 +39,7 @@
 import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.program.ProgramStageDataElement;
 import org.hisp.dhis.program.ProgramStageSection;
+import org.hisp.dhis.program.ProgramTrackedEntityAttribute;
 import org.hisp.dhis.render.RenderFormat;
 import org.hisp.dhis.render.RenderService;
 import org.hisp.dhis.user.User;
@@ -175,7 +176,6 @@
 
         ObjectBundle bundle = objectBundleService.create( params );
         ObjectBundleValidation validate = objectBundleService.validate( bundle );
-        System.err.println( validate.getObjectErrorReports() );
         assertTrue( validate.getObjectErrorReports().isEmpty() );
 
         objectBundleService.commit( bundle );
@@ -188,6 +188,7 @@
         List<Program> programs = manager.getAll( Program.class );
         List<ProgramStage> programStages = manager.getAll( ProgramStage.class );
         List<ProgramStageDataElement> programStageDataElements = manager.getAll( ProgramStageDataElement.class );
+        List<ProgramTrackedEntityAttribute> programTrackedEntityAttributes = manager.getAll( ProgramTrackedEntityAttribute.class );
 
         assertFalse( dataSets.isEmpty() );
         assertFalse( organisationUnits.isEmpty() );
@@ -197,5 +198,6 @@
         assertEquals( 1, programs.size() );
         assertEquals( 1, programStages.size() );
         assertEquals( 4, programStageDataElements.size() );
+        assertEquals( 2, programTrackedEntityAttributes.size() );
     }
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/program_reg1.json'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/program_reg1.json	2016-03-10 10:48:59 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/program_reg1.json	2016-03-11 07:05:57 +0000
@@ -1,231 +1,466 @@
 {
+  "programStages": [
+    {
+      "created": "2016-03-11T07:00:48.241+0000",
+      "attributeValues": [ ],
+      "id": "CPP34zTxaSf",
+      "name": "ProgramStageA",
+      "captureCoordinates": false,
+      "autoGenerateEvent": true,
+      "generatedByEnrollmentDate": false,
+      "program": {
+        "id": "lVYxQwbXaj7"
+      },
+      "excecutionDateLabel": "Report date",
+      "validCompleteOnly": false,
+      "blockEntryForm": false,
+      "hideDueDate": false,
+      "sortOrder": 1,
+      "minDaysFromStart": 0,
+      "lastUpdated": "2016-03-11T07:00:48.242+0000",
+      "allowGenerateNextVisit": false,
+      "remindCompleted": false,
+      "openAfterEnrollment": false,
+      "repeatable": false,
+      "programStageDataElements": [
+        {
+          "id": "K3nySg2U6Ht"
+        },
+        {
+          "id": "LKlMVtBr3sF"
+        }
+      ],
+      "trackedEntityInstanceReminders": [ ],
+      "displayGenerateEventBox": false,
+      "preGenerateUID": false,
+      "programStageSections": [ ]
+    },
+    {
+      "remindCompleted": false,
+      "hideDueDate": false,
+      "sortOrder": 2,
+      "minDaysFromStart": 0,
+      "lastUpdated": "2016-03-11T07:01:02.882+0000",
+      "allowGenerateNextVisit": false,
+      "trackedEntityInstanceReminders": [ ],
+      "displayGenerateEventBox": false,
+      "programStageSections": [ ],
+      "preGenerateUID": false,
+      "openAfterEnrollment": false,
+      "repeatable": false,
+      "programStageDataElements": [
+        {
+          "id": "Eebs10ayIG7"
+        },
+        {
+          "id": "DMEbpdzukIY"
+        }
+      ],
+      "name": "ProgramStageB",
+      "autoGenerateEvent": true,
+      "generatedByEnrollmentDate": false,
+      "captureCoordinates": false,
+      "created": "2016-03-11T07:01:02.878+0000",
+      "attributeValues": [ ],
+      "id": "xx7OzjHZDc8",
+      "blockEntryForm": false,
+      "program": {
+        "id": "lVYxQwbXaj7"
+      },
+      "excecutionDateLabel": "Report date",
+      "validCompleteOnly": false
+    }
+  ],
+  "dataElements": [
+    {
+      "name": "DataElementA",
+      "user": {
+        "id": "A3U6uPM3H58"
+      },
+      "shortName": "DataElementShortA",
+      "created": "2016-03-11T06:58:21.302+0000",
+      "attributeValues": [ ],
+      "userGroupAccesses": [ ],
+      "categoryCombo": {
+        "id": "BIjQHJRpTV0"
+      },
+      "id": "XzGnBlUcB87",
+      "aggregationLevels": [ ],
+      "valueType": "NUMBER",
+      "domainType": "TRACKER",
+      "publicAccess": "rw------",
+      "lastUpdated": "2016-03-11T06:58:21.304+0000",
+      "code": "DataElementCodeA",
+      "zeroIsSignificant": false,
+      "aggregationType": "SUM"
+    },
+    {
+      "domainType": "TRACKER",
+      "publicAccess": "rw------",
+      "lastUpdated": "2016-03-11T06:58:40.963+0000",
+      "code": "DataElementCodeB",
+      "aggregationType": "SUM",
+      "zeroIsSignificant": false,
+      "name": "DataElementB",
+      "shortName": "DataElementShortB",
+      "user": {
+        "id": "A3U6uPM3H58"
+      },
+      "attributeValues": [ ],
+      "created": "2016-03-11T06:58:40.961+0000",
+      "userGroupAccesses": [ ],
+      "id": "qS4lxayqVRv",
+      "categoryCombo": {
+        "id": "BIjQHJRpTV0"
+      },
+      "aggregationLevels": [ ],
+      "valueType": "NUMBER"
+    },
+    {
+      "code": "DataElementCodeC",
+      "zeroIsSignificant": false,
+      "aggregationType": "SUM",
+      "publicAccess": "rw------",
+      "lastUpdated": "2016-03-11T06:58:59.840+0000",
+      "domainType": "TRACKER",
+      "valueType": "NUMBER",
+      "aggregationLevels": [ ],
+      "userGroupAccesses": [ ],
+      "attributeValues": [ ],
+      "created": "2016-03-11T06:58:59.839+0000",
+      "categoryCombo": {
+        "id": "BIjQHJRpTV0"
+      },
+      "id": "FAa7f8OxYmu",
+      "name": "DataElementC",
+      "user": {
+        "id": "A3U6uPM3H58"
+      },
+      "shortName": "DataElementShortC"
+    },
+    {
+      "domainType": "TRACKER",
+      "lastUpdated": "2016-03-11T06:59:19.043+0000",
+      "publicAccess": "rw------",
+      "zeroIsSignificant": false,
+      "aggregationType": "SUM",
+      "code": "DataElementCodeD",
+      "user": {
+        "id": "A3U6uPM3H58"
+      },
+      "shortName": "DataElementShortD",
+      "name": "DataElementD",
+      "id": "OmOMKxMZca9",
+      "categoryCombo": {
+        "id": "BIjQHJRpTV0"
+      },
+      "attributeValues": [ ],
+      "created": "2016-03-11T06:59:19.041+0000",
+      "userGroupAccesses": [ ],
+      "aggregationLevels": [ ],
+      "valueType": "NUMBER"
+    }
+  ],
   "categoryOptionCombos": [
     {
-      "ignoreApproval": false,
-      "id": "I29iR8V6aPd",
-      "name": "default",
-      "created": "2016-03-10T08:51:12.421+0000",
-      "lastUpdated": "2016-03-10T08:51:12.421+0000",
+      "created": "2016-03-11T06:51:31.397+0000",
+      "lastUpdated": "2016-03-11T06:51:31.397+0000",
       "categoryOptions": [
         {
-          "id": "Mmd7sm0TaHY"
+          "id": "IDZYg5rw3Sw"
         }
       ],
       "categoryCombo": {
-        "id": "WVL9nPoHsqg"
-      }
-    }
-  ],
-  "organisationUnitLevels": [
-    {
-      "name": "Level 1",
-      "lastUpdated": "2016-03-10T08:52:14.754+0000",
-      "created": "2016-03-10T08:52:14.753+0000",
-      "level": 1,
-      "id": "KY520zVqd2K"
+        "id": "BIjQHJRpTV0"
+      },
+      "id": "bKtGCINdmbt",
+      "name": "default",
+      "ignoreApproval": false
     }
   ],
   "trackedEntities": [
     {
-      "name": "Person",
+      "created": "2016-03-11T06:56:14.000+0000",
+      "attributeValues": [ ],
       "description": "Person",
-      "attributeValues": [ ],
-      "id": "DRosazBFv1D"
-    }
-  ],
-  "programStageDataElements": [
-    {
-      "sortOrder": 1,
-      "programStage": {
-        "id": "g4Xr1Awz0zi"
-      },
-      "displayInReports": false,
-      "dataElement": {
-        "id": "Ej1j5H3tTkd"
-      },
-      "id": "nlovlNXzKlC",
-      "allowProvidedElsewhere": true,
-      "compulsory": false,
-      "created": "2016-03-10T10:26:06.584+0000",
-      "lastUpdated": "2016-03-10T10:26:06.584+0000",
-      "allowFutureDate": false
-    },
-    {
-      "allowFutureDate": false,
-      "created": "2016-03-10T10:26:06.579+0000",
-      "compulsory": true,
-      "lastUpdated": "2016-03-10T10:26:06.579+0000",
-      "allowProvidedElsewhere": false,
-      "programStage": {
-        "id": "g4Xr1Awz0zi"
-      },
-      "sortOrder": 0,
-      "dataElement": {
-        "id": "Vqz6W5MxfEm"
-      },
-      "id": "NahcqSrH3bS",
-      "displayInReports": false
-    },
-    {
-      "allowFutureDate": false,
-      "allowProvidedElsewhere": false,
-      "lastUpdated": "2016-03-10T10:25:44.249+0000",
-      "created": "2016-03-10T10:25:44.248+0000",
-      "compulsory": true,
-      "programStage": {
-        "id": "XMHDWz9Xjjt"
-      },
-      "sortOrder": 1,
-      "dataElement": {
-        "id": "yVPYKrkJNMA"
-      },
-      "id": "WREqBqld1WH",
-      "displayInReports": false
-    },
-    {
-      "lastUpdated": "2016-03-10T10:25:44.241+0000",
-      "created": "2016-03-10T10:25:44.241+0000",
-      "compulsory": false,
-      "allowProvidedElsewhere": false,
-      "allowFutureDate": false,
-      "sortOrder": 0,
-      "programStage": {
-        "id": "XMHDWz9Xjjt"
-      },
-      "displayInReports": true,
-      "dataElement": {
-        "id": "ToC9jcO3TFZ"
-      },
-      "id": "LymUnpDzFKO"
+      "id": "vmZxWXOw5CD",
+      "lastUpdated": "2016-03-11T06:56:14.000+0000",
+      "name": "Person"
+    }
+  ],
+  "categoryOptions": [
+    {
+      "name": "default",
+      "shortName": "default",
+      "publicAccess": "--------",
+      "attributeValues": [ ],
+      "created": "2016-03-11T06:51:31.361+0000",
+      "userGroupAccesses": [ ],
+      "id": "IDZYg5rw3Sw",
+      "lastUpdated": "2016-03-11T06:51:31.405+0000",
+      "organisationUnits": [ ]
+    }
+  ],
+  "programs": [
+    {
+      "trackedEntity": {
+        "id": "vmZxWXOw5CD"
+      },
+      "trackedEntityInstanceReminders": [ ],
+      "programTrackedEntityAttributes": [
+        {
+          "id": "zReHWMUoEDQ"
+        },
+        {
+          "id": "vCj7Gz6297Y"
+        }
+      ],
+      "onlyEnrollOnce": false,
+      "dataEntryMethod": false,
+      "selectIncidentDatesInFuture": false,
+      "organisationUnits": [ ],
+      "skipOffline": false,
+      "lastUpdated": "2016-03-11T07:00:28.972+0000",
+      "incidentDateLabel": "Incident Date",
+      "publicAccess": "rw------",
+      "displayFrontPageList": false,
+      "selectEnrollmentDatesInFuture": false,
+      "validationCriterias": [ ],
+      "programStages": [
+        {
+          "id": "CPP34zTxaSf"
+        },
+        {
+          "id": "xx7OzjHZDc8"
+        }
+      ],
+      "user": {
+        "id": "A3U6uPM3H58"
+      },
+      "ignoreOverdueEvents": false,
+      "shortName": "ProgramShortA",
+      "programType": "WITH_REGISTRATION",
+      "name": "ProgramA",
+      "categoryCombo": {
+        "id": "BIjQHJRpTV0"
+      },
+      "id": "lVYxQwbXaj7",
+      "attributeValues": [ ],
+      "created": "2016-03-11T07:00:28.954+0000",
+      "userGroupAccesses": [ ],
+      "version": 1,
+      "enrollmentDateLabel": "Enrollment Date",
+      "displayIncidentDate": true
+    }
+  ],
+  "categoryCombos": [
+    {
+      "name": "default",
+      "dataDimensionType": "DISAGGREGATION",
+      "userGroupAccesses": [ ],
+      "skipTotal": false,
+      "created": "2016-03-11T06:51:31.395+0000",
+      "publicAccess": "--------",
+      "lastUpdated": "2016-03-11T06:51:31.401+0000",
+      "categories": [
+        {
+          "id": "nVvZX1PE3wS"
+        }
+      ],
+      "id": "BIjQHJRpTV0"
     }
   ],
   "trackedEntityAttributes": [
     {
+      "displayOnVisitSchedule": false,
       "unique": false,
-      "attributeValues": [ ],
-      "inherit": false,
+      "lastUpdated": "2016-03-11T06:59:40.866+0000",
+      "confidential": false,
+      "publicAccess": "rw------",
+      "code": "TrackedEntityAttributeCodeA",
+      "shortName": "TrackedEntityAttributeShortA",
+      "user": {
+        "id": "A3U6uPM3H58"
+      },
       "name": "TrackedEntityAttributeA",
-      "lastUpdated": "2016-03-10T08:56:04.552+0000",
-      "publicAccess": "rw------",
-      "programScope": false,
+      "id": "QhEcRpLZwMb",
+      "displayInListNoProgram": false,
+      "inherit": false,
       "userGroupAccesses": [ ],
-      "shortName": "TrackedEntityAttributeShortA",
+      "attributeValues": [ ],
+      "created": "2016-03-11T06:59:40.865+0000",
+      "searchScope": "SEARCH_ORG_UNITS",
       "orgunitScope": false,
-      "confidential": false,
-      "created": "2016-03-10T08:56:04.552+0000",
-      "id": "xgLKrt8PiRE",
-      "valueType": "TEXT",
-      "displayOnVisitSchedule": false,
-      "trackedEntityAttributeGroup": {
-        "id": "zVHDmpVFOUe"
-      },
-      "searchScope": "SEARCH_ORG_UNITS",
-      "displayInListNoProgram": false,
-      "code": "TrackedEntityAttributeCodeA",
-      "user": {
-        "id": "zro9Snj8OKF"
-      }
+      "programScope": false,
+      "valueType": "TEXT"
     },
     {
+      "orgunitScope": false,
       "searchScope": "SEARCH_ORG_UNITS",
+      "programScope": false,
+      "valueType": "TEXT",
       "user": {
-        "id": "zro9Snj8OKF"
-      },
-      "code": "TrackedEntityAttributeCodeB",
-      "displayInListNoProgram": false,
-      "valueType": "TEXT",
-      "id": "dw6f2Q16RMF",
-      "trackedEntityAttributeGroup": {
-        "id": "zVHDmpVFOUe"
-      },
-      "displayOnVisitSchedule": false,
-      "created": "2016-03-10T08:56:15.900+0000",
-      "confidential": false,
+        "id": "A3U6uPM3H58"
+      },
       "shortName": "TrackedEntityAttributeShortB",
-      "orgunitScope": false,
-      "userGroupAccesses": [ ],
-      "publicAccess": "rw------",
-      "programScope": false,
-      "inherit": false,
       "name": "TrackedEntityAttributeB",
-      "lastUpdated": "2016-03-10T08:56:15.900+0000",
+      "displayInListNoProgram": false,
+      "id": "cpaMZredRXb",
+      "userGroupAccesses": [ ],
       "attributeValues": [ ],
-      "unique": false
+      "created": "2016-03-11T06:59:51.888+0000",
+      "inherit": false,
+      "code": "TrackedEntityAttributeCodeB",
+      "displayOnVisitSchedule": false,
+      "unique": false,
+      "confidential": false,
+      "lastUpdated": "2016-03-11T06:59:51.889+0000",
+      "publicAccess": "rw------"
+    }
+  ],
+  "programStageDataElements": [
+    {
+      "displayInReports": false,
+      "programStage": {
+        "id": "xx7OzjHZDc8"
+      },
+      "compulsory": true,
+      "allowProvidedElsewhere": false,
+      "allowFutureDate": false,
+      "lastUpdated": "2016-03-11T07:01:02.890+0000",
+      "id": "DMEbpdzukIY",
+      "sortOrder": 1,
+      "created": "2016-03-11T07:01:02.890+0000",
+      "dataElement": {
+        "id": "qS4lxayqVRv"
+      }
+    },
+    {
+      "programStage": {
+        "id": "xx7OzjHZDc8"
+      },
+      "displayInReports": true,
+      "dataElement": {
+        "id": "XzGnBlUcB87"
+      },
+      "created": "2016-03-11T07:01:02.886+0000",
+      "sortOrder": 0,
+      "id": "Eebs10ayIG7",
+      "lastUpdated": "2016-03-11T07:01:02.887+0000",
+      "allowFutureDate": false,
+      "allowProvidedElsewhere": false,
+      "compulsory": true
+    },
+    {
+      "compulsory": true,
+      "allowProvidedElsewhere": false,
+      "allowFutureDate": false,
+      "lastUpdated": "2016-03-11T07:00:48.255+0000",
+      "id": "LKlMVtBr3sF",
+      "sortOrder": 1,
+      "created": "2016-03-11T07:00:48.255+0000",
+      "dataElement": {
+        "id": "qS4lxayqVRv"
+      },
+      "displayInReports": true,
+      "programStage": {
+        "id": "CPP34zTxaSf"
+      }
+    },
+    {
+      "compulsory": true,
+      "lastUpdated": "2016-03-11T07:00:48.250+0000",
+      "allowFutureDate": false,
+      "allowProvidedElsewhere": false,
+      "sortOrder": 0,
+      "id": "K3nySg2U6Ht",
+      "created": "2016-03-11T07:00:48.249+0000",
+      "dataElement": {
+        "id": "XzGnBlUcB87"
+      },
+      "displayInReports": true,
+      "programStage": {
+        "id": "CPP34zTxaSf"
+      }
     }
   ],
   "trackedEntityAttributeGroups": [
     {
-      "id": "zVHDmpVFOUe",
       "name": "TrackedEntityAttributeGroupA",
-      "lastUpdated": "2016-03-10T10:10:50.259+0000",
-      "created": "2016-03-10T10:10:50.259+0000",
       "trackedEntityAttributes": [
         {
-          "id": "xgLKrt8PiRE"
+          "id": "QhEcRpLZwMb"
         },
         {
-          "id": "dw6f2Q16RMF"
+          "id": "cpaMZredRXb"
         }
-      ]
+      ],
+      "created": "2016-03-11T07:00:02.917+0000",
+      "lastUpdated": "2016-03-11T07:00:02.917+0000",
+      "id": "TLxOGInNoVL"
     }
   ],
-  "programs": [
+  "users": [
     {
-      "publicAccess": "rw------",
-      "userGroupAccesses": [ ],
-      "ignoreOverdueEvents": false,
-      "displayIncidentDate": true,
-      "skipOffline": false,
-      "enrollmentDateLabel": "Enrollment Date",
+      "dataViewOrganisationUnits": [ ],
+      "teiSearchOrganisationUnits": [ ],
+      "organisationUnits": [
+        {
+          "id": "AOin24YR0Dh"
+        }
+      ],
+      "surname": "admin",
+      "firstName": "admin",
+      "id": "A3U6uPM3H58",
+      "lastUpdated": "2016-03-11T06:57:46.094+0000",
+      "userCredentials": {
+        "lastLogin": "2016-03-11T06:51:52.462+0000",
+        "invitation": false,
+        "user": {
+          "id": "A3U6uPM3H58"
+        },
+        "userInfo": {
+          "id": "A3U6uPM3H58"
+        },
+        "passwordLastUpdated": "2016-03-11T06:51:52.462+0000",
+        "created": "2016-03-11T06:51:52.558+0000",
+        "username": "admin",
+        "disabled": false,
+        "selfRegistered": false,
+        "userRoles": [
+          {
+            "id": "RrHdx6L9ksj"
+          }
+        ],
+        "cogsDimensionConstraints": [ ],
+        "catDimensionConstraints": [ ],
+        "externalAuth": false
+      },
       "attributeValues": [ ],
-      "programType": "WITH_REGISTRATION",
-      "version": 1,
-      "programTrackedEntityAttributes": [
-        { },
-        { }
-      ],
-      "selectIncidentDatesInFuture": false,
-      "lastUpdated": "2016-03-10T10:11:54.605+0000",
-      "name": "ProgramA",
-      "validationCriterias": [ ],
-      "dataEntryMethod": false,
-      "id": "wy6qQqJfYWM",
-      "trackedEntity": {
-        "id": "DRosazBFv1D"
-      },
-      "programStages": [
-        {
-          "id": "XMHDWz9Xjjt"
-        },
-        {
-          "id": "g4Xr1Awz0zi"
-        }
-      ],
-      "categoryCombo": {
-        "id": "WVL9nPoHsqg"
-      },
+      "created": "2016-03-11T06:51:52.434+0000"
+    }
+  ],
+  "organisationUnits": [
+    {
+      "openingDate": "2016-03-11",
+      "shortName": "Country",
       "user": {
-        "id": "zro9Snj8OKF"
+        "id": "A3U6uPM3H58"
       },
-      "trackedEntityInstanceReminders": [ ],
-      "shortName": "ProgramShortA",
-      "incidentDateLabel": "Incident Date",
-      "onlyEnrollOnce": false,
-      "displayFrontPageList": false,
-      "selectEnrollmentDatesInFuture": false,
-      "created": "2016-03-10T10:11:54.584+0000",
-      "organisationUnits": [ ]
+      "uuid": "250c05c5-1df4-440b-a531-ae66201176f0",
+      "name": "Country",
+      "id": "AOin24YR0Dh",
+      "lastUpdated": "2016-03-11T06:57:30.540+0000",
+      "created": "2016-03-11T06:57:30.514+0000",
+      "attributeValues": [ ],
+      "description": "",
+      "path": "/AOin24YR0Dh",
+      "featureType": "NONE"
     }
   ],
   "userRoles": [
     {
       "dataSets": [ ],
-      "programs": [ ],
-      "name": "Superuser",
-      "lastUpdated": "2016-03-10T08:51:58.422+0000",
-      "created": "2016-03-10T08:51:58.421+0000",
-      "publicAccess": "--------",
-      "id": "yFwsVaMPvyi",
       "authorities": [
         "F_TRACKED_ENTITY_INSTANCE_SEARCH_IN_ALL_ORGUNITS",
         "ALL",
@@ -261,299 +496,70 @@
         "F_APPROVE_DATA_LOWER_LEVELS",
         "F_TRACKED_ENTITY_DATAVALUE_DELETE"
       ],
-      "userGroupAccesses": [ ]
-    }
-  ],
+      "name": "Superuser",
+      "publicAccess": "--------",
+      "userGroupAccesses": [ ],
+      "created": "2016-03-11T06:51:52.447+0000",
+      "programs": [ ],
+      "id": "RrHdx6L9ksj",
+      "lastUpdated": "2016-03-11T06:51:52.447+0000"
+    }
+  ],
+  "programTrackedEntityAttributes": [
+    {
+      "created": "2016-03-11T07:00:28.968+0000",
+      "mandatory": true,
+      "lastUpdated": "2016-03-11T07:00:28.968+0000",
+      "allowFutureDate": false,
+      "id": "vCj7Gz6297Y",
+      "displayInList": false,
+      "program": {
+        "id": "lVYxQwbXaj7"
+      },
+      "trackedEntityAttribute": {
+        "id": "cpaMZredRXb"
+      }
+    },
+    {
+      "displayInList": true,
+      "allowFutureDate": false,
+      "lastUpdated": "2016-03-11T07:00:28.963+0000",
+      "id": "zReHWMUoEDQ",
+      "created": "2016-03-11T07:00:28.963+0000",
+      "mandatory": false,
+      "trackedEntityAttribute": {
+        "id": "QhEcRpLZwMb"
+      },
+      "program": {
+        "id": "lVYxQwbXaj7"
+      }
+    }
+  ],
+  "date": "2016-03-11T07:01:59.096+0000",
   "categories": [
     {
       "dataDimension": true,
-      "name": "default",
-      "lastUpdated": "2016-03-10T08:51:12.585+0000",
-      "created": "2016-03-10T08:51:12.415+0000",
+      "publicAccess": "--------",
+      "userGroupAccesses": [ ],
+      "created": "2016-03-11T06:51:31.390+0000",
+      "id": "nVvZX1PE3wS",
       "categoryOptions": [
         {
-          "id": "Mmd7sm0TaHY"
+          "id": "IDZYg5rw3Sw"
         }
       ],
-      "publicAccess": "--------",
-      "id": "xaaKhxrGczy",
-      "userGroupAccesses": [ ],
+      "lastUpdated": "2016-03-11T06:56:14.686+0000",
+      "name": "default",
       "dataDimensionType": "DISAGGREGATION"
     }
   ],
-  "programTrackedEntityAttributes": [
-    {
-      "allowFutureDate": false,
-      "mandatory": false,
-      "program": {
-        "id": "wy6qQqJfYWM"
-      },
-      "displayInList": true,
-      "trackedEntityAttribute": {
-        "id": "xgLKrt8PiRE"
-      }
-    },
-    {
-      "displayInList": false,
-      "trackedEntityAttribute": {
-        "id": "dw6f2Q16RMF"
-      },
-      "mandatory": true,
-      "program": {
-        "id": "wy6qQqJfYWM"
-      },
-      "allowFutureDate": false
-    }
-  ],
-  "dataElements": [
-    {
-      "publicAccess": "rw------",
-      "userGroupAccesses": [ ],
-      "attributeValues": [ ],
-      "aggregationType": "AVERAGE",
-      "name": "DataElementA",
-      "lastUpdated": "2016-03-10T08:53:23.116+0000",
-      "id": "ToC9jcO3TFZ",
-      "valueType": "NUMBER",
-      "code": "DataElementCodeA",
-      "user": {
-        "id": "zro9Snj8OKF"
-      },
-      "aggregationLevels": [ ],
-      "categoryCombo": {
-        "id": "WVL9nPoHsqg"
-      },
-      "domainType": "TRACKER",
-      "shortName": "DataElementShortA",
-      "created": "2016-03-10T08:53:23.113+0000",
-      "zeroIsSignificant": false
-    },
-    {
-      "domainType": "TRACKER",
-      "shortName": "DataElementShortB",
-      "created": "2016-03-10T08:53:51.597+0000",
-      "zeroIsSignificant": false,
-      "id": "yVPYKrkJNMA",
-      "valueType": "NUMBER",
-      "code": "DataElementCodeB",
-      "user": {
-        "id": "zro9Snj8OKF"
-      },
-      "categoryCombo": {
-        "id": "WVL9nPoHsqg"
-      },
-      "aggregationLevels": [ ],
-      "attributeValues": [ ],
-      "aggregationType": "SUM",
-      "name": "DataElementB",
-      "lastUpdated": "2016-03-10T08:53:51.600+0000",
-      "publicAccess": "rw------",
-      "userGroupAccesses": [ ]
-    },
-    {
-      "name": "DataElementC",
-      "lastUpdated": "2016-03-10T08:54:11.431+0000",
-      "aggregationType": "SUM",
-      "attributeValues": [ ],
-      "userGroupAccesses": [ ],
-      "publicAccess": "rw------",
-      "zeroIsSignificant": false,
-      "created": "2016-03-10T08:54:11.430+0000",
-      "shortName": "DataElementShortC",
-      "domainType": "TRACKER",
-      "aggregationLevels": [ ],
-      "categoryCombo": {
-        "id": "WVL9nPoHsqg"
-      },
-      "code": "DataElementCodeC",
-      "user": {
-        "id": "zro9Snj8OKF"
-      },
-      "id": "Vqz6W5MxfEm",
-      "valueType": "NUMBER"
-    },
-    {
-      "created": "2016-03-10T08:54:34.200+0000",
-      "zeroIsSignificant": false,
-      "domainType": "TRACKER",
-      "shortName": "DataElementShortD",
-      "user": {
-        "id": "zro9Snj8OKF"
-      },
-      "code": "DataElementCodeD",
-      "categoryCombo": {
-        "id": "WVL9nPoHsqg"
-      },
-      "aggregationLevels": [ ],
-      "valueType": "NUMBER",
-      "id": "Ej1j5H3tTkd",
-      "name": "DataElementD",
-      "lastUpdated": "2016-03-10T08:54:34.201+0000",
-      "attributeValues": [ ],
-      "aggregationType": "SUM",
-      "userGroupAccesses": [ ],
-      "publicAccess": "rw------"
-    }
-  ],
-  "programStages": [
-    {
-      "lastUpdated": "2016-03-10T10:25:44.233+0000",
-      "name": "ProgramStageA",
-      "minDaysFromStart": 0,
-      "allowGenerateNextVisit": false,
-      "attributeValues": [ ],
-      "program": {
-        "id": "wy6qQqJfYWM"
-      },
-      "displayGenerateEventBox": false,
-      "sortOrder": 1,
-      "remindCompleted": false,
-      "programStageDataElements": [
-        {
-          "id": "LymUnpDzFKO"
-        },
-        {
-          "id": "WREqBqld1WH"
-        }
-      ],
-      "generatedByEnrollmentDate": false,
-      "hideDueDate": false,
-      "created": "2016-03-10T10:25:44.232+0000",
-      "blockEntryForm": false,
-      "preGenerateUID": false,
-      "captureCoordinates": false,
-      "programStageSections": [ ],
-      "openAfterEnrollment": false,
-      "trackedEntityInstanceReminders": [ ],
-      "repeatable": false,
-      "validCompleteOnly": false,
-      "excecutionDateLabel": "Report date",
-      "autoGenerateEvent": true,
-      "id": "XMHDWz9Xjjt"
-    },
-    {
-      "programStageSections": [ ],
-      "openAfterEnrollment": false,
-      "trackedEntityInstanceReminders": [ ],
-      "blockEntryForm": false,
-      "created": "2016-03-10T10:26:06.571+0000",
-      "preGenerateUID": false,
-      "captureCoordinates": false,
-      "validCompleteOnly": false,
-      "repeatable": false,
-      "autoGenerateEvent": true,
-      "id": "g4Xr1Awz0zi",
-      "excecutionDateLabel": "Report date",
-      "program": {
-        "id": "wy6qQqJfYWM"
-      },
-      "attributeValues": [ ],
-      "displayGenerateEventBox": false,
-      "name": "ProgramStageB",
-      "lastUpdated": "2016-03-10T10:26:06.574+0000",
-      "minDaysFromStart": 0,
-      "allowGenerateNextVisit": false,
-      "hideDueDate": false,
-      "generatedByEnrollmentDate": false,
-      "remindCompleted": false,
-      "sortOrder": 2,
-      "programStageDataElements": [
-        {
-          "id": "NahcqSrH3bS"
-        },
-        {
-          "id": "nlovlNXzKlC"
-        }
-      ]
-    }
-  ],
-  "users": [
-    {
-      "dataViewOrganisationUnits": [ ],
-      "organisationUnits": [
-        {
-          "id": "l0Df56s2n31"
-        }
-      ],
-      "created": "2016-03-10T08:51:58.406+0000",
-      "lastUpdated": "2016-03-10T08:52:28.013+0000",
-      "firstName": "admin",
-      "surname": "admin",
-      "attributeValues": [ ],
-      "teiSearchOrganisationUnits": [ ],
-      "userCredentials": {
-        "passwordLastUpdated": "2016-03-10T08:51:58.439+0000",
-        "username": "admin",
-        "lastLogin": "2016-03-10T08:51:58.438+0000",
-        "user": {
-          "id": "zro9Snj8OKF"
-        },
-        "invitation": false,
-        "selfRegistered": false,
-        "userRoles": [
-          {
-            "id": "yFwsVaMPvyi"
-          }
-        ],
-        "catDimensionConstraints": [ ],
-        "externalAuth": false,
-        "userInfo": {
-          "id": "zro9Snj8OKF"
-        },
-        "created": "2016-03-10T08:51:58.523+0000",
-        "cogsDimensionConstraints": [ ],
-        "disabled": false
-      },
-      "id": "zro9Snj8OKF"
-    }
-  ],
-  "date": "2016-03-10T10:29:15.214+0000",
-  "organisationUnits": [
-    {
-      "shortName": "Country",
-      "featureType": "NONE",
-      "attributeValues": [ ],
-      "openingDate": "2016-03-10",
-      "uuid": "cec9e5f3-4866-4ab1-9d07-ff6e157213d0",
-      "created": "2016-03-10T08:52:11.125+0000",
-      "name": "Country",
-      "lastUpdated": "2016-03-10T08:52:11.139+0000",
-      "id": "l0Df56s2n31",
-      "path": "/l0Df56s2n31",
-      "description": "",
-      "user": {
-        "id": "zro9Snj8OKF"
-      }
-    }
-  ],
-  "categoryCombos": [
-    {
-      "id": "WVL9nPoHsqg",
-      "publicAccess": "--------",
-      "dataDimensionType": "DISAGGREGATION",
-      "userGroupAccesses": [ ],
-      "categories": [
-        {
-          "id": "xaaKhxrGczy"
-        }
-      ],
-      "skipTotal": false,
-      "created": "2016-03-10T08:51:12.420+0000",
-      "name": "default",
-      "lastUpdated": "2016-03-10T08:51:12.423+0000"
-    }
-  ],
-  "categoryOptions": [
-    {
-      "id": "Mmd7sm0TaHY",
-      "publicAccess": "--------",
-      "userGroupAccesses": [ ],
-      "attributeValues": [ ],
-      "shortName": "default",
-      "organisationUnits": [ ],
-      "lastUpdated": "2016-03-10T08:51:12.425+0000",
-      "name": "default",
-      "created": "2016-03-10T08:51:12.397+0000"
+  "organisationUnitLevels": [
+    {
+      "created": "2016-03-11T06:57:33.954+0000",
+      "lastUpdated": "2016-03-11T06:57:33.954+0000",
+      "id": "Zg59WT031yE",
+      "name": "Level 1",
+      "level": 1
     }
   ]
 }