How to get just the newly created TEIs?

Something like this doesn´t work:

https://play.dhis2.org/test/api/trackedEntityInstances/query.json?ou=DiszpKrYNg8&program=ur1Edk5Oe2n&skipPaging=true&attribute=created:GE:2013.10.08

···

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

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 :GE:

c) The date would be in yyyy-MM-dd format (not dots).

···

On Thu, Nov 24, 2016 at 4:32 PM, Knut Staring knutst@gmail.com wrote:

Something like this doesn´t work:

https://play.dhis2.org/test/api/trackedEntityInstances/query.json?ou=DiszpKrYNg8&program=ur1Edk5Oe2n&skipPaging=true&attribute=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@lists.launchpad.net

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

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@dhis2.org 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 :GE:

c) The date would be in yyyy-MM-dd format (not dots).

On Thu, Nov 24, 2016 at 4:32 PM, Knut Staring knutst@gmail.com wrote:

Something like this doesn´t work:

https://play.dhis2.org/test/api/trackedEntityInstances/query.json?ou=DiszpKrYNg8&program=ur1Edk5Oe2n&skipPaging=true&attribute=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@lists.launchpad.net

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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

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

···

On Thu, Nov 24, 2016 at 6:56 PM, Knut Staring knutst@gmail.com wrote:

Thanks - but you are then saying it cannot be done? Or is it possible using one of the other endpoints?


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

Abyot A. Gizaw.

Senior Engineer, DHIS2

University of Oslo

http://www.dhis2.org

On Thu, Nov 24, 2016 at 6:52 PM, Halvdan Hoem Grelland halvdan@dhis2.org 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 :GE:

c) The date would be in yyyy-MM-dd format (not dots).


Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

On Thu, Nov 24, 2016 at 4:32 PM, Knut Staring knutst@gmail.com wrote:

Something like this doesn´t work:

https://play.dhis2.org/test/api/trackedEntityInstances/query.json?ou=DiszpKrYNg8&program=ur1Edk5Oe2n&skipPaging=true&attribute=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@lists.launchpad.net

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

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

···

On Thu, Nov 24, 2016 at 7:27 PM, Abyot Asalefew Gizaw abyot@dhis2.org 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

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@gmail.com wrote:

Thanks - but you are then saying it cannot be done? Or is it possible using one of the other endpoints?


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

On Thu, Nov 24, 2016 at 6:52 PM, Halvdan Hoem Grelland halvdan@dhis2.org 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 :GE:

c) The date would be in yyyy-MM-dd format (not dots).


Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

On Thu, Nov 24, 2016 at 4:32 PM, Knut Staring knutst@gmail.com wrote:

Something like this doesn´t work:

https://play.dhis2.org/test/api/trackedEntityInstances/query.json?ou=DiszpKrYNg8&program=ur1Edk5Oe2n&skipPaging=true&attribute=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@lists.launchpad.net

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

Great, thanks Abyot!!

knut

···

On Thu, Nov 24, 2016 at 7:30 PM, Abyot Asalefew Gizaw abyot@dhis2.org wrote:

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@dhis2.org 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@gmail.com wrote:

Thanks - but you are then saying it cannot be done? Or is it possible using one of the other endpoints?


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

On Thu, Nov 24, 2016 at 6:52 PM, Halvdan Hoem Grelland halvdan@dhis2.org 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 :GE:

c) The date would be in yyyy-MM-dd format (not dots).


Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

On Thu, Nov 24, 2016 at 4:32 PM, Knut Staring knutst@gmail.com wrote:

Something like this doesn´t work:

https://play.dhis2.org/test/api/trackedEntityInstances/query.json?ou=DiszpKrYNg8&program=ur1Edk5Oe2n&skipPaging=true&attribute=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@lists.launchpad.net

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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org