← Back to team overview

dhis2-devs team mailing list archive

Re: Possible bug related to "value" field in datavalues in api/events.

 

Please also remember that multiple names can point to the same code value,
so you probably want to indicate that somehow in your UI, it is impossible
to know which name was used when collecting the code.

--
Morten

On Mon, Mar 30, 2015 at 7:42 PM, Lars Helge Øverland <larshelge@xxxxxxxxx>
wrote:

> That's correct.
>
> So from a client perspective, you need to fetch option sets, then
> translate the option values from code to name whenever you display it.
>
> regards,
>
> Lars
>
>
> On Mon, Mar 30, 2015 at 8:13 AM, Araz Abishov <araz.abishov.gsoc@xxxxxxxxx
> > wrote:
>
>> Hello Jason,
>>
>> Thanks for fast responding.
>>
>> Oh, I have noticed right now that all data values contain only "code" in
>> "value" field. Other option sets just specify the same values for name and
>> code. That was the reason of confusion.
>>
>> Thank you!
>>
>> Regards,
>> Araz
>>
>>
>> On Mon, Mar 30, 2015 at 10:52 AM, Jason Pickering <
>> jason.p.pickering@xxxxxxxxx> wrote:
>>
>>> Hi Araz
>>>
>>> I do not think this is a bug, but rather by design. You can see from
>>> here (https://apps.dhis2.org/demo/api/dataElements/fWIAEtYVEGk) that
>>> this data element has an option set (
>>> https://apps.dhis2.org/demo/api/optionSets/iDFPKpFTiVw) which you can
>>> determine the "clear text" value.
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>> On Mon, Mar 30, 2015 at 7:31 AM, Araz Abishov <
>>> araz.abishov.gsoc@xxxxxxxxx> wrote:
>>>
>>>> Hello developers,
>>>>
>>>> When requesting events with datavalues like here:
>>>>
>>>>
>>>> https://apps.dhis2.org/demo/api/events?page=0&pageSize=200&orgUnit=DiszpKrYNg8&program=eBAyeGv0exc&filter=lastUpdated:gt:2015-03-30T04:50:49.462+0000
>>>>
>>>> some datavalues contain optionset "code" in "value" field instead of
>>>> "name".
>>>> For example: <dataValue value="MODDISCH" dataElement="fWIAEtYVEGk"
>>>> providedElsewhere="false" storedBy="imported"/> should contain "Discharged"
>>>> as value instead of MODDISCH.
>>>>
>>>> Could you please fix this as soon as possible?
>>>>
>>>> Best Regards,
>>>> Araz
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Jason P. Pickering
>>> email: jason.p.pickering@xxxxxxxxx
>>> tel:+46764147049
>>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

References