Hi 2009/12/11 Abyot Gizaw <[email protected]>
> > > 2009/12/11 Ola Hodne Titlestad <[email protected]> > >> >> 2009/12/11 Abyot Gizaw <[email protected]> >> >> Hi Lars, >>> >>> Yes I have started looking at it. And I was thinking of writing a mail >>> about it, but the commit was very late and went to bed :( >>> >>> What I have done is >>> >>> 1. made 2 methods in dataElementService >>> 1. method 1 takes collection of dataElements and returns a sorted >>> collection of categoryCombos that the passed dataElements contain. The >>> sorting is simple based on the number of optioncombos each >>> categorycombo >>> has.Say for example default categorycombos will appear first, then >>> with 2 >>> optioncombos, with 3 ... it goes on. This will help to have a >>> consistent >>> look in the dataentry form >>> 2. method 2 takes collection of dataElements and returns a mapped >>> collection of dataelements. The mapping is Map<CategoryCombo, >>> Collection<DataElement>>. My assumption is you can throw whatever >>> dataElement in your dataset. And using this method then possible to >>> filter/group the dataElements based on their categorycombo >>> 2. in multidimensional dataentry >>> 1. get the dataset >>> 2. get collection dataelements for the selected dataset >>> 3. use the 2 newly created methods and get the categorycombos >>> 4. generate table heading for each categorycombo >>> 5. populate the dataentry form using the table headers generated >>> 6. under each table list the dataelements that belong to the >>> corresponing tableheading/categorycombo >>> 7. then of course dataentry >>> >>> My next plan is to apply this for default dataset reports. >>> >>> >> Thanks Abyot, this is exactly the kind of functionality I was asking for >> yesterday. >> >> Seems you are dealing with this without any need for a new object to >> persists all data elements with the same catcombo, you just use a service >> to get that collection. I assume that if we look at the next steps, if you >> need to make some editing to a form section (table/catcombo part of a form) >> like custom heading, grey fields etc. then you need to persist that somehow? >> > > I opted for this because we already have all the information persisted - > dataeleement and dataset. With the approach you are suggesting then we need > to refactor the dataelement-dataset association into > dataelement-section/form/xxxxxxx Bob can suggest a good name :) and > section/form/xxxxx-dataset ....... are we ready to do that? > I wouldn't suggest doing that, let alone naming it! I don't know how many times I have said this now, but I am uncomfortable using our data structure to determine how we lay out forms. But I see we already have done this to certain extent with DataSet sections so my advice to Ola was just use that as it is already there. Bob. > >> The section thing ... I haven't looked into it - am not even sure what to >>> do there. Because I thought the idea of sectioning was to break a long list >>> of dataelements into smaller pieces. >>> >>> As far as I know Vietnam has been the only place to use these sections >> and they developed it. I am not 100% what they are used for either. >> >> >>> Yes it should be possible to generate the sections automatically based on >>> categorycombos, and while doing that we are not breaking into pieces but >>> rather grouping based on categorycombos. My worry is while identifying a >>> collection of dataelements belonging to the same categorycombo and call it a >>> section, we might endup with a long list of dataelements. If a long list >>> then we need to think of sectioning a section which is a bit complicated or >>> else put some kind of assumption - like no more than 10 dataelements in a >>> section ! >>> >>> >> I am not sure why the long list is a problem. Since we base this on >> catcombos we get the tables in the entry form as they would look on the >> paper report right, but that needs to be further split up? Where would it be >> a problem to have a long list of data elements? I assume that if we have >> non-dimensional data elements there would be no tables and then just a long >> list since they all belong to the same catcombo (default) and then >> automatically the same section? I guess it should be possible to put data >> elements from the same catcombo in two different sections as long as all >> data elements in one section share the same catcombo? Wouldn't that solve >> the long list problem? >> >> Ola >> --------- >> >> >>> Are we using the section functionality by the way? >>> >>> Thank you >>> Abyot. >>> >>> >>> 2009/12/11 Lars Helge Ă˜verland <[email protected]> >>> >>> >>>> Hi Abyot, great that you are taking initiative on this. Could you >>>> explain a bit what you did, is this sorting out some of the short-term >>>> needs >>>> Ola wrote about in that last mail? >>>> >>>> Lars >>>> >>>> >>>> On Fri, Dec 11, 2009 at 3:20 AM, <[email protected]> wrote: >>>> >>>>> ------------------------------------------------------------ >>>>> revno: 1207 >>>>> committer: Abyot Asalefew Gizaw <[email protected]> >>>>> branch nick: trunk >>>>> timestamp: Fri 2009-12-11 03:18:27 +0100 >>>>> message: >>>>> automatically breaking data entry form into sections using >>>>> categorycombinations >>>>> modified: >>>>> >>>>> >>>>> dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java >>>>> >>>>> dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSetService.java >>>>> >>>>> >>>>> dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java >>>>> >>>>> >>>>> dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java >>>>> >>>>> >>>>> dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/multidimensional/FormAction.java >>>>> >>>>> >>>>> dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml >>>>> >>>>> >>>>> dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multidimensional/form.vm >>>>> The size of the diff (1391 lines) is larger than your specified limit >>>>> of 1000 lines >>>>> >>>>> -- >>>>> 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> >>>>> . >>>>> >>>>> _______________________________________________ >>>>> Mailing list: >>>>> https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs> >>>>> Post to : [email protected] >>>>> Unsubscribe : >>>>> https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs> >>>>> More help : https://help.launchpad.net/ListHelp >>>>> >>>> >>>> >>> >> > > _______________________________________________ > Mailing list: > https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs> > Post to : [email protected] > Unsubscribe : > https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-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

