← Back to team overview

dhis2-devs team mailing list archive

Re: How to get just the newly created TEIs?

 

since you are mentioning program, you could use enrollment date. See
programEnrollmentStartDate & programEnrollmentEndDate

https://play.dhis2.org/demo/api/trackedEntityInstances/query.json?ou=ImspTQPwCqd&ouMode=DESCENDANTS&program=ur1Edk5Oe2n&&programEnrollmentStartDate=2016-11-01&programEnrollmentEndDate=2016-11-23&pageSize=50&page=1&totalPages=true

--
Abyot A. Gizaw.
Senior Engineer, DHIS2
University of Oslo
http://www.dhis2.org

On Thu, Nov 24, 2016 at 7:27 PM, Abyot Asalefew Gizaw <abyot@xxxxxxxxx>
wrote:

> Since created is a TEI property, it should be possible to filter on the
> TEI without using attrbibutes ... but seems we have a bug there
>
> https://play.dhis2.org/demo/api/trackedEntityInstances/
> query.json?ou=ImspTQPwCqd&ouMode=SELECTED&created:GE:
> 2016-11-01&pageSize=50&page=1&totalPages=true
>
> --
> Abyot A. Gizaw.
> Senior Engineer, DHIS2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Nov 24, 2016 at 6:56 PM, Knut Staring <knutst@xxxxxxxxx> wrote:
>
>> Thanks - but you are then saying it cannot be done? Or is it possible
>> using one of the other endpoints?
>>
>> On Thu, Nov 24, 2016 at 6:52 PM, Halvdan Hoem Grelland <halvdan@xxxxxxxxx
>> > wrote:
>>
>>> Hi,
>>>
>>> This is because
>>>   a) 'created' is not a TEAttribute of the TE(I) (it is a property of
>>> the TEI object)
>>>   b) If you could do this, the format would be <attribute-uid>:GE:<date>
>>>   c) The date would be in yyyy-MM-dd format (not dots).
>>>
>>> On Thu, Nov 24, 2016 at 4:32 PM, Knut Staring <knutst@xxxxxxxxx> wrote:
>>>
>>>> Something like this doesn´t work:
>>>>
>>>> https://play.dhis2.org/test/api/trackedEntityInstances/query
>>>> .json?ou=DiszpKrYNg8&program=ur1Edk5Oe2n&skipPaging=true&att
>>>> ribute=created:GE:2013.10.08
>>>> --
>>>> Knut Staring
>>>> Dept. of Informatics, University of Oslo
>>>> Norway: +4791880522
>>>> Skype: knutstar
>>>> http://dhis2.org
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Halvdan Hoem Grelland
>>> Software developer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org <https://www.dhis2.org/>
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

Follow ups

References