Re: [Dhis2-devs] Issues with Upgrade from DHIS 2.26 to DHIS 2.27

2017-11-30 Thread Jhansi Reddy Karee
Hi Morten,

Thanks for fixing the enrollments and trackedEntityInstance APIs to
continue to return the lastUpdated and created timestamps.

We are still not able to figure out on how can we provide translations for
legends through legendSet web API.

The only way we are able to translate legends is through POST '
/api/25/metadata' call.

> Even for contained objects like legends, you still translate in the same
way, just add a array called translations on the legend, and fill in your
props.
Could you give more details on this or point us to an endpoint.

Thanks,
Jhansi





On Fri, Nov 24, 2017 at 9:40 AM, Morten Olav Hansen <mor...@dhis2.org>
wrote:

> Please try again with latest 227
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Nov 23, 2017 at 11:00 AM, Morten Olav Hansen <mor...@dhis2.org>
> wrote:
>
>> > Legends are now directly contained in the object where they are used,
>>> so no need to reference by UIDs anymore, translations should also be put
>>> directly in the legend payload.
>>> We see that we may translate the legends through POST '/api/25/metadata'
>>> call.
>>> Is there any other way to translate legends? Can you point us to an
>>> appropriate API?
>>>
>>
>> The translations are now directly a part of the payload itself, you can
>> see that if you try and translate any part of dhis2, then go to
>> /api/type/ID and you will see the translations directly contained in the
>> payload itself.
>>
>> As an example, you can have a look here:
>> https://play.dhis2.org/dev/api/dataElements.json?fields=id,
>> displayName,translations
>>
>> the translation object itself is built up of: property (can be NAME,
>> SHORT_NAME, DESCRIPTION, and FORM_NAME for data elements), locale, value.
>>
>> Even for contained objects like legends, you still translate in the same
>> way, just add a array called translations on the legend, and fill in your
>> props.
>>
>> > created/lastUpdated should not be gone, I think thats a bug, I will
>>> look into it.
>>> From this, we understand that the lastUpdated and created timestamps
>>> also must be available along with lastUpdatedAtClient and
>>> createdAtClient timestamps in the response. Could you confirm if it is
>>> true.
>>>
>>
>> Both created, createdAtClient, lastUpdated, lastUpdatedAtClient will be
>> there. Created/lastUpdated will be read-only, while *AtClient can be
>> changed by the client (mostly for usage in offline systems)
>>
>>
>>>
>>>  In DHIS 2.27, the enrollments and trackedEntityInstance API responses
>>> are returning the lastUpdatedAtClient and createdAtClient timestamps
>>> only. Because of this, we think the lastUpdated and created timestamps have
>>> been renamed to lastUpdatedAtClient and createdAtClient. If this is the
>>> case, we think that the data in lastUpdated and created must be
>>> migrated to lastUpdatedAtClient and createdAtClient. If yes, could you
>>> point us to any such migration script?
>>>
>>> Thanks,
>>> Madhoolika/Jhansi
>>>
>>>
>>> On Wed, Nov 22, 2017 at 8:12 AM, Morten Olav Hansen <mor...@dhis2.org>
>>> wrote:
>>>
>>>> Hi Jhansi
>>>>
>>>> Legends are now directly contained in the object where they are used,
>>>> so no need to reference by UIDs anymore, translations should also be put
>>>> directly in the legend payload.
>>>>
>>>> created/lastUpdated should not be gone, I think thats a bug, I will
>>>> look into it.
>>>>
>>>> --
>>>> Morten Olav Hansen
>>>> Senior Engineer, DHIS 2
>>>> University of Oslo
>>>> http://www.dhis2.org
>>>>
>>>> On Tue, Nov 21, 2017 at 1:18 PM, Jhansi Reddy Karee <
>>>> jhans...@thoughtworks.com> wrote:
>>>>
>>>>> Hello Team,
>>>>>
>>>>> Did you get a chance to take a look at DHIS 2.27 upgrade issues?
>>>>>
>>>>> Thanks,
>>>>> Jhansi
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Nov 15, 2017 at 12:14 PM, Mani Madhoolika Bulusu <
>>>>> mbul...@thoughtworks.com> wrote:
>>>>>
>>>>>>
>>>>>> Hello team,
>>>>>>
>>>>>> We are planning an upgrade from DHIS 2.26 to DHIS 2.27, and
>>>>>&

[Dhis2-devs] In DHIS 2.27 Issues with deleting organisation unit

2017-12-14 Thread Jhansi Reddy Karee
Hello Team,


In DHIS 2.27, we are not able to delete an organisation unit after deleting
all the data associated to it.


Following are the steps we have followed to do this:

   -

   Delete all the data associated to the organisation unit
   -

   In Data administration app, under maintenance, we have performed
   maintenance over “Permanently remove soft deleted data values”.
   -

   Tried deleting the organisation unit. But, we are getting the following
   error: Could not delete due to association with another object:
   DataValueAudit


Please let us know if we have missed anything.


Thanks,

Jhansi
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] In DHIS 2.27 Issues with deleting organisation unit

2017-12-14 Thread Jhansi Reddy Karee
Thanks for the quick reply Jason,

In DHIS documentation
<https://docs.dhis2.org/2.27/en/developer/html/webapi_maintenance.html>, we
came across a WEB API which can clear all the data of the organisation unit.

/api/26/maintenance/dataPruning/organisationUnits/

API Details: Data pruning will remove complete data set registrations, data
approvals, data value audits and data values, in this case of an
organisation unit.

We are expecting that this API will clear all the data of the given
organisation unit and any data/approvals of its parent organisation units
will be untouched. Is our expectation correct?

Do you see any problem with deleting data for the organisation unit using
this API.

Thanks,
Jhansi

On Thu, Dec 14, 2017 at 9:12 PM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Hi Jhansi,
> You will also need to get rid of the data in the data value audit table.
>
> Here is an SQL function which might work for you.
>
> https://github.com/dhis2/dhis2-utils/blob/master/
> resources/sql/delete_orgunit_with_data.sql
>
> Regards,
> Jason
>
>
> On Thu, Dec 14, 2017 at 2:49 PM, Jhansi Reddy Karee <
> jhans...@thoughtworks.com> wrote:
>
>> Hello Team,
>>
>>
>> In DHIS 2.27, we are not able to delete an organisation unit after
>> deleting all the data associated to it.
>>
>>
>> Following are the steps we have followed to do this:
>>
>>-
>>
>>Delete all the data associated to the organisation unit
>>-
>>
>>In Data administration app, under maintenance, we have performed
>>maintenance over “Permanently remove soft deleted data values”.
>>-
>>
>>Tried deleting the organisation unit. But, we are getting the
>>following error: Could not delete due to association with another object:
>>DataValueAudit
>>
>>
>> Please let us know if we have missed anything.
>>
>>
>> Thanks,
>>
>> Jhansi
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] In DHIS 2.27 Issues with deleting organisation unit

2017-12-14 Thread Jhansi Reddy Karee
Thanks Jason,

Since we just have data values for the organisation units (which should be
deleted), we are able to remove them after clearing the data associated
with them using /api/maintenance/dataPruning/organisationUnits API.

Thanks,
Jhansi

On Fri, Dec 15, 2017 at 11:51 AM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> It might work for you, but I am not 100% sure if that API endpoint will
> clear out everything. As you can  see from the SQL function, orgunits may
> also have other dependencies, like pivots, charts, user associations, etc.
> The deletion handler for orgunits may refuse to remove it,  if the object
> is associated with other objects.
>
> It might work in your case, but may not.
>
> Good luck,
> Jason
>
>
> On Fri, Dec 15, 2017 at 7:14 AM, Jhansi Reddy Karee <
> jhans...@thoughtworks.com> wrote:
>
>> Thanks for the quick reply Jason,
>>
>> In DHIS documentation
>> <https://docs.dhis2.org/2.27/en/developer/html/webapi_maintenance.html>,
>> we came across a WEB API which can clear all the data of the organisation
>> unit.
>>
>> /api/26/maintenance/dataPruning/organisationUnits/
>>
>> API Details: Data pruning will remove complete data set registrations,
>> data approvals, data value audits and data values, in this case of an
>> organisation unit.
>>
>> We are expecting that this API will clear all the data of the given
>> organisation unit and any data/approvals of its parent organisation units
>> will be untouched. Is our expectation correct?
>>
>> Do you see any problem with deleting data for the organisation unit using
>> this API.
>>
>> Thanks,
>> Jhansi
>>
>> On Thu, Dec 14, 2017 at 9:12 PM, Jason Pickering <
>> jason.p.picker...@gmail.com> wrote:
>>
>>> Hi Jhansi,
>>> You will also need to get rid of the data in the data value audit table.
>>>
>>> Here is an SQL function which might work for you.
>>>
>>> https://github.com/dhis2/dhis2-utils/blob/master/resources/s
>>> ql/delete_orgunit_with_data.sql
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>> On Thu, Dec 14, 2017 at 2:49 PM, Jhansi Reddy Karee <
>>> jhans...@thoughtworks.com> wrote:
>>>
>>>> Hello Team,
>>>>
>>>>
>>>> In DHIS 2.27, we are not able to delete an organisation unit after
>>>> deleting all the data associated to it.
>>>>
>>>>
>>>> Following are the steps we have followed to do this:
>>>>
>>>>-
>>>>
>>>>Delete all the data associated to the organisation unit
>>>>-
>>>>
>>>>In Data administration app, under maintenance, we have performed
>>>>maintenance over “Permanently remove soft deleted data values”.
>>>>-
>>>>
>>>>Tried deleting the organisation unit. But, we are getting the
>>>>following error: Could not delete due to association with another 
>>>> object:
>>>>DataValueAudit
>>>>
>>>>
>>>> Please let us know if we have missed anything.
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Jhansi
>>>>
>>>>
>>>>
>>>> ___
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to : dhis2-devs@lists.launchpad.net
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Jason P. Pickering
>>> email: jason.p.picker...@gmail.com
>>> tel:+46764147049 <076-414%2070%2049>
>>>
>>
>>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Questions in TrackedEntityInstance and Enrollment Web API

2017-11-17 Thread Jhansi Reddy Karee
Thanks Morten! 



Sent from my iPhone
> On 17-Nov-2017, at 1:28 PM, Morten Olav Hansen <mor...@dhis2.org> wrote:
> 
> Yes, these are free to be used
> 
> -- 
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
> 
>> On Fri, Nov 17, 2017 at 12:25 PM, Jhansi Reddy Karee 
>> <jhans...@thoughtworks.com> wrote:
>> Hello Team,
>> 
>> We have few questions regarding enrollments and trackedEntityInstances web 
>> API:
>> We are able to get the list of trackedEntityInstances matching the given 
>> trackedEntityInstance ids (separated by semicolon).
>>   URL: 
>> https://play.dhis2.org/demo/api/trackedEntityInstances.json?trackedEntityInstance=vOxUH373fy5;vu9dsAuJ29q
>> Similarly, we are also able to get the list of enrollments matching the 
>> given enrollment ids (separated by semicolon). 
>>   URL: 
>> https://play.dhis2.org/demo/api/enrollments.json?enrollment=gopBaFzOdkt;Cl7ZhgxaYQO
>> 
>> We don't see this mentioned in the documentation. Could you please confirm 
>> if we can use them?
>> 
>> Thanks,
>> Jhansi
>> 
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>> 
> 
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Issues with Upgrade from DHIS 2.26 to DHIS 2.27

2017-11-20 Thread Jhansi Reddy Karee
Hello Team,

Did you get a chance to take a look at DHIS 2.27 upgrade issues?

Thanks,
Jhansi




On Wed, Nov 15, 2017 at 12:14 PM, Mani Madhoolika Bulusu <
mbul...@thoughtworks.com> wrote:

>
> Hello team,
>
> We are planning an upgrade from DHIS 2.26 to DHIS 2.27, and encountered
> the following blockers during analysis:
>
>- In DHIS 2.26, we were entering the legend translations using PUT '
>/api/25/legends/{someLegendId}/translations.json'. In DHIS 2.27 this
>URL is failing with 404 error code. Could you point us to an end point for
>translating the legends in DHIS 2.27?
>- In DHIS 2.27, Enrollments and TrackedEntityInstance APIs are
>returning lastUpdatedAtClient and createdAtClient timestamps instead of
>lastUpdated and created timestamps. On upgrading DHIS from 2.26 to 2.27, we
>are not getting lastUpdatedAtClient and createdAtClient timestamps for the
>Enrollments and TrackedEntityInstances created in DHIS 2.26. Could you
>point us to a migration script to migrate the lastUpdated and created to
>lastUpdatedAtClient and createdAtClient, if any.
>
> Let us know if you need more details.
>
> Thanks,
> Madhoolika/Jhansi
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Questions in TrackedEntityInstance and Enrollment Web API

2017-11-16 Thread Jhansi Reddy Karee
Hello Team,

We have few questions regarding enrollments and trackedEntityInstances web
API:

   - We are able to get the list of trackedEntityInstances matching the
   given trackedEntityInstance ids (separated by semicolon).

  URL: https://play.dhis2.org/demo/api/trackedEntityInstances.
json?trackedEntityInstance=vOxUH373fy5;vu9dsAuJ29q


   - Similarly, we are also able to get the list of enrollments matching
   the given enrollment ids (separated by semicolon).

  URL: https://play.dhis2.org/demo/api/enrollments.json?enroll
ment=gopBaFzOdkt;Cl7ZhgxaYQO


We don't see this mentioned in the documentation. Could you please confirm
if we can use them?

Thanks,
Jhansi
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Issue with Enrollments API Pagination - Not returning pager details

2017-11-07 Thread Jhansi Reddy Karee
Hi Team,

We are experiencing an issue with the enrollments API pagination on DHIS
2.26 (it exists on the later versions of DHIS as well). When the
enrollments API is paginated, it returns the enrollments for the given
pageSize and the page number. But, *it doesn't return the pager params as a
part of each page response, like it returns in other APIs*. By pager params
we mean, paging details like total, pageSize, page, pageCount.

Without the paging params it would be hard for us to figure out on how many
pages should we download and also at which page we should stop downloading.
Because of this issue, we are not able to paginate the enrollments API.

We are about to go live with programs with registration which would
internally use the enrollments API. We are expecting a lot of data entry to
be done in the near future. This means there will be a lot of enrollments
in the system and downloading all of them in a single API call, would be
problematic for our end users who are in remote locations with very slow
internet connectivity.

*Will you be able to fix the pagination of enrollments API to return the
paging params, so that it is consistent with the other API’s paging
response *and we could also leverage it.

Thanks,

Madhoo/Jhansi
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Issue with Enrollments API Pagination - Not returning pager details

2017-11-08 Thread Jhansi Reddy Karee
Thanks @Stian for creating the bug.

Yes @Morten, we tried paginating it by adding totalPages request param. But
still, we don't get the pager details (like total, pageSize, page,
pageCount).

Here is the link we used:
https://play.dhis2.org/dev/api/enrollments.json?ou=DiszpKrYNg8=3=true

Thanks,
Jhansi


On Wed, Nov 8, 2017 at 7:47 AM, Morten Olav Hansen <mor...@dhis2.org> wrote:

> Hi
>
> Did you have a look at the enrollment API docs? please try out
> totalPages=true and see if it does what you want.
>
> https://docs.dhis2.org/master/en/developer/html/webapi_
> enrollment_instance_query.html
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Wed, Nov 8, 2017 at 10:23 AM, Stian Sandvold <st...@dhis2.org> wrote:
>
>> Hi Jhansi,
>>
>> You can report bugs like these directly to Jira (http://jira.dhis2.org).
>>
>> I created a bug report for you, you can see it here:
>> https://jira.dhis2.org/browse/DHIS2-2476
>>
>> Please add additional information in the comment section if you have
>> something to add.
>>
>> On Wed, Nov 8, 2017 at 6:27 AM, Jhansi Reddy Karee <
>> jhans...@thoughtworks.com> wrote:
>>
>>> Hi Team,
>>>
>>> We are experiencing an issue with the enrollments API pagination on DHIS
>>> 2.26 (it exists on the later versions of DHIS as well). When the
>>> enrollments API is paginated, it returns the enrollments for the given
>>> pageSize and the page number. But, *it doesn't return the pager params
>>> as a part of each page response, like it returns in other APIs*. By
>>> pager params we mean, paging details like total, pageSize, page, pageCount.
>>>
>>> Without the paging params it would be hard for us to figure out on how
>>> many pages should we download and also at which page we should stop
>>> downloading. Because of this issue, we are not able to paginate the
>>> enrollments API.
>>>
>>> We are about to go live with programs with registration which would
>>> internally use the enrollments API. We are expecting a lot of data entry to
>>> be done in the near future. This means there will be a lot of enrollments
>>> in the system and downloading all of them in a single API call, would be
>>> problematic for our end users who are in remote locations with very slow
>>> internet connectivity.
>>>
>>> *Will you be able to fix the pagination of enrollments API to return the
>>> paging params, so that it is consistent with the other API’s paging
>>> response *and we could also leverage it.
>>>
>>> Thanks,
>>>
>>> Madhoo/Jhansi
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Stian Sandvold
>> Software developer, DHIS2
>> University of Oslo
>> http://www.dhis2.org
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp