Re: [Dhis2-users] [Dhis2-devs] Create New track Entity through web API

2015-02-05 Thread channara rin
I don't know i feedback to you is right or wrong?
My step doing is:
1. using command "CURL" to import track entity around 100records into DHIS2
with successfull.
2. And then i go to DHIS2 interface: "App->Individual Records" and then
choose one track entity for registering program
3. After registered program, the one record of track entity that just
registered got the blank attribute value.

You can look my video in attached file

On Thu, Feb 5, 2015 at 3:36 PM, Morten Olav Hansen 
wrote:

> When you send in a TEI (Tracked entity instance), something like this:
>
> {
>   "trackedEntity": "ID1",
>"orgUnit": "ID2",
>"attributes": [
>{ "attribute": "att1", "value": "value" }
>   ]
> }
>
> And then you send in another time with this payload
>
> {
>   "trackedEntity": "ID1",
>"orgUnit": "ID2",
>"attributes": [
>   ]
> }
>
> It will delete all the attribute values.. you must always make sure you
> send the full TEI
>
> --
> Morten
>
> On Thu, Feb 5, 2015 at 3:32 PM, channara rin 
> wrote:
>
>> Hi Morten,
>> Could you describe more detail for me, what should i do? for me it is
>> seem difficult to understand.
>>
>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] [Dhis2-devs] Create New track Entity through web API

2015-02-05 Thread Morten Olav Hansen
Ok, but I'm not sure this is related to the web-api.. you are using the old
UI, which means it is using struts directly...

Did you also try in the new tracker app?

--
Morten

On Thu, Feb 5, 2015 at 3:55 PM, channara rin  wrote:

> I don't know i feedback to you is right or wrong?
> My step doing is:
> 1. using command "CURL" to import track entity around 100records into
> DHIS2 with successfull.
> 2. And then i go to DHIS2 interface: "App->Individual Records" and then
> choose one track entity for registering program
> 3. After registered program, the one record of track entity that just
> registered got the blank attribute value.
>
> You can look my video in attached file
>
> On Thu, Feb 5, 2015 at 3:36 PM, Morten Olav Hansen 
> wrote:
>
>> When you send in a TEI (Tracked entity instance), something like this:
>>
>> {
>>   "trackedEntity": "ID1",
>>"orgUnit": "ID2",
>>"attributes": [
>>{ "attribute": "att1", "value": "value" }
>>   ]
>> }
>>
>> And then you send in another time with this payload
>>
>> {
>>   "trackedEntity": "ID1",
>>"orgUnit": "ID2",
>>"attributes": [
>>   ]
>> }
>>
>> It will delete all the attribute values.. you must always make sure you
>> send the full TEI
>>
>> --
>> Morten
>>
>> On Thu, Feb 5, 2015 at 3:32 PM, channara rin 
>> wrote:
>>
>>> Hi Morten,
>>> Could you describe more detail for me, what should i do? for me it is
>>> seem difficult to understand.
>>>
>>
>>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] [Dhis2-devs] Create New track Entity through web API

2015-02-05 Thread Morten Olav Hansen
When you send in a TEI (Tracked entity instance), something like this:

{
  "trackedEntity": "ID1",
   "orgUnit": "ID2",
   "attributes": [
   { "attribute": "att1", "value": "value" }
  ]
}

And then you send in another time with this payload

{
  "trackedEntity": "ID1",
   "orgUnit": "ID2",
   "attributes": [
  ]
}

It will delete all the attribute values.. you must always make sure you
send the full TEI

--
Morten

On Thu, Feb 5, 2015 at 3:32 PM, channara rin  wrote:

> Hi Morten,
> Could you describe more detail for me, what should i do? for me it is seem
> difficult to understand.
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] [Dhis2-devs] Create New track Entity through web API

2015-02-05 Thread channara rin
Hi Morten,
Could you describe more detail for me, what should i do? for me it is seem
difficult to understand.
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] [Dhis2-devs] Create New track Entity through web API

2015-02-04 Thread Morten Olav Hansen
Hi

It will delete them yes, but it will also associate the new ones that are
in the payload. Remember that POST/PUT are not doing partial updates, so
whatever is in the payload you are sending, is the whole new object.

We have support for partial (single property only) updates in 2.18 [1].

[1]
https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s08.html#d5e1074

--
Morten

On Thu, Feb 5, 2015 at 11:44 AM, channara rin 
wrote:

> Hi all Developer,
> I met problem is After i success import track entity by using command curl
> like: https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s35.html
> And then i register those track with program i saw the DHIS2 delete all
> attribute values in track entity.
> Help me how to solve this problem???
>
>
> Thank you
> CHANNARA
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-d...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp