Create New track Entity through web API

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

image

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 rin.channara@gmail.com 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-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Morten,
Could you describe more detail for me, what should i do? for me it is seem
difficult to understand.

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

···

On Thu, Feb 5, 2015 at 3:32 PM, channara rin rin.channara@gmail.com wrote:


Morten

Hi Morten,

Could you describe more detail for me, what should i do? for me it is seem difficult to understand.

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

Hi Morten,
Could you describe more detail for me, what should i do? for me it is
seem difficult to understand.

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?

···

On Thu, Feb 5, 2015 at 3:55 PM, channara rin rin.channara@gmail.com 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.
  1. And then i go to DHIS2 interface: “App->Individual Records” and then choose one track entity for registering program
  1. 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


Morten

On Thu, Feb 5, 2015 at 3:36 PM, Morten Olav Hansen mortenoh@gmail.com 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 rin.channara@gmail.com wrote:

Hi Morten,

Could you describe more detail for me, what should i do? for me it is seem difficult to understand.

Hi all

With expanded use of the DHIS can you consider changing its name or make it easily customizable to do so given that although originally it was designed for the district it is now used in facilities and national level. Dropping the D or coming up with a more encompassing name will be good.

Regards

Simon Muyambo

__________ Information from ESET NOD32 Antivirus, version of virus signature database 11144 (20150209) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Hi Simon,
It has been talked about, but remember since DHIS 2 is open source (as
well as the documentation), you can conceivably call it whatever you
like, even modifying the documentation as well to suit. As has been
pointed out on the list before, the acronym is a bit like IBM, who do
a lot more than make typewriters, but the name has stuck. Several
implementations which I know of try to get rid of all signs of DHIS 2
for "marketing purposes", so it may really be up to you to decide what
you would like to call it. Its open source, so anything goes really.

Best regards,
Jason

···

On Mon, Feb 9, 2015 at 7:42 AM, Simon Muyambo <smmuyambo@gmail.com> wrote:

Hi all

With expanded use of the DHIS can you consider changing its name or make it
easily customizable to do so given that although originally it was designed
for the district it is now used in facilities and national level. Dropping
the D or coming up with a more encompassing name will be good.

Regards

Simon Muyambo

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 11144 (20150209) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

_______________________________________________
Mailing list: DHIS 2 developers in Launchpad
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : DHIS 2 developers in Launchpad
More help : ListHelp - Launchpad Help

--
Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Thanks Simon,

I support the idea of dropping D to remain HIS which is applicable a cross as well as Health information resources from different information sources which the current system can do

PEPELA WANJALA

MINISTRY OF HEALTH HEADQUARTERS

HEALTH SECTOR MONITORING & EVALUATION - AMRO- KENYA CHAIRMAN

AFYA HOUSE, LG 37

P.O BOX 30016, NAIROBI, KENYA

TEL: +254 (020) 2717077 EXT 45097

**CELL: +254 (0) 722375633 **

EMAIL: wanjala2p@yahoo.com, wanjala2p@gmail.com

** his@health.go.ke, **meunitmoh@gmail.com

* *"HealthInformation Management - Making a World of Difference”

···

From: Simon Muyambo smmuyambo@gmail.com
To: ‘DHIS 2 Developers list’ dhis2-devs@lists.launchpad.net
Cc: ‘DHIS 2 Users list’ dhis2-users@lists.launchpad.net
Sent: Monday, February 9, 2015 9:42 AM
Subject: [Dhis2-users] DHIS name change

Hi all

With expanded use of the DHIS can you consider changing its name or make it easily customizable to do so given that although originally it was designed for the district it is now used in facilities and national level. Dropping the D or coming up with a more encompassing name will be good.

Regards

Simon Muyambo

__________ Information from ESET NOD32 Antivirus, version of virus signature database 11144 (20150209) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


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