dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28263
Re: [Dhis2-users] Test api messages
Thanks Ferdie, much appreciated.
Cheers,
Pascal
On 24 February 2014 08:31, Ferdie Botha <ferdie@xxxxxxxx> wrote:
> Hi Pascal, I'll have Greg look at this as he did previously do this as
> part of a test Carl requested. Get back to you during the day.
>
> Kind regards
> Ferdie
>
>
>
> On Mon, Feb 24, 2014 at 8:24 AM, Pascal Brandt <pascal@xxxxxxxxx> wrote:
>
>> Hi guys,
>>
>> We're still trying to get an example patient creation message that will
>> work against the demo site. Does anyone have one?
>>
>> Cheers,
>> Pascal
>>
>>
>>
>> On 21 February 2014 15:23, Pierre Dane <pierre@xxxxxxxxx> wrote:
>>
>>> Hi all,
>>>
>>> I've begun to implement the patient tracker for a new project - the
>>> National Pregnancy Register of South Africa for Jembi Health Systems.
>>>
>>> Looks like the DHIS2 documentation is out of date. Please see my problem
>>> below - but I think it could be easily solved if someone would send me a
>>> test payload for the PUT message to the person api that works on the live
>>> demo site.
>>> The response to the persons path gives me errors (unknown attribute)
>>> when I try the message template detailed in the online DHIS2 documents, but
>>> passes when I remove all elements except identifiers, orgUnit and attributes
>>> However I get an ignored response (rather than a failure) when I send
>>> this message to /api/persons
>>>
>>>
>>> Message:
>>> {
>>> "orgUnit": "C33j9neHDGt",
>>> "identifiers": [ {
>>> "type": "zEhQmZeoRN9",
>>> "value": "7373736543376"
>>> } ],
>>> "attributes": [ {
>>> "type": "uRGeJ84LKb5",
>>> "value": "pierretest"
>>> },{
>>> "type": "PGtWVaM3uXz",
>>> "value": "2010-02-02"
>>> },{
>>> "type": "T7pwpMdaVVa",
>>> "value": "1974-02-03"
>>> }
>>> ]
>>> }
>>>
>>> 0000: 7B 22 73 74 61 74 75 73 22 3A 22 45 52 52 4F 52 |
>>> {"status":"ERROR |
>>> 0010: 22 2C 22 69 6D 70 6F 72 74 43 6F 75 6E 74 22 3A |
>>> ","importCount": |
>>> 0020: 7B 22 69 6D 70 6F 72 74 65 64 22 3A 30 2C 22 75 |
>>> {"imported":0,"u |
>>> 0030: 70 64 61 74 65 64 22 3A 30 2C 22 69 67 6E 6F 72 |
>>> pdated":0,"ignor |
>>> 0040: 65 64 22 3A 31 2C 22 64 65 6C 65 74 65 64 22 3A |
>>> ed":1,"deleted": |
>>> 0050: 30 7D 2C 22 63 6F 6E 66 6C 69 63 74 73 22 3A 5B |
>>> 0},"conflicts":[ |
>>> 0060: 7B 22 6F 62 6A 65 63 74 22 3A 22 49 64 65 6E 74 |
>>> {"object":"Ident |
>>> 0070: 69 66 69 65 72 2E 74 79 70 65 22 2C 22 76 61 6C |
>>> ifier.type","val |
>>> 0080: 75 65 22 3A 22 4D 69 73 73 69 6E 67 20 72 65 71 | ue":"Missing
>>> req |
>>> 0090: 75 69 72 65 64 20 69 64 65 6E 74 69 66 69 65 72 | uired
>>> identifier |
>>> 00A0: 20 74 79 70 65 20 7A 45 68 51 6D 5A 65 6F 52 4E | type
>>> zEhQmZeoRN |
>>> 00B0: 39 22 7D 2C 7B 22 6F 62 6A 65 63 74 22 3A 22 49 |
>>> 9"},{"object":"I |
>>> 00C0: 64 65 6E 74 69 66 69 65 72 2E 74 79 70 65 22 2C |
>>> dentifier.type", |
>>> 00D0: 22 76 61 6C 75 65 22 3A 22 49 6E 76 61 6C 69 64 |
>>> "value":"Invalid |
>>> 00E0: 20 74 79 70 65 20 6E 75 6C 6C 22 7D 2C 7B 22 6F | type
>>> null"},{"o |
>>> 00F0: 62 6A 65 63 74 22 3A 22 41 74 74 72 69 62 75 74 |
>>> bject":"Attribut |
>>> 0100: 65 2E 74 79 70 65 22 2C 22 76 61 6C 75 65 22 3A |
>>> e.type","value": |
>>> 0110: 22 4D 69 73 73 69 6E 67 20 72 65 71 75 69 72 65 | "Missing
>>> require |
>>> 0120: 64 20 61 74 74 72 69 62 75 74 65 20 74 79 70 65 | d attribute
>>> type |
>>> 0130: 20 54 37 70 77 70 4D 64 61 56 56 61 22 7D 2C 7B |
>>> T7pwpMdaVVa"},{ |
>>> 0140: 22 6F 62 6A 65 63 74 22 3A 22 41 74 74 72 69 62 |
>>> "object":"Attrib |
>>> 0150: 75 74 65 2E 74 79 70 65 22 2C 22 76 61 6C 75 65 |
>>> ute.type","value |
>>> 0160: 22 3A 22 4D 69 73 73 69 6E 67 20 72 65 71 75 69 | ":"Missing
>>> requi |
>>> 0170: 72 65 64 20 61 74 74 72 69 62 75 74 65 20 74 79 | red
>>> attribute ty |
>>> 0180: 70 65 20 50 47 74 57 56 61 4D 33 75 58 7A 22 7D | pe
>>> PGtWVaM3uXz"} |
>>> 0190: 2C 7B 22 6F 62 6A 65 63 74 22 3A 22 41 74 74 72 |
>>> ,{"object":"Attr |
>>> 01A0: 69 62 75 74 65 2E 74 79 70 65 22 2C 22 76 61 6C |
>>> ibute.type","val |
>>> 01B0: 75 65 22 3A 22 4D 69 73 73 69 6E 67 20 72 65 71 | ue":"Missing
>>> req |
>>> 01C0: 75 69 72 65 64 20 61 74 74 72 69 62 75 74 65 20 | uired
>>> attribute |
>>> 01D0: 74 79 70 65 20 75 52 47 65 4A 38 34 4C 4B 62 35 | type
>>> uRGeJ84LKb5 |
>>> 01E0: 22 7D 2C 7B 22 6F 62 6A 65 63 74 22 3A 22 41 74 |
>>> "},{"object":"At |
>>> 01F0: 74 72 69 62 75 74 65 2E 74 79 70 65 22 2C 22 76 |
>>> tribute.type","v |
>>> 0200: 61 6C 75 65 22 3A 22 49 6E 76 61 6C 69 64 20 74 |
>>> alue":"Invalid t |
>>> 0210: 79 70 65 20 6E 75 6C 6C 22 7D 2C 7B 22 6F 62 6A | ype
>>> null"},{"obj |
>>> 0220: 65 63 74 22 3A 22 41 74 74 72 69 62 75 74 65 2E |
>>> ect":"Attribute. |
>>> 0230: 74 79 70 65 22 2C 22 76 61 6C 75 65 22 3A 22 49 |
>>> type","value":"I |
>>> 0240: 6E 76 61 6C 69 64 20 74 79 70 65 20 6E 75 6C 6C | nvalid type
>>> null |
>>> 0250: 22 7D 2C 7B 22 6F 62 6A 65 63 74 22 3A 22 41 74 |
>>> "},{"object":"At |
>>> 0260: 74 72 69 62 75 74 65 2E 74 79 70 65 22 2C 22 76 |
>>> tribute.type","v |
>>> 0270: 61 6C 75 65 22 3A 22 49 6E 76 61 6C 69 64 20 74 |
>>> alue":"Invalid t |
>>> 0280: 79 70 65 20 6E 75 6C 6C 22 7D 5D 7D | ype null"}]}
>>> |
>>>
>>> Many thanks,
>>>
>>> Pierre
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-users
>>> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>>
>> *Pascal BrandtSenio*
>>
>> *r Software Developer, Jembi Health Systems | SOUTH AFRICA Mobile: +27 84
>> 827 9342 <%2B27%2084%20827%209342> | Office: +27 21 701 0939
>> <%2B27%2021%20701%200939> | Skype: psbrandt E-mail: pascal@xxxxxxxxx
>> <pascal@xxxxxxxxx>*
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
--
*Pascal BrandtSenio*
*r Software Developer, Jembi Health Systems | SOUTH AFRICA Mobile: +27 84
827 9342 | Office: +27 21 701 0939 | Skype:
psbrandtE-mail: pascal@xxxxxxxxx <pascal@xxxxxxxxx>*
References