Hi Devs, I managed to get the relationships for linking TEI to work based on the json syntax sent by Morten. I am checking the documentation for creating program stages i.e. http://dhis2.github.io/dhis2-docs/2.24/en/developer/html/ch01s58.html#d0e12001 and I am not finding some guide on this. Please help with any guide on the json payload syntax for creating a program stage instance through the API. rgds David
2016-08-01 21:26 GMT+03:00 David Muturi <[email protected]>: > Hi Morten, > I have investigated and found out the issue below is a bug and will go > ahead and report on launchpad. I have made the field relationship typeid to > allow nulls then sent the json payload with 10 records. From the attached > image the records have inserted in the relationship table via the API. I > will use this method to push in the relationship of several hundred > thousand recs then run an update sql to fill in the column for now before > setting its constraints not to allow nulls. > rgds > David > > 2016-08-01 15:54 GMT+03:00 David Muturi <[email protected]>: > >> Hi Morten, >> Many thanks for you response. >> rgds >> David >> >> 2016-07-30 12:06 GMT+03:00 Morten Olav Hansen <[email protected]>: >> >>> I will have a look on Monday >>> >>> -- >>> Morten Olav Hansen >>> Senior Engineer, DHIS 2 >>> University of Oslo >>> http://www.dhis2.org >>> >>> On Sat, Jul 30, 2016 at 10:03 AM, David Muturi <[email protected]> >>> wrote: >>> >>>> Hi Devs >>>> Could this be a bug? The attached error is getting generated when I >>>> send the attached TEI Payload via curl. >>>> rgds >>>> David >>>> ---------- Forwarded message ---------- >>>> From: "David Muturi" <[email protected]> >>>> Date: 29 Jul 2016 21:46 >>>> Subject: Re: [Dhis2-devs] Tracker Relationship API >>>> To: "Morten Olav Hansen" <[email protected]> >>>> Cc: >>>> >>>> Hi Morten, >>>>> Sorry to come back to you again on this, I am getting the error in the >>>>> attached output.txt file when I try too update relationship between two >>>>> TEIs. I have attached my JSON payload as well, when I look at it, I cant >>>>> seem to see any errors in the syntax. >>>>> rgds >>>>> David >>>>> >>>>> 2016-07-27 10:12 GMT+03:00 Morten Olav Hansen <[email protected]>: >>>>> >>>>>> Hi >>>>>> >>>>>> Yes, you can add this to your create or update TEI payload: >>>>>> "relationships": [ >>>>>> { "trackedEntityInstanceA": "UID of TEI A", >>>>>> "trackedEntityInstanceB": "UID of TEI B" } >>>>>> ] >>>>>> >>>>>> -- >>>>>> Morten Olav Hansen >>>>>> Senior Engineer, DHIS 2 >>>>>> University of Oslo >>>>>> http://www.dhis2.org >>>>>> >>>>>> On Tue, Jul 26, 2016 at 9:13 PM, David Muturi <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> Hello Dhis2 team, >>>>>>> Is there a way of creating relationships between enrolled TEI's via >>>>>>> the API similar to enrollment as described in the dhis2 docs here >>>>>>> http://dhis2.github.io/dhis2-docs/master/en/developer/html/dhis2_ >>>>>>> developer_manual_full.html#d7532e12063 >>>>>>> >>>>>>> rgds >>>>>>> David >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Mailing list: https://launchpad.net/~dhis2-devs >>>>>>> Post to : [email protected] >>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs >>>>>>> More help : https://help.launchpad.net/ListHelp >>>>>>> >>>>>>> >>>>>> >>>>> >>>> _______________________________________________ >>>> Mailing list: https://launchpad.net/~dhis2-devs >>>> Post to : [email protected] >>>> Unsubscribe : https://launchpad.net/~dhis2-devs >>>> More help : https://help.launchpad.net/ListHelp >>>> >>>> >>> >> >
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

