← Back to team overview

dhis2-devs team mailing list archive

Once a categorycombo is created there is no way to add/remove a category/option into/from it.

 

Have been discussing this with Lars, and "not allowing to edit" is what we
could come up at least for the time being.

We can think of allowing users to edit the members in the
categorycombination - like adding/removing options or categories. But the
question is what will be the consequence of doing this when data is already
registered?

We can keep existing optioncombos, deal with all the internal complexities
of extending/shrinking optioncombos by adding/removing options. Still the
real challenge is what will happen to values previously registered? For
example - assume the following

Malaria ( <5 ) = 50
Malaria ( >5 ) = 40

We have only one category Age with options <5 and >5. Next time you want to
further break and come up with <5, 6-15, >15 or something like that - then
what are we going to do with the values 50 and 40? Remove the values and
record (rather collect) them again? Do we need to keep 50 and 40 for some
reason (history?). If so how are we going to display them? because if we
want to keep the old values and at the same time reflect the new changes -
then we need to have a new set of optioncombos lined to the dataelement (in
our case Malaria) so there is no way to refer to the old data because the
dataelement is linked to the new optioncombo/categorycombo.

The way I see it by allowing adding/removing categories/options from
categorycomobs/categories we will be inviting lots of complexities - so I
think the best way is not to allow addition or removal.


Thank you
Abyot.






On Fri, Dec 4, 2009 at 3:13 PM, <noreply@xxxxxxxxxxxxx> wrote:

> ------------------------------------------------------------
> revno: 1167
> committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
> branch nick: trunk
> timestamp: Fri 2009-12-04 15:10:54 +0100
> message:
>  Once a categorycombo is created there is no way to add/remove a
> category/option into/from it.
> modified:
>
>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/updateDataElementCategoryComboForm.vm
>
>
> --
> lp:dhis2
> https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk<https://code.launchpad.net/%7Edhis2-devs-core/dhis2/trunk>
>
> Your team DHIS 2 developers is subscribed to branch lp:dhis2.
> To unsubscribe from this branch go to
> https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription<https://code.launchpad.net/%7Edhis2-devs-core/dhis2/trunk/+edit-subscription>
> .
>
> === modified file
> 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/updateDataElementCategoryComboForm.vm'
> ---
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/updateDataElementCategoryComboForm.vm
> 2009-10-20 12:49:32 +0000
> +++
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/updateDataElementCategoryComboForm.vm
> 2009-12-04 14:10:54 +0000
> @@ -37,7 +37,7 @@
>       </tr>
>       <tr>
>                <td>
> -          <select size="15" id="availableList" name="availableList"
> multiple="multiple" style="min-width:20em;height:20em" ondblclick="move(
> 'availableList' )">
> +          <select size="15" id="availableList" name="availableList"
> multiple="multiple" style="min-width:20em;height:20em" ondblclick="move(
> 'availableList' )" disabled="disabled">
>             #foreach ( $availableDataElementCategory in
> $allDataElementCategories )
>               <option
> value="$availableDataElementCategory.id">$encoder.htmlEncode(
> $availableDataElementCategory.name )</option>
>             #end
> @@ -51,7 +51,7 @@
>                  <a href="#" onclick="moveDown('selectedList')"><img
> src="../images/move_down.png" border="0" alt=""></a>
>         </td>
>                <td>
> -          <select id="selectedList" name="selectedList"
> multiple="multiple" style="min-width:20em;height:20em" ondblclick="move(
> 'selectedList' )">
> +          <select id="selectedList" name="selectedList"
> multiple="multiple" style="min-width:20em;height:20em">
>             #foreach ( $dataElementCategory in $dataElementCategories )
>               <option value="$dataElementCategory.id">$encoder.htmlEncode(
> $dataElementCategory.name )</option>
>             #end
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups