Re: [Dhis2-devs] JQuery table sorter
Maximum Tries exceeded... Please try after 0 mins :-( On 9 May 2010 15:53, Knut Staring knu...@gmail.com wrote: Have given it a go for facilities - even Chrome couldn't really handle a table of 6700 for Kenya, though, so had to select one province. You can see it here (click, then default login to DHIS2, then click again): http://109.74.202.200:8080/ke/MFL/mfl.html k On Sat, May 8, 2010 at 7:49 PM, Knut Staring knu...@gmail.com wrote: I have now added maps for (most of) the ports, showing OpenLayers with OpenStreetMap in an iframe inside the table. This could be quite cool for health facilities also. http://bit.ly/aNVA9i k On Thu, May 6, 2010 at 3:28 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Wow. datatables.net examples look very slick. Would really like to see this integrated into DHIS2! On Thu, May 6, 2010 at 2:48 PM, Bob Jolliffe bobjolli...@gmail.com wrote: The jquery table sorter is quite cool but also a bit limited as it is restricted to using html tables in the dom as its model and doesn't naturally lend itself to server side pagination - though can be coaxed no doubt. http://datatables.net/index looks much better. All the features of the above but much more flexible. Not to mention the wonderful array of grid controls which come with ext-all.js which is already distributed with dhis2 :-) Cheers Bob On 6 May 2010 00:43, Knut Staring knu...@gmail.com wrote: On the topic of paging and long lists, I just added 1700 rows to an HTML page with the Jquery table sorter plugin, and it seems very performant: http://109.74.202.200:8080/who_ihr_poe/out/docs/ports.html -- Cheers, Knut Staring ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- -- Jason P. Pickering email: jason.p.picker...@gmail.com tel:+260968395190 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- Cheers, Knut Staring -- Cheers, Knut Staring ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] JQuery table sorter
That looks pretty cool. How easy is it to work with the table widget. Shallow learning curve I hope? On 8 May 2010 18:49, Knut Staring knu...@gmail.com wrote: I have now added maps for (most of) the ports, showing OpenLayers with OpenStreetMap in an iframe inside the table. This could be quite cool for health facilities also. http://bit.ly/aNVA9i k On Thu, May 6, 2010 at 3:28 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Wow. datatables.net examples look very slick. Would really like to see this integrated into DHIS2! On Thu, May 6, 2010 at 2:48 PM, Bob Jolliffe bobjolli...@gmail.com wrote: The jquery table sorter is quite cool but also a bit limited as it is restricted to using html tables in the dom as its model and doesn't naturally lend itself to server side pagination - though can be coaxed no doubt. http://datatables.net/index looks much better. All the features of the above but much more flexible. Not to mention the wonderful array of grid controls which come with ext-all.js which is already distributed with dhis2 :-) Cheers Bob On 6 May 2010 00:43, Knut Staring knu...@gmail.com wrote: On the topic of paging and long lists, I just added 1700 rows to an HTML page with the Jquery table sorter plugin, and it seems very performant: http://109.74.202.200:8080/who_ihr_poe/out/docs/ports.html -- Cheers, Knut Staring ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- -- Jason P. Pickering email: jason.p.picker...@gmail.com tel:+260968395190 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- Cheers, Knut Staring ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Framework upgrade
well done Jo! 2010/5/7 Lars Helge Øverland larshe...@gmail.com: We have been doing a real spring cleaning (sic) and upgraded our major development frameworks. Thanks to Jo for good work and testing. - Spring version 3.0.2 http://blog.springsource.com/2009/12/16/spring-framework-3-0-goes-ga/ - Hibernate version 3.5.1 http://in.relation.to/Bloggers/Hibernate350FinalRelease - Struts 2.1.8.1 http://struts.apache.org/announce.html - H2 1.2.129 There exists a later version but we need to resolve an issue before upgrading further. We are not yet taking advantage of the possibilities this gives, including replacing xml config with annotations, wrapper for jaxb2 marshalling, REST support. This will be considered after we do the merge with Indian branch and we can free up some developer time. regards, Lars ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] JQuery table sorter
The jquery table sorter is quite cool but also a bit limited as it is restricted to using html tables in the dom as its model and doesn't naturally lend itself to server side pagination - though can be coaxed no doubt. http://datatables.net/index looks much better. All the features of the above but much more flexible. Not to mention the wonderful array of grid controls which come with ext-all.js which is already distributed with dhis2 :-) Cheers Bob On 6 May 2010 00:43, Knut Staring knu...@gmail.com wrote: On the topic of paging and long lists, I just added 1700 rows to an HTML page with the Jquery table sorter plugin, and it seems very performant: http://109.74.202.200:8080/who_ihr_poe/out/docs/ports.html -- Cheers, Knut Staring ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] logging in dhis2-live
For those of you who are using dhis2-live you might have been frustrated to discover that log4j.properties in WEB-INF/classes is being ignored. After much searching I discovered that dhis2-live has a log4j.properties file in the dhis2-live.jar which is the one that is used. Of course I should have known that because I put it there, but it was a long time ago :-( It is there to ensure the logs get written to the right directory and to make jetty happy. Anyway lessons learned: 1. If you ever find looking for a file in an endless sea of jars you can try this: for f in $(find . -iname '*.jar'); do echo looking for log4j.properties in $f; unzip -t $f;done |grep log4j.properties Assuming you have bash and find and unzip and grep of course. 2. If you are debugging with dhis2-live and want to customize the log level: eg I wanted to append the line log4j.category.org.hisp.dhis.importexport= DEBUG Just poke your custom log4j.properties into the jar like this: zip dhis2-live.jar log4j.properties We live and we learn Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] Ubuntu lucid lynx
Don't know if anyone is planning to early-adopt the latest ubuntu (due out later today), but if you are worried about the much talked about removal of sun-jdk from the standard repos you might take a look at this: http://beeznest.wordpress.com/2010/04/23/howto-install-suns-java-on-ubuntu-lucid-lynx-10-04/ It seems they didn't go completely crazy ... Cheers Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] dhis-openmrs integration
Hi Ime The OpenMRS-DHIS integration is based around exchanging datasets using sdmx-hd. There has been a lot of work done on the sdmx-hd standard itself recently which has required some changes to both the openmrs module and our import export module. I hope to be more or less finished with our import module by Friday - the basics are already on launchpad, but will be more complete by then. The import module itself is fairly generic. The substance of importing lies in the transformation from an xml source to dxf for import. I'm still working on an appropriate place to put those transformations (xslt style sheets) but for the moment they are externally provided on the filesystem. So work is still on - but not complete. Regards Bob On 28 April 2010 10:55, Ime Asangansi asanga...@yahoo.com wrote: Hi Bob and all, Just a quick one, guys. Just wondering where we are on the OpenMRS-DHIS integration. Is work still on? Or is it complete? Is there any place I could see code? Thanks :) Warm regards, Ime --- On Mon, 4/26/10, Bob Jolliffe bobjolli...@gmail.com wrote: From: Bob Jolliffe bobjolli...@gmail.com Subject: [Dhis2-devs] Front end engineering ... To: dhis2-devs dhis2-devs@lists.launchpad.net Date: Monday, April 26, 2010, 1:59 PM Looking at our ajax stuff while tracking ognl issues I notice that we have two copies of request.js: ./dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/request.js ./dhis-web-commons-resources/src/main/webapp/request.js It looks like the dhis-web-maintenance-dataset version was forked off the original and a few changes made. I noticed this because I was trying to set the content type on a request header only to find that it wasn't supported in our (two!) homegrown ajax request components. Two suggestions [which are somewhat contradictory :-) ]: 1. We should merge the request.js changes back into web-commons-resources taking care not to break the many dependencies 2. We are already using jquery quite extensively in the frontend, which has well developed and widely used ajax components. Perhaps we should simply retire request.js entirely. Thoughts? Bob. ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1822: Removed more ognl errors due to un-encoded string parameters being passed.
Please do check that this has not broken functionality of dataset maintenance. I have checked manually as best I can but might have missed something. It seems to me that the designCode is not being used in the target action so there is no need to pass it (if there was then it should have been url-encoded first). Regards Bob On 28 April 2010 13:44, nore...@launchpad.net wrote: revno: 1822 committer: Bob Jolliffe b...@bobj-laptop branch nick: trunk timestamp: Wed 2010-04-28 13:41:49 +0100 message: Removed more ognl errors due to un-encoded string parameters being passed. modified: dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editCustomValues.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/selectDataElement.vm -- lp:dhis2 https://code.launchpad.net/~dhis2-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 === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editCustomValues.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editCustomValues.vm 2010-03-08 14:50:40 + +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editCustomValues.vm 2010-04-28 12:41:49 + @@ -331,9 +331,7 @@ var requestString = 'getSelectedDataElements.action'; var params = 'dataSetId=' + document.getElementById( 'dataSetIdField' ).value; - - params += 'designCode=' + htmlCode; - + request.sendAsPost( params ); request.send( requestString ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/selectDataElement.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/selectDataElement.vm 2009-09-04 10:27:10 + +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/selectDataElement.vm 2010-04-28 12:41:49 + @@ -536,9 +536,7 @@ var requestString = 'getSelectedDataElements.action'; var params = 'dataSetId=' + document.getElementById( 'dataSetIdField' ).value; - - params += 'designCode=' + htmlCode; - + request.sendAsPost( params ); request.send( requestString ); @@ -767,4 +765,4 @@ /tr input type=hidden name=dataSetIdField id=dataSetIdField value=$dataSet.id / /body -/html \ No newline at end of file +/html ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Bug 568335] Re: ognl-error-custom-data-entry-form
** Changed in: dhis2 Status: Confirmed = Fix Committed -- ognl-error-custom-data-entry-form https://bugs.launchpad.net/bugs/568335 You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. Status in DHIS 2 - District Health Information Software: Fix Committed Bug description: I have designed a custom data entry form. When pressing the InsertDataElement button a slew of ognl errors appear. tcpdump and some log messages attached. ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] Front end engineering ...
Looking at our ajax stuff while tracking ognl issues I notice that we have two copies of request.js: ./dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/request.js ./dhis-web-commons-resources/src/main/webapp/request.js It looks like the dhis-web-maintenance-dataset version was forked off the original and a few changes made. I noticed this because I was trying to set the content type on a request header only to find that it wasn't supported in our (two!) homegrown ajax request components. Two suggestions [which are somewhat contradictory :-) ]: 1. We should merge the request.js changes back into web-commons-resources taking care not to break the many dependencies 2. We are already using jquery quite extensively in the frontend, which has well developed and widely used ajax components. Perhaps we should simply retire request.js entirely. Thoughts? Bob. ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Site Specific Browser included with DHIS2 Live?
On 23 April 2010 09:04, Bob Jolliffe bobjolli...@gmail.com wrote: On 23 April 2010 08:54, Jason Pickering jason.p.picker...@gmail.com wrote: I somewhat agree with Bob, but I also see good reasons why packaging a browser is a good idea. There seems to be pretty wide variation between different browsers, and while it is a good idea to support many different ones, it is also a lot of work. If we could focus on being sure that all the browser-related bugs are not present, for instance in Chrome or Firefox, for a particular release, this would ensure that the app is going to work properly in a production environment. I have seen a lot of problems in the field with people installing toolbars, browser hijacking, etc that really is going to complicate deployments unnecessarily. After looking at the code, it seems that setting an environment variable might be the best solution, perhaps. This could be set as part of the installation process. If the environment variable exists (DHIS2_BROWSER) for example, then it would attempt to open up DHIS2 with this. Otherwise, it would default to the current Desktop.getDesktop().browse( URI.create (getUrl() ) ) ); which will simply launch the default browser. I guess this could work with an exec. I'll take a look. Though I am reluctant to depend on the environment variable for the out-of-the-box experience. The nice thing about dhis-live is that you can drop it in and run it. It is this zero-install-fiddling which people like. Setting environment variables is the next level of customisation and sophistication for users. Other possibilities: (i) check for the existence of a portable-firefox folder. If available use that. (ii) open a dialog on first invocation requesting users to pick a browser (I have no idea at this stage how to list them). But that choice would have to be persisted somehow. (iii) ? Of course, this could be made as an option of the installer, whether to install one of these site-specific browsers or not, but I think the advantages outweigh the disadvantages. It is certainly worth testing I think. Regards, Jason On Fri, Apr 23, 2010 at 9:46 AM, Ola Hodne Titlestad olati...@gmail.com wrote: On 22 April 2010 23:28, Bob Jolliffe bobjolli...@gmail.com wrote: On 22 April 2010 19:35, Jason Pickering jason.p.picker...@gmail.com wrote: I think it should probably be a blueprint and I think it is a good idea. It is certainly a problem on many machines I have encounterd in the field. We need to install FireFox, Chrome, Opera or something, and ideally make it the default browser. This seems to be a good idea to me, but can seem a bit drastic to some users. Ideally, the installer would come prepackaged with this browser. When DHI2 Live is launched, instead of making a call to the default browser (which in most cases in IE), assuming that this was installed as part of a special live package, then this browser would get opened instead, thereby launching DHIS2. I am not so sure about the DHIS2 live part, as it simply launches the default browser. Bob? I don't think its very easy to coax dhis2-live to open anything besides the default browser. Not that its impossible, but probably very messy. I'm also not sure we want to get into the browser packaging business. Could the portable firefox package be of any help here? We could put it in a standard location DHIS2Live/firefox/ and start it from there? I have used it for the PHIT and DHIS seems to run fine there. It is set up with all relative paths which should make it easier to distribute as no installation is needed. Ola On Thu, Apr 22, 2010 at 6:32 PM, Knut Staring knu...@gmail.com wrote: Given that DHIS2 runs best in Chrome (especially the Mapping module), and also ok in Firefox, it might be a good idea to make sure people have access to one of these browsers. One way to do that is to package things with Prism (Firefox) or Chrome (or Fluid for Mac http://fluidapp.com/) http://stackoverflow.com/questions/1842277/chrome-application-shortcuts-mozilla-prism-installer What do you guys think? Knut ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- -- Jason P. Pickering email: jason.p.picker...@gmail.com tel:+260968395190 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More
Re: [Dhis2-devs] Site Specific Browser included with DHIS2 Live?
I've got an even simpler suggestion. Why not get the tray app to simply try and exec firefox first (in the hope that it is installed and in the path). If that fails it can try chrome and if that fails open with default browser. From the packaging perspective (and I think packaging is a slightly different concern) , if a packager wants to build a portable-firefox-included version then just be sure that the installer sets the path correctly. I think personally my preference would be to simply include a standard (up to date) firefox install package on the same medium as the dhis2-live. But I do understand the concern about users inadvertently having their default browser switched because they get intimidated by the dialog. Cheers Bob On 23 April 2010 09:55, Ola Hodne Titlestad olati...@gmail.com wrote: I was more thing of the unzip and run package. If there is a folder DHIS2Live/firefox-portable/ I thought we could simply run DHIS in this specific browser with a command on the form: portable-firefox/firefox.exe http://localhost:8080/dhis; Ola -- On 23 April 2010 10:48, Jason Pickering jason.p.picker...@gmail.com wrote: Including the browser as part of the install is trivial. Making it launch, without making it the default browser, is the issue really we are discussing and that will require modification to the DHIS2 tray app. I have currently three different installers in trunk. 1) Windows bare-bones installer that just installs H2 and DHIS2. 2) Windows installer with the H2 Sierra Leone DB 3) A console based installer for Linux. It would be simple enough to produce a fourth, and include a browser of choice. Still working on the postgres installer, but for Zambia, I was planning on distributing FireFox/Opera/Chrome or whatever the devs say is best along with the installer. I did not really want to make this browser the default, unless the user did this theirselves, which most browsers will try and do anyway, which is a bit of a problem. If this feature of Me first, Me first! could be disabled for the SSB, then it sounds like a very good plan to me. Regards, JP On Fri, Apr 23, 2010 at 10:42 AM, Ola Hodne Titlestad olati...@gmail.com wrote: I would still like us to pursue the idea of distributing a portable browser with DHIS2 live to make it easier to get started with DHIS. At least check whether this is doable or not. This would cater for DHIS training and the I want to see what this is scenarios when the users are offline or on poor connections making online demos difficult to use. The installer/production scenario is a bit different I think, but also very important. Ola Hodne Titlestad |Technical Officer| Health Metrics Network (HMN) | World Health Organization Avenue Appia 20 |1211 Geneva 27, Switzerland | Email: titlest...@who.int|Tel: +41 788216897 Website: www.healthmetricsnetwork.org Better Information. Better Decisions. Better Health. On 23 April 2010 10:31, Jason Pickering jason.p.picker...@gmail.com wrote: My suggestion would be to keep it very simple. If the environment variable exists, and is of the form C:\program files\dhis2\ssb\firefox.exe then launch it. This would mean that this would only cater to the situation where someone has installed the program with the installer (which will likely be the case for many production installations) but not always. Otherwise, just fall back and do what is already in the code. On Fri, Apr 23, 2010 at 10:18 AM, Bob Jolliffe bobjolli...@gmail.com wrote: On 23 April 2010 09:04, Bob Jolliffe bobjolli...@gmail.com wrote: On 23 April 2010 08:54, Jason Pickering jason.p.picker...@gmail.com wrote: I somewhat agree with Bob, but I also see good reasons why packaging a browser is a good idea. There seems to be pretty wide variation between different browsers, and while it is a good idea to support many different ones, it is also a lot of work. If we could focus on being sure that all the browser-related bugs are not present, for instance in Chrome or Firefox, for a particular release, this would ensure that the app is going to work properly in a production environment. I have seen a lot of problems in the field with people installing toolbars, browser hijacking, etc that really is going to complicate deployments unnecessarily. After looking at the code, it seems that setting an environment variable might be the best solution, perhaps. This could be set as part of the installation process. If the environment variable exists (DHIS2_BROWSER) for example, then it would attempt to open up DHIS2 with this. Otherwise, it would default to the current Desktop.getDesktop().browse( URI.create (getUrl() ) ) ); which will simply launch the default browser. I guess this could work with an exec. I'll take a look. Though I am reluctant to depend
Re: [Dhis2-devs] Site Specific Browser included with DHIS2 Live?
wot's an SSB? On 23 April 2010 12:30, Knut Staring knu...@gmail.com wrote: On Fri, Apr 23, 2010 at 12:39 PM, Saptarshi Purkayastha sun...@gmail.com wrote: I believe making it cross-browser is better than packaging a browser. Didn't EU tell MS that browser bundling by a majority player is wrong. ;) Nice point. But a SSB is more like a separate application - removes the clutter, user toolbars and plugins, back button etc. On a small screen, the wasted real estate of the top toolbar space seriously affects the usability of DHIS2. An SSB will make it more similar to 1.4 and other desktop apps. In Chrome, just click the page icon in the upper right corner and select Create application shortcuts... to see what I mean. And of course, optionally supplying an (optional) modern browser does not contradict efforts at supporting some of the horrible old ones ;-) Knut Sent from my BlackBerry® -Original Message- From: Jason Pickering jason.p.picker...@gmail.com Date: Fri, 23 Apr 2010 11:37:53 To: Bob Jolliffebobjolli...@gmail.com Cc: DHIS 2 developersdhis2-devs@lists.launchpad.net Subject: Re: [Dhis2-devs] Site Specific Browser included with DHIS2 Live? Yeah, the problem is, how do you know where Chrome/FireFox/etc is? Sounds like we need to read the registry, which sounds even more complicated. My preference would be as follows. 1) Test for the existence of a DHIS2_BROWSER variable. . This will allow packagers to determine which browser the user should use and or advanced users to set the variable on their own if they are so inclined to do so. If it exists, try and use this 2) Test for the existence of the /ssb/firefox.exe file. If it exists, use this. 3) If none of that works, just open the default browser. On Fri, Apr 23, 2010 at 11:31 AM, Bob Jolliffe bobjolli...@gmail.com wrote: I've got an even simpler suggestion. Why not get the tray app to simply try and exec firefox first (in the hope that it is installed and in the path). If that fails it can try chrome and if that fails open with default browser. From the packaging perspective (and I think packaging is a slightly different concern) , if a packager wants to build a portable-firefox-included version then just be sure that the installer sets the path correctly. I think personally my preference would be to simply include a standard (up to date) firefox install package on the same medium as the dhis2-live. But I do understand the concern about users inadvertently having their default browser switched because they get intimidated by the dialog. Cheers Bob On 23 April 2010 09:55, Ola Hodne Titlestad olati...@gmail.com wrote: I was more thing of the unzip and run package. If there is a folder DHIS2Live/firefox-portable/ I thought we could simply run DHIS in this specific browser with a command on the form: portable-firefox/firefox.exe http://localhost:8080/dhis; Ola -- On 23 April 2010 10:48, Jason Pickering jason.p.picker...@gmail.com wrote: Including the browser as part of the install is trivial. Making it launch, without making it the default browser, is the issue really we are discussing and that will require modification to the DHIS2 tray app. I have currently three different installers in trunk. 1) Windows bare-bones installer that just installs H2 and DHIS2. 2) Windows installer with the H2 Sierra Leone DB 3) A console based installer for Linux. It would be simple enough to produce a fourth, and include a browser of choice. Still working on the postgres installer, but for Zambia, I was planning on distributing FireFox/Opera/Chrome or whatever the devs say is best along with the installer. I did not really want to make this browser the default, unless the user did this theirselves, which most browsers will try and do anyway, which is a bit of a problem. If this feature of Me first, Me first! could be disabled for the SSB, then it sounds like a very good plan to me. Regards, JP On Fri, Apr 23, 2010 at 10:42 AM, Ola Hodne Titlestad olati...@gmail.com wrote: I would still like us to pursue the idea of distributing a portable browser with DHIS2 live to make it easier to get started with DHIS. At least check whether this is doable or not. This would cater for DHIS training and the I want to see what this is scenarios when the users are offline or on poor connections making online demos difficult to use. The installer/production scenario is a bit different I think, but also very important. Ola Hodne Titlestad |Technical Officer| Health Metrics Network (HMN) | World Health Organization Avenue Appia 20 |1211 Geneva 27, Switzerland | Email: titlest...@who.int|Tel: +41 788216897 Website: www.healthmetricsnetwork.org Better Information. Better Decisions. Better Health. On 23 April 2010 10:31, Jason Pickering jason.p.picker...@gmail.com wrote: My suggestion would be to keep it very simple
Re: [Dhis2-devs] XSLTForms
Yes this is one of the engines I've been watching ... Its quite nice. On 23 April 2010 16:56, Knut Staring knu...@gmail.com wrote: Looks interesting? http://www.agencexml.com/xsltforms -- Cheers, Knut Staring ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Discussion from OpenMRS list related to data loading, legacy systems, ETL
On 22 April 2010 18:12, Murodullo Latifov murodlati...@yahoo.com wrote: Hi, Good point. I was talking long before on using ETL as generic and flexible way to be used for import/export compared to DXP or similar initiatives going on. There is no one size to fit all, at least for me. Bob did you find any solution so far, as I know you are working on import/export module? No there is no one size fits all. I agree there will be different approaches depending on the size of the data to be imported, the nature of the data source and the nature of the job (one-off vs routine data interchange). For routine interchange then I think we will have a reasonable solution with the dxf-centric approach. For bootstrapping of systems and migration from legacy systems my sense is that it will almost always be a difficult operation where the more skills, tools and experience the implementor has at hand the better off he will be - kettle, sql, xslt, awk .. they will all have their place. What is dxp? regards, murod From: Ola Hodne Titlestad olati...@gmail.com To: DHIS 2 developers dhis2-devs@lists.launchpad.net Sent: Thu, April 22, 2010 3:42:09 PM Subject: [Dhis2-devs] Discussion from OpenMRS list related to data loading, legacy systems, ETL This might be useful input to our ongoing data loading work: http://openmrs-mailing-list-archives.1560443.n2.nabble.com/Re-Details-on-Data-Migration-ETL-Module-tt4867404.html#a4867404 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Site Specific Browser included with DHIS2 Live?
On 22 April 2010 19:35, Jason Pickering jason.p.picker...@gmail.com wrote: I think it should probably be a blueprint and I think it is a good idea. It is certainly a problem on many machines I have encounterd in the field. We need to install FireFox, Chrome, Opera or something, and ideally make it the default browser. This seems to be a good idea to me, but can seem a bit drastic to some users. Ideally, the installer would come prepackaged with this browser. When DHI2 Live is launched, instead of making a call to the default browser (which in most cases in IE), assuming that this was installed as part of a special live package, then this browser would get opened instead, thereby launching DHIS2. I am not so sure about the DHIS2 live part, as it simply launches the default browser. Bob? I don't think its very easy to coax dhis2-live to open anything besides the default browser. Not that its impossible, but probably very messy. I'm also not sure we want to get into the browser packaging business. On Thu, Apr 22, 2010 at 6:32 PM, Knut Staring knu...@gmail.com wrote: Given that DHIS2 runs best in Chrome (especially the Mapping module), and also ok in Firefox, it might be a good idea to make sure people have access to one of these browsers. One way to do that is to package things with Prism (Firefox) or Chrome (or Fluid for Mac http://fluidapp.com/) http://stackoverflow.com/questions/1842277/chrome-application-shortcuts-mozilla-prism-installer What do you guys think? Knut ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- -- Jason P. Pickering email: jason.p.picker...@gmail.com tel:+260968395190 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1785: Audit trail logging functions for DataSet, OrganisationUnit, User modules.
I'm not a maven wizard, but is it possible to give the dependency a scopetest/scope? On 21 April 2010 08:57, Viet Nguyen phamquocv...@gmail.com wrote: No bean named 'org.hisp.dhis.user.CurrentUserService' is defined That bean is defined in dhis-service-user-hibernate module This can be solved by add the dependency in the dhis-service-core pom file dependency groupIdorg.hisp.dhis/groupId artifactIddhis-service-user-hibernate/artifactId /dependency But as discussed , I will have to apply AOP for this audit trail logging, then I will remove the CurrentUserService from other service classes that use audit logging ( User, DataSet, Orgunit ) , then this error will be removed. Lars, is it ok to change the pom file just for the time being ? On Wed, Apr 21, 2010 at 2:13 PM, Quang Nguyen quangnguyen...@gmail.com wrote: On Mon, Apr 19, 2010 at 4:56 PM, nore...@launchpad.net wrote: revno: 1785 committer: Viet v...@viet-laptop branch nick: trunk timestamp: Mon 2010-04-19 16:54:45 +0700 message: Audit trail logging functions for DataSet, OrganisationUnit, User modules. Hi Viet, Seems this commit broke all tests in dhis-service-core. Enclosed is the surefine reports. Could you please have a look? Cheers, Quang added: dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogLevel.java dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogUtil.java modified: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientService.java dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-services/dhis-service-user-hibernate/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java dhis-2/dhis-services/dhis-service-user-hibernate/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/WEB-INF/classes/log4j.properties dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/additional-methods.js dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/jquery.validate.js dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addSection.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidatePatientAction.java The size of the diff (1144 lines) is larger than your specified limit of 1000 lines -- lp:dhis2 https://code.launchpad.net/~dhis2-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 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- Viet Nguyen ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Pagination patch
Hi On 21 April 2010 06:44, Jason Pickering jason.p.picker...@gmail.com wrote: Hi Viet, This is good news. So, my suggestion would be as follows. 1) Use the user settings to determine what the initial sorting should be. Retrieve the first block of data based on whatever the user settings are when the user enters the page. At this point there would be no filter. 2) Should the user apply a filter, a new block of data would need to be retrieved, based on the user input. One thing that I have noticed is that there should be some sort of delay implemented until the user finishes typing. It would be inefficient to send an AJAX request each time the user types a character, but the request should be generated once the user stops typing. This might require some experimentation. My browser sort of does a hiccup each time I filter on the data element list, as it filters after the input of each character. If it would be possible to wait until the user actually finishes typing, and then make the filter, this might result in a better user experience. On a slow machine of mine, Firefox has crashed several times while trying to filter the data element list. This is one of the reasons I keep pushing so hard for this feature. :) Haven't yet looked at the code but yes you do need to have some sort of software hysteresis on these Ajax kind of things to prevent excessive chatter and synchronisation problems. Part of the challenge is choosing the right amount of delay (and/or number of characters typed) to make the system behave reasonably in different network environments. In very high latency internet environments (like for example a lot of the Indian deployment) doing this auto dispatching of ajax requests would need to be tuned quite differently (or switched off) compared to running the app on the same workstation as the browser. I suspect the best short term solution is to be able to switch automatic filtering on and off. (Crazy aside: Ideally it would be *nice-to-have* a sort of adaptive timeout which recalibrates itself against the measured round-trip times of the ajax request/response. This is the same problem which TCP solves in the calculation of its timeouts. [To save myself recalculating - if I was writing a program in C on linux - I could use getsockopt(TCP_INFO) ] Nevertheless, implementing a similar algorithm in javascript working on the ajax RTTs is not beyond the bounds of reason. I guess I'd keep the time in a hidden div on the page with id='RTT'. Each time I sent a request I'd include a timestamp. On receiving the response I'd compare timestamp with current time and update the RTT. Of course RTTs can have considerable variance so I'd probably want to do what TCP does and keep a moving weighted average to avoid spikes causing me to set ridiculous timeouts.) 3) I would think it would be desirable to view all results (the current view that we have) as well. 4) When I saw this with Murod in Tajikistan a few weeks back, I did not pay attention to the details. But, it would be very nice to be able to filter/search on other properties of the object. This is a nice to have feature. Right now, we can only filter on the name but there are situations when you need to filter the data element code for instance. Not sure if this is possible. As Lars has detailed in a previous mail, a separate branch should probably be made for this. Although I think it is a good and needed feature, it may result in worse performance due to the roundtrips between the client and the server that will be required each time a new page needs to be generated. For large lists, i.e. patients and data elements, it would seem to make sense in theory, but may actually be worse than loading the entire DOM into the browser and filtering on the client side. I think with lists like patients you really cannot get away from server side pagination. Cheers Bob I would be of course available to test this with you. Lastly, thanks for taking a look at this. Regards, Jason On Wed, Apr 21, 2010 at 7:22 AM, Viet Nguyen phamquocv...@gmail.com wrote: Hi Jason, I planed to move this to common ... but...somehow forgot it sorry :( Will do it asap. Something I would like to note here for sorting and filter functions. When we apply the paging, we need to sort from database, so there will be many changes in service methods. And for filter function, this is the most thing I have been worry about . Because we should not just filter in current page. I think we need to use ajax here. At this point, filter would be similar to search function, the only different thing is it effects on the fly. When user type something in filter text box, we get the result from database, then sort and paging that list, then return to the view. What do you think about this ? -- -- Jason P. Pickering email: jason.p.picker...@gmail.com tel:+260968395190
Re: [Dhis2-devs] [Bug 567080] [NEW] dataset-section-no-sorting
Hi 2010/4/21 Lars Helge Øverland larshe...@gmail.com: Hi Jason, I think your problem is that the available data elements list is not sorted, right? I have fixed this, someone simply forgot to put in the sorting code in the action. Bob, I agree that dataset should have been dataelementset. Changing it will take a lot of work. I know. I think dataset is also now deeply embedded in the culture of HISP so it might even be counter-productive to change it. I guess if we need an abstraction for a set of data values we'll call it something like dataValueSet. Also agree that view-related attributes of a data(element)set should be in a different object. This will as Ola says be worked on for 2.0.5. Lars On Tue, Apr 20, 2010 at 2:30 PM, Ola Hodne Titlestad olati...@gmail.com wrote: On 20 April 2010 13:04, Jason Pickering jason.p.picker...@gmail.com wrote: Hi Ola, Here is what i am trying to do. I have a paper data collection form that i am implementing as a custom data entry screen. Pretty simple in practice, but is laborious to implement because 1) We do not have multidimensional/category combo type data elements here and 2) The sort order of the data elements is all jumbled up. I want to break up the dataset, which is rather large, into sections that correspond to two separate pages of the paper aggregation form. Why? Well, it is not entirely necessary I guess, since I am using a custom data entry form, but some users actually prefer to use the default form instead of the custom form. I want to be sure that the data elements are ordered properly and they have appropriate sections. Thus, I figured that the data set sections would do this for me. Sound reasonable to use the data set sections for this yes. If you imported the custom sort order for the full list of data elements from 1.4 to 2 then you can turn on custom system wide sort order and that sort order should(!) then be respected by all modules and lists, including the data set section edit lists and the data entry form. That is how it is supposed to be at least. Perhaps this is totally unnecessary, but it still does not mean that this bug is not valid. The list remains totally unordered, so if people want to have a data set section for whatever reason, it should be presented in some form that makes sense. Seems Bob may have already figured it out. Yes, as I said these lists in data set section edit should also respect the system wide sort order, so this seems like a bug. Why would that be important if it has nothing to do with the order in the form? And again, why use the section at all? Well, maybe you can enlighten us then as to the use of data set sections? I assumed that it was for the purpose I am trying to achieve, but perhaps not. My point was that it is the sort order in the default form that matters the most, right? But of course I agree that the lists in the data set edit should also be sorted and easy to browse. Was just confused by the statement that it was not the ordering in the form that was important. If you take a look at the datasetmembers table, there is no sortorder field, unlike DHIS1.4. DHIS 1.4 has both a sort order in the data elements table, as well as the equivalent of the datasetmembers table. Yes, I am aware of this difference, and I guess I can understand that is sometimes is useful to have a different sort order among data elements in a dataset than when they appear in a full list. Although I am not sure how often that is actually the case. A few years back we had a quite different data set model in DHIS2 and then we had an object called datasetelement. To this object we could attach other properties such as sortorder. This object no longer exists and as such the model does not support any other properties on the individual data elements belonging to a specific dataset. If I remember correctly this new rationale behind the change of model was to simplify what had become a very comlicated data set model and removing the datasetelement sort order thing was traded for simplicity. After all in most cases the sort order for a full list of data elements would still be valid when looking at a subset of those data elements. I think sort order in forms will be a major part of the new form model , and as Bob writes, should be part of the form (e.g. form elements with various properties) and not the data model. The new form model will most likely not be ready for 2.0.5,at least per the discussion we had in Oslo some weeks back, but some interim fixes will be there as stated in the blueprint. It would just be very useful to be able to resort the data elements (and all objects for that matter) in the browser itself. Sort by name (Ascending, descending), sort by code, sort by sort order, etc. When I was in Tajikistan, I thought that Murod has sent some code for server side filtering and ordering. Not sure what happened to it, but that
Re: [Dhis2-devs] Pagination patch
2010/4/21 Jason Pickering jason.p.picker...@gmail.com: Hi Lars, I will write up the blueprint. It is becoming my specialty. :) Personally, I think the filter button is a good thing to test. The on-the-fly filtering is really causing me a lot of headaches. On Ubuntu, on a relatively slow machine, the browser greys out while performing a filter, sometimes for a minute or so. This does not seem like a particularly complicated operation, but it is very annoying, and the user has no idea what is happening. The machine just freezes for a few seconds when filtering on data elements. Should maybe not throw out the baby with the bathwater. What you describe shouldn't really happen - that's meant to be the asynchronous in Ajax - and could well be a problem with our implementation. So I'd go for an optional button - perhaps driven by a general system-wide setting No-Ajax-Please which could be used in other parts of the UI as well. I am experiencing a very high latency environment right now, so it may be a while before I can get launchpad to work. I had some problems with launchpad last night. I think sometimes it just gets bewildered. Cheers Bob Regards, Jason 2010/4/21 Lars Helge Øverland larshe...@gmail.com: Hi, agreed that pagination is needed on long lists like data elements and indicators. Jason, could you take the bother to write a blueprint? I guess you have almost done it with your last mail. Re the filtering I think we are mixing this up a bit. Currently filtering happens on the client side. It can continue to do that even if we use pagination as the filter function simply moves elements back and forth from a hidden list. Also, currently we have on-the-fly filtering. Would it be simpler if we just have a button which says Filter instead, ie letting the user decide when to perform the filtering? Easier and maybe better? Agree that this is important and that we really need to improve usability/performance in high latency internet environments. Downloading the data element list with 1000 elements can be around 1 MB which is unacceptable. We have currently reduced the amount of html in the page + made the delete function ajaxified in order to avoid reloading the list, but more must be done. Lars -- -- Jason P. Pickering email: jason.p.picker...@gmail.com tel:+260968395190 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Bug 567080] [NEW] dataset-section-no-sorting
Maybe throwing unwarranted cats amongst pigeons here as it is not code I am directly working on (well I am sort of with import), but it bothers me to see all of this business of display sort order being some sort of structural characteristic of the data (set, section or what have you). I have expressed this opinion before, but the way things are displayed should really be determined by (and persisted with) a form object of some sort. Dataset to me seems to be quite a confused platypus (well it makes me a confused platypus anyway ..). Here are a few of my reasons: (i) before I get jumped on for getting anal about names again I'm going to throw this one in - its not really a set of data at all. If anything its a set of datelements though dataelementset sounds a bit clumsy I know. Now one could say whats in a name and does it really matter, and it doesn't until you want to find an abstraction for really representing a dataset - ie a set of datavalues which has been collected off a form or imported in one go. I guess one could always call that a datavalue set but things start to look silly. Having such a concept is not really an off the wall blue-sky requirement. The concept of dataset as a set of data is out there in the world we want to interact with - eg sdmx, xforms etc. (ii) it is kind of unclear whether dataset (as we currently understand it) is a component of the model or the view. I think we use it as a kind of bridge between the two which can become confusing. Mostly it seems there is a 1-1 correspondence between datasets and forms or collection instruments. It would be better to make that relationship more explicit. (iii) we can take some inspiration from xforms where a considerable amount of time, expertise and review has, one hopes, distilled some nuggets of best practice around the representation of forms and form data. Xforms identifies (1) the form, which contains (2) the model and produces (3) the model instance data. Rendering the form (via the web, thick-gui or on a phone) is determined by the host language for the form. Our dataset strikes me as being analogous to the model for a collection instrument. So returning to the original question. Where should one articulate the ordering of elements? Within the dataset and or its sections? I don't think so. Partly because one can - and we do - export dataset (metadata) and import corresponding data where the ordering of the datavalues is completely irrelevant. Just saw Ola's mail re the blueprint ... I'll stop here and look there. Cheers Bob On 20 April 2010 09:31, Jason Pickering jason.p.picker...@gmail.com wrote: This may actually be a problem due to the way that the data elements were sorted in DHIS 1.4. 1.4 allows you to specify both a sorting order in the dataelement table, as well as the equivalent of the datasetmembers table. A global (system) setting allows one to chose how they should be displayed in lists. Our data elements were sorted correctly according to the dataset, but as far as I can tell, DHIS2 does not support sorting of data elements by data set (at least there is no field in datasetmembers that would support this) On the datasetsection page, the ordering that is presented to me, is not in alphabetical order the SECOND time I enter the page. The first time, everything is ordered alphabetically (user setting), the second time around, the ordering is completely mixed up. I would expect it to follow the user setting (alphabetical) but this does not seem to be the case. I agree that it should probably be a system setting, similar to DHIS1.4. On Tue, Apr 20, 2010 at 10:16 AM, Ola Hodne Titlestad olati...@gmail.com wrote: Hi, My understanding of this is that you can apply the system wide custom sort order to data elements in a data set section. In user settings you can set the sort order to be custom and then go to MaintenanceData Elements and sort the elements in the full list there. Then the data elements in the data set section (or data set) will be sorted according to their global sort order when listed in a default data entry form. My only concern with this is that the sort order is a user setting and not a system setting so different users doing data entry might experience different sort order, which may not be desired in data entry forms. Ola Hodne Titlestad |Technical Officer| Health Metrics Network (HMN) | World Health Organization Avenue Appia 20 |1211 Geneva 27, Switzerland | Email: titlest...@who.int|Tel: +41 788216897 Website: www.healthmetricsnetwork.org Better Information. Better Decisions. Better Health. On 20 April 2010 10:08, Hieu Dang Duy hieu.hispviet...@gmail.com wrote: Dear Jason, Actually, this ordering is completely belongs to your action during on sorting data elements in the selected list. For example; Assuming that, there are five data elements such as: A, B, C, D and E in the available list. Then, if select each element
Re: [Dhis2-devs] [Bug 567080] [NEW] dataset-section-no-sorting
On 20 April 2010 08:12, jason.p.pickering jason.p.picker...@gmail.com wrote: Public bug reported: When creating a data set section, there is no logical ordering applied to the data elements. The first time I created the dataset section, they appeared to be ordered alphabetically. When I saved and edited the dataset again, the ordering is completely jumbled up. After chatting with Jason I realise my recent tirade was mis-focussed. Jason is concerned here about ordering in the dataset section maintenance module (not the form itself). Currently we have: private ListString selectedList = new ArrayListString(); private ListDataElement dataElements = new ArrayListDataElement(); in the various action classes. I suspect changing List? to SortedSet? will provide a quick fix. Just trying now ... Bob. ** Affects: dhis2 Importance: Undecided Status: New -- dataset-section-no-sorting https://bugs.launchpad.net/bugs/567080 You received this bug notification because you are a member of DHIS 2 coordinators, which is the registrant for DHIS. Status in DHIS 2 - District Health Information Software: New Bug description: When creating a data set section, there is no logical ordering applied to the data elements. The first time I created the dataset section, they appeared to be ordered alphabetically. When I saved and edited the dataset again, the ordering is completely jumbled up. -- dataset-section-no-sorting https://bugs.launchpad.net/bugs/567080 You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. Status in DHIS 2 - District Health Information Software: New Bug description: When creating a data set section, there is no logical ordering applied to the data elements. The first time I created the dataset section, they appeared to be ordered alphabetically. When I saved and edited the dataset again, the ordering is completely jumbled up. ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Bug 567080] [NEW] dataset-section-no-sorting
On 20 April 2010 12:04, Jason Pickering jason.p.picker...@gmail.com wrote: Hi Ola, Here is what i am trying to do. I have a paper data collection form that i am implementing as a custom data entry screen. Pretty simple in practice, but is laborious to implement because 1) We do not have multidimensional/category combo type data elements here and 2) The sort order of the data elements is all jumbled up. I want to break up the dataset, which is rather large, into sections that correspond to two separate pages of the paper aggregation form. Why? Well, it is not entirely necessary I guess, since I am using a custom data entry form, but some users actually prefer to use the default form instead of the custom form. I want to be sure that the data elements are ordered properly and they have appropriate sections. Thus, I figured that the data set sections would do this for me. Perhaps this is totally unnecessary, but it still does not mean that this bug is not valid. The list remains totally unordered, so if people want to have a data set section for whatever reason, it should be presented in some form that makes sense. Seems Bob may have already figured it out. Thought I had but now I'm a bit confused :-( There are three things which could be sorted (and sorted with different criteria eg. by id, by name, by categorycombo, by ad-hoc sortorder) : (i) the panel of available dataelements (ii) the panel of selected dataelements (iii) the display and/or navigation order on the default form Which is it? Regards Bob Why would that be important if it has nothing to do with the order in the form? And again, why use the section at all? Well, maybe you can enlighten us then as to the use of data set sections? I assumed that it was for the purpose I am trying to achieve, but perhaps not. If you take a look at the datasetmembers table, there is no sortorder field, unlike DHIS1.4. DHIS 1.4 has both a sort order in the data elements table, as well as the equivalent of the datasetmembers table. It would just be very useful to be able to resort the data elements (and all objects for that matter) in the browser itself. Sort by name (Ascending, descending), sort by code, sort by sort order, etc. When I was in Tajikistan, I thought that Murod has sent some code for server side filtering and ordering. Not sure what happened to it, but that is exactly what would be useful to have in these situations. Regards, Jason On Tue, Apr 20, 2010 at 11:29 AM, Ola Hodne Titlestad olati...@gmail.com wrote: Jason, What are you trying to achieve using the dataset sections? Ola Hodne Titlestad |Technical Officer| Health Metrics Network (HMN) | World Health Organization Avenue Appia 20 |1211 Geneva 27, Switzerland | Email: titlest...@who.int|Tel: +41 788216897 Website: www.healthmetricsnetwork.org Better Information. Better Decisions. Better Health. On 20 April 2010 11:19, Jason Pickering jason.p.picker...@gmail.com wrote: Sounds good, but I need to fix this now. Will have a look myself and see what can be done in the interim. Creating a dataset section is nigh impossible with several hundred elements unsorted. On 4/20/10, Ola Hodne Titlestad olati...@gmail.com wrote: Hi, Note that there is a planned revamp of the whole forms/dataset model quite soon and this blueprint for 2.0.5 covers at least improved functionality in terms of defining the layout of default forms, incl. sort order: https://blueprints.launchpad.net/dhis2/+spec/improved-forms The goal is to be able to use the default tabular forms as much as possible, since that will save us all a lot of time. These default tabular forms should be (as it they are today) generated off a data set with data elements and one or more category combos, but we need to provide the form designers with more options in terms of disabling certain fields, sort order of data elements, pivoting of the table (option to have data elements on columns and categories on rows). The idea is to use custom forms (which take a lot more time to design) only when its not possible to generate the form off the data set and some additional (and not too complicated) layout choices. Most tabular forms should be possible to auto generate. Feel free to add to the blueprint. Ola Hodne Titlestad |Technical Officer| Health Metrics Network (HMN) | World Health Organization Avenue Appia 20 |1211 Geneva 27, Switzerland | Email: titlest...@who.int|Tel: +41 788216897 Website: www.healthmetricsnetwork.org Better Information. Better Decisions. Better Health. On 20 April 2010 10:31, Jason Pickering jason.p.picker...@gmail.com wrote: This may actually be a problem due to the way that the data elements were sorted in DHIS 1.4. 1.4 allows you to specify both a sorting order in the dataelement table, as well as the equivalent of the datasetmembers table. A global (system) setting allows
[Dhis2-devs] [Bug 567197] [NEW] Editing dataset sections does not persist
Public bug reported: When I create a new section and add dataelements to it and press save the new section is saved. When I retrieve that section I do see the available and selected dataelements (though a bug in the ordering has been reported - https://bugs.launchpad.net/bugs/567080). I can remove and add dataelements to the selected panel but nothing is happening when I press save and no changes get persisted, ** Affects: dhis2 Importance: Undecided Status: New -- Editing dataset sections does not persist https://bugs.launchpad.net/bugs/567197 You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. Status in DHIS 2 - District Health Information Software: New Bug description: When I create a new section and add dataelements to it and press save the new section is saved. When I retrieve that section I do see the available and selected dataelements (though a bug in the ordering has been reported - https://bugs.launchpad.net/bugs/567080). I can remove and add dataelements to the selected panel but nothing is happening when I press save and no changes get persisted, ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Bug 567197] Re: Editing dataset sections does not persist
** Changed in: dhis2 Assignee: (unassigned) = Bob Jolliffe (bobjolliffe) -- Editing dataset sections does not persist https://bugs.launchpad.net/bugs/567197 You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. Status in DHIS 2 - District Health Information Software: New Bug description: When I create a new section and add dataelements to it and press save the new section is saved. When I retrieve that section I do see the available and selected dataelements (though a bug in the ordering has been reported - https://bugs.launchpad.net/bugs/567080). I can remove and add dataelements to the selected panel but nothing is happening when I press save and no changes get persisted, ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Bug 567197] Re: Editing dataset sections does not persist
** Changed in: dhis2 Status: New = Fix Committed -- Editing dataset sections does not persist https://bugs.launchpad.net/bugs/567197 You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. Status in DHIS 2 - District Health Information Software: Fix Committed Bug description: When I create a new section and add dataelements to it and press save the new section is saved. When I retrieve that section I do see the available and selected dataelements (though a bug in the ordering has been reported - https://bugs.launchpad.net/bugs/567080). I can remove and add dataelements to the selected panel but nothing is happening when I press save and no changes get persisted, ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1785: Audit trail logging functions for DataSet, OrganisationUnit, User modules.
Hi Viet This is excellent. When we first started discussing using logging framework for audit you pointed out that logging is most commonly used for system info/diagnostics/debugging. Which is true. Of course logging works pretty well for audit as well, but I was thinking (influenced by http://www.mail-archive.com/gene...@logging.apache.org/msg00747.html) that it makes sense to use a distinct logger, rather than one based after the class name, for this. So for example instead of where you have: private Logger logger = Logger.getLogger( getClass() ); I was thinking something more like private Logger audit_logger = Logger.getLogger( AUDIT_LOG ); // where AUDIT_LOG is a globally accessible string Or considering that the audit_logger could be thought of as a singleton throughout the system, just use a setter and configure by spring. Or a static getLogger method on a simple AuditLogger class. However, I see you have extended Level to produce a new AUDIT_LEVEL and routed that to a distinct log appender which I can see also works well to manage the output of logging in a discriminatory way. That's pretty cool. I'm still in two minds whether the enabling of audit should be related to the debug level you want to have on diagnostics though. I might reasonably want to turn audit off and debug on for example. For which I'd want a distinct audit logger. Maybe that's not reasonable. What do you think? Cheers Bob On 19 April 2010 10:56, nore...@launchpad.net wrote: revno: 1785 committer: Viet v...@viet-laptop branch nick: trunk timestamp: Mon 2010-04-19 16:54:45 +0700 message: Audit trail logging functions for DataSet, OrganisationUnit, User modules. added: dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogLevel.java dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogUtil.java modified: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientService.java dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-services/dhis-service-user-hibernate/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java dhis-2/dhis-services/dhis-service-user-hibernate/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/WEB-INF/classes/log4j.properties dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/additional-methods.js dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/jquery.validate.js dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addSection.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidatePatientAction.java The size of the diff (1144 lines) is larger than your specified limit of 1000 lines -- lp:dhis2 https://code.launchpad.net/~dhis2-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 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1785: Audit trail logging functions for DataSet, OrganisationUnit, User modules.
Hi Viet On 19 April 2010 13:47, Viet Nguyen phamquocv...@gmail.com wrote: On Mon, Apr 19, 2010 at 5:51 PM, Bob Jolliffe bobjolli...@gmail.com wrote: Hi Viet This is excellent. When we first started discussing using logging framework for audit you pointed out that logging is most commonly used for system info/diagnostics/debugging. Which is true. Of course logging works pretty well for audit as well, but I was thinking (influenced by http://www.mail-archive.com/gene...@logging.apache.org/msg00747.html) that it makes sense to use a distinct logger, rather than one based after the class name, for this. So for example instead of where you have: private Logger logger = Logger.getLogger( getClass() ); I was thinking something more like private Logger audit_logger = Logger.getLogger( AUDIT_LOG ); // where AUDIT_LOG is a globally accessible string Or considering that the audit_logger could be thought of as a singleton throughout the system, just use a setter and configure by spring. Or a static getLogger method on a simple AuditLogger class. However, I see you have extended Level to produce a new AUDIT_LEVEL and routed that to a distinct log appender which I can see also works well to manage the output of logging in a discriminatory way. That's pretty cool. I'm still in two minds whether the enabling of audit should be related to the debug level you want to have on diagnostics though. I might reasonably want to turn audit off and debug on for example. For which I'd want a distinct audit logger. Maybe that's not reasonable. What do you think? Cheers Bob For your first concern, I think using AOP can solve it. Lars also told me about that. I will try to apply AOP to this. About distinct audit logger, I don't know how to use two different loggers in one application... Unless I manually create a logger class ( create file, write logging message to that fileetc.. ) which I did before in my old project... I am no expert on log4j but it seems that fortunately it's not as complicated as you expect. And you are already using a great many different loggers in one application!. Its just that each one is is typically named after the class in which it is used. That is the normal and natural way to configure logging for diagnostics. And all these named loggers form themselves into a hierarchical tree on top of the root logger. So typically we have many loggers with names like: org.hisp.dhis.dataset.DefaultDataSetService, org.hisp.dhis.importexport.DefaultDhis14XMLImportService etc The nice thing about this is that one can use the inheritance in the tree to fine tune what goes on in branches of the tree. So for example I should be able to set logging level to DEBUG for all loggers below org.hisp.dhis.importexport. So having loggers in a tree is cool, but what is also cool is that you can structure that tree using whichever strings are appropriate. For diagnostic purposes it is generally structured according to class/package names. But you can equally have loggers called security.audit, security.alarm or security.core.audit and security.web.audit etc, There is no difference in the code. And the log4j properties will work as before except that you can (optionally) override the root logger if you want to configure the security logs separately from the diagnostic system logs. Anyway I agree that its really not critical and the really good thing is that you have implemented the audit logging. I guess I'm just trying to set your mind at rest that you might not think you know how to work with multiple loggers but in fact you do. If at some stage in the future we want to separate the audit logger from the rest it will be simple. If we do that I would be tempted to bring the audit levels and audit utils stuff together into an AuditLog class. Cheers Bob BTW I am not meaning to be critical. At least it shows I looked at the code :-) Anyway...turning debug on and audit offis not really a common use I think ... I always want to see everything when I turn debug on ... And when you are debugging , means that you don't work on production server, so it will not effect the production logging files... However, I will google more about using two different loggers in one application, should be interesting. Anyway ...I have to back with STQC bugs now ...so could we consider that committed code as a beta version of this audit trail logging ... On 19 April 2010 10:56, nore...@launchpad.net wrote: revno: 1785 committer: Viet v...@viet-laptop branch nick: trunk timestamp: Mon 2010-04-19 16:54:45 +0700 message: Audit trail logging functions for DataSet, OrganisationUnit, User modules. added: dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogLevel.java dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system
Re: [Dhis2-devs] can't run with the latest DHIS2 source-code
Looks like a typo here. oorg? Cannot find class [oorg.hisp.dhis.dataadmin.action.minmaxvalidation.UnselectLevelAction] On 12 April 2010 07:05, Kim-Anh Vo cata...@gmail.com wrote: Dear all, here is the log (attached!) -- -- Best regards, Kim-Anh Vo +84.906612246 k...@ifi.uio.no Coordinator of HISP(hisp.info) in Vietnam Master of Information Systems at the University of Oslo join facebook at www.facebook.com join LinkedIn at www.linkedin.com ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Multiple connections to H2
I had a go at this earlier with reasonable success. You have to make an uncompressed pg dump with insert statements (these are both optional parametrs to pg_dump). Some very slight adjustment to the structural metadata - I'll document later if people are interested - and then tried to import data. Only one snag - pg has its own peculiar way of handling binary strings (bytea fields) which h2 doesn't emulate. Can't blame h2 too much - what pg does is a bid weird. This affects systemsettings, usersettings and reportsettings. Other than that I imported 1.5 million datavalues and associated dataelements, orgunits etc. The h2 guys are aware of the bytea compatibility problem and have the issue roadmapped - apparently they will bump it if it something people request. I guess I should request. If I was really pushed I could write a script to find all the binary strings in the pg dump and try to convert them to something h2 is happy with. Having said that, I think all the places where we currently use binary strings are really unnecessary (storing evil java serialized objects) which I think have a historical rationale. It should be relatively easy and desirable to change these - particularly as we also want to represent these things in xml - but we'd have to consider the effect on compatibility with legacy dhis databases which have the blobs. I guess we'd need an upgrade script of some sort. So the prognosis is good but not quite seamless yet. Cheers Bob BTW how did you make the demo db? 2010/4/12 Lars Helge Øverland larshe...@gmail.com: I see H2 can be run in PostgreSQL mode by appending ;MODE=PostgreSQL to the connection URL: http://www.h2database.com/html/features.html#compatibility Could be interesting to try to import the pgdump using this.. Lars ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Multiple connections to H2
2010/4/12 Lars Helge Øverland larshe...@gmail.com: 2010/4/12 Bob Jolliffe bobjolli...@gmail.com I had a go at this earlier with reasonable success. You have to make an uncompressed pg dump with insert statements (these are both optional parametrs to pg_dump). Some very slight adjustment to the structural metadata - I'll document later if people are interested - and then tried to import data. Only one snag - pg has its own peculiar way of handling binary strings (bytea fields) which h2 doesn't emulate. Can't blame h2 too much - what pg does is a bid weird. This affects systemsettings, usersettings and reportsettings. Other than that I imported 1.5 million datavalues and associated dataelements, orgunits etc. The h2 guys are aware of the bytea compatibility problem and have the issue roadmapped - apparently they will bump it if it something people request. I guess I should request. If I was really pushed I could write a script to find all the binary strings in the pg dump and try to convert them to something h2 is happy with. Having said that, I think all the places where we currently use binary strings are really unnecessary (storing evil java serialized objects) which I think have a historical rationale. It should be relatively easy and desirable to change these - particularly as we also want to represent these things in xml - but we'd have to consider the effect on compatibility with legacy dhis databases which have the blobs. I guess we'd need an upgrade script of some sort. So the prognosis is good but not quite seamless yet. Cheers This is great news. The system settings should def be no show-stopper here. First they could simply be omitted as they probably will be set individually anyway, second we could migrate to string as we have never really used objects as settings. Hi Lars True. system settings should be least disruptive. Sorry I meant reporttable (rather than report setting!). We are using a serialized java object to represent the dimension type which also seems a bit strange. How do (non java) db clients like excel deal with these? I'll have another look tomorrow, but you will know better the rationale. I'm guessing its related to the whole casting thing that we are doing with dimensions. Cheers Bob Lars ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Multiple connections to H2
Knut OK in the cold light of day it seems I was quite wrong about how I understood the auto_server to work. The tcp stuff is in fact a distraction and apparently not related to auto_server at all - the h2 driver uses file locking to manage concurrent connections directly to the db file. So in fact what works is NOT to use tcp and to make sure that each connecting client appends ;AUTO_SERVER=TRUE to the url. tcp will also work but then we are in fact using vanilla server mode. So I have currently in dhis2 hibernate.properties jdbc:h2:./database/newh2;AUTO_SERVER=TRUE. And I can connect to the same database using the h2 client and through openoffice using jdbc:h2:~/dhis2-live/database/newh2;AUTO_SERVER=TRUE Try that. It seems things are simpler than I initially imagined. And so we learn Bob BTW I just imported a 121M h2 database off a postgres sql dump. Not completely trouble free but but nearly. There are a few incompatibilities which prevented me from importing the report tables. On 11 April 2010 13:02, Knut Staring knu...@gmail.com wrote: Not quite untangling this yet. Since it is working for you on Linux, I tried that now. I first start DHIS Live with the default URL: Then I start the H2 console. The following URL does not work, as expected: jdbc:h2:../../dhis-live/database/dhis3 But this one does: jdbc:h2:../../dhis-live/database/dhis3;AUTO_SERVER=TRUE However, this one does not work (with or without ;AUTO_SERVER=TRUE) jdbc:h2:tcp://localhost/~/Desktop/dhis-live/database/dhis3 Curiously, after the ~ gets substituted with /home/knutst/, the H2 console does not seem to find anything, and connects me with an empty database: jdbc:h2:tcp://localhost/home/knutst/Desktop/dhis-live/database/dhis3 This is increasingly baffling... On Sat, Apr 10, 2010 at 11:44 PM, Bob Jolliffe bobjolli...@gmail.com wrote: On 10 April 2010 22:41, Knut Staring knu...@gmail.com wrote: Well, if I start DHIS Live with the following URL in hibernate.properites jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7;AUTO_SERVER=TRUE I am then able to connect from H2 console with: jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7 This at least works for my needs - do you see a problem with doing it that way? Yes. The dhis2 connection will be considerably slower using tcp than accessing the db file directly in embedded mode. Get rid of the tcp stuff in dhis2 and go back to the way you had it. Trust me it will work :-) On Sat, Apr 10, 2010 at 11:35 PM, Bob Jolliffe bobjolli...@gmail.com wrote: On 10 April 2010 22:26, Knut Staring knu...@gmail.com wrote: Ok, it works now - the trick was to use the same URL also in hibernate.properties, i.e. jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7;AUTO_SERVER=TRUE No that's not the trick!! In hibernate properties you want: jdbc:h2:./database/kenya7;AUTO_SERVER=TRUE And for subsequent connections (eg console) you want: jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7 Note the lack of AUTO_SERVER=TRUE. You only want one process (dhis2) to act as server. The tcp connection is just for clients. On Sat, Apr 10, 2010 at 11:23 PM, Knut Staring knu...@gmail.com wrote: Almost...maybe it is subtly different on Windows? If I start the H2 console first like below, I can then proceed to also start DHIS Live, and I see changes I make in DHIS show up in the console: jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7;AUTO_SERVER=TRUE However, if I start DHIS2 Live first, I am not allowed to connect in the console. I can start in the console, then DHIS, log out of the console and log in again (i.e. access both at the same time). I just need to do the initial startup with the console. 2010/4/10 Bob Jolliffe bobjolli...@gmail.com 2010/4/10 Bob Jolliffe bobjolli...@gmail.com: I've also had this problem but I doubt if the bindaddress has anything to do with it. By default the server socket will be bound to INADDR_ANY. (This is the same as the tomcat security issue I referred to some time back). Will investigate ... Bob 2010/4/10 Lars Helge Øverland larshe...@gmail.com: I have had the same problem. Why don't you test it, you can set props from the command line when starting live.. 2010/4/10, Knut Staring knu...@gmail.com: I am unable to connect to the H2 database through the H2 console while DHIS2 is running, despite AUTO_SERVER being indicated in hibernate.properties (default for DHIS Live). From the following message, it seems that perhaps we need to set System.setProperty(h2.bindAddress, ...) before loading the org.h2.Driver class (and before starting the server) OK. Here goes ... I saw that there were a few hits on google about this problem including
Re: [Dhis2-devs] Multiple connections to H2
I've also had this problem but I doubt if the bindaddress has anything to do with it. By default the server socket will be bound to INADDR_ANY. (This is the same as the tomcat security issue I referred to some time back). Will investigate ... Bob 2010/4/10 Lars Helge Øverland larshe...@gmail.com: I have had the same problem. Why don't you test it, you can set props from the command line when starting live.. 2010/4/10, Knut Staring knu...@gmail.com: I am unable to connect to the H2 database through the H2 console while DHIS2 is running, despite AUTO_SERVER being indicated in hibernate.properties (default for DHIS Live). From the following message, it seems that perhaps we need to set System.setProperty(h2.bindAddress, ...) before loading the org.h2.Driver class (and before starting the server) http://groups.google.com/group/h2-database/msg/7526244fde1a0e58 -- Cheers, Knut Staring -- Sendt fra min mobile enhet ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Multiple connections to H2
2010/4/10 Bob Jolliffe bobjolli...@gmail.com: I've also had this problem but I doubt if the bindaddress has anything to do with it. By default the server socket will be bound to INADDR_ANY. (This is the same as the tomcat security issue I referred to some time back). Will investigate ... Bob 2010/4/10 Lars Helge Øverland larshe...@gmail.com: I have had the same problem. Why don't you test it, you can set props from the command line when starting live.. 2010/4/10, Knut Staring knu...@gmail.com: I am unable to connect to the H2 database through the H2 console while DHIS2 is running, despite AUTO_SERVER being indicated in hibernate.properties (default for DHIS Live). From the following message, it seems that perhaps we need to set System.setProperty(h2.bindAddress, ...) before loading the org.h2.Driver class (and before starting the server) OK. Here goes ... I saw that there were a few hits on google about this problem including the peculiar bindaddress workaround but I wasn't entirely convinced. So I started poking around with the source code and looking at the latest releases thinking that if this was a problem before, then it would probably have been solved by now. In the process discovered that: (i) This really is a fast moving project. Release cycle seems to average a week or two! (ii) We are using v1.1.119 in DHIS2. Current version is v1.2.132. (iii) there are issues of version compatibility with the h2 file format. So thinking that this could be the problem (my external h2 client was 1.1.114) I decided to update my dhis2 and local client to the latest and greatest v1.2.132. To my great disappointment (my dhis-web compile is very slow) this made no difference at all other than a more helpful exception being thrown and reported on. So .. Well sometimes I am stupid and sometimes I am very stupid :-) My url in hibernate.properties is: jdbc:h2:./database/testdb;AUTO_SERVER=TRUE Then in my client (h2 console or openoffice jdbc) I used: jdbc:h2:./database/testdb and of course it doesn't connect. The dhis2 connection opens the file in embedded mode which means other clients can't do the same thing (file locking prevents this). Other clients have to connect using tcp to get access in server mode. So if instead I use: jdbc:h2:tcp://localhost/home/bobj/dhis2-live/database/testdb everything works like a charm! My guess is I'm not the only one who was doing this. And I doubt if this has much to do with my h2 version upgrade. Knut, try using a tcp url like this with your setup and see if it works. If so problem soved. There is of course a downside. If I configure this url in openoffice (my preferred way of accessing h2 db) I can only open it if h2 is running in server mode (eg my dhis2-live is running) which is a bit of a pain. I need to actually have two db connections configured - one for server mode and one to open the db directly. But I guess you can't have your cake and eat it. Final thought on version upgrade. It is very tempting to look at bumping up our h2 version in dhis2 with one big pro and one big con. The con being that there will likely be incompatibility with existing h2 file format (not a major issue as I don't think there's much h2 production use but it might mess with our sample db). The pro being that each new release seems be improving postgres compatibility. If we can freely exchange db dumps between h2 and postgres that would be more than cool. Given that exchange between postgres versions is troublesome anyway I'm not holding my breath too much, but its worth investigating. Cheers Bob http://groups.google.com/group/h2-database/msg/7526244fde1a0e58 -- Cheers, Knut Staring -- Sendt fra min mobile enhet ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Multiple connections to H2
On 10 April 2010 22:26, Knut Staring knu...@gmail.com wrote: Ok, it works now - the trick was to use the same URL also in hibernate.properties, i.e. jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7;AUTO_SERVER=TRUE No that's not the trick!! In hibernate properties you want: jdbc:h2:./database/kenya7;AUTO_SERVER=TRUE And for subsequent connections (eg console) you want: jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7 Note the lack of AUTO_SERVER=TRUE. You only want one process (dhis2) to act as server. The tcp connection is just for clients. On Sat, Apr 10, 2010 at 11:23 PM, Knut Staring knu...@gmail.com wrote: Almost...maybe it is subtly different on Windows? If I start the H2 console first like below, I can then proceed to also start DHIS Live, and I see changes I make in DHIS show up in the console: jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7;AUTO_SERVER=TRUE However, if I start DHIS2 Live first, I am not allowed to connect in the console. I can start in the console, then DHIS, log out of the console and log in again (i.e. access both at the same time). I just need to do the initial startup with the console. 2010/4/10 Bob Jolliffe bobjolli...@gmail.com 2010/4/10 Bob Jolliffe bobjolli...@gmail.com: I've also had this problem but I doubt if the bindaddress has anything to do with it. By default the server socket will be bound to INADDR_ANY. (This is the same as the tomcat security issue I referred to some time back). Will investigate ... Bob 2010/4/10 Lars Helge Øverland larshe...@gmail.com: I have had the same problem. Why don't you test it, you can set props from the command line when starting live.. 2010/4/10, Knut Staring knu...@gmail.com: I am unable to connect to the H2 database through the H2 console while DHIS2 is running, despite AUTO_SERVER being indicated in hibernate.properties (default for DHIS Live). From the following message, it seems that perhaps we need to set System.setProperty(h2.bindAddress, ...) before loading the org.h2.Driver class (and before starting the server) OK. Here goes ... I saw that there were a few hits on google about this problem including the peculiar bindaddress workaround but I wasn't entirely convinced. So I started poking around with the source code and looking at the latest releases thinking that if this was a problem before, then it would probably have been solved by now. In the process discovered that: (i) This really is a fast moving project. Release cycle seems to average a week or two! (ii) We are using v1.1.119 in DHIS2. Current version is v1.2.132. (iii) there are issues of version compatibility with the h2 file format. So thinking that this could be the problem (my external h2 client was 1.1.114) I decided to update my dhis2 and local client to the latest and greatest v1.2.132. To my great disappointment (my dhis-web compile is very slow) this made no difference at all other than a more helpful exception being thrown and reported on. So .. Well sometimes I am stupid and sometimes I am very stupid :-) My url in hibernate.properties is: jdbc:h2:./database/testdb;AUTO_SERVER=TRUE Then in my client (h2 console or openoffice jdbc) I used: jdbc:h2:./database/testdb and of course it doesn't connect. The dhis2 connection opens the file in embedded mode which means other clients can't do the same thing (file locking prevents this). Other clients have to connect using tcp to get access in server mode. So if instead I use: jdbc:h2:tcp://localhost/home/bobj/dhis2-live/database/testdb everything works like a charm! My guess is I'm not the only one who was doing this. And I doubt if this has much to do with my h2 version upgrade. Knut, try using a tcp url like this with your setup and see if it works. If so problem soved. There is of course a downside. If I configure this url in openoffice (my preferred way of accessing h2 db) I can only open it if h2 is running in server mode (eg my dhis2-live is running) which is a bit of a pain. I need to actually have two db connections configured - one for server mode and one to open the db directly. But I guess you can't have your cake and eat it. Final thought on version upgrade. It is very tempting to look at bumping up our h2 version in dhis2 with one big pro and one big con. The con being that there will likely be incompatibility with existing h2 file format (not a major issue as I don't think there's much h2 production use but it might mess with our sample db). The pro being that each new release seems be improving postgres compatibility. If we can freely exchange db dumps between h2 and postgres that would be more than cool. Given that exchange between postgres versions is troublesome anyway I'm not holding my breath too much, but its worth investigating. Cheers Bob http://groups.google.com/group/h2-database/msg
Re: [Dhis2-devs] Multiple connections to H2
On 10 April 2010 22:41, Knut Staring knu...@gmail.com wrote: Well, if I start DHIS Live with the following URL in hibernate.properites jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7;AUTO_SERVER=TRUE I am then able to connect from H2 console with: jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7 This at least works for my needs - do you see a problem with doing it that way? Yes. The dhis2 connection will be considerably slower using tcp than accessing the db file directly in embedded mode. Get rid of the tcp stuff in dhis2 and go back to the way you had it. Trust me it will work :-) On Sat, Apr 10, 2010 at 11:35 PM, Bob Jolliffe bobjolli...@gmail.com wrote: On 10 April 2010 22:26, Knut Staring knu...@gmail.com wrote: Ok, it works now - the trick was to use the same URL also in hibernate.properties, i.e. jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7;AUTO_SERVER=TRUE No that's not the trick!! In hibernate properties you want: jdbc:h2:./database/kenya7;AUTO_SERVER=TRUE And for subsequent connections (eg console) you want: jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7 Note the lack of AUTO_SERVER=TRUE. You only want one process (dhis2) to act as server. The tcp connection is just for clients. On Sat, Apr 10, 2010 at 11:23 PM, Knut Staring knu...@gmail.com wrote: Almost...maybe it is subtly different on Windows? If I start the H2 console first like below, I can then proceed to also start DHIS Live, and I see changes I make in DHIS show up in the console: jdbc:h2:tcp://localhost/V:/dhis/dhis2-live/database/kenya7;AUTO_SERVER=TRUE However, if I start DHIS2 Live first, I am not allowed to connect in the console. I can start in the console, then DHIS, log out of the console and log in again (i.e. access both at the same time). I just need to do the initial startup with the console. 2010/4/10 Bob Jolliffe bobjolli...@gmail.com 2010/4/10 Bob Jolliffe bobjolli...@gmail.com: I've also had this problem but I doubt if the bindaddress has anything to do with it. By default the server socket will be bound to INADDR_ANY. (This is the same as the tomcat security issue I referred to some time back). Will investigate ... Bob 2010/4/10 Lars Helge Øverland larshe...@gmail.com: I have had the same problem. Why don't you test it, you can set props from the command line when starting live.. 2010/4/10, Knut Staring knu...@gmail.com: I am unable to connect to the H2 database through the H2 console while DHIS2 is running, despite AUTO_SERVER being indicated in hibernate.properties (default for DHIS Live). From the following message, it seems that perhaps we need to set System.setProperty(h2.bindAddress, ...) before loading the org.h2.Driver class (and before starting the server) OK. Here goes ... I saw that there were a few hits on google about this problem including the peculiar bindaddress workaround but I wasn't entirely convinced. So I started poking around with the source code and looking at the latest releases thinking that if this was a problem before, then it would probably have been solved by now. In the process discovered that: (i) This really is a fast moving project. Release cycle seems to average a week or two! (ii) We are using v1.1.119 in DHIS2. Current version is v1.2.132. (iii) there are issues of version compatibility with the h2 file format. So thinking that this could be the problem (my external h2 client was 1.1.114) I decided to update my dhis2 and local client to the latest and greatest v1.2.132. To my great disappointment (my dhis-web compile is very slow) this made no difference at all other than a more helpful exception being thrown and reported on. So .. Well sometimes I am stupid and sometimes I am very stupid :-) My url in hibernate.properties is: jdbc:h2:./database/testdb;AUTO_SERVER=TRUE Then in my client (h2 console or openoffice jdbc) I used: jdbc:h2:./database/testdb and of course it doesn't connect. The dhis2 connection opens the file in embedded mode which means other clients can't do the same thing (file locking prevents this). Other clients have to connect using tcp to get access in server mode. So if instead I use: jdbc:h2:tcp://localhost/home/bobj/dhis2-live/database/testdb everything works like a charm! My guess is I'm not the only one who was doing this. And I doubt if this has much to do with my h2 version upgrade. Knut, try using a tcp url like this with your setup and see if it works. If so problem soved. There is of course a downside. If I configure this url in openoffice (my preferred way of accessing h2 db) I can only open it if h2 is running in server mode (eg my dhis2-live is running) which is a bit of a pain. I need to actually have two db connections configured - one
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1743: Improve the min/max value functionality.
Dunno. Its weird. java templates are a bit weird anyway :-) But if you cast the result it seems to go away: dataValues = (CollectionDeflatedDataValue)service.analyse( organisationUnit, dataElements, periods, standardDeviation ); On 7 April 2010 17:25, Lars Helge Øverland larshe...@gmail.com wrote: On Wed, Apr 7, 2010 at 5:00 PM, Jan Henrik Øverland janhenrik.overl...@gmail.com wrote: Hi Tran, I think this commit causes a build error: [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure D:\development\source\bzr\dhis2\dhis-2\dhis-web\dhis-web-validationrule\src\main\java\org\hisp\dhis\validationrule\action\dataanalysis\GetAnalysisAction.java:[2 23,40] incompatible types found : java.util.Collectioncapture#274 of ? required: java.util.Collectionorg.hisp.dhis.datavalue.DeflatedDataValue Had a look at this and can't really see whats going on.. anyone got a clue? Please fix. On Wed, Apr 7, 2010 at 2:32 PM, nore...@launchpad.net wrote: revno: 1743 committer: Tran Chau tran.hispviet...@gmail.com branch nick: trunk timestamp: Wed 2010-04-07 19:27:42 +0700 message: Improve the min/max value functionality. modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataanalysis/DataAnalysisService.java dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/StdDevOutlierAnalysisService.java dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/menu.vm -- lp:dhis2 https://code.launchpad.net/~dhis2-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 === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataanalysis/DataAnalysisService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataanalysis/DataAnalysisService.java 2009-12-23 17:34:18 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataanalysis/DataAnalysisService.java 2010-04-07 12:27:42 + @@ -30,18 +30,18 @@ import java.util.Collection; import org.hisp.dhis.dataelement.DataElement; -import org.hisp.dhis.datavalue.DeflatedDataValue; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.period.Period; /** * @author Dag Haavi Finstad - * @version $Id: StdDevOutlierAnalysisService.java 882 2009-05-14 23:09:31Z daghf $ + * @version $Id: StdDevOutlierAnalysisService.java 882 2009-05-14 23:09:31Z + * daghf $ */ public interface DataAnalysisService { String ID = DataAnalysisService.class.getName(); - CollectionDeflatedDataValue analyse( OrganisationUnit organisationUnit, CollectionDataElement dataElements, + Collection? analyse( OrganisationUnit organisationUnit, CollectionDataElement dataElements, CollectionPeriod periods, Double stdDevFactor ); } === modified file 'dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java' --- dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2010-03-31 16:44:55 + +++ dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2010-04-07 12:27:42 + @@ -58,6 +58,8 @@ final String KEY_GIS_LATITUDE = latitude; final String KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED = dataEntryFormCompleted; + + final String KEY_FACTOR_OF_DEVIATION = factorDeviation; void saveSystemSetting( String name, Serializable value ); === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/StdDevOutlierAnalysisService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/StdDevOutlierAnalysisService.java 2009-12-24 08:55:53 + +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/StdDevOutlierAnalysisService.java 2010-04-07 12:27:42 + @@ -58,12 +58,12 @@ } private OrganisationUnitService organisationUnitService; - + public void
Re: [Dhis2-devs] Content type not allowed during DHIS 1.4 file import
2010/4/5 Lars Helge Øverland larshe...@gmail.com: The initial purpose was to avoid confusion when users uploaded the raw dxf instead of the zip, and avoid nasty stacktraces when irrellevant files were uploaded.. OK. I'll take it out and find another way of dealing with nasty stack traces. Bob. 2010/4/4, Bob Jolliffe bobjolli...@gmail.com: I would suggest dropping the code which checks for supported content types as I don't think it really serves any useful purpose - just creates a maze of different browser peculiarity behaviour. We can (and do) deduce if the stream is a zip or a gzip by looking at the header bytes. If it's not we have a go and see if its xml parseable. I don't think there is nothing else immediately useful to us being provided by the browser reported mime-type. Does anyone have any objection to dropping this? I could be missing something important ... Regards Bob 2010/4/3 Lars Helge Øverland larshe...@gmail.com: I have added application/octet-stream to the allowed content types as a work-around for now. Lars On Wed, Mar 31, 2010 at 8:40 AM, Jason Pickering jason.p.picker...@gmail.com wrote: I tried with Opera and it worked. Seems to be either a bug or perhaps malware that is causing this. Does not seem to be a bug with DHIS2 though, so I will not file a bug report I guess. However, it is a problem that we need to figure out how to resolve. On Tue, Mar 30, 2010 at 11:37 PM, Jo Størset stor...@gmail.com wrote: Den 30. mars 2010 kl. 21.22 skrev Jason Pickering: Yeah, I figured this out actually after I had done it. Oh well, it was worth a try. This seems like a major limitation really, well, at least when it comes to importing DHIS 1.4 XML zip files. Would it be possible simply to add the application/octet-stream as an acceptable type? Using some Java applet might be a way to accomplish 1 and 2. 3 seems pretty dubious. :) I mean, if the file is bogus, DHIS2 should simply just ignore it and trash the file right? I don't think it's a common problem, most clients should be reporting correctly for standard files and this is the first time we have encountered such a problem. Does anybody else know of any similar problems with dhis? It should be possible to work around the problem in your case, if it is what I suspect. As you say, it has been working before. Import should work in most browsers, if you could try another one it would help. If you could use something like the live http header plugin [1] to log the POST request being sent, it would also verify what content-type firefox sends. If we accept application/octet-stream, I think we might as well drop the content type checking. And I guess that should work fine. Notice that we currently more or less have option 3 (with 1 in addition), so 3 might not be *that* dubious :) Bob has been talking about switching to 2, I guess since sdmx-hd might come with different envelope formats (i.e. xml, zip, gzip). I'm leaving on easter break tomorrow, and Lars/Bob seem to have already left. So I guess it will have to wait a couple of days. Jo [1] https://addons.mozilla.org/en-US/firefox/addon/3829 -- -- Jason P. Pickering email: jason.p.picker...@gmail.com tel:+260968395190 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- Sendt fra min mobile enhet ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Content type not allowed during DHIS 1.4 file import
I would suggest dropping the code which checks for supported content types as I don't think it really serves any useful purpose - just creates a maze of different browser peculiarity behaviour. We can (and do) deduce if the stream is a zip or a gzip by looking at the header bytes. If it's not we have a go and see if its xml parseable. I don't think there is nothing else immediately useful to us being provided by the browser reported mime-type. Does anyone have any objection to dropping this? I could be missing something important ... Regards Bob 2010/4/3 Lars Helge Øverland larshe...@gmail.com: I have added application/octet-stream to the allowed content types as a work-around for now. Lars On Wed, Mar 31, 2010 at 8:40 AM, Jason Pickering jason.p.picker...@gmail.com wrote: I tried with Opera and it worked. Seems to be either a bug or perhaps malware that is causing this. Does not seem to be a bug with DHIS2 though, so I will not file a bug report I guess. However, it is a problem that we need to figure out how to resolve. On Tue, Mar 30, 2010 at 11:37 PM, Jo Størset stor...@gmail.com wrote: Den 30. mars 2010 kl. 21.22 skrev Jason Pickering: Yeah, I figured this out actually after I had done it. Oh well, it was worth a try. This seems like a major limitation really, well, at least when it comes to importing DHIS 1.4 XML zip files. Would it be possible simply to add the application/octet-stream as an acceptable type? Using some Java applet might be a way to accomplish 1 and 2. 3 seems pretty dubious. :) I mean, if the file is bogus, DHIS2 should simply just ignore it and trash the file right? I don't think it's a common problem, most clients should be reporting correctly for standard files and this is the first time we have encountered such a problem. Does anybody else know of any similar problems with dhis? It should be possible to work around the problem in your case, if it is what I suspect. As you say, it has been working before. Import should work in most browsers, if you could try another one it would help. If you could use something like the live http header plugin [1] to log the POST request being sent, it would also verify what content-type firefox sends. If we accept application/octet-stream, I think we might as well drop the content type checking. And I guess that should work fine. Notice that we currently more or less have option 3 (with 1 in addition), so 3 might not be *that* dubious :) Bob has been talking about switching to 2, I guess since sdmx-hd might come with different envelope formats (i.e. xml, zip, gzip). I'm leaving on easter break tomorrow, and Lars/Bob seem to have already left. So I guess it will have to wait a couple of days. Jo [1] https://addons.mozilla.org/en-US/firefox/addon/3829 -- -- Jason P. Pickering email: jason.p.picker...@gmail.com tel:+260968395190 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1639: fixes to get ajax return on periods
On 12 March 2010 12:10, Saptarshi Purkayastha sun...@gmail.com wrote: don't blame me for those extra spaces in the diff that's being shown I'm using the code style which Bob gave ;-) ... and that applied those extra spaces Good to have someone to blame :-) BTW I don't think I changed what netbeans does to xml formatting. But having said that, the real style problem below is the fact that you have all that whitespace in character data which shouldn't be there. I suspect it would be better as: action name=emptyOrgunitSetupAssociationsTree class=org.hisp.dhis.commons.action.NoAction result name=success type=velocity/dhis-web-maintenance-dataadmin/noResponseInFrame.vm/result param name=javascriptsjavascript/oust.js,javascript/associations.js,javascript/locking.js/param /action Netbeans generally doesn't seem too smart about xml formatting. Cheers Bob --- Regards, Saptarshi PURKAYASTHA Director R D, HISP India Health Information Systems Programme My Tech Blog: http://sunnytalkstech.blogspot.com You Live by CHOICE, Not by CHANCE On 12 March 2010 13:04, nore...@launchpad.net wrote: revno: 1639 committer: Saptarshi sun...@gmail.com branch nick: trunk timestamp: Fri 2010-03-12 13:03:07 +0100 message: fixes to get ajax return on periods modified: dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml -- lp:dhis2 https://code.launchpad.net/~dhis2-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. === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2010-02-01 15:30:27 + +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2010-03-12 12:03:07 + @@ -145,7 +145,7 @@ action name=getPeriodsForLock class=org.hisp.dhis.dataadmin.action.lock.GetPeriodsForLockAction result name=success type=velocity - /dhis-web-commons/ajax/responsePeriod.vm/result + /dhis-web-commons/ajax/xmlPeriods.vm/result param name=onExceptionReturnplainTextError/param /action @@ -307,8 +307,8 @@ action name=mergeOrganisationUnits class=org.hisp.dhis.dataadmin.action.organisationunitmerge.MergeOrganisationUnitsAction result name=success type=redirect - displayOrganisationUnitMergeForm.action/result - /action + displayOrganisationUnitMergeForm.action/result + /action !-- Duplicate data elimination -- @@ -322,9 +322,9 @@ action name=eliminateDuplicateData class=org.hisp.dhis.dataadmin.action.duplicatedataelimination.EliminateDuplicateDataAction result name=success type=redirect - displayDuplicateDataEliminationForm.action/result + displayDuplicateDataEliminationForm.action/result /action - + !-- Data Element Zero Value Storage Management -- action name=zeroValueStorageManagement ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1639: fixes to get ajax return on periods
On 12 March 2010 14:36, Saptarshi Purkayastha sun...@gmail.com wrote: While we are the point of talking about formatting and white-space... One thing we should consider is atleast changing the style of javascript to be more concise. Javascript is loaded as it is without any obfuscation and all browsers spend their greatest resource in JIT to optimise javascript code of which creating tokens can be speed up by reducing lines of code. Also download time will decrease... Bob, do you think there is a need for MOP in JavaScript atleast?? Never heard of MOP till 5 minutes ago so not sure I'm the best person to answer this. Mind you I have taken a quick look and it looks very interesting and I can see quite useful when you have to synchronize complex asynchronous interactions. Have you used it for anything? In general I suspect we need to at some point gather up all our javascript stuff and take a good look at it. We are probably much more organised on the java side than the javascript side. Like many things I guess it has evolved over time using different styles and different libraries. There seems to be a gravitation towards jquery but with some flirtation with ext particulalrly for the gis stuff. And some standardizing on FCKEditor for our rich text components. It would be nice to have a sort of dhis javascript api which is consistent in style and maintainable over time. And which would also be easier to focus optimization efforts. I don't really see much point in obfuscation as such, but certainly there may be a case for producing deployment versions of our javascript which is pre-processed to optimize on white space use and the like. I know there is a range of minification utilities out there. I guess challenge would be to be able to integrate this into the maven processes on packaging the web-portal project. But I think I should leave that to the javascript gurus like yourself, Nimrata, Viet, Jan and company. Cheers Bob --- Regards, Saptarshi PURKAYASTHA Director R D, HISP India Health Information Systems Programme My Tech Blog: http://sunnytalkstech.blogspot.com You Live by CHOICE, Not by CHANCE On 12 March 2010 14:14, Bob Jolliffe bobjolli...@gmail.com wrote: On 12 March 2010 12:10, Saptarshi Purkayastha sun...@gmail.com wrote: don't blame me for those extra spaces in the diff that's being shown I'm using the code style which Bob gave ;-) ... and that applied those extra spaces Good to have someone to blame :-) BTW I don't think I changed what netbeans does to xml formatting. But having said that, the real style problem below is the fact that you have all that whitespace in character data which shouldn't be there. I suspect it would be better as: action name=emptyOrgunitSetupAssociationsTree class=org.hisp.dhis.commons.action.NoAction result name=success type=velocity/dhis-web-maintenance-dataadmin/noResponseInFrame.vm/result param name=javascriptsjavascript/oust.js,javascript/associations.js,javascript/locking.js/param /action Netbeans generally doesn't seem too smart about xml formatting. Cheers Bob --- Regards, Saptarshi PURKAYASTHA Director R D, HISP India Health Information Systems Programme My Tech Blog: http://sunnytalkstech.blogspot.com You Live by CHOICE, Not by CHANCE On 12 March 2010 13:04, nore...@launchpad.net wrote: revno: 1639 committer: Saptarshi sun...@gmail.com branch nick: trunk timestamp: Fri 2010-03-12 13:03:07 +0100 message: fixes to get ajax return on periods modified: dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml -- lp:dhis2 https://code.launchpad.net/~dhis2-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. === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2010-02-01 15:30:27 + +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2010-03-12 12:03:07 + @@ -145,7 +145,7 @@ action name=getPeriodsForLock class=org.hisp.dhis.dataadmin.action.lock.GetPeriodsForLockAction result name=success type=velocity - /dhis-web-commons/ajax/responsePeriod.vm/result + /dhis-web-commons/ajax/xmlPeriods.vm/result param name=onExceptionReturnplainTextError/param /action @@ -307,8 +307,8 @@ action name=mergeOrganisationUnits class=org.hisp.dhis.dataadmin.action.organisationunitmerge.MergeOrganisationUnitsAction result name=success type
Re: [Dhis2-devs] DHIS Mobile - UI Feedback
Hi Saptarshi On 5 March 2010 17:50, Saptarshi Purkayastha sun...@gmail.com wrote: Hi, Have done a complete revamp of the mobile client application. Earlier we used simple MIDP 2.0 components and required programming the form. The form was simple, but required JavaME knowledge. New code can be downloaded from here. I didn't get the here link :-( Please check - mybe my mail client. But the screenshots look promising. Probably have to key through it to really get a feeling. The new approach has few advantages: 1.) Can be generated from DHIS2 by selecting datasets/data elements (No JavaME programming required) 2.) Completely maven-ized. No need for ant 3.) Looks same on all phones (earlier had issues with low-end Nokia phones which truncated textfield labels) 4.) Works on the cheapest currently manufactured java-enabled phone (tested with Nokia 1680) 5.) Can be used to report patient program stage data elements 6.) No separate SMS Listener. Inside DHIS 2 web server. (needs some more work) What are the security considerations here? Will you be relying on the closed user group? I know you have really packed a lot into the sms format you have devised - is there space in their for any sort of identifier (for audit purposes)? I don't have the answers to all of these. Just firing off the questions :-) Issues: 1.) Requires WTK libraries, which can be installed part of Sun WTK on the DHIS 2 server, but the war file remains unaffected 2.) Requires health workers to download full application on phone, even if only 1 data element is changed in the dataset Attached are screenshots of the UI on which I need some comments. The UI is more customizable now and has calendar, themes, drop-downs, lists etc. Only 2-button interface, because some phones may not have the middle button. The web-module is still under-development and plan is to release the full-package pre-beta version on 15th March after which, we can test, comment and get a direction to where we should take the mobile application. I don't think SMS are the best way to send patient data. Atleast not for the number of elements and number of patients in Indian context. For which I suggest XForms are the best way forward. Yes that should also address issue number 2 above. I guess you are planning http (or better https with client certificate authentication)? good stuff. Bob --- Regards, Saptarshi PURKAYASTHA Director R D, HISP India Health Information Systems Programme My Tech Blog: http://sunnytalkstech.blogspot.com You Live by CHOICE, Not by CHANCE ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Greetings + new DHIS patient module
I agree depending on the uniqueness of names is not a good idea. I saw John said that facilities in India do have codes - the 16 digit ones which are built hierarchicly (is that a word?). Is it possible to for a patient id to continue this hierarchy so that a patient might have say a 6-8 digit local identifier - preferably Base30 as I see Saptarshi has just chimed in. But his fully-qualified id would be the 16 digit one + the local part. I can see that generation and allocation of these might be problematic and the internal uuid might be a good (if expensive) failsafe. How does openmrs deal with this? Saptarshi, is at as you have suggested? I would be a bit concerned that management of a pool of ids strikes me as something which could easily fall apart. Isn't it better to generate them on demand from some random source and test for uniqueness before inserting into the database? If its not unique then it simply tries another till its happy? Bob 2010/3/4 Lars Helge Øverland larshe...@gmail.com: Been chatting a bit with John and he expressed concern about the orgunit-randomnumber apprach. In India there are multiple installations and one cannot know for sure that an orgunit name will be unique. How do we deal with this? Using a globally unique identifier could be a solution, but the standard Java implementation (UUID) uses 32 characters and is a bit long. Is implementing our own, shorter one an option? Lars ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Greetings + new DHIS patient module
2010/3/4 Lars Helge Øverland larshe...@gmail.com: 2010/3/4 Bob Jolliffe bobjolli...@gmail.com I agree depending on the uniqueness of names is not a good idea. I saw John said that facilities in India do have codes - the 16 digit ones which are built hierarchicly (is that a word?). OK I wasn't aware of this code.. Certainly if we could generate a string based on the orgunit code plus its ancestors it will be unique. How does one generate a fixed-length alphanumeric string based on this sequence of names btw? I'm thinking that we just generate the local part. The facility codes already exist. So in Db you would have fields for patient id and issuing-facility. I think it is common to store the issuing authority with an id anyway. In most cases the issuing-facility might be null because it could be assumed. If a patient is moved into the db from somewhere else, or if patients are combined from different facilities for one of many reasons, then the facility code would need to be populated to avoid clashes. This bears some resemblance I think to the uuid disambiguation referred to by Saptarshi. Regards Bob Is it possible to for a patient id to continue this hierarchy so that a patient might have say a 6-8 digit local identifier - preferably Base30 as I see Saptarshi has just chimed in. But his fully-qualified id would be the 16 digit one + the local part. I can see that generation and allocation of these might be problematic and the internal uuid might be a good (if expensive) failsafe. How does openmrs deal with this? Saptarshi, is at as you have suggested? I would be a bit concerned that management of a pool of ids strikes me as something which could easily fall apart. Isn't it better to generate them on demand from some random source and test for uniqueness before inserting into the database? If its not unique then it simply tries another till its happy? Bob 2010/3/4 Lars Helge Øverland larshe...@gmail.com: Been chatting a bit with John and he expressed concern about the orgunit-randomnumber apprach. In India there are multiple installations and one cannot know for sure that an orgunit name will be unique. How do we deal with this? Using a globally unique identifier could be a solution, but the standard Java implementation (UUID) uses 32 characters and is a bit long. Is implementing our own, shorter one an option? Lars ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] New installer available: Testers wanted
2010/3/4 Lars Helge Øverland larshe...@gmail.com: Hi, I think Bob hits the needle on the head here. Ouch. That can be painful .. We can provide a generic hook into the Live app by making it look for a set of scripts during certain phases. E.g. database_start.bat at startup time, database_stop.bat at shutdown, and more. In these scripts we start the database or what we prefer. I am in favour of the binary/non-installer postgres approach. Simple is good. Being independent of admin rights and existing installations weighs more than pgadmin (which can be installed separately) in my opinion. Work flow for the Live package could be simple: When clicked it starts postgres, then jetty/dhis2. At system tray exit it stops jetty/dhis2, then postgres. If I read Jason correctly the database part of this is doable. I suggest we go for this. Objections? I think it is all doable. There are a few synchronisation type issues to consider which would be beyond my windoze scripting ability. Specifically we need to (i) make sure we don't start postgres if its already started; and (ii) don't start jetty till we know postgres has started - I guess this can be a little more fine grained. We can start jetty in parallel but not start the dhis context till we know we have database (this will save a second or two). I guess a rough solution might be to fire off the startup scripts then start pinging for database from the tray app, though this would have to be done through hibernate to keep database dependencies at bay. A better solution is for the shell script to poll for a connection using pg_xxx. After it gets it, it can release the connection and exit. The java in the dhis2-live picks up on when the exec finishes through java.lang.Process before going about its business. I guess we should also capture stdout and stderr for logging and/or UI display. For all of the above you can also substitute mysql for postgres. Is anybody volunteering to have a go at writing the above with pg and/or mysql commands? If we have some strong scripts I can help with dhis-live integration and execution control. Cheers Bob Lars PS using Live for modifying hibernate.properties (and thus a low-key change-of-database as required in SA) and update war file are great ideas, lets start a new thread for these. ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Switching databases almost runtime using dhis2 live system tray UI
Hi Saptarshi On 4 March 2010 14:55, Saptarshi Purkayastha sun...@gmail.com wrote: I love this as well... and from all the comments, the world likes it as well!!.. and is fast to swicth databases. Hoots to Bob!! I was going to make a patch last nite, but sadly I can't get live to work... It says the dhis.war is not found at the webapps path?? Does it not need the DHIS2_HOME environment var to be already set... and do I need to remove that thing?? The dhis live is targeted at the ignorant and you are too wise! In a nutshell it does not use DHIS2_HOME (and should ignore it if is there) and it is designed to use an exploded war in the webapps/dhis directory (exploding the war was too costly on startup time). I have been poor in documenting (partly because few people seemed interested at the start though I see that is changing) but I think Jason has now done some outstanding work in packaging and documenting. Does that help? I suspect your problem is that there is no exploded dhis.war in the webapps/dhis directory. Funny message from jetty though. Perhaps it is agnostic about whether it finds a war or a directory. But you do have to put it there yourself (though I think Jason's changes do this as well now). Regards Bob --- Regards, Saptarshi PURKAYASTHA Director R D, HISP India Health Information Systems Programme My Tech Blog: http://sunnytalkstech.blogspot.com You Live by CHOICE, Not by CHANCE On 4 March 2010 15:47, Ola Hodne Titlestad olati...@gmail.com wrote: PS using Live for modifying hibernate.properties (and thus a low-key change-of-database as required in SA) and update war file are great ideas, lets start a new thread for these. Hi, I like this seemingly simple fix to a complex problem. While we could look at more advanced solutions to switching databases runtime at a later stage I think being able to switch between databases using a simple menu in the DHIS2 live system tray will help a lot to system admins and implementers that frequently need to switch databases on their laptops or desktops. If I understand you correctly Lars you suggest that we through the live app UI interaction allow the users to switch database, and in the background that triggers 1) a jetty shutdown + 2) edit/replace hibernate.properties + 3) jetty startup sequence? We could then with a bit more UI interaction through the live app allow the users to register multiple databases and then provide a switch db menu that lists all registered databases? How long does it take to shut down and start up jetty? 1 min? It's not perfect, but simplifies the life of the not-very-technical DHIS2 trainer etc. that needs to work on multiple databases. Ola - ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] New installer available: Testers wanted
If we are committed to using the dhis2-live model for the desktop installs - with the tray icon+jetty+hibernate-points-to-whatever - then it makes sense to expand on our current lonely exit option to include others such as upgrading the war, updating the database and what have you. This is also a direction it seems the openmrs guys are considering taking with our approach. We can then build in as much or as little flexibility is desired. There are many rich maintenance use cases which we can deal with here rather than with an uber-smart installer. The important thing with the trayicon app is that it has full control over the webserver - so it could pause it, run psql or mysql scripts - unpause etc. Also manage hibernate connections through a nicer gui dialog than hand editing hibernate.properties. There's a list of maintenance tasks which we should consider. Given that it is easy for the app to read the hibernate.properties (and manage the webserver) it could also be possible to intelligently select between running pgdumps vs mysqldumps and restores and the like. My two cents. Anyone interested in doing a little bit of swing? Cheers Bob On 3 March 2010 08:27, Knut Staring knu...@gmail.com wrote: A couple of comments: While it maybe somewhat instructive to have a look at the Netbeans installer, it was not targeted at Postgres and I doubt much of it would be transferable to BitRock. Also, I really think we shouldn't waste our time trying to detect all sorts of things. Rather, there are two options: 1) Create a nonstandard username for Postgres (i.e. not postgres) and run it on a nonstandard port (i.e. not 5432). This should avoid 99% of conflicts 2) State very clearly in the docs and on dhis2.org that the FULL installer is for people who don't already have a database engine installed. If you already have Postgres, it would be much better to go with the minimal installer, which is just DHIS2 Live and a few links in the menu. THEN we add clear instructions as to how to modify hibernate.properties, and all is well. Similar clear instructions for server installation, where the full installer would not be used would do the trick. I see very little value in putting more work into the installer at this point (beyond making Postgres an option). I agree with Lars that we should strongly promote Postgres over Mysql (even more so after Oracle's takeover). However, I think we should promote the use of H2 unless it is a server-type installation. Knut On Wed, Mar 3, 2010 at 6:01 AM, Jason Pickering jason.p.picker...@gmail.com wrote: Hi Saptarshi, It will certainly be a lot of effort, but nothing compared to the number of man hours devoted to DHIS2. If we cannot get this product installed on more peoples machine's, all of that development effort is just wasted. So, it is absolutely critical we get a good installer together, regardless of the effort that is required. Could you release what you did in NetBeans, and let others, like myself that are in need of a proper installer, learn from what has been done previously. Knut has provided valuable information to me with a previous BitRock installer that he was working on. I think there are ways to do this, but we will need to try and be a bit more clever. :) Let me know what you think. Regards, Jason On Tue, Mar 2, 2010 at 8:29 PM, Saptarshi Purkayastha sun...@gmail.com wrote: This is what the Netbeans-based installer is doing... Infact it is able to do that for Linux, Windows, Mac and Solaris from the beginning. It was able to detect mysql and jre's installations on the system, tomcat was not detectable, which could have been detected from the registry or services like MySQL... but it was too much effort and I lost interest in developing that further... Anyways, what happens when postgres/mysql/tomcat is already installed and running?? The bitrock installer screwed a few things and I know ppl just uninstall it and all the data entered just goes... Possibly most important for an installer is to understand what's installed and not overwrite anything, which is why msi is so good for Windows. --- Regards, Saptarshi PURKAYASTHA Director R D, HISP India Health Information Systems Programme My Tech Blog: http://sunnytalkstech.blogspot.com You Live by CHOICE, Not by CHANCE 2010/3/2 Jason Pickering jason.p.picker...@gmail.com OK. A quick update. I managed to get DHIS+Postgres installed on a clean system, meaning one without a Postgres user or previous install Postgres instance. This is good, as this may be 90% of the cases we will encounter for a first time install, but it is only part of the problem. On a system with the postgres user already there, I do not know how to get the password in order to start the windows service, where the password needs to be set when the service is installed. This is not a big deal if you can start the
Re: [Dhis2-devs] New installer available: Testers wanted
On 3 March 2010 09:35, Jason Pickering jason.p.picker...@gmail.com wrote: Not installing postgres as a Windows service would remove a significant amount of the complexity of the installation. If it could be done, it would really be great. So, prior to launching jetty, Postgres would need to be fired up manually. It is certainly worth considering if this is possible. I guess that could be done from the tray app as well .. in fact it probably could be done from within the dhis startup process itself. On startup see if there is any pre-run shell script to run first by checking for scripts somewhere in dhis2_home, if so run that first, wait for it, then proceed to launch app. Gives me a few security wobblies though :-) On Wed, Mar 3, 2010 at 11:31 AM, Bob Jolliffe bobjolli...@gmail.com wrote: If we are committed to using the dhis2-live model for the desktop installs - with the tray icon+jetty+hibernate-points-to-whatever - then it makes sense to expand on our current lonely exit option to include others such as upgrading the war, updating the database and what have you. This is also a direction it seems the openmrs guys are considering taking with our approach. We can then build in as much or as little flexibility is desired. There are many rich maintenance use cases which we can deal with here rather than with an uber-smart installer. The important thing with the trayicon app is that it has full control over the webserver - so it could pause it, run psql or mysql scripts - unpause etc. Also manage hibernate connections through a nicer gui dialog than hand editing hibernate.properties. There's a list of maintenance tasks which we should consider. Given that it is easy for the app to read the hibernate.properties (and manage the webserver) it could also be possible to intelligently select between running pgdumps vs mysqldumps and restores and the like. My two cents. Anyone interested in doing a little bit of swing? Cheers Bob On 3 March 2010 08:27, Knut Staring knu...@gmail.com wrote: A couple of comments: While it maybe somewhat instructive to have a look at the Netbeans installer, it was not targeted at Postgres and I doubt much of it would be transferable to BitRock. Also, I really think we shouldn't waste our time trying to detect all sorts of things. Rather, there are two options: 1) Create a nonstandard username for Postgres (i.e. not postgres) and run it on a nonstandard port (i.e. not 5432). This should avoid 99% of conflicts 2) State very clearly in the docs and on dhis2.org that the FULL installer is for people who don't already have a database engine installed. If you already have Postgres, it would be much better to go with the minimal installer, which is just DHIS2 Live and a few links in the menu. THEN we add clear instructions as to how to modify hibernate.properties, and all is well. Similar clear instructions for server installation, where the full installer would not be used would do the trick. I see very little value in putting more work into the installer at this point (beyond making Postgres an option). I agree with Lars that we should strongly promote Postgres over Mysql (even more so after Oracle's takeover). However, I think we should promote the use of H2 unless it is a server-type installation. Knut On Wed, Mar 3, 2010 at 6:01 AM, Jason Pickering jason.p.picker...@gmail.com wrote: Hi Saptarshi, It will certainly be a lot of effort, but nothing compared to the number of man hours devoted to DHIS2. If we cannot get this product installed on more peoples machine's, all of that development effort is just wasted. So, it is absolutely critical we get a good installer together, regardless of the effort that is required. Could you release what you did in NetBeans, and let others, like myself that are in need of a proper installer, learn from what has been done previously. Knut has provided valuable information to me with a previous BitRock installer that he was working on. I think there are ways to do this, but we will need to try and be a bit more clever. :) Let me know what you think. Regards, Jason On Tue, Mar 2, 2010 at 8:29 PM, Saptarshi Purkayastha sun...@gmail.com wrote: This is what the Netbeans-based installer is doing... Infact it is able to do that for Linux, Windows, Mac and Solaris from the beginning. It was able to detect mysql and jre's installations on the system, tomcat was not detectable, which could have been detected from the registry or services like MySQL... but it was too much effort and I lost interest in developing that further... Anyways, what happens when postgres/mysql/tomcat is already installed and running?? The bitrock installer screwed a few things and I know ppl just uninstall it and all the data entered just goes... Possibly most important for an installer is to understand what's installed and not overwrite anything, which is why msi
Re: [Dhis2-devs] New installer available: Testers wanted
On 3 March 2010 09:49, Jason Pickering jason.p.picker...@gmail.com wrote: Yeah, it is certainly possible, but this is not how the DHIS2 live app is launched. It is not launched with a bat script. So, if we want users to have a double clickable icon to start the application and not a batch file, then it would need to occur from within the DHIS2 Live EXE itself. That is how I see it, but maybe Bob has other comments. Yes it can easily be part of the startup process but would require some small tinkering. Something along the lines of if there is a startup.sh or startup.bat in ./scripts/ then exec that. Wait for that to complete, capture status, and if all is well call the start method on the webserver. Translated to java. The downside of this is that users may need the Postgres service running anyway, for instance if they need to use the PivotTables without having DHIS2 running. I think a service is the best way to go at this point for the Desktop install. It is not that much more complex to add a custom user and a custom service. Comments welcome however. On Wed, Mar 3, 2010 at 11:45 AM, Knut Staring knu...@gmail.com wrote: I'm pretty sure it is - and I think I did it (though I certainly also used it as service). Looking through my bat scripts (attached) I see this line: @@DHIS2DIR@@\pgsql\bin\pg_ctl start -D @@DHIS2DIR@@\pgsql\data On Wed, Mar 3, 2010 at 10:35 AM, Jason Pickering jason.p.picker...@gmail.com wrote: Not installing postgres as a Windows service would remove a significant amount of the complexity of the installation. If it could be done, it would really be great. So, prior to launching jetty, Postgres would need to be fired up manually. It is certainly worth considering if this is possible. On Wed, Mar 3, 2010 at 11:31 AM, Bob Jolliffe bobjolli...@gmail.com wrote: If we are committed to using the dhis2-live model for the desktop installs - with the tray icon+jetty+hibernate-points-to-whatever - then it makes sense to expand on our current lonely exit option to include others such as upgrading the war, updating the database and what have you. This is also a direction it seems the openmrs guys are considering taking with our approach. We can then build in as much or as little flexibility is desired. There are many rich maintenance use cases which we can deal with here rather than with an uber-smart installer. The important thing with the trayicon app is that it has full control over the webserver - so it could pause it, run psql or mysql scripts - unpause etc. Also manage hibernate connections through a nicer gui dialog than hand editing hibernate.properties. There's a list of maintenance tasks which we should consider. Given that it is easy for the app to read the hibernate.properties (and manage the webserver) it could also be possible to intelligently select between running pgdumps vs mysqldumps and restores and the like. My two cents. Anyone interested in doing a little bit of swing? Cheers Bob On 3 March 2010 08:27, Knut Staring knu...@gmail.com wrote: A couple of comments: While it maybe somewhat instructive to have a look at the Netbeans installer, it was not targeted at Postgres and I doubt much of it would be transferable to BitRock. Also, I really think we shouldn't waste our time trying to detect all sorts of things. Rather, there are two options: 1) Create a nonstandard username for Postgres (i.e. not postgres) and run it on a nonstandard port (i.e. not 5432). This should avoid 99% of conflicts 2) State very clearly in the docs and on dhis2.org that the FULL installer is for people who don't already have a database engine installed. If you already have Postgres, it would be much better to go with the minimal installer, which is just DHIS2 Live and a few links in the menu. THEN we add clear instructions as to how to modify hibernate.properties, and all is well. Similar clear instructions for server installation, where the full installer would not be used would do the trick. I see very little value in putting more work into the installer at this point (beyond making Postgres an option). I agree with Lars that we should strongly promote Postgres over Mysql (even more so after Oracle's takeover). However, I think we should promote the use of H2 unless it is a server-type installation. Knut On Wed, Mar 3, 2010 at 6:01 AM, Jason Pickering jason.p.picker...@gmail.com wrote: Hi Saptarshi, It will certainly be a lot of effort, but nothing compared to the number of man hours devoted to DHIS2. If we cannot get this product installed on more peoples machine's, all of that development effort is just wasted. So, it is absolutely critical we get a good installer together, regardless of the effort that is required. Could you release what you did in NetBeans, and let others, like myself that are in need
Re: [Dhis2-devs] New installer available: Testers wanted
On 3 March 2010 09:58, Knut Staring knu...@gmail.com wrote: On Wed, Mar 3, 2010 at 10:49 AM, Jason Pickering jason.p.picker...@gmail.com wrote: Yeah, it is certainly possible, but this is not how the DHIS2 live app is launched. It is not launched with a bat script. So, if we want users to have a double clickable icon to start the application and not a batch file, then it would need to occur from within the DHIS2 Live EXE itself. That is how I see it, but maybe Bob has other comments. The downside of this is that users may need the Postgres service running anyway, for instance if they need to use the PivotTables without having DHIS2 running. Well, could be a resource issue, of course - you'd rather not have Jetty eat resources when not needed. On the other hand, the Postgres service would always be running (assuming you set it to automatic). I don't think it would be to onerous to ask a user to start DHIS2 before refreshing the Pivot table, but the resource issue could be real. One can easily enough implement stop the database, start the database, stop the webserver, start the webserver as menu options from the tray. But I can imagine this could be very confusing for users. I think a service is the best way to go at this point for the Desktop install. It is not that much more complex to add a custom user and a custom service. Comments welcome however. By far the best way to go longer term with the desktop install would be to get first class citizenship for the h2 database. Which I suspect largely means making the dxf dumps more complete. I say go with what is easiest for you. But I in general like the use of the tray application, especially if we can get developers from OpenMRS working on it. We could perhaps also use it for the Public Health Information Toolkit (PHIT) http://www.openhealthconsortium.org/wiki/doku.php?id=phit The needs of many tools are very similar - even PHP apps like iHRIS perhaps, if ran on Quercus http://quercus.caucho.com/ as Saptarshi has suggested. So the Launcher/installer/updater could be factored out as a separate project, perhaps (though I know you just merged the installer it with trunk) Knut On Wed, Mar 3, 2010 at 11:45 AM, Knut Staring knu...@gmail.com wrote: I'm pretty sure it is - and I think I did it (though I certainly also used it as service). Looking through my bat scripts (attached) I see this line: @@DHIS2DIR@@\pgsql\bin\pg_ctl start -D @@DHIS2DIR@@\pgsql\data On Wed, Mar 3, 2010 at 10:35 AM, Jason Pickering jason.p.picker...@gmail.com wrote: Not installing postgres as a Windows service would remove a significant amount of the complexity of the installation. If it could be done, it would really be great. So, prior to launching jetty, Postgres would need to be fired up manually. It is certainly worth considering if this is possible. On Wed, Mar 3, 2010 at 11:31 AM, Bob Jolliffe bobjolli...@gmail.com wrote: If we are committed to using the dhis2-live model for the desktop installs - with the tray icon+jetty+hibernate-points-to-whatever - then it makes sense to expand on our current lonely exit option to include others such as upgrading the war, updating the database and what have you. This is also a direction it seems the openmrs guys are considering taking with our approach. We can then build in as much or as little flexibility is desired. There are many rich maintenance use cases which we can deal with here rather than with an uber-smart installer. The important thing with the trayicon app is that it has full control over the webserver - so it could pause it, run psql or mysql scripts - unpause etc. Also manage hibernate connections through a nicer gui dialog than hand editing hibernate.properties. There's a list of maintenance tasks which we should consider. Given that it is easy for the app to read the hibernate.properties (and manage the webserver) it could also be possible to intelligently select between running pgdumps vs mysqldumps and restores and the like. My two cents. Anyone interested in doing a little bit of swing? Cheers Bob On 3 March 2010 08:27, Knut Staring knu...@gmail.com wrote: A couple of comments: While it maybe somewhat instructive to have a look at the Netbeans installer, it was not targeted at Postgres and I doubt much of it would be transferable to BitRock. Also, I really think we shouldn't waste our time trying to detect all sorts of things. Rather, there are two options: 1) Create a nonstandard username for Postgres (i.e. not postgres) and run it on a nonstandard port (i.e. not 5432). This should avoid 99% of conflicts 2) State very clearly in the docs and on dhis2.org that the FULL installer is for people who don't already have a database engine installed. If you already have Postgres, it would be much
Re: [Dhis2-devs] New installer available: Testers wanted
On 3 March 2010 11:34, Saptarshi Purkayastha sun...@gmail.com wrote: ok... since we are talking about Postgres and removing mysql support... has anyone seen that postgres on Windows is not actually a service and is started/stopped through a cygwin. There are other things to consider about MySQL is the separation of storage engines and SQL. If MySQL with oracle is question then we could always use MariaDB (the full suite) or XtraDB as the engine. nice to see the safety net - just in case :-) I don't think I have I have heard anyone talk of dropping mysql support. I think that would be grossly premature. Jason is trying to build an installer with which bundle postgres. I am sure the same could be done with mysql. As far as dhis2-live is concerned it is (so far) not dependent on any of the three and I think it should remain that way. --- Regards, Saptarshi PURKAYASTHA Director R D, HISP India Health Information Systems Programme My Tech Blog: http://sunnytalkstech.blogspot.com You Live by CHOICE, Not by CHANCE On 3 March 2010 11:20, Jason Pickering jason.p.picker...@gmail.com wrote: I agree as well. It is confusing and might not work. There should actually be a probably be config file, that the installer would write to depending on the installation (or as you mention, read from the hibernate.properties file to know if Postgres/MySQL) needs to be started and then execute appropriate action to ensure they are. Right now, I have constructed the installer to cater to either H2 or Postgres installs, which then (not done yet) make changes to the hibernate.properties files during the installation. I agree about H2. I would be willing to trash Postgres completely for desktop installs. It really is a lot of effort to get it running, and the installation process is filled with pitfalls due to the security requirements of Postgres. But, it is a good system, and there are reasons for using it, so I do not think it should not be an option. Regards, JPP On Wed, Mar 3, 2010 at 12:04 PM, Bob Jolliffe bobjolli...@gmail.com wrote: On 3 March 2010 09:58, Knut Staring knu...@gmail.com wrote: On Wed, Mar 3, 2010 at 10:49 AM, Jason Pickering jason.p.picker...@gmail.com wrote: Yeah, it is certainly possible, but this is not how the DHIS2 live app is launched. It is not launched with a bat script. So, if we want users to have a double clickable icon to start the application and not a batch file, then it would need to occur from within the DHIS2 Live EXE itself. That is how I see it, but maybe Bob has other comments. The downside of this is that users may need the Postgres service running anyway, for instance if they need to use the PivotTables without having DHIS2 running. Well, could be a resource issue, of course - you'd rather not have Jetty eat resources when not needed. On the other hand, the Postgres service would always be running (assuming you set it to automatic). I don't think it would be to onerous to ask a user to start DHIS2 before refreshing the Pivot table, but the resource issue could be real. One can easily enough implement stop the database, start the database, stop the webserver, start the webserver as menu options from the tray. But I can imagine this could be very confusing for users. I think a service is the best way to go at this point for the Desktop install. It is not that much more complex to add a custom user and a custom service. Comments welcome however. By far the best way to go longer term with the desktop install would be to get first class citizenship for the h2 database. Which I suspect largely means making the dxf dumps more complete. I say go with what is easiest for you. But I in general like the use of the tray application, especially if we can get developers from OpenMRS working on it. We could perhaps also use it for the Public Health Information Toolkit (PHIT) http://www.openhealthconsortium.org/wiki/doku.php?id=phit The needs of many tools are very similar - even PHP apps like iHRIS perhaps, if ran on Quercus http://quercus.caucho.com/ as Saptarshi has suggested. So the Launcher/installer/updater could be factored out as a separate project, perhaps (though I know you just merged the installer it with trunk) Knut On Wed, Mar 3, 2010 at 11:45 AM, Knut Staring knu...@gmail.com wrote: I'm pretty sure it is - and I think I did it (though I certainly also used it as service). Looking through my bat scripts (attached) I see this line: @@DHIS2DIR@@\pgsql\bin\pg_ctl start -D @@DHIS2DIR@@\pgsql\data On Wed, Mar 3, 2010 at 10:35 AM, Jason Pickering jason.p.picker...@gmail.com wrote: Not installing postgres as a Windows service would remove a significant amount of the complexity of the installation. If it could be done, it would really be great. So, prior to launching jetty
Re: [Dhis2-devs] Greetings + new DHIS patient module
Hi On 3 March 2010 12:20, Viet Nguyen phamquocv...@gmail.com wrote: Hi, Just a quick update about Patient registration form functionality : * Check duplicate : This function allow user to check for existing patient base on : name , birthdate, age, gender If there is duplicate patient, a pop up will be showed, with the list of all the duplicated patients. From this pop up, user can have two options : Continue create the current patient. So there will be two patients with the same information like above. But their identifiers must be different which will be checked later. User can choose a patient from the list duplicated patient to update information for him, by click on the button Update this patient that follow by each patient in the list. User will then be redirected to the Update Patient page. * Under age patient : Under age patient can be understand as a child. The purpose of this field is not to hard code the age to define a child, like age 5 or age 15. In the registration form, there is a check box named Is Underage . User check on this check box to identify the patient is a child. A pop up will be showed after clicking. The purpose of this pop up is : user must choose a representative for this child. Because , some identifiers that are mandatory ( can be defined in Patient Identifier Type management page ) . But a child can not have those identifier, so we have to inherit those identifier from the child's representative. Not all identifier can be inherited, you can defined a PatientIdentiferType is able to inherit or not when creating it. The field name is Related ... ( God ...why didn't I use Inheritable ) . If a PatientIdentifierType with related = FALSE and mandatory = TRUE then user must enter value for it. Ok, back to the popup, there are two tabs : Search existing person : user can search for an existing patient in system to be the representative of the child. Add new person : said this is person, because this is not really a patient, this person is just giving identifier...not enrolling to any program, at least at this step. Of course the record is also saved to the patient table. The form just only include basic information ( name , birthdate, gender.. ) and Identifiers. No attributes is needed. Of course user can update attributes for this person later by the Update Patient page. One problem in this function that I can not have enough time to do : In the combo box Relationship Type, there should be Parent and Guardian, I hard coded this. You should create two relationship type with this information before testing this function : A is to B : Guardian, B is to A : Child A is to B : Parent , B is to A : Child. The list of relationship type should be get from the Relationship type table. But if we put everything to the combo box, then user may choose Husband, Wife, or even child...which is so wrong. My plan is creating an object RelationshipGroup, which should be based on the age... Anyway, because we are late for releasing this version in India. so hard code for now is the only solution. I will continue working on this, so ...please don't worry... * System generated identifier : I looked at the id_gen module from OpenMRS. Well , they have a whole module for this which has many functionality for manage system auto generated identifier. I can not have enough time for getting all of that. So what I did is just get a piece of code that is used for generate a check digit for the ID. The format that Indian team chose is : [BirthDate][Gender][XX][checkdigit] Encoding the birthdate and gender into a patient identifier is considered bad practice. Using the orgunit+random digits would be much better. It shouldn't matter if the patient migrates. The number was simply issued by a particular facility. Regards Bob BirthDate : MMdd Gender : Male = 1 ; Female = 0 XX : a random number with length = 6 ( 0 - 99 ) checkdigit : generated using Luhn Algorithm ( thanks to OpenMRS guys ) I also changed the way that Abyot generate the birthdate from age ( when user only enter age ) . It is : todayCalendar.add( Calendar.YEAR, -1 * age ); What Abyot did is todayCalendar.set( Calendar.DATE, 1 ); todayCalendar.set( Calendar.MONTH, Calendar.JANUARY ); todayCalendar.add( Calendar.YEAR, -1 * age ); Because we generate the id base on birthdate , get current date should be better. Hope this is ok for Abyot Each country will have different formats...so I think for current we just can change code when implementing in the country. Building a module for this would take time Finally, but almost those things only follow India 's requirements. Please give comment then we can try to make it more generic... Regards, Viet Nguyen ___ Mailing list: https://launchpad.net/~dhis2-devs
Re: [Dhis2-devs] Greetings + new DHIS patient module
Hi John On 3 March 2010 15:20, John lewis johnlewis.h...@gmail.com wrote: Hi bob, the system generated ID is to one way to identify the case or person. using orgunit you mean the code for that organization unit. In india they have generated a 16 digit ID based on Country, Province,District,Sub-district and facility. but the problem with this is what happen if new district or province is created. In norway the personal id number is ddmmyy+sex+random number. I thougth we cloud use the same but increasing the random number to avoid the duplicate. I think this is a national id number. In Norway they do indeed use the national ID number as a patient ID. And, believe it or not, Norway does not follow best practice in this area. They do it probably because it was convenient and they started doing it at a time before anyone really took much time to think about it. The hazard of early adoption in the information age. They are not the only country which now finds itself in this position. I've mentioned a few times on this list that national identifiers are not always suitable for use as patient identifiers. That they are frequently coerced for this use is now broadly understood to be a common but bad practice, largely because the requirements of national ids are not generally the same as requirements for patient ids. There are a lot of references out there on what these requirements are - I think myself and Saptarshi have provided some links to literature on the subject. Just googled this one fresh for example (http://books.google.com/books?id=X0JeKx8-J0cCpg=PA59lpg=PA59dq=norway+patient+identifiersource=blots=6C8eZlwxLbsig=zTY4mpmxpNtvGGz-hssv3KVEQh8hl=enei=F46OS7KHEJO7jAfZocDpAwsa=Xoi=book_resultct=resultresnum=5ved=0CB8Q6AEwBA) coz it mentions Norway - what a horrible url - and not a great article. You can I'm sure access better quality stuff through the university. In the case of India, where they are now designing a national ID from scratch, they might have taken this issue into account - ie they have the benefit of hindsight that the identifier might (read it always happens!) be used for many purposes beyond what may have been its original intent. So the ID could be useful if encoded on a card or something, but the downside being that very few people are going to memorize it if it has many random digits. Alphanumerics can help keep it shorter. I'm not sure if I get your concern about provinces and districts changing etc. Using a similar scheme but based on facility+unique string a patient would only really need to commit to memory the unique string part in 95% of cases. She would only need the full number with prefix part when visiting a different facility at which point it would be useful to have the full number on a card, file or what have you. But even then, if she remembered the facility that she got it from, it could be reasonably reconstructed. I can sympathize with the desire for simplicity and I think we should strive for a simple solution. But given that is widely accepted that encoding the birthdate and gender in a patient id is a bad practice I don't think it is wise to roll-out a new personal identification system like this. To me it might indicate a certain amateurism and lack of familiarity with the literature which could reflect badly on the project. Particularly as you are undergoing your security review. I also do know that the openmrs guys have really put a lot of thought into this. So my warning would be if you go ahead with birthdates and gender you should be prepared to be hammered from all sides. Cheers Bob And its also useful that the person dont have to remember all the 16 or 14 digit number. for the sake of simplicity we used this method. John On Wed, Mar 3, 2010 at 1:35 PM, Bob Jolliffe bobjolli...@gmail.com wrote: Hi On 3 March 2010 12:20, Viet Nguyen phamquocv...@gmail.com wrote: Hi, Just a quick update about Patient registration form functionality : * Check duplicate : This function allow user to check for existing patient base on : name , birthdate, age, gender If there is duplicate patient, a pop up will be showed, with the list of all the duplicated patients. From this pop up, user can have two options : Continue create the current patient. So there will be two patients with the same information like above. But their identifiers must be different which will be checked later. User can choose a patient from the list duplicated patient to update information for him, by click on the button Update this patient that follow by each patient in the list. User will then be redirected to the Update Patient page. * Under age patient : Under age patient can be understand as a child. The purpose of this field is not to hard code the age to define a child, like age 5 or age 15. In the registration form, there is a check box named Is Underage . User check on this check box
Re: [Dhis2-devs] Greetings + new DHIS patient module
On 3 March 2010 17:23, John lewis johnlewis.h...@gmail.com wrote: Ok bob, point taken. when you say facility+ unique string what do you mean. facility code or name of the facility and unique string is random number right? yup. and facility code is infinitely better than facility name. Though its obviously useful for the patient to know the name. On Wed, Mar 3, 2010 at 6:11 PM, Bob Jolliffe bobjolli...@gmail.com wrote: Hi John On 3 March 2010 15:20, John lewis johnlewis.h...@gmail.com wrote: Hi bob, the system generated ID is to one way to identify the case or person. using orgunit you mean the code for that organization unit. In india they have generated a 16 digit ID based on Country, Province,District,Sub-district and facility. but the problem with this is what happen if new district or province is created. In norway the personal id number is ddmmyy+sex+random number. I thougth we cloud use the same but increasing the random number to avoid the duplicate. I think this is a national id number. In Norway they do indeed use the national ID number as a patient ID. And, believe it or not, Norway does not follow best practice in this area. They do it probably because it was convenient and they started doing it at a time before anyone really took much time to think about it. The hazard of early adoption in the information age. They are not the only country which now finds itself in this position. I've mentioned a few times on this list that national identifiers are not always suitable for use as patient identifiers. That they are frequently coerced for this use is now broadly understood to be a common but bad practice, largely because the requirements of national ids are not generally the same as requirements for patient ids. There are a lot of references out there on what these requirements are - I think myself and Saptarshi have provided some links to literature on the subject. Just googled this one fresh for example (http://books.google.com/books?id=X0JeKx8-J0cCpg=PA59lpg=PA59dq=norway+patient+identifiersource=blots=6C8eZlwxLbsig=zTY4mpmxpNtvGGz-hssv3KVEQh8hl=enei=F46OS7KHEJO7jAfZocDpAwsa=Xoi=book_resultct=resultresnum=5ved=0CB8Q6AEwBA) coz it mentions Norway - what a horrible url - and not a great article. You can I'm sure access better quality stuff through the university. In the case of India, where they are now designing a national ID from scratch, they might have taken this issue into account - ie they have the benefit of hindsight that the identifier might (read it always happens!) be used for many purposes beyond what may have been its original intent. So the ID could be useful if encoded on a card or something, but the downside being that very few people are going to memorize it if it has many random digits. Alphanumerics can help keep it shorter. I'm not sure if I get your concern about provinces and districts changing etc. Using a similar scheme but based on facility+unique string a patient would only really need to commit to memory the unique string part in 95% of cases. She would only need the full number with prefix part when visiting a different facility at which point it would be useful to have the full number on a card, file or what have you. But even then, if she remembered the facility that she got it from, it could be reasonably reconstructed. I can sympathize with the desire for simplicity and I think we should strive for a simple solution. But given that is widely accepted that encoding the birthdate and gender in a patient id is a bad practice I don't think it is wise to roll-out a new personal identification system like this. To me it might indicate a certain amateurism and lack of familiarity with the literature which could reflect badly on the project. Particularly as you are undergoing your security review. I also do know that the openmrs guys have really put a lot of thought into this. So my warning would be if you go ahead with birthdates and gender you should be prepared to be hammered from all sides. Cheers Bob And its also useful that the person dont have to remember all the 16 or 14 digit number. for the sake of simplicity we used this method. John On Wed, Mar 3, 2010 at 1:35 PM, Bob Jolliffe bobjolli...@gmail.com wrote: Hi On 3 March 2010 12:20, Viet Nguyen phamquocv...@gmail.com wrote: Hi, Just a quick update about Patient registration form functionality : * Check duplicate : This function allow user to check for existing patient base on : name , birthdate, age, gender If there is duplicate patient, a pop up will be showed, with the list of all the duplicated patients. From this pop up, user can have two options : Continue create the current patient. So there will be two patients with the same information like above. But their identifiers must be different which
Re: [Dhis2-devs] Greetings + new DHIS patient module
Hi Thanh On 3 March 2010 19:59, Ngoc Thanh Nguyen thanh.hispviet...@gmail.com wrote: On Thu, Mar 4, 2010 at 12:11 AM, Bob Jolliffe bobjolli...@gmail.com wrote: Hi John On 3 March 2010 15:20, John lewis johnlewis.h...@gmail.com wrote: Hi bob, the system generated ID is to one way to identify the case or person. using orgunit you mean the code for that organization unit. In india they have generated a 16 digit ID based on Country, Province,District,Sub-district and facility. but the problem with this is what happen if new district or province is created. In norway the personal id number is ddmmyy+sex+random number. I thougth we cloud use the same but increasing the random number to avoid the duplicate. I think this is a national id number. In Norway they do indeed use the national ID number as a patient ID. And, believe it or not, Norway does not follow best practice in this area. They do it probably because it was convenient and they started doing it at a time before anyone really took much time to think about it. The hazard of early adoption in the information age. They are not the only country which now finds itself in this position. I've mentioned a few times on this list that national identifiers are not always suitable for use as patient identifiers. That they are frequently coerced for this use is now broadly understood to be a common but bad practice, largely because the requirements of national ids are not generally the same as requirements for patient ids. There are a lot of references out there on what these requirements are - I think myself and Saptarshi have provided some links to literature on the subject. Just googled this one fresh for example (http://books.google.com/books?id=X0JeKx8-J0cCpg=PA59lpg=PA59dq=norway+patient+identifiersource=blots=6C8eZlwxLbsig=zTY4mpmxpNtvGGz-hssv3KVEQh8hl=enei=F46OS7KHEJO7jAfZocDpAwsa=Xoi=book_resultct=resultresnum=5ved=0CB8Q6AEwBA) coz it mentions Norway - what a horrible url - and not a great article. You can I'm sure access better quality stuff through the university. In the case of India, where they are now designing a national ID from scratch, they might have taken this issue into account - ie they have the benefit of hindsight that the identifier might (read it always happens!) be used for many purposes beyond what may have been its original intent. So the ID could be useful if encoded on a card or something, but the downside being that very few people are going to memorize it if it has many random digits. Alphanumerics can help keep it shorter. I'm not sure if I get your concern about provinces and districts changing etc. Using a similar scheme but based on facility+unique string a patient would only really need to commit to memory the unique string part in 95% of cases. She would only need the full number with prefix part when visiting a different facility at which point it would be useful to have the full number on a card, file or what have you. But even then, if she remembered the facility that she got it from, it could be reasonably reconstructed. I can sympathize with the desire for simplicity and I think we should strive for a simple solution. But given that is widely accepted that encoding the birthdate and gender in a patient id is a bad practice I don't think it is wise to roll-out a new personal identification system like this. To me it might indicate a certain amateurism and lack of familiarity with the literature which could reflect badly on the project. Particularly as you are undergoing your security review. I also do know that the openmrs guys have really put a lot of thought into this. So my warning would be if you go ahead with birthdates and gender you should be prepared to be hammered from all sides. Cheers Bob I think we can take a look at here http://en.wikipedia.org/wiki/National_identification_number to see how countries in the world dealing with this problem. While putting birthdate in the ID is considered as a violence of privacy, most of countries use it in their national ID systems. They might do thing wrong? ID system, as I perceive, is very similar to a infrastructure with its installed based. Addressing it is not the problem of good or bad but what the current situation is and how to build upon that, I think. The wikipedia article you refer to deals with national ids. From the same source re patient identifiers: http://en.wikipedia.org/wiki/ASTM_E_1714#Patient_confidentiality_and_access_security Not that I'm in favour of the 28 digit sample. That seems not to be appropriate where manual systems are the norm. But the desirable characteristics of a patient identifier are worthwhile being aware of. Its ok of course to deviate from them with good reason, but lets start from what is generally considered good practice and work from there. Bob Thanh And its also useful that the person dont have
Re: [Dhis2-devs] New installer available: Testers wanted
2010/3/1 Lars Helge Øverland larshe...@gmail.com: 2010/3/1 Jason Pickering jason.p.picker...@gmail.com Hi there. I think we should focus on giving the user a choice at install time. 1) Install H2 2) Install Postgres This is pretty simple. Now the question is how easy is an unattended Postgres install. We can easily package the Postgres MSI and have the user click through. Now, any number of problems can occur there, so it is probably not a good idea. I think the unattended Postgres install is the best option, but it requires administrative rights, which the installer can request, but there is no guarantee they will be granted. Knut previous work includes many of the pieces of the puzzle, but it does not solve the unattended Postgres install,which I see as the biggest risk. If that does not install, then you are stuffed. Write up a blueprint and include the actual requirements, and I will take a look at it on the plane. The user option for choosing database sounds really good to me. User rights will always be an issue, we can make people aware of it on the website and in a Readme. I don't think we should worry so much about Vista, even MS doesn't recommend using it now... MS don't make recommendations. They just force you to get it with your new computer. Soon they will recommend not using win7 :-) Will write a blueprint. Regards, JPP 2010/3/1 Lars Helge Øverland larshe...@gmail.com: 2010/3/1 Ola Hodne Titlestad olati...@gmail.com 2010/3/1 Lars Helge Øverland larshe...@gmail.com 2010/2/18 Jason Pickering jason.p.picker...@gmail.com Hi there. Try building everything from the latest version of the files, per my instructions sent in an earlier mail for the complete compile (dhis2, docs, and the installer) I suspect something was out of date as well. Thanks for testing. Regards, jason Hi Jason, sorry lost focus on the installer for a while. What we badly need is an installer with DHIS2 Live + Postgres for Windows. Been getting quite a few requests for this lately and it will make our range of installers close to complete, as we already have a cross-platform package (Live) and a tomcat+postgres for linux (deb). I would like to add tomcat+postgres on Windows as well. I saw a request for this on the users list this morning. Many users/admins are familiar with tomcat and would like to use it instead of jetty (which is included in the Live package). We had a pretty well functional windows installer for tomcat+postgres 1-2 years ago ( the bitrock installer), and I think there is still a need for it. Okay.. that could be good to have too.. The reason why I think we should at least prioritize Live now is that it makes life easy.. Common problems we get with tomcat which embedded jetty avoids are: - tomcat simply doesn't start - tomcat is already installed - dhis2_home isn't picked up I've been testing Live for a long time now and it really works well, with a postgres backend its a solid alternative. Ola --- I was wondering if you would have time to compile such a package with the latest dhis? I know I could have dug into this myself but I'm seriously bogged down with Indian stuff this week... cheers, Lars ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- -- Jason P. Pickering email: jason.p.picker...@gmail.com tel:+260968395190 ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1474: Work in progress on embedded help function. Finished data-web-maintenance-dataadmin module.
Just gave it a spin. Lars that's just too cool for words :-) Nice to see the transformer getting some exercise. And a great consequence of the move to docbook. Its hard to imagine how we could have linked this up to our original word documentation. On 23 February 2010 19:47, nore...@launchpad.net wrote: revno: 1474 committer: Lars Helge Oeverland larshe...@gmail.com branch nick: trunk timestamp: Tue 2010-02-23 20:44:51 +0100 message: Work in progress on embedded help function. Finished data-web-maintenance-dataadmin module. modified: dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help/DefaultHelpManager.java dhis-2/dhis-options/src/main/resources/help_content.xml dhis-2/dhis-options/src/main/resources/help_stylesheet.xsl dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/help.png dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrityForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/duplicateDataEliminationForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockingForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/maintenanceForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/organisationUnitMergeForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/resourceTableForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/showcache.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/viewStatistics.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/zeroValueStorageManagement.vm -- lp:dhis2 https://code.launchpad.net/~dhis2-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. === modified file 'dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help/DefaultHelpManager.java' --- dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help/DefaultHelpManager.java 2010-02-23 17:10:02 + +++ dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help/DefaultHelpManager.java 2010-02-23 19:44:51 + @@ -48,11 +48,9 @@ { try { - TransformerFactory factory = TransformerFactory.newInstance(); - Source stylesheet = new StreamSource( new ClassPathResource( help_stylesheet.xsl ).getInputStream() ); - Transformer transformer = factory.newTransformer( stylesheet ); + Transformer transformer = TransformerFactory.newInstance().newTransformer( stylesheet ); transformer.setParameter( sectionId, id ); === modified file 'dhis-2/dhis-options/src/main/resources/help_content.xml' --- dhis-2/dhis-options/src/main/resources/help_content.xml 2010-02-23 17:10:02 + +++ dhis-2/dhis-options/src/main/resources/help_content.xml 2010-02-23 19:44:51 + @@ -1,40 +1,276 @@ -?xml version='1.0' encoding='UTF-8'? -chapter - titleData Quality/title - paraThe data quality module provides means to improve the quality of the data in the system. This can be done through validation rules and various statistical checks./para - section id=learningObjectives - titleLearning Objectives/title - paraAfter reading this module you will be able to understand:/para - orderedlist - listitem - paraWhat is data quality and its importance for HMIS./para - /listitem - listitem - paraHow to do data quality check at point of data entry./para - /listitem - listitem - paraHow to create data validation rules./para - /listitem - listitem - paraHow to carry out data triangulation./para - /listitem - listitem - paraHow to analyze data status./para - /listitem - /orderedlist - paraThis stuff is in a paragraph/para - /section - section id=overview - titleOverview of data quality check/title - paraEnsuring data quality is a key concern in building an
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1467: Added application/zip to allowed content types in import
much better :-) On 22 February 2010 14:55, nore...@launchpad.net wrote: revno: 1467 committer: Lars Helge Oeverland larshe...@gmail.com branch nick: trunk timestamp: Mon 2010-02-22 15:53:23 +0100 message: Added application/zip to allowed content types in import modified: dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/imp/ImportAction.java -- lp:dhis2 https://code.launchpad.net/~dhis2-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. === modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/imp/ImportAction.java' --- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/imp/ImportAction.java 2010-02-22 09:37:31 + +++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/imp/ImportAction.java 2010-02-22 14:53:23 + @@ -33,10 +33,13 @@ import static org.hisp.dhis.util.InternalProcessUtil.PROCESS_KEY_IMPORT; import static org.hisp.dhis.util.InternalProcessUtil.setCurrentRunningProcess; +import static org.hisp.dhis.system.util.ConversionUtils.getList; + import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; +import java.util.List; import org.amplecode.cave.process.ProcessCoordinator; import org.amplecode.cave.process.ProcessExecutor; @@ -64,6 +67,12 @@ private static final Log log = LogFactory.getLog( ImportAction.class ); + private static final ListString ALLOWED_CONTENT_TYPES = getList( + application/x-zip-compressed, + application/zip, + application/x-gzip, + text/xml ); + // - // Dependencies // - @@ -205,9 +214,7 @@ // accept zip, gzip or uncompressed xml // TODO: check cross-browser content type strings - if ( !( ( contentType.equals( application/x-zip-compressed ) ) || - contentType.equals( application/x-gzip) || - contentType.equals( text/xml))) + if ( !ALLOWED_CONTENT_TYPES.contains( contentType ) ) { message = i18n.getString( file_type_not_allowed ); ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] J2SE Code Names
What's dhis2 2.0.4? Can anyone suggest a good codename? Maybe we need a theme. Fish, clouds, mammals ... On 21 February 2010 13:31, Saptarshi Purkayastha sun...@gmail.com wrote: I'm not sure these codenames have some well known logic to them... they are just names which someone thought was an interesting name... obviously good trivia to know the reason for the name That list does not have Java 6 (codename Mustang) and upcoming Java 7 (codename Dolphin)... Probably the java forums are a better place to ask the question and get an answer to the reasons for the code names than DHIS2 devs list :-) --- Regards, Saptarshi PURKAYASTHA Director R D, HISP India Health Information Systems Programme My Tech Blog: http://sunnytalkstech.blogspot.com You Live by CHOICE, Not by CHANCE On 21 February 2010 14:20, Brajesh Murari brajesh2mur...@gmail.com wrote: hi, Please have a look on official code names of different flavors of JAVA. Its so nice, every one have specific code name. http://java.sun.com/j2se/codenames.html But i am surprised why sun had decided to put TIGER as a official code name of J2SE 5.0. Any Guess... -- With Regards, Brajesh ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] H2 BitRock Windows Installer Available
I havent downloaded bitrock yet, but looking at the website docs, you can define postinstall actions to run scripts. So isn't it possible to simply run pg_restore from here? 2010/2/18 Lars Helge Øverland larshe...@gmail.com: 2010/2/18 Jason Pickering jason.p.picker...@gmail.com Hi Lars, Right now, there are two versions. The IZPack installer uses the native windows MSI. The user has to install this by themselves. The MSI handles the creation of the Postgres user, and the installation of the service. This should really be done as a silent install, but I did not figure out how to do this quite yet. I started as well on the BitRock variant, which is also in that branch. It will install the H2 DB by default. Knut has provided a lot of examples of BitRock installers using Postgres, but I have not looked at them yet. Ideally, we should just have a single installer, and BitRock (especially since we got the license from them) seems to be great. I have not really figured out yet though how to get it to install Postgres, but I am sure it is possible. Basically, we need create a BitRock installer that installs postgres. A batch file could then be used to load a sample DB. Knut has already done this in some of the older installers he created, so it should be pretty simple. I suppose this could also be done with IZpack, in a similar manner. The problem is that we need to be able to control the postgres user name and password, in order to populate the DB with the sample database. As for the BitRock installer, we can simple package the sample DB along with the installer, and ask the user if they want to install it or not. If they do, it will get copied to the /database folder, otherwise, we will leave it empty. Regards, jason Tutorial for silent install of postgres windows installer: http://pginstaller.projects.postgresql.org/silent.html I am not sure if this is possible but could we do this similar to how we install H2? Set it up, include a database, compress it and when installing, simply decompress it? ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] bzr merge problem
I am having something of a problem with 'bzr merge'. I checkout from trunk into say dhis2-trunk/ . Then I try bzr merge ../dhis2-xml to merge my changes but I keep getting conflicts along the lines of Conflict adding files to dhis-2/dhis-services/dhis-service-xml. Created directory. Conflict because dhis-2/dhis-services/dhis-service-xml is not versioned, but has versioned children. Versioned directory. Conflict adding file dhis-2/dhis-services/dhis-service-xml. Moved existing file to dhis-2/dhis-services/dhis-service-xml.moved. Any idea how to resolve these? Regards Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] bzr merge problem
2010/2/18 Lars Helge Øverland larshe...@gmail.com: No need to check out trunk... Just do bzr merge lp:dhis2 Yes I have been doing this all along. To keep my branch synched with trunk. But now I really want to go the other way ... I guess the easiest will be to do this and then push to trunk? Bob On Thu, Feb 18, 2010 at 1:50 PM, Bob Jolliffe bobjolli...@gmail.com wrote: I am having something of a problem with 'bzr merge'. I checkout from trunk into say dhis2-trunk/ . Then I try bzr merge ../dhis2-xml to merge my changes but I keep getting conflicts along the lines of Conflict adding files to dhis-2/dhis-services/dhis-service-xml. Created directory. Conflict because dhis-2/dhis-services/dhis-service-xml is not versioned, but has versioned children. Versioned directory. Conflict adding file dhis-2/dhis-services/dhis-service-xml. Moved existing file to dhis-2/dhis-services/dhis-service-xml.moved. Any idea how to resolve these? Regards Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] bzr merge problem
No that doesn't work either ... I'm getting the similar weird conflict messages: Conflict: can't delete dhis-2/dhis-services/dhis-service-xml because it is not empty. Not deleting. Conflict because dhis-2/dhis-services/dhis-service-xml is not versioned, but has versioned children. Versioned directory. .. etc The whole business seems similar to what is happening here : https://bugs.launchpad.net/bzr/+bug/477475 2010/2/18 Bob Jolliffe bobjolli...@gmail.com: 2010/2/18 Lars Helge Øverland larshe...@gmail.com: No need to check out trunk... Just do bzr merge lp:dhis2 Yes I have been doing this all along. To keep my branch synched with trunk. But now I really want to go the other way ... I guess the easiest will be to do this and then push to trunk? Bob On Thu, Feb 18, 2010 at 1:50 PM, Bob Jolliffe bobjolli...@gmail.com wrote: I am having something of a problem with 'bzr merge'. I checkout from trunk into say dhis2-trunk/ . Then I try bzr merge ../dhis2-xml to merge my changes but I keep getting conflicts along the lines of Conflict adding files to dhis-2/dhis-services/dhis-service-xml. Created directory. Conflict because dhis-2/dhis-services/dhis-service-xml is not versioned, but has versioned children. Versioned directory. Conflict adding file dhis-2/dhis-services/dhis-service-xml. Moved existing file to dhis-2/dhis-services/dhis-service-xml.moved. Any idea how to resolve these? Regards Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] populating test dir?
A quick question regarding unit tests and locationmanager. Does anyone know how to pre-populate resources into dhis2_test_dir? Regards Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] Fwd: [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1427: brought staxwax src back into dhis, implemented transformer, uri resolver and xml event pipe.
-- Forwarded message -- From: Bob Jolliffe bobjolli...@gmail.com Date: 2010/2/15 Subject: Fwd: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1427: brought staxwax src back into dhis, implemented transformer, uri resolver and xml event pipe. To: Lars Helge Øverland larshe...@gmail.com Sorry Lars. That was a mistake - it wasn't meant to go directly back into trunk but rather to my own branch. Got confused with mirroring trunk and pulling ands pushing. Anyway I fixed the build and all tests are passing. Please take a look. If its ok we can leave it where it is is. Main points: staxwax is back in src (but still org.amplecode) dxf import has converter separated out from it. We are still using cave process so nothing fundamental should be different. Cheers Bob -- Forwarded message -- From: nore...@launchpad.net Date: 14 February 2010 16:00 Subject: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1427: brought staxwax src back into dhis, implemented transformer, uri resolver and xml event pipe. To: DHIS 2 developers dhis2-devs@lists.launchpad.net revno: 1427 committer: Bob Jolliffe b...@bobj-laptop branch nick: trunk timestamp: Sun 2010-02-14 15:55:41 + message: brought staxwax src back into dhis, implemented transformer, uri resolver and xml event pipe. implemented locationmanager based uri resolver for xslt Refactoreed dxf import - separation of dxf converter class implemented logging xslt error handler added: dhis-2/dhis-api/src/main/java/org/hisp/dhis/external/location/LocationManagerResolver.java dhis-2/dhis-services/dhis-service-xml/ dhis-2/dhis-services/dhis-service-xml/pom.xml dhis-2/dhis-services/dhis-service-xml/src/ dhis-2/dhis-services/dhis-service-xml/src/main/ dhis-2/dhis-services/dhis-service-xml/src/main/java/ dhis-2/dhis-services/dhis-service-xml/src/main/java/org/ dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/ dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/ dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/factory/ dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/factory/XMLFactory.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/framework/ dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/framework/InputPort.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/framework/OutputPort.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/framework/XMLPipe.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/reader/ dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/reader/DefaultXMLEventReader.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/reader/DefaultXMLStreamReader.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/reader/XMLReader.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/transformer/ dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/transformer/TransformerTask.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/writer/ dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/writer/DefaultIndentingXMLStreamWriter.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/writer/DefaultLineBreakingXMLStreamWriter.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/writer/DefaultXMLStreamWriter.java dhis-2/dhis-services/dhis-service-xml/src/main/java/org/amplecode/staxwax/writer/XMLWriter.java dhis-2/dhis-services/dhis-service-xml/src/main/resources/ dhis-2/dhis-services/dhis-service-xml/src/main/resources/META-INF/ dhis-2/dhis-services/dhis-service-xml/src/main/resources/META-INF/dhis/ dhis-2/dhis-services/dhis-service-xml/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-services/dhis-service-xml/src/test/ dhis-2/dhis-services/dhis-service-xml/src/test/java/ dhis-2/dhis-services/dhis-service-xml/src/test/java/org/ dhis-2/dhis-services/dhis-service-xml/src/test/java/org/amplecode/ dhis-2/dhis-services/dhis-service-xml/src/test/java/org/amplecode/staxwax/ dhis-2/dhis-services/dhis-service-xml/src/test/java/org/amplecode/staxwax/framework/ dhis-2/dhis-services/dhis-service-xml/src/test/java/org/amplecode/staxwax/framework/XMLPipeTest.java dhis-2/dhis-services/dhis-service-xml/src/test/java/org/amplecode/staxwax/reader/ dhis-2/dhis-services/dhis-service-xml/src/test/java/org/amplecode/staxwax/reader/XMLReaderTest.java dhis-2/dhis-services/dhis-service-xml/src/test/java/org/amplecode/staxwax/transformer/ dhis-2/dhis-services/dhis-service-xml/src/test/java/org/amplecode/staxwax/transformer/TransformerTaskTest.java dhis-2/dhis-services/dhis-service-xml/src/test/java
Re: [Dhis2-devs] DHIS2 live installer
Hi Jason Thanks for the effort you have put into this. Basically you are correct - all the steps for putting the pieces together should be easily automated. Not being a maven guru, I have not taken this last important step. So I have used maven as far as building the jars. Doing the launch4j wrapper, creating the directories and lzpack and stuff I could do very easily with a makefile but it should be doable with the dreaded maven as well. Packaging with a default hibernate.properties which points to a postgres database is also of course trivial. Presumably you would install postgres with its native installer? And do that first. The missing piece of the puzzle would be to create the empty dhis pg database between the steps of installing postgres and installing dhis2-live. I guess the logic of using H2 as default is that it is more foolproof for a simple install. One way of doing this (which would also be cross-platform) would be to make a tcl based installer. Now I know this is not the latest buzz-hype language but there is a long history of creating installers this way (http://wiki.tcl.tk/1896) and it remains very actively maintained and developed. The benefit is you can combine the ability to create windows shortcuts, registry entries etc with the ability to script postgres (and mysql) with a cross-platform gui. I used to be a dab hand at embedding tcl in my previous life. Would love to look at something like this when I get a breather ... Did you try importing dxf into h2? The dxf2 project is not dead (just resting). It would be good to get a list of requirements of crucial things people have found missing. You will certainly get all your data values, datasets, orgunits etc. Cheers Bob 2010/2/10 Jason Pickering jason.p.picker...@gmail.com: I have not dealt with Postgres yet. I think it should be possible. I am going to see what the result of a DXF import is. Knut and Bob both tell me these are lossy. So, the other strategy will be to install postgres if needed, install a copy of the Zambia database, and then the rest of the application. Anyway, the source is here. bzr branch lp:~jason-p-pickering/+junk/dhis2-live-installer There are two files that are important. The install.xml file and the shortcutSpec.xml. The description for maven integration is here http://izpack.codehaus.org/izpack-maven-plugin/ Right now, I place all the needed files into the directories where they should be, and compile with the Izpack compile.bat file, something like this... C:\dhis2-live-shellc:\Program Files\IzPack\bin\compile.bat install.xml -b . - o dhis2-installer.jar Now, I just execute the dhis2-installer.jar, and everything works. What I mean in terms of the build is, it would be ideal to be able to populate the /webapps/dhis directory with a fresh build, and the /docs/ directory with a fresh build of the docs with maven. So, as we make changes to the application/docs/installer everything is kept fresh and up to date. Capiche? Again, this will likely require modification by individual implementers, but at least a skeleton project, able to be build by maven, would be a nice to have...but not absolutely necessary. Best, Jason 2010/2/10 Lars Helge Øverland larshe...@gmail.com: 2010/2/10 Jason Pickering jason.p.picker...@gmail.com OK. For now, I am populating everything manually, but it works. It would be great to have this as part of the build process. Maybe a maven guru can take this on, perhaps Jo? Not entirely urgent, as this installer is really for my own purposes here, but it is general enough to be reused elsewhere I think. A windows installer with Postgres and Jetty/DHIS2 Live would be useful, perfect for the scenario where rolling out a large number of offline installations. Don't know anything about izpack though. What exactly is it that you wanted to be part of the build process..? 2010/2/10 Lars Helge Øverland larshe...@gmail.com: 2010/2/10 Jason Pickering jason.p.picker...@gmail.com Hi there. I created a very basic installer last night using IZPack. Right now, this will install the system with dhis2-live.exe file you gave me yesterday. I think it should be possible to do an install with Postgres (there are some fragmented documents around). It will be more work for sure, but maybe we can reuse what Knut has done previously, once he finds it. I needed something quick and dirty yesterday, thus the urgency with this. Basically, it just creates the directory structure, and importantly for me, creates shortcuts and other ornamentation critical for end-users. Just a few questions. Is there source for the dhis2-live.exe application? The exe file is generated using Launch4j and is just a wrapper for the live JAR file. The xml file used to generate it (+ splash image etc) can be found in utils/launch4j in the repo. Lars Theoretically, the installer can be build with ant/maven as part
Re: [Dhis2-devs] DHIS2 live installer
On 10 February 2010 15:53, Jason Pickering jason.p.picker...@gmail.com wrote: I have made some more changes to the installer, and it now seems to work pretty OK. Basically, you will need to populate some different directories with prerequisites. 1) Put everything you need for postgres in the postgres directory.This usually involves unzipping that installer on the Postgres website. 2) Put an offline version of Java (to be sure you have a recent version) in the /java directory. Be sure that the file name matches that in the install.xml file You can't really do this. Stupid sun java licence requires click through install. The dhis2-live.exe wrapper will check for correct installed java version and suggest download if necessary. Not the best but best I could do. 3) Put the dhis2_user_manual_en.pdf from the documentation branch into the /docs directory 4) Change the hibernate.properties file to set your needs. 5) Compile with the IZPack compiler. There were numerous problem encountered trying to install this on Windows Vista. XP was a breeze. You must run the application with elevated privileges. http://wiki.evolvis.org/mvn-pkg-plugin/index.php/IzPack_on_Windows_Vista has some discussion on this. I guess this needs to be worked out. Strangely, when it was installed with elevated privileges, the user no longer had permissions to write to the directories, so DHIS2 just hung. I had to provide the user permissions. You must also authorize the port used by Java. Also, the restoration of the database was manual. This could be easily automated with a batch script. I think Knut has already done this with the BitRock installer. There are still several steps required for user intervention, which usually spells disaster. But for a supervised installation (as will be the case here) I think this installer pretty much suits our needs. The all important shortcut is there. Perhaps it will be useful to others. Knut has also provided the BitRock installer he did a while ago, and I will take a look at this one and commit to Launchpad as well. It sounds like it may be a good alternative as well. Next step (but not urgent) is to automate the builds with Maven. Seems possible, but if there is a Maven guru out there with not enough work to do, I gotta job for ya. Ciao, Jason 2010/2/10 Jason Pickering jason.p.picker...@gmail.com: Oh, I forgot to add, I am going to try with a full postgres install, instead of H2. This is going to cause problems otherswise in the long run. Better to try and get it right the first time around. 2010/2/10 Jason Pickering jason.p.picker...@gmail.com: I am certainly no maven guru either, but am much more comfortable with XML,and since we are already using Maven, it seems to make sense, and perhaps it is really not too difficult, as seen here.. http://www.jroller.com/vschiavoni/entry/how_to_izpack_installer_with In the latest revision, done just right now, I can install the VC++ redistributable, and Postgresql msi. I think this can be done silently as detailed here http://pginstaller.projects.postgresql.org/silent.html. Finally, a batch file using psql could be used to populate the database. It is not foolproof, but I will continue testing. Either way we go, it is fine with me, as long as their is an installer. I have something that meets my needs, well just about all of them. Just need to go that little extra bit and get Postgres installed, and then populated with the data, but it certainly seems feasible at this point. Best regards, Jason 2010/2/10 Bob Jolliffe bobjolli...@gmail.com: Hi Jason Thanks for the effort you have put into this. Basically you are correct - all the steps for putting the pieces together should be easily automated. Not being a maven guru, I have not taken this last important step. So I have used maven as far as building the jars. Doing the launch4j wrapper, creating the directories and lzpack and stuff I could do very easily with a makefile but it should be doable with the dreaded maven as well. Packaging with a default hibernate.properties which points to a postgres database is also of course trivial. Presumably you would install postgres with its native installer? And do that first. The missing piece of the puzzle would be to create the empty dhis pg database between the steps of installing postgres and installing dhis2-live. I guess the logic of using H2 as default is that it is more foolproof for a simple install. One way of doing this (which would also be cross-platform) would be to make a tcl based installer. Now I know this is not the latest buzz-hype language but there is a long history of creating installers this way (http://wiki.tcl.tk/1896) and it remains very actively maintained and developed. The benefit is you can combine the ability to create windows shortcuts, registry entries etc with the ability to script postgres (and mysql) with a cross-platform
Re: [Dhis2-devs] DHIS2 live installer
OK. maybe I'm wrong. I just assumed that to be the case because of how the licence dialog always popped up on linux installs. Thats why the openjdk was a such a good initiative. Anyway sun's lawyers are moot at the moment. Mostly staring looming redundancy in the face I imagine. Oracle's lawyers are the new kids on the block. Though I can't see them tracking down Jason in a hurry :-) Cheers Bob. 2010/2/10 Knut Staring knu...@gmail.com: Here is a guy who seems to be saying the practice of just providing JRE unpackaged and bundled is ok. By far the easiest thing to do (not bothering the poor user with all these different interfaces - one for DHIS, one for Java, one for the database...): What I mean is creating a subfolder in the installation directory with a cut down jre (which is allowed in the license agreement) http://forums.sun.com/thread.jspa?threadID=708451 2010/2/10 Knut Staring knu...@gmail.com 2010/2/10 Lars Helge Øverland larshe...@gmail.com On Wed, Feb 10, 2010 at 5:52 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Hmm, what do you mean I can't do it? Like it violates the license? Well, I did do it, and it worked, but I guess Sun's lawyers will be paying me a visit here in Lusaka. I packaged the EXE and triggered it during the installation, similar to the Postgres MSI. The same click-through installation procedures was used with postgres as well, although this could be done silently. Yeah, the little notice that you must download it will not work here, as there will be no internet where I will be next week. If the Sun distro cannot be packaged, even the EXE, then this is a problem, and we need to find another JRE. Nice work.. I think as long as the end user clicks agree to the the terms/license it is not a problem... Agree. Interesting to see they also provide silent installs...how does that work, license-wise? http://java.sun.com/javase/6/webnotes/install/jre/silent.html Knut Lars ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp -- Cheers, Knut Staring -- Cheers, Knut Staring ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Regular expressions in data validation rules
Hi Jason Looks good. I think we might want to push ahead and make the tables anyway. Then you can already start taking advantage of them with your queries outside of the system. We can then start implementing the other use cases as we go along - and hopefully not hit too many problems with dialect. Having a few regexes there might be a starting point for investigating the portability issues. I am pretty sure I will take advantage of such a table at some point to do schema based validation on import for example. Cheers Bob On 9 February 2010 05:20, Jason Pickering jason.p.picker...@gmail.com wrote: Just forwarding a side discussion with Hieu to the list for discussion and consideration. Input welcome. Regards, Jason -- Forwarded message -- From: Jason Pickering jason.p.picker...@gmail.com Date: Mon, Feb 8, 2010 at 9:25 PM Subject: Re: [Dhis2-devs] Regular expressions in data validation rules To: Hieu Dang Duy hieu.hispviet...@gmail.com Fantastic. Please review https://blueprints.launchpad.net/dhis2/+spec/regex-validation carefully. I have indicated to persistence objects which I think would be necessary. The first, would be a table that would store the regex itself. The can be a one-to-many relationship between regexes and other objects. So, the first table would simple store the regex itself, and a few other properties. So, to create that example query (Detect trailing spaces in names) we would have a persistence object like this.. a)regexid (taken from hibernate_sequence) b)name (Detect trailing spaces in names) c)expression ('\s+$') d)description('Trailing spaces should not be allowed.') e)resolution('The following objects have trailing spaces. Please delete them from the appropriate field') OK, so that would basically store the regex itself. Now, another table would store the particulars of what we want to apply the regex to. a) regexid (same as the hibernate sequence) b) table (organisationunit) c) field (name) d) negate (false) e) caseinsentive (defaults to false) So, we would need two dialogs. One to allow a user to define the regex, the other to assign a particular regex to a particular field. Now, this is where I need help. I know the SQL that will return the record set we want. SELECT organisationunitid, name from organisationunit where name ~('\s+$') If we were to select the negate field as TRUE, then the query would be SELECT organisationunitid, name from organisationunit where name !~('\s+$') If we select case insensitve the query would be (which of course in this case is meaningless) SELECT organisationunitid, name from organisationunit where name !~*('\s+$') This is Postgresql dialect.The key question for me is how do we make it database independent? Do we return a recordset from the organisationunit table, apply a regex with java.util.regex or can we just push it back to the DB? Both Postres, MySQL and H2 seem to support this (MySQL uses RLIKE or REGEXP and H2 uses LIKE while postgres uses ~ ) So, we could create a query and then just execute it directly on the DB. Otherwise, I am not sure how to do it directly with Hibernate. Perhaps it is easy, but I reviewed a few pages from Google, and there did not seem to be a clear answer. In the end however, the result set would then need to be returned to the user through during a data integrity check, with the list of fields that violate the rule, similar to what happens now. I think this is really incredibly important, and the example I have given thus far is really just a trivial example. I am sure there are many more situations where this would come in handy. Anyway, let me know what you think. Best regards, Jason On Mon, Feb 8, 2010 at 8:39 PM, Hieu Dang Duy hieu.hispviet...@gmail.com wrote: Dear Jason, I would like to work with u on this blueprint. As your previous mail, you make me open my eyes really at using RegEx in sql query. Absolutely, I've never seen this query like that before. I had try running your example on orgunit table. Amazing, it ran fine. Plz show off to me which things what I have to do for u? Hopefully that, I will try to help you test this if I can. On Mon, Feb 8, 2010 at 11:25 PM, Jason Pickering jason.p.picker...@gmail.com wrote: Hi there Hieu, I was hoping maybe to work with you on this. I have no idea how to code Java really, but I understand the code fairly well if you can point me in the right direction. I can certainly help you with the specs. I know exactly what needs to be done I think (see the blueprint) and can help with the testing and regex definitions. I think we should start with the data integrity checks. This seems like the quickest win. Do you have any time? Best regards, Jason On Sun, Feb 7, 2010 at 7:36 PM, Hieu Dang Duy hieu.hispviet...@gmail.com wrote: Hi all, I've no idea about using RegEx for validating data in DHIS2. Just a small comment, I
Re: [Dhis2-devs] Regular expressions in data validation rules
Hi There are 4 places one could use these regex's: 1. in the browser - client side validation 2. in the framework action/interceptors ( http://struts.apache.org/2.1.8.1/docs/validation.html) 3. in the object persist methods 4. post fact validation checks. There are lots of examples of validation with regex using javascript. Not much to say. Regarding 2 it is a natural way to proceed but it won't affect import which doesn't use the web interface. Regarding 3 we do need to be aware of those places where we bypass the object model. But where the object model is being used it is not difficult to validate with a regex on save. Of course we have to find the corresponding regex. That is really the first problem to solve. Where to find the regex within the model. Leaving values out of the picture for a while it might make sense to start with names. We have many named objects and the way we name then is frequently very important as the names also act as primary identifiers. We need somehow to add a class-wide string regex field for descendents of NamedObjects (you might want two - one for name and one shortName, but maybe start with name). This way the regex should be available to clients of orgunit, dataelement, category etc On importing from XML it is very natural and easy to do regular expression based validation using something like schematron which can validate against any xpath expression - but regex is only available in XPath2 which means using saxon and there are some concerns about introducing a saxon dependency. (We might re-look at that). Though there is also another reason to perhaps not use regex validation on dataValues. It will slow things enormously for large imports. It is also possible to do regular expression matching at the schema level (using either RelaxNG or XSD) and validate via schema. This might be the most viable way to go though it would imply that the Zambia dxf schema would have slightly different constraints to say the Tajik one. And these schema variations would have to be auto-generated somehow based on the local database. Regards Bob On 8 February 2010 08:57, Jason Pickering jason.p.picker...@gmail.comwrote: Hi Murod, This, of course, is one particular trivial example and was provided to illustrate a point. I totally agree, this particular example could be solved through JavaScript validation on the client, and it may already be there in 2.0. I have found this particular example by importing data from 1.4, where organization units are allowed to have trailing spaces. I think this is not really a one-off issue, as many people may need to import data from external systems, which may or may not have this particular validation enforced. What I am trying to get at is that regular expressions could be used to expand the scope of the current data integrity checks, by enforcing certain patterns on the data (which in some cases could also be enforced through JavaScript in through the UI). Of course, if we can do it at the UI level great, but it may not work in all cases, especially when receiving data from external system. This is why I think that the data integrity checks come in place. For instance, as I mentioned in the specs, I need to find all organizational units that do not correspond to the naming conventions here in Zambia. I can do this with this... SELECT name from organisationunit where name !~ '^(ce|co|ea|ls|lu|no|nw|so|we) ' Well, I found 47, which do not correspond to the naming convention. I have made my dislike of the supposed best practice naming conventions in earlier threads, but with the implmenetation of regex for checking of these conventions, at least we could enforce them, even if it is ex post facto. Again, these are all examples, and they are really impossible to predict what they may be, thus the need for flexible rules, built by administrators/users, and then applied during data integrity checks (and/or during data entry). Regards, Jason On Mon, Feb 8, 2010 at 9:55 AM, Murodullo Latifov murodlati...@yahoo.com wrote: Hi Jason, Looks like single time task if I understood you correctly? If you want to clean data already on database. like data integrity checking. Why not to make it clean at the very beginning, when particular record being captured? For this one could use regexp in javascript on client side too. As for leading and trailing spaces String.trim( string) should do before passing to database. regards, murod - Original Message From: Jason Pickering jason.p.picker...@gmail.com To: Hieu Dang Duy hieu.hispviet...@gmail.com Cc: dhis2-devs dhis2-devs@lists.launchpad.net Sent: Mon, February 8, 2010 1:05:27 PM Subject: Re: [Dhis2-devs] Regular expressions in data validation rules Hi Hieu, Yes, I am actively fishing for a developer to implement this, as it will really save me a huge amount of work in trying to clean up data. I have
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1404: Implemented DHIS 1.4 export of data values
2010/2/8 Lars Helge Øverland larshe...@gmail.com: On Mon, Feb 8, 2010 at 11:59 AM, nore...@launchpad.net wrote: revno: 1404 committer: Lars Helge Oeverland larshe...@gmail.com branch nick: trunk timestamp: Mon 2010-02-08 11:56:08 +0100 message: Implemented DHIS 1.4 export of data values modified: There is actually still a snag here. DHIS 1.4 only accepts the 7zip/lzma format currently. I have talked Greg into making 1.4 accept zip/deflate too. Isn't it better to have gzip/deflate? We are not talking about compressing an archive of files but rather compressing a single stream. Also I think the original void write( BufferedWriter writer, ExportParams params ) might be better than void write( ZipOutputStream out, ExportParams params ). It seems unnecessary that the convertor should have to know anything about zip, gzip, 7zip or what have you. It should know how to write csv to a stream. I suspect that how the stream is later compressed is better deferred to later. Cheers Bob dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/CSVConverter.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportPipeThread.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/converter/ReportTableDataConverter.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/exporter/CSVExportPipeThread.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/exporter/DefaultCSVExportService.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/util/CsvUtil.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataValueConverter.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/StreamUtils.java dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/externalExportMenu.vm -- lp:dhis2 https://code.launchpad.net/~dhis2-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. === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/CSVConverter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/CSVConverter.java 2009-03-03 16:46:36 + +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/CSVConverter.java 2010-02-08 10:56:08 + @@ -28,7 +28,7 @@ */ import java.io.BufferedReader; -import java.io.BufferedWriter; +import java.util.zip.ZipOutputStream; /** * @author Lars Helge Overland @@ -36,7 +36,7 @@ */ public interface CSVConverter { - void write( BufferedWriter writer, ExportParams params ); + void write( ZipOutputStream out, ExportParams params ); void read( BufferedReader reader, ImportParams params ); } === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportPipeThread.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportPipeThread.java 2009-11-02 15:55:44 + +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportPipeThread.java 2010-02-08 10:56:08 + @@ -52,7 +52,8 @@ private ListXMLConverter xsdConverters = new ArrayListXMLConverter(); private ListXMLConverter xmlConverters = new ArrayListXMLConverter(); - + private ListCSVConverter csvConverters = new ArrayListCSVConverter(); + // - // Parameters // - @@ -122,6 +123,11 @@ this.xmlConverters.add( converter ); } + public void registerCSVConverter ( CSVConverter converter ) + { + this.csvConverters.add( converter ); + } + // - // Thread implementation // - @@ -159,9 +165,20 @@ }
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1404: Implemented DHIS 1.4 export of data values
2010/2/8 Lars Helge Øverland larshe...@gmail.com: 2010/2/8 Bob Jolliffe bobjolli...@gmail.com 2010/2/8 Lars Helge Øverland larshe...@gmail.com: On Mon, Feb 8, 2010 at 11:59 AM, nore...@launchpad.net wrote: revno: 1404 committer: Lars Helge Oeverland larshe...@gmail.com branch nick: trunk timestamp: Mon 2010-02-08 11:56:08 +0100 message: Implemented DHIS 1.4 export of data values modified: There is actually still a snag here. DHIS 1.4 only accepts the 7zip/lzma format currently. I have talked Greg into making 1.4 accept zip/deflate too. Isn't it better to have gzip/deflate? We are not talking about compressing an archive of files but rather compressing a single stream. Also I think the original void write( BufferedWriter writer, ExportParams params ) might be better than void write( ZipOutputStream out, ExportParams params ). It seems unnecessary that the convertor should have to know anything about zip, gzip, 7zip or what have you. It should know how to write csv to a stream. I suspect that how the stream is later compressed is better deferred to later. Problem is that DHIS 1.4 uses a CSV file for data and an XML file for meta-data and keeps both inside the archive... I was was not able to have multiple zip entries while using the Writer.. Ah. Ok. I do remember. Then you would need an archive (zip or the seven thing) rather a gzipped stream. But does your CSV writer need to know that? Surely it just has an interest in churning out csv datavalues. Some other component should put the csv stream together with the xml stream into the zip. Cheers Bob dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/CSVConverter.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportPipeThread.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/converter/ReportTableDataConverter.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/exporter/CSVExportPipeThread.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/exporter/DefaultCSVExportService.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/util/CsvUtil.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataValueConverter.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/StreamUtils.java dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/externalExportMenu.vm -- lp:dhis2 https://code.launchpad.net/~dhis2-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. === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/CSVConverter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/CSVConverter.java 2009-03-03 16:46:36 + +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/CSVConverter.java 2010-02-08 10:56:08 + @@ -28,7 +28,7 @@ */ import java.io.BufferedReader; -import java.io.BufferedWriter; +import java.util.zip.ZipOutputStream; /** * @author Lars Helge Overland @@ -36,7 +36,7 @@ */ public interface CSVConverter { - void write( BufferedWriter writer, ExportParams params ); + void write( ZipOutputStream out, ExportParams params ); void read( BufferedReader reader, ImportParams params ); } === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportPipeThread.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportPipeThread.java 2009-11-02 15:55:44 + +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportPipeThread.java 2010-02-08 10:56:08 + @@ -52,7 +52,8 @@ private ListXMLConverter xsdConverters = new ArrayListXMLConverter(); private ListXMLConverter xmlConverters
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1404: Implemented DHIS 1.4 export of data values
Hi Saptarshi When I looked at this briefly last year I saw that this library provides the lzma compression algorithm. As you say the algorithm is implementable in java, But 7z doesn't just do compression/decompression. It also archives collections of files - like zip. The layout of these archives is not in this sdk and I'm not sure if its documented anywhere. Now I'm sure it could be reverse engineered from the c/c++ code but to the best of my knowledge nobody has done it. So you can certainly lzma compress individual streams (like you can gzip them), but that doesn't complete the picture of creating a 7z archive. Probably Jason's exec approach could work. Cheers Bob On 8 February 2010 17:23, Saptarshi Purkayastha sun...@gmail.com wrote: Isn't LZMA SDK providing the JAVA library?? and comparisons are here --- Regards, Saptarshi PURKAYASTHA Director R D, HISP India Health Information Systems Programme My Tech Blog: http://sunnytalkstech.blogspot.com You Live by CHOICE, Not by CHANCE On 8 February 2010 18:17, Jason Pickering jason.p.picker...@gmail.com wrote: No clue if this is possible, but if the user was to provide a path to a native OS executable, could DHIS push the job off to this? 2010/2/8 Bob Jolliffe bobjolli...@gmail.com: 2010/2/8 Lars Helge Øverland larshe...@gmail.com: Yup agree with that just could not make it write the appropriate zip entries that way.. Open for being enlighted here.. OK. Can't really look now but I guess it must be tricky :-) Will maybe look later in the week. If the day comes (and I don't see it soon) that you had an option to write to either 7z or zip format I'm just thinking you would want the packaging decoupled from the production of the streams. Bob 2010/2/8, Bob Jolliffe bobjolli...@gmail.com: 2010/2/8 Lars Helge Øverland larshe...@gmail.com: 2010/2/8 Bob Jolliffe bobjolli...@gmail.com 2010/2/8 Lars Helge Øverland larshe...@gmail.com: On Mon, Feb 8, 2010 at 11:59 AM, nore...@launchpad.net wrote: revno: 1404 committer: Lars Helge Oeverland larshe...@gmail.com branch nick: trunk timestamp: Mon 2010-02-08 11:56:08 +0100 message: Implemented DHIS 1.4 export of data values modified: There is actually still a snag here. DHIS 1.4 only accepts the 7zip/lzma format currently. I have talked Greg into making 1.4 accept zip/deflate too. Isn't it better to have gzip/deflate? We are not talking about compressing an archive of files but rather compressing a single stream. Also I think the original void write( BufferedWriter writer, ExportParams params ) might be better than void write( ZipOutputStream out, ExportParams params ). It seems unnecessary that the convertor should have to know anything about zip, gzip, 7zip or what have you. It should know how to write csv to a stream. I suspect that how the stream is later compressed is better deferred to later. Problem is that DHIS 1.4 uses a CSV file for data and an XML file for meta-data and keeps both inside the archive... I was was not able to have multiple zip entries while using the Writer.. Ah. Ok. I do remember. Then you would need an archive (zip or the seven thing) rather a gzipped stream. But does your CSV writer need to know that? Surely it just has an interest in churning out csv datavalues. Some other component should put the csv stream together with the xml stream into the zip. Cheers Bob dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/CSVConverter.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportPipeThread.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/converter/ReportTableDataConverter.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/exporter/CSVExportPipeThread.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/exporter/DefaultCSVExportService.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/csv/util/CsvUtil.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataValueConverter.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis
Re: [Dhis2-devs] Question about the Organisation Unit Close Date
2010/2/5 Lars Helge Øverland larshe...@gmail.com On Fri, Feb 5, 2010 at 12:27 PM, Viet Nguyen phamquocv...@gmail.comwrote: Hi, I wonder what I have to do with this field , and also the field Alow entering data of the Organisation Unit . As what I'm thinking is : If an organisation unit is closed in real. User have to set the close date for it. Then we should automatically set the allow entering data to FALSE. If an organisation Unit is not allowing entering data. Then in the data entry form. If user try to enter data for it. We should not allow them, and show a popup to inform that this orgUnit is closed. Also the same in Import data modules. Is this right ? Hi Viet, if the orgunit is closed then one should not be able to enter data for it. But there is no allow-enter-data attribute on OrganisationUnit in trunk so I'm not sure about that... Lars Hi Viet and Lars There is active. Is this what you mean? In which case I'd also be interested to know the history - is active=false synonomous with closedDate==notEmpty ? Or are there other permutations which make sense? I really don't know. Just one thought about having a date for closed. I would interpret this as an indication that it doesn't make sense to enter datavalues (through ui or import) for that orgunit with a period which is after the close date. There might be a case where you would have to enter datavalues from periods prior to the close date. I'm thinking around retsoring backups or some such scenario. So barring any data entry might be a bit dangerous. Cheers Bob ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Patient Identifier Management functions
2010/2/4 Ola Hodne Titlestad olati...@gmail.com 2010/2/4 Lars Helge Øverland larshe...@gmail.com On Thu, Feb 4, 2010 at 3:38 PM, Ola Hodne Titlestad olati...@gmail.comwrote: Hi, Is there some reason for not simply reusing what OpenMRS has done in this area? Seems like we are dealing with a lot of fundamental patient level issues (not just in this thread) that I am sure have been discussed and taken care of already in a mature and widely used application like OpenMRS. So what have they done in openmrs? Exactly the kind of question that needs to be asked. I am sure Saptarshi, having developed modules for OpenMRS would know, and if not there is an active openmrs mailing list and lots of documentation on their wiki, and the source code is available. Yes should be easy to find out. There was some discussion some months back which I followed vaguely. I am pretty sure Saptarshi has already looked into what they do. A more long term question: Are we still planning to integrate this community system with OpenMRS as in e.g. using their API for patient management etc. or is that no longer the plan? From what I have seen it looks like there was a departure from that proposed approach to one that is more similar to existing dhis paradigms. Hopefully with half an eye still kept on possible integration ... Cheers Bob Ola -- ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Patient Identifier Management functions
Google knows everything ... http://n2.nabble.com/Generation-of-unique-IDs-and-pre-printing-of-the-cards-PIH-Baobab-AMPATH-and-MVP-Time-important-td3986730.html On 4 February 2010 15:56, Bob Jolliffe bobjolli...@gmail.com wrote: 2010/2/4 Ola Hodne Titlestad olati...@gmail.com 2010/2/4 Lars Helge Øverland larshe...@gmail.com On Thu, Feb 4, 2010 at 3:38 PM, Ola Hodne Titlestad olati...@gmail.comwrote: Hi, Is there some reason for not simply reusing what OpenMRS has done in this area? Seems like we are dealing with a lot of fundamental patient level issues (not just in this thread) that I am sure have been discussed and taken care of already in a mature and widely used application like OpenMRS. So what have they done in openmrs? Exactly the kind of question that needs to be asked. I am sure Saptarshi, having developed modules for OpenMRS would know, and if not there is an active openmrs mailing list and lots of documentation on their wiki, and the source code is available. Yes should be easy to find out. There was some discussion some months back which I followed vaguely. I am pretty sure Saptarshi has already looked into what they do. A more long term question: Are we still planning to integrate this community system with OpenMRS as in e.g. using their API for patient management etc. or is that no longer the plan? From what I have seen it looks like there was a departure from that proposed approach to one that is more similar to existing dhis paradigms. Hopefully with half an eye still kept on possible integration ... Cheers Bob Ola -- ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Bug 517047] Re: DHIS 1.4 file imports ignores the OrgUnit code field
Hi Jason Please send me a (small) dhis14 sample export file. I don't have one. Then I'll look at fixing this. Bob On 4 February 2010 13:19, jason.p.pickering jason.p.picker...@gmail.comwrote: There is no uniqueness constraint in DHIS1.4 on the OrgUnitCode field. therefore, the uniqueness constraint in DHIS 2 should be relaxed, to allow data from 1.4 to be imported. A data integrity rule could then be added to DHIS2 to inform the user that there are duplicate codes. Since the code field is not currently being used for anything specific in DHIS2, it would be better to allow the user to resolve duplicate codes if this is an issue. -- DHIS 1.4 file imports ignores the OrgUnit code field https://bugs.launchpad.net/bugs/517047 You received this bug notification because you are a member of DHIS 2 coordinators, which is the registrant for DHIS. Status in DHIS 2 - District Health Information Software: New Bug description: In some installations, the OrgUnitCode field is used to store official in-country codes assigned to health facilities, and districts. In order to import data such as census data, the code is often consistent between government agencies, but the name of the organisation unit is not. Currently DHI2 does not import the OrgUnitCode field. I would suggest that this be imported into the code field during a file import. -- DHIS 1.4 file imports ignores the OrgUnit code field https://bugs.launchpad.net/bugs/517047 You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. Status in DHIS 2 - District Health Information Software: New Bug description: In some installations, the OrgUnitCode field is used to store official in-country codes assigned to health facilities, and districts. In order to import data such as census data, the code is often consistent between government agencies, but the name of the organisation unit is not. Currently DHI2 does not import the OrgUnitCode field. I would suggest that this be imported into the code field during a file import. ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Patient Identifier Management functions
you are taking about me? What silly names do we have in mind? 2010/2/1 Lars Helge Øverland larshe...@gmail.com On Mon, Feb 1, 2010 at 11:09 AM, Viet Nguyen phamquocv...@gmail.comwrote: Hi Abyot, Do you have any plan for Patient Identifier Management functions ? Is it ok if i work on this ? It would be great if the Chief complainer for silly Names for Things could provide a small piece of advice on this matter... ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Patient Identifier Management functions
2010/2/1 Lars Helge Øverland larshe...@gmail.com 2010/2/1 Bob Jolliffe bobjolli...@gmail.com you are taking about me? What silly names do we have in mind? Yes. Just kidding, no silly names this time. Oh well. I guess we can always try silly indentifiers instead :-) We are going to implement system generated patient identifiers for the patient module. VN team has suggested: - Set of characters dependent on the organisation unit - Set of digits, include date and number of patients in the day. Viet has suggested an algorithm dependent on patient information and the time of creation. Jason has suggested an UUID. I think identifier for a person and identifier for a person's file are subtley different. Patients may already have a number of personal state-issued identifiers (hence the flexible identifier type). Many of these might well provide the quality of uniqueness but not necessarily the anonymity you would look for when for example tracking lab samples. But it seems what you are looking at is the generation of a file number for the patient. Like would be written on top of the cardboard folder in real life. In which case I would be tempted to follow the simplicity of the VN team suggestion. Of course patients can migrate between org units which needs to be taken into account. If privacy is more of a concern then this information can instead be hashed, probably along similar lines to Viet's algorithm. A few things to consider: 1. there should be a check digit built in to the identifier 2. regular expression validation can be useful 3. if the identifier is meant to be human readable (and writable) as well as machine readable then you don't want to go much over 8 characters 4. before designing an identifier we should be very clear what the identifier should be used for. There are lots of examples of scope creep where identifiers primarily designed for social security, tax, national identification etc are repurposed as health identifiers. Often they do not have the required characteristics for this. So maybe that's the starting point - what exactly can we say this identifier is to be used for and not used for. The openmrs guys have some experience of issuing patient identifiers (and printed barcodes) in Kenya. We should look at what they have done. I have no idea if what they do represent s best practice or not but they do have concrete experience to share. A couple of broader references: A discussion on the use of SSN which also contains some useful criteria to frame thinking about identifier design: http://epic.org/privacy/medical/hhs-id-798.html A report commisioned in Ireland which specifically addresses the problem of re-purposing: http://www.hiqa.ie/media/pdfs/Unique_Health_Identifier_Report.pdf That's all the thoughts I can muster for now. Cheers Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Installation on Ubuntu
The deb package as it is currently is set up with dependencies on java and tomcat (so they will be triggered to install if necessary). By default it will just run out of the box using an h2 database in /opt/dhis2/database. I held off on the postgres dependency because I know there are also mysql users out there so it didn't seem right to make it a dependency. So currently you would be required to: 1. install dhis2 from deb 2. install postgres (apt-get install ) 3. configure hibernate.properties manually I guess what would be useful hand-holding would be to have a dhis2-postgres meta package which does the above three, though I'm not sure entirely how to handle dependencies where dhis2 is not yet available from ubuntu repositories. Basically this would just contain just the hibernate.properties and the dependency information. A dhis2-mysql package would look very similar. One solution would be to host the debs in a repository on dhis2.org. Then it would just be a case of getting users to add http://dhis2.org to their software sources. A simpler (and much uglier) solution is to create dhis2-postgres as an alternative version of dhis2 package with the exception that this has the webapp as well as the postgres dependency and hibernate.properties Cheers Bob PS. How real is the use case. ie is it worth putting effort into this? I didn't get the sense that there was too much interest in the deb. It seems to be a useful little curiosity. 2010/1/28 Ola Hodne Titlestad olati...@gmail.com Hi, I think it would be really useful to have a .deb package that is set up to use postgres out of the box. Ideally the DHIS deb install process should trigger installs of any other needed packages, like java, tomcat, postgres. Would that be possible? Ola -- 2010/1/28 Knut Staring knu...@gmail.com There is some good info at http://bazaar.launchpad.net/~dhis2-devs-core/dhis2/trunk/annotate/head:/tools/dhis2deb/Readme.txthttp://bazaar.launchpad.net/%7Edhis2-devs-core/dhis2/trunk/annotate/head:/tools/dhis2deb/Readme.txt But it is hidden away in an obscure place and not complete enough to be truly helpful for an installation - unlike the DHIS2 Live or IzPack installers we have for Windows. k 2010/1/28 Lars Helge Øverland larshe...@gmail.com See dhis2/tools/dhis2deb/Readme.txt in the repo. -- Cheers, Knut Staring ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Installation on Ubuntu
Hi 2010/1/28 Knut Staring knu...@gmail.com Thanks Bob, I don't know how many people are currently interested in running DHIS2 on Ubuntu, but I don't think it is negligible, and I would like to see it increase. The reason this came up now, is that I have been trying to guide people in Malawi over IM, not an efficient process. Installation needs to be made as easy as possible - preferably also in standalone conditions, i.e. where you bring a USB stick or CD to a computer with no or slw internet connection. We should not require end users to have to touch the command line or know about config files. This is exactly what dhis2-live does using h2. Unpack and run. And its platform neutral. There are several approaches, and we could offer more than one: 0) Write out the steps (including for Postgres and Mysql) in a clear and easy to follow manner, prominently displayed on dhis2.org OK. I can do that. 1) An installer that basically just unzips everything you need. This was done already 3-4 years ago in Kerala by Øystein, using BitRock (he also made a CD image that installed DHIS2 and Mysql on Windows, then created a partition for Linux, installed the very lightweight http://wolvix.org/ distro with Tomcat and pointed it to the same Mysql database on the Windows partition). 2) A more conventional installer using IzPack that does what is required 3) meta-debs as you suggest You can yourself just go into dhis2/tools/dhis2deb and modify the hibernate.properties to connect to a postgres database instead. And add postgres to dependencies. Then make to create a dhis2-postgres.deb version. Its still a bit complicated because you'd have to also create the dhis2 database in postgres as part of the installation. (That's also what is nice about h2 :-) Ideally IMHO we might have a super-admin view of dhis without the database connection with a set of simple web steps to setup the connection rather than fiddling manually with hibernate.properties. Not unlike the openmrs installer. A puzzle to solve is that we use the same database for user authentication that we use for data. So without connection you can't log in ... and without login you can't set up connections ... etc. Would be nice one day to separate these. Cheers Bob 4) Provide downloadable Ubuntu virtual machines images with everything nicely set up My take is that I could do 0) right now, 3) could follow when you have some time, and 4) perhaps longer term. Knut On Thu, Jan 28, 2010 at 12:08 PM, Bob Jolliffe bobjolli...@gmail.comwrote: The deb package as it is currently is set up with dependencies on java and tomcat (so they will be triggered to install if necessary). By default it will just run out of the box using an h2 database in /opt/dhis2/database. I held off on the postgres dependency because I know there are also mysql users out there so it didn't seem right to make it a dependency. So currently you would be required to: 1. install dhis2 from deb 2. install postgres (apt-get install ) 3. configure hibernate.properties manually I guess what would be useful hand-holding would be to have a dhis2-postgres meta package which does the above three, though I'm not sure entirely how to handle dependencies where dhis2 is not yet available from ubuntu repositories. Basically this would just contain just the hibernate.properties and the dependency information. A dhis2-mysql package would look very similar. One solution would be to host the debs in a repository on dhis2.org. Then it would just be a case of getting users to add http://dhis2.org to their software sources. A simpler (and much uglier) solution is to create dhis2-postgres as an alternative version of dhis2 package with the exception that this has the webapp as well as the postgres dependency and hibernate.properties Cheers Bob PS. How real is the use case. ie is it worth putting effort into this? I didn't get the sense that there was too much interest in the deb. It seems to be a useful little curiosity. 2010/1/28 Ola Hodne Titlestad olati...@gmail.com Hi, I think it would be really useful to have a .deb package that is set up to use postgres out of the box. Ideally the DHIS deb install process should trigger installs of any other needed packages, like java, tomcat, postgres. Would that be possible? Ola -- 2010/1/28 Knut Staring knu...@gmail.com There is some good info at http://bazaar.launchpad.net/~dhis2-devs-core/dhis2/trunk/annotate/head:/tools/dhis2deb/Readme.txthttp://bazaar.launchpad.net/%7Edhis2-devs-core/dhis2/trunk/annotate/head:/tools/dhis2deb/Readme.txt But it is hidden away in an obscure place and not complete enough to be truly helpful for an installation - unlike the DHIS2 Live or IzPack installers we have for Windows. k 2010/1/28 Lars Helge Øverland larshe...@gmail.com See dhis2/tools/dhis2deb/Readme.txt in the repo. -- Cheers, Knut Staring
Re: [Dhis2-devs] Installation on Ubuntu
Hi Lars 2010/1/28 Lars Helge Øverland larshe...@gmail.com Ideally IMHO we might have a super-admin view of dhis without the database connection with a set of simple web steps to setup the connection rather than fiddling manually with hibernate.properties. Not unlike the openmrs installer. A puzzle to solve is that we use the same database for user authentication that we use for data. So without connection you can't log in ... and without login you can't set up connections ... etc. Would be nice one day to separate these. What would the alternatives be for storing user authentication? I'm not sure exactly. As I say it's a bit of a puzzle and the best authentication mechanism depends quite a bit on the installation context. DHIS2 running in the cloud and accessed over the internet as in India is a very different proposition to running browser, tomcat and db server on the shared pentium III machine in a dusty office. But there could be a few. I guess the question is whether we want to separate access to the application from access to a particular database (from a developer perspective this is obviously useful because we flip databases all the time - might be less so for a real user whose only need to be authenticated is to access a particular database). But off the top of my head there might be: (i) a separate user/password database perhaps using h2 or .htpasswd style files (ii) a separate ldap service (iii) the database native user/privilege system (iv) some kind of hybrid separating authentication to the application from database authentication I guess each of the above throws up little (and big) challenges regarding how and when to instantiate hibernate sessions. The idea of all the user authentication stuff being in the database seems to fit best when (i) the internet is in the way of physical access to hibernate.properties or (ii) when using databases like h2 or MSAccess where there is no database server between the user and the data. A hybrid solution might be something like there being a single super-admin user who can login without the database connection and who can modify hibernate.properties. Or in a variation on this theme, a pre-installed mode where the first user is able to configure the system like the openmrs setup wizard. I do think that using (iii) is the only reasonably secure option when considering standalone desktop systems. Each user having his/her own password to the database rather than all users effectively sharing the one which is plaintext in hibernate.properties. But this does present enormous challenges of creating hibernate.sessions on the fly, when to run startup routines etc. This would probably require to request an admin password through a dialog when dhis2 is started which might or might not be reasonable depending on context. I guess there are different security profiles which depend a lot on context which are really hard to take into account with a simple automated installer. Hence my taking the easy way out with h2. Will think about this later. Cheers Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero
2010/1/26 Lars Helge Øverland larshe...@gmail.com 2010/1/26 Trí Trần Thanh tranthanhtr...@gmail.com Tran Thanh Tri HISP Viet Nam Cell phone: +84903670967 Website: http://tringuyenvn.com 2010/1/25 nore...@launchpad.net revno: 1337 committer: Lars Helge Oeverland larshe...@gmail.com branch nick: trunk timestamp: Mon 2010-01-25 15:30:51 +0100 message: Improved DataValue.isZero modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunkhttps://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-subscriptionhttps://code.launchpad.net/%7Edhis2-devs-core/dhis2/trunk/+edit-subscription . === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java 2010-01-25 14:08:24 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java 2010-01-25 14:30:51 + @@ -198,7 +198,7 @@ public boolean isZero() { return dataElement != null dataElement.getType().equals( DataElement.VALUE_TYPE_INT ) - value != null ( value.equals( 0 ) || value.startsWith( 0. ) ); This script will not working fine. *new Double(0.001).intValue()==0 is true but it must be false.* I thing it must be n*ew Double(value)==(new Double(0))* what do you thing ? + value != null new Double( value ).i I don't think we should allow decimal numbers in the first place, eg it cant be 0.5 people with malaria or vaccines given. But Jason pointed out that regex might be the better solution for this in any case. Maybe something like ^[0]*[.]?[0]*$ Start word. Read any number of zeroes followed optionally by a '.' followed by any number of zeroes. End word. From my emacs buffer, M indicates a match 0 M 003 0.00 M 0.03 .000 M 00.0 M 008000 Cheers Bob Feel free to improve, I don't have strong opinions on this. ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero
I don't think a java.util.regex solution would be hugely more complicated. One advantage is that all it expects is the string datavalue. If casting to a double you might also need to catch a class caste exception to be on the safe side. ie you have to ask is it a double first before you can ask is that double = zero. Cheers Bob 2010/1/26 Trí Trần Thanh tranthanhtr...@gmail.com Hi all, my way is easy and simple. Cast to Double and compare with new Double(0). new Double(value).equal(new Double(0)) ? how do you think? On 1/26/10, Bob Jolliffe bobjolli...@gmail.com wrote: 2010/1/26 Lars Helge Øverland larshe...@gmail.com 2010/1/26 Trí Trần Thanh tranthanhtr...@gmail.com Tran Thanh Tri HISP Viet Nam Cell phone: +84903670967 Website: http://tringuyenvn.com 2010/1/25 nore...@launchpad.net revno: 1337 committer: Lars Helge Oeverland larshe...@gmail.com branch nick: trunk timestamp: Mon 2010-01-25 15:30:51 +0100 message: Improved DataValue.isZero modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunkhttps://code.launchpad.net/%7Edhis2-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-subscriptionhttps://code.launchpad.net/%7Edhis2-devs-core/dhis2/trunk/+edit-subscription https://code.launchpad.net/%7Edhis2-devs-core/dhis2/trunk/+edit-subscription . === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java 2010-01-25 14:08:24 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java 2010-01-25 14:30:51 + @@ -198,7 +198,7 @@ public boolean isZero() { return dataElement != null dataElement.getType().equals( DataElement.VALUE_TYPE_INT ) - value != null ( value.equals( 0 ) || value.startsWith( 0. ) ); This script will not working fine. *new Double(0.001).intValue()==0 is true but it must be false.* I thing it must be n*ew Double(value)==(new Double(0))* what do you thing ? + value != null new Double( value ).i I don't think we should allow decimal numbers in the first place, eg it cant be 0.5 people with malaria or vaccines given. But Jason pointed out that regex might be the better solution for this in any case. Maybe something like ^[0]*[.]?[0]*$ Start word. Read any number of zeroes followed optionally by a '.' followed by any number of zeroes. End word. From my emacs buffer, M indicates a match 0 M 003 0.00 M 0.03 .000 M 00.0 M 008000 Cheers Bob Feel free to improve, I don't have strong opinions on this. ___ Mailing list: https://launchpad.net/~dhis2-devs https://launchpad.net/%7Edhis2-devs https://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs https://launchpad.net/%7Edhis2-devs https://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp -- Sent from my mobile device Tran Thanh Tri HISP Viet Nam Cell phone: +84903670967 Website: http://tringuyenvn.com ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero
2010/1/26 Jason Pickering jason.p.picker...@gmail.com Hi Bob, I might suggest just a small change. ^[0]*[\.,]?[0]*$ Escape the period and add a comma for some locales that use commas instead of periods. I am not aware of other decimal points, perhaps a semicolon? True. This is better. I am a bit confused though about the concept here. Values in DHIS are stored in the DB as text, as far as I can tell. People should be allowed to enter decimal values I think. We have an data element (Number of liters of fuel). There is no reason why this could not be entered (and as far as I know, it is) in decimal values. I am sure there are other examples. Perhaps the validation rules is a better place to put these types of rules? It sure would be nice to have Regex capability there, to allow people that are so inclined to create expressions for validation that would just be evaluated with a regular expression. Regards, JPP 2010/1/26 Bob Jolliffe bobjolli...@gmail.com: 2010/1/26 Lars Helge Øverland larshe...@gmail.com 2010/1/26 Trí Trần Thanh tranthanhtr...@gmail.com Tran Thanh Tri HISP Viet Nam Cell phone: +84903670967 Website: http://tringuyenvn.com 2010/1/25 nore...@launchpad.net revno: 1337 committer: Lars Helge Oeverland larshe...@gmail.com branch nick: trunk timestamp: Mon 2010-01-25 15:30:51 +0100 message: Improved DataValue.isZero modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunkhttps://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-subscriptionhttps://code.launchpad.net/%7Edhis2-devs-core/dhis2/trunk/+edit-subscription . === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java 2010-01-25 14:08:24 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java 2010-01-25 14:30:51 + @@ -198,7 +198,7 @@ public boolean isZero() { return dataElement != null dataElement.getType().equals( DataElement.VALUE_TYPE_INT ) - value != null ( value.equals( 0 ) || value.startsWith( 0. ) ); This script will not working fine. new Double(0.001).intValue()==0 is true but it must be false. I thing it must be new Double(value)==(new Double(0)) what do you thing ? + value != null new Double( value ).i I don't think we should allow decimal numbers in the first place, eg it cant be 0.5 people with malaria or vaccines given. But Jason pointed out that regex might be the better solution for this in any case. Maybe something like ^[0]*[.]?[0]*$ Start word. Read any number of zeroes followed optionally by a '.' followed by any number of zeroes. End word. From my emacs buffer, M indicates a match 0 M 003 0.00 M 0.03 .000 M 00.0 M 008000 Cheers Bob Feel free to improve, I don't have strong opinions on this. ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero
2010/1/26 Bob Jolliffe bobjolli...@gmail.com 2010/1/26 Jason Pickering jason.p.picker...@gmail.com Hi Bob, I might suggest just a small change. ^[0]*[\.,]?[0]*$ Escape the period and add a comma for some locales that use commas instead of periods. I am not aware of other decimal points, perhaps a semicolon? True. This is better. I am a bit confused though about the concept here. Values in DHIS are stored in the DB as text, as far as I can tell. People should be allowed to enter decimal values I think. We have an data element (Number of liters of fuel). There is no reason why this could not be entered (and as far as I know, it is) in decimal values. I am sure there are other examples. Perhaps the validation rules is a better place to put these types of rules? It sure would be nice to have Regex capability there, to allow people that are so inclined to create expressions for validation that would just be evaluated with a regular expression. I suppose dataelement could have an extra string properties for an (optional) regex. This could be populated with generic defaults for different value types though that is maybe too wasteful. Anyway a user could then create more specialised regexes for particular dataelements. Mind you not too many people are so inclined. Cheers Bob Regards, JPP 2010/1/26 Bob Jolliffe bobjolli...@gmail.com: 2010/1/26 Lars Helge Øverland larshe...@gmail.com 2010/1/26 Trí Trần Thanh tranthanhtr...@gmail.com Tran Thanh Tri HISP Viet Nam Cell phone: +84903670967 Website: http://tringuyenvn.com 2010/1/25 nore...@launchpad.net revno: 1337 committer: Lars Helge Oeverland larshe...@gmail.com branch nick: trunk timestamp: Mon 2010-01-25 15:30:51 +0100 message: Improved DataValue.isZero modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunkhttps://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-subscriptionhttps://code.launchpad.net/%7Edhis2-devs-core/dhis2/trunk/+edit-subscription . === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java 2010-01-25 14:08:24 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java 2010-01-25 14:30:51 + @@ -198,7 +198,7 @@ public boolean isZero() { return dataElement != null dataElement.getType().equals( DataElement.VALUE_TYPE_INT ) - value != null ( value.equals( 0 ) || value.startsWith( 0. ) ); This script will not working fine. new Double(0.001).intValue()==0 is true but it must be false. I thing it must be new Double(value)==(new Double(0)) what do you thing ? + value != null new Double( value ).i I don't think we should allow decimal numbers in the first place, eg it cant be 0.5 people with malaria or vaccines given. But Jason pointed out that regex might be the better solution for this in any case. Maybe something like ^[0]*[.]?[0]*$ Start word. Read any number of zeroes followed optionally by a '.' followed by any number of zeroes. End word. From my emacs buffer, M indicates a match 0 M 003 0.00 M 0.03 .000 M 00.0 M 008000 Cheers Bob Feel free to improve, I don't have strong opinions on this. ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Tasks for community system
Hi Lots of important issues emerging here which is great. A few general comments: I do agree with Saptarshi regarding distinguishing between names and unique identifiers. The principle of keeping these two concepts divorced is generally well documented. The use of the name as the determinant of uniqueness in dhis may well start to become more of a hindrance than a help. But moving away from it is also not a simple proposition. There are many possibilities including URI based schemes but they have to looked at carefully in terms of maintainability, efficiency and suitability. And the name-based uniqueness idea is quite deeply ingrained in much of the existing model so any proposal to change this should be made with full awareness of the challenge. On the issue of attributes, I think it has opened an area of dhis which is ripe for the next step. Prior to the flexible person-attributes model there was not a way to add generic metadata to dhis entitities - be they persons, dataelements, indicators, categories or what have you. If we needed more metadata about an entity we added another field. Or a bunch of them as in extended dataelement. What Abyot has now done, by creating attributes on person, opens up a vision of the possibility of a richer metadata model for dhis. It would be good to think more generally about this before reacting to the requirements coming in as a result of new possibilities being exposed. [ie. respond rather than react. Be responsive not reactionary :-) ] Two questions which spring to my mind are: 1. If persons can have attributes then couldn't other entities also have them? What would be required to facilitate this? Currently, for example, if we import a rich set of indicator descriptions which has tags which we can't match then we end up with a lossy import. The same could be true of a set of organisation units, persons or what ever. Ideally we should be able to extend metadata about an object dynamically. 2. As soon as we start adding metadata, like with a person, it seems that it immediately throws up new requirements to group them, tag them, categorize them etc. Before we end up reinventing what can be a complex wheel I would suggest that it might be worth looking at some existing standards in the area of metadata, like for example RDF. And look at how we can better interact with things like the OpenMRS concept dictionary, SDMX etc. I wonder do we have any metadata fundi's out there would care to investigate where we might go with this? Cheers Bob On 23 January 2010 18:37, Saptarshi Purkayastha sun...@gmail.com wrote: Excellent suggestions from John and some of them are critical... *Identifiers Vs Attributes* I'm quite sure we should not mix the concepts of identifier and attributes. Attributes are characteristics of a person (e.g. Blood group) where as Identifiers are searchable and unique characteristics to the context of search/data store (e.g. Passport no.). and hence searching people while registration on attributes for uniqueness isn't quite recommended. Searching on identifiers is the right thing and we can make some identifiers compulsory and there should be these compulsory identifiers (mayb an implementation wants fingerprints as compulsory and primary identification... So we should compulsorily want fingerprints for all) for correct identification of the patient on revisit. Categories on attributes are critical for things like Blood group, where we know the possible answers. *Names of Data Elements* We should be able to give multiple names/synonyms/simple names to every data element especially when we have reached the medical informatics domain. Date of incident/LMP/Birthdate is just one example, but more keep coming in these requirement-customization meetings. Shakespeare got it wrong when he said, What's in a name... to me it seems to be all in the name ;-) *Inheritable Attributes* We should be able to select which are inheritable attributes and which are not, when creating new attributes. Blood group is not an inheritable attribute, but caste may be an inheritable attribute. Address I'm not sure is an attribute or not... but that's a different complexity all together :( *Searching on Identifiers Vs Attributes* Searching on identifiers should nearly always result in single results... I say nearly because we could badly design identifiers, location-specific identifiers, remote sites, independently generated identifiers etc. But definitely searching on attributes, should be nested. I would actually say searching on attributes should not be internally any different from searching on data elements and should allow composition... I'll finish it... No need to re-invent the wheel... --- Regards, Saptarshi PURKAYASTHA Director R D, HISP India Health Information Systems Programme My Tech Blog: http://sunnytalkstech.blogspot.com You Live by CHOICE, Not by CHANCE On 23 January 2010 07:19, John
Re: [Dhis2-devs] Fwd: data pilot
Thanks Ola. I'll pass on this report to the openoffice team at sun and see if they have any comment. Regards Bob 2010/1/5 Ola Hodne Titlestad olati...@gmail.com Hi, Sorry for the late feedback on this. I've done some testing of datapilot using the new openoffice 3.2 RC1 release on Windows XP with java 1.6.16: *Large datasets are problematic *The main issue I have encountered is the lack of support for large datasets. In DHIS we typically have data sets of more than 100 000 rows, sometimes more than a million rows. With openoffice I ended up having lots of java heap space errors with the larger datasets when loading the data into the datapilot (using jdbc connection to postgres) and did not manage to create them at all. Datasets with up to 20 000 rows seem to work ok, although a bit slower than what I am used to with Excel, and the 40 000 rows dataset I managed to set up is extremely slow when doing any manipulation. I can see that the wiki page on performance improvement on larger datasets that Bob linked to refers to a test dataset of 5000 rows, which is a very small dataset in the context of DHIS. For comparison I created Excel pivot tables for the 40 000 row IndicatorsOU3 table and a 300 000 row pivot for RoutineDataOU3 and these work just fine and much faster than the datapilots. This is especially noticeable when editing the pivot table layouts (start in data pilot and pivot table wizard in excel), but also when doing simpler manipulation of the tables such as moving a field from row to column or changing a filter. *Indicator values as calculated fields are not supported? *Another issue I have come across is the lack of support to set up what in Excel is called calculated fields,formulas based on other pivot fields. This is needed when dealing with indicators as the indicator value field is a calulated field set up as the formula numxfactor/denominatorvalue. Such a formula is needed when dealing with aggregation of percentages as numerators and denominators need to be summed up separately and not by simply averaging the percentage (the value) of all the orgunit children. It is possible that this is supported, but I haven't found it yet. *Captions for pivot fields are not supported? *I cannot find a place to change the caption of the pivot fields. We often use generic column names in the database such as orgunit1, orgunit2, but in a pivot table it looks much better if these names are replaced with more localised names e.g. country, district, chiefdom in the case of Sierra Leone. *General comments: *- Openoffice does not seem to store the data inside the spreadsheet file like Excel does and therefore will always need a functioning database connection. Excel only needs the database connection on refresh. - You need to create a new openoffice database using a jdbc connection to the existing postgres database. - To connect to the postgres database using jdbc you need to add the postgres jdbc driver to the java classpath in openoffice: Tools-Options-Java-Classpath - This openoffice database needs to be registered in openoffice in order to be available to the datapilot. This is an option during the setup of a new database, or you can do it later by opening Calc and press F4, then right click inside the Bibliography navigator window and select Registered Databases. Then click New and look up your openoffice database. - When creating the datapilot the pivot view queries in the dhis database should be treated as sheets (default) and not queries (all views in postgres are automatically displayed as tables in the openoffice database) Here are the files I have used: http://folk.uio.no/olati/filer/dhis2_sl_data_pilots.ods http://folk.uio.no/olati/filer/dhis2_sl_pivots.zip http://folk.uio.no/olati/filer/dhis2_sl.backup http://208.76.222.114/confluence/download/attachments/8096/PivotSourceViewsOU2-5.sql - the excel file can be used right away, but a refresh will needs an odbc connection 'dhis2_sl' to a database 'dhis2_sl' with the pivotsource views - the openoffice file will need a database dhis2_sl registered in openoffice with the pivotsource views Ola -- 2009/12/11 Knut Staring knu...@gmail.com Interetesting with a release candidate coming in just one week: 2009-12-17 On Fri, Dec 11, 2009 at 5:57 PM, Bob Jolliffe bobjolli...@gmail.comwrote: Looks like 3.2 is the performance targetted version. [ http://wiki.services.openoffice.org/wiki/Features] Including DataPilot. 2009/12/11 Bob Jolliffe bobjolli...@gmail.com Sure. This is just a background issue. The OOo pivot table performance has been a mess for some time now. Just want to take advantage of the opportunity to feed them some real requirements. Mind you I see IBM's Chinese dev team have been putting some work into this already ( http://wiki.services.openoffice.org/wiki/Calc/Proposal_DataPilot_byIBM). I wonder did this optimisation make
[Dhis2-devs] Work in progress
Hi Lars, Jo I've just uploaded work in progress branch here: https://code.launchpad.net/~dhis2-devs-core/+junk/dhis2-xml-ng From latest commit message: 1. Brought staxwax code into dhis-service-xml, keeping package name as discussed. Some modifications: using stax2, exposing EventReader. 2. Tested Relaxng validation - note this currently requires sun's msv in local repository. Works well. 3. Abstracted MessageQ in task framework 4. Started process of porting import/export module to task framework - lots of work! Also causes lots of work at web layer. Import/Export module not building yet ... Still plugging away at import/export module between sips of whisky, bites of christmas cake and bouts of table tennis with the kids. I hope to finish that bit tonight if I get a chance. As you know there is a lot to it! Thinking about: 1. Internationalizing messages on message queue 2. figuring out what on earth state.setOutput(importAnalyser.getImportAnalysis()) does 3. whatever happened to Christmas 4. must take a break tomorrow and write up some sdmx-hd stuff Regards Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Work in progress
Finished porting importexport module to new concurrency framework. See sample usage here: http://bazaar.launchpad.net/%7Edhis2-devs-core/%2Bjunk/dhis2-xml-ng/annotate/head%3A/dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/DXFImportServiceTest.java#L452 Will start looking at web import-export module soon. Cheers Bob 2009/12/27 Bob Jolliffe bobjolli...@gmail.com Hi Lars, Jo I've just uploaded work in progress branch here: https://code.launchpad.net/~dhis2-devs-core/+junk/dhis2-xml-nghttps://code.launchpad.net/%7Edhis2-devs-core/+junk/dhis2-xml-ng From latest commit message: 1. Brought staxwax code into dhis-service-xml, keeping package name as discussed. Some modifications: using stax2, exposing EventReader. 2. Tested Relaxng validation - note this currently requires sun's msv in local repository. Works well. 3. Abstracted MessageQ in task framework 4. Started process of porting import/export module to task framework - lots of work! Also causes lots of work at web layer. Import/Export module not building yet ... Still plugging away at import/export module between sips of whisky, bites of christmas cake and bouts of table tennis with the kids. I hope to finish that bit tonight if I get a chance. As you know there is a lot to it! Thinking about: 1. Internationalizing messages on message queue 2. figuring out what on earth state.setOutput(importAnalyser.getImportAnalysis()) does 3. whatever happened to Christmas 4. must take a break tomorrow and write up some sdmx-hd stuff Regards Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Work in progress
Made XMLEventReader implementation of StaxWax XMLReader with identical semantics to existing XMLStreamReader version. So that we can peek at the root element Bob. 2009/12/27 Bob Jolliffe bobjolli...@gmail.com Finished porting importexport module to new concurrency framework. See sample usage here: http://bazaar.launchpad.net/%7Edhis2-devs-core/%2Bjunk/dhis2-xml-ng/annotate/head%3A/dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/DXFImportServiceTest.java#L452 Will start looking at web import-export module soon. Cheers Bob 2009/12/27 Bob Jolliffe bobjolli...@gmail.com Hi Lars, Jo I've just uploaded work in progress branch here: https://code.launchpad.net/~dhis2-devs-core/+junk/dhis2-xml-nghttps://code.launchpad.net/%7Edhis2-devs-core/+junk/dhis2-xml-ng From latest commit message: 1. Brought staxwax code into dhis-service-xml, keeping package name as discussed. Some modifications: using stax2, exposing EventReader. 2. Tested Relaxng validation - note this currently requires sun's msv in local repository. Works well. 3. Abstracted MessageQ in task framework 4. Started process of porting import/export module to task framework - lots of work! Also causes lots of work at web layer. Import/Export module not building yet ... Still plugging away at import/export module between sips of whisky, bites of christmas cake and bouts of table tennis with the kids. I hope to finish that bit tonight if I get a chance. As you know there is a lot to it! Thinking about: 1. Internationalizing messages on message queue 2. figuring out what on earth state.setOutput(importAnalyser.getImportAnalysis()) does 3. whatever happened to Christmas 4. must take a break tomorrow and write up some sdmx-hd stuff Regards Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Bug 430657] Re: Date text field needs validation rule in data entry screen
2009/12/23 Lars Helge Øverland larshe...@gmail.com On Wed, Dec 23, 2009 at 4:01 AM, Hieu Dang Duy hieu.hispviet...@gmail.com wrote: Dear Saptarshi, I'm not good at about security, I also knew that using javascript it's really not safe in web application. By the way, I have a small idea about this issue that. Not surely, have any configuration/setting about date in DHIS2 program ? Unless, I think we can make a new setting for this one. I meant we should make a pattern setting for date format, ie. -mm-dd for DataEntry module. Or can be expanding to use for our whole system. In that case, we can easily use any kind of validations with that pattern setting in either client-side (javascript) or server-side (java). Thanks for your suggestion ! Hi, I would say that we should stick with -mm-dd for input for now, to me the added complexity of configurable date input formats justifies the benefit... Re validation, we do have server side validation for meta data like data elements, indicators, data set etc. A problem is that we have separate action classes for validation and adding/updating (this was done with separation-of-concerns in mind). This poses a threat since a malicious user could bypass this by turning off javascript in the browser or sending direct GET-requests. Btw I wouldn't say avoiding javascript validation is the answer, rather having both where its possible. Agreed it is not an either/or thing. Validation at the browser and validation at the server actually serve two different purposes. Client side validation is really a convenience to the user to prevent having to enter data only to find that the data is later rejected after the http post/get. Catching the validation problem early allows for a slicker and more friendly user interface. But because it can be easily bypassed it is not a mechanism for protecting the integrity of data to be persisted and should not be used with that in mind. That is the purpose of server side validation. But of course we all know that Sorry I haven't looked much at the validation action classes so I can't really comment much. But shouldn't the validation be a function of the model layer (as low down as it can be pushed) and be un-bypassable?. This way it also applies to data input from other sources than the web ui. Bob Lars ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] task execution
Hi Lars Took a bit longer than expected fitting things in with Xmas but I've created a new task execution service based on Spring wrapper of java.util.concurrent and uploaded to lp:~dhis2-devs-core/+junk/dhis2-xml-ng. Not much documentation yet but you can get a good idea from the unit tests. There's probably a few things to add and refactor but I must push on now (rather than try and get the world's best task executor). If you look at the beans you can see that the concurrency strategy is configurable there. For the moment spawning new thread per task is the most straightforward, but for highly scalable applications we might want to use threadpool. Both work but in the latter case we do need to cater for tasks being refused and determine optimal size of pool. The idea is that any class implementing Task (like import or datamart or what have you) must provide a setter for a message queue and a call() method. Task execution is then managed by the TaskExecutor. Tasks belong to users. A user can at any time check whether the task has emitted any messages and display them. For example the getStatus ajax arrangement as we have currently, with small modification can display these messages periodically as the task executes. Will need to implement a watchdog task to clean up stale tasks later. Haven't decided the best strategy for this yet. If you (or anyone else) gets a chance you might want to look this over. There may be some functionality from amplecode cave process which is missing, but for the most part this seems reasonably clean and robust. Now back to the xml framework stuff ... Cheers Bob ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] DHIS 2.0.3 released
2009/12/22 Lars Helge Øverland larshe...@gmail.com Hi, DHIS 2.0.3 is released. The DHIS 2 Live package has been improved and now contains GIS, reporting, charting ++ as well as an embedded servlet container, database and sample data in just 60 MB. A live demo of the release can be found at demo.dhis2.org Download the Live package, WAR file, source code, and sample databases for PostgreSQL and H2 from dhis2.org/download That's http://dhis2.org/downloads Ubuntu deb will be there later this morning. Bob. Get the javadocs from dhis2.org/documentation The DHIS 2 team ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1239: Added utility script which copies the dhis.war file from the portal, updates the dhis-live packag...
Hi Lars It should all be there under tools/dhis2deb/. The control file is then dhis2/DEBIAN/control but you shouldn't need to play with this unless you want to customize it further. Just use the makefile as per the Readme.txt. Cheers Bob 2009/12/21 Lars Helge Øverland larshe...@gmail.com On Thu, Dec 17, 2009 at 12:08 PM, Bob Jolliffe bobjolli...@gmail.comwrote: This is what I do as well for testing. Mind you all this time I've been lazy to write a script - endless rounds of bash 'history | grep dhis' instead. Thanks. BTW has anybody tried out the deb package builder yet? I haven't had any feedback. Its also a very quick way to take a build and deploy/undeploy onto tomcat in ubuntu. Hi Bob, sorry for the late reply, I very much would like to try it out. Excuse my lack of knowledge but where can I find the DEBIAN/control file? Lars ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1232: Fixed error in dxf export of categoryComboCategoryAssociations. Simplified the convertor.
OK. Fixing the equals method was the right thing to do. I could see contains() was not doing what it should, but took the lazy way out when I spotted the redundancy. It really is not required in this case. Whenever we export a category we will always want to export all the category options. Regardless of any other constraint. So this is not acting as any kind of check - just burning cycles (computational masturbation :-) If I was better with hibernate I would rather do a cascade save on things like this - would be more robust though I understand the performance concerns. Should we not emulate that anyway? We add categoryoptions to the category and get the batchhandler for the category to take care of also persisting it's options and conversely with writing out category elements. Well that won't really be an issue for these elements in dxfv2 because we are not explicitly writing out the associations anyway. Jo these will be issues for you to consider. Bob. 2009/12/18 Lars Helge Øverland larshe...@gmail.com Sorry, had to revert this commit... The error was not in the if ( categories.contains( category ) ) clause, the problem was that the equals method on DataElementCategory was badly implemented leading to contains always returning false. Even if it is not strickly needed in this case, this check is a general pattern we have for all the *Association converters. For the detailed meta data export one might want to export only selected data elements and groups. In that case one cannot export all dataelement-dataelementgroup-associations, only those which are included in that export... Lars On Wed, Dec 16, 2009 at 11:45 AM, nore...@launchpad.net wrote: revno: 1232 committer: Bob Jolliffe b...@bobj-laptop branch nick: trunk timestamp: Wed 2009-12-16 10:41:19 + message: Fixed error in dxf export of categoryComboCategoryAssociations. Simplified the convertor. modified: dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/CategoryComboCategoryAssociationConverter.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryOptionComboConverter.java -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunkhttps://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-subscriptionhttps://code.launchpad.net/%7Edhis2-devs-core/dhis2/trunk/+edit-subscription . === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/CategoryComboCategoryAssociationConverter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/CategoryComboCategoryAssociationConverter.java 2009-11-02 09:20:10 + +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/CategoryComboCategoryAssociationConverter.java 2009-12-16 10:41:19 + @@ -29,6 +29,8 @@ import java.util.Collection; import java.util.Map; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.amplecode.quick.BatchHandler; import org.amplecode.staxwax.reader.XMLReader; @@ -52,6 +54,8 @@ public class CategoryComboCategoryAssociationConverter extends AbstractGroupMemberConverter implements XMLConverter { +private static final Log log = LogFactory.getLog(CategoryComboCategoryAssociationConverter.class); + public static final String COLLECTION_NAME = categoryComboCategoryAssociations; public static final String ELEMENT_NAME = categoryComboCategoryAssociation; @@ -108,9 +112,7 @@ { CollectionDataElementCategoryCombo categoryCombos = categoryService.getDataElementCategoryCombos( params.getCategoryCombos() ); -CollectionDataElementCategory categories = categoryService.getDataElementCategories( params.getCategories() ); - -if ( categoryCombos != null categoryCombos.size() 0 categories != null categories.size() 0 ) +if ( categoryCombos != null categoryCombos.size() 0 ) { writer.openElement( COLLECTION_NAME ); @@ -122,8 +124,6 @@ for ( DataElementCategory category : categoryCombo.getCategories() ) { -if ( categories.contains( category ) ) -{ writer.openElement( ELEMENT_NAME ); writer.writeElement( FIELD_CATEGORY_COMBO, String.valueOf( categoryCombo.getId() ) ); @@ -131,7 +131,6 @@ writer.writeElement( FIELD_SORT_ORDER, String.valueOf( sortOrder
[Dhis2-devs] [Bug 497044] Re: missing categoryComboCategoryAssociations in dxf export
Fixed in rev1232 ** Changed in: dhis2 Status: New = Fix Committed -- missing categoryComboCategoryAssociations in dxf export https://bugs.launchpad.net/bugs/497044 You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. Status in DHIS 2 - District Health Information Software: Fix Committed Bug description: Confirmed reported bug. On export this element is always empty. ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] [Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 73: Changed element name, arguably to a better name, to avoid same name elements
Hi Jo I like your simple naming solution. And there is the more general case throughout dxf where we have somewhere an element with an id, say dataElement id=1/ And somewhere else a reference to it. Currently we have something like: dataSet dataElement ref=1/ ... etc The use of such homonymns is generally an evil which should be strongly discouraged. So I agree to name the element dataElementRef is better. Though I think the attribute should remain ref rather than id - id has a different connotation. Also I want to easily find elements which have references to others without doing a regex on the element name :-) So we will have: dataSet dataElementRef ref=1/ ... etc Beyond the naming issue, the particular case you have fixed is another example of the reversed associations you picked up earlier - I have an indication of the dataSets the dataElement belongs to rather than the other way round. I'll quickly reverse this. Hope you are not editing now ... Regards Bob 2009/12/15 nore...@launchpad.net revno: 73 committer: Jo Størset stor...@gmail.com branch nick: dhis2-docbook-docs timestamp: Tue 2009-12-15 13:47:37 +0100 message: Changed element name, arguably to a better name, to avoid same name elements (and generated java classes, especially on stupid ignore case file systems). modified: src/schemas/dxf_v2_schema/dxf2.rng -- lp:~dhis2-documenters/dhis2/dhis2-docbook-docs https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docshttps://code.launchpad.net/%7Edhis2-documenters/dhis2/dhis2-docbook-docs Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscriptionhttps://code.launchpad.net/%7Edhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription . === modified file 'src/schemas/dxf_v2_schema/dxf2.rng' --- src/schemas/dxf_v2_schema/dxf2.rng 2009-12-15 00:49:17 + +++ src/schemas/dxf_v2_schema/dxf2.rng 2009-12-15 12:47:37 + @@ -349,8 +349,8 @@ /element element name=dataDictionaries zeroOrMore - element name=datadictionary -attribute name=ref + element name=dataDictionaryRef +attribute name=id ref name=dxfIDRef/ /attribute /element ___ Mailing list: https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devshttps://launchpad.net/%7Edhis2-devs More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Error running DHIS 2 on Jetty on Ubuntu
Lars, I am not using jdk from apt-get. But rather the one I have downloaded directly from sun. java version 1.6.0_14 Java(TM) SE Runtime Environment (build 1.6.0_14-b08) Java HotSpot(TM) Server VM (build 14.0-b16, mixed mode) mv jetty:run-war working fine here. Mind you my default tomcat install (which also works) uses the default openjdk on ubuntu: $ java -version java version 1.6.0_0 OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1) OpenJDK Server VM (build 14.0-b16, mixed mode) So I think its probably not to do with the jvm version (or the platform). I know I have seen this error before but I can't think where. For some reason I think it was on windoze not ubuntu. I guess you have done the mvn clean install a thousand times and tried a prebuilt dhis.war. There lots of similar reports out in google-land. This one (org.springframework.core. BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63)) seemed interesting. Any chance you are mixing spring versions? Bob. 2009/12/16 Lars Helge Øverland larshe...@gmail.com Hi, I am getting this when running DHIS 2 on Jetty on Ubuntu. Installed Sun Java JDK 1.6_17 with apt-get install. Is there anyone who has experienced something similar? Lars Exception: Error creating bean with name 'org.springframework.aop. config.internalAutoProxyCreator': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Method must not be null: java.lang.IllegalArgumentException: Method must not be null at org.springframework.util.Assert.notNull(Assert.java:112) at org.springframework.core.BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63) at org.springframework.beans.GenericTypeAwarePropertyDescriptor.init(GenericTypeAwarePropertyDescriptor.java:58) at org.springframework.beans.CachedIntrospectionResults.init(CachedIntrospectionResults.java:250) at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144) at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:282) at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:333) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1247) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:597) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:366) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
Re: [Dhis2-devs] Error running DHIS 2 on Jetty on Ubuntu
There lots of similar reports out in google-land. This one (org.springframework.core. BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63)) seemed interesting. Any chance you are mixing spring versions? Sorry - not very helpful link. I meant http://forum.springsource.org/showthread.php?t=62392. Note that the reported failed assertion is apparently not in the spring 2.5.6 code. Bob. ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp