Re: [Dhis2-devs] Empty DHIS2 database

2018-11-13 Thread moses mwale
Hey Houssan
Just connect DHIS to an empty Database, it will auto create empty tables on
its own.

On Wed, 14 Nov 2018 at 8:47 AM, Houssam Chammaa 
wrote:

> Greetings
>
> Please note that I have installed a new DHIS2 server and I have download
> the Postgres Database  from DHIS2 website and I find out it is has some
> content (sierra Leone).
>
> Kindly can you provide me with an empty DHIS2 database in script format.
>
>
> Thanks
>
> Houssam Chammaa
>
> 
> ___
> 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
>
-- 
developer_lusaka_systems
___
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] Duplicate Key Error

2018-11-01 Thread moses mwale
Can you share the full log.

On Tue, 30 Oct 2018 at 1:22 PM, gerald thomas  wrote:

> Dear All,
> It had been awhile now that we had been noticing this error in our log:
>
> Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value
> violates unique constraint "datavalue_pkey"
>   Detail: Key (dataelementid, periodid, sourceid, categoryoptioncomboid,
> attributeoptioncomboid)=(1969, 9498235, 326, 13, 13) already exists.
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2476)
>
> Please i need to know why are we getting these error messages and how can
> i fix them.
> Thanks in advance for your help.
>
>
>
> --
> Regards,
>
> Gerald
> ___
> 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
>
-- 
developer_lusaka_systems
___
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] [Dhis2-users] postgresql version 9.6 required for dhis version 2.31

2018-10-31 Thread moses mwale
Sorry just to interject, so dhis2 does not work with Postgres 9.5?

On Wed, 31 Oct 2018 at 9:58 AM, Bjørn Sandvik  wrote:

> Hi,
>
> PostGIS requirement is 2.2 or later.
> AFAIK, this will still be the case for 2.31.
>
> Regards,
> Bjørn
>
> --
> Bjørn Sandvik
> GIS developer, DHIS 2
> University of Oslo
> www.dhis2.org
>
> On Wed, Oct 31, 2018 at 8:18 AM Calle Hedberg 
> wrote:
>
>> Hi,
>>
>> With regard to minimum pg requirements: Bjorn, what is the minimum
>> version requirement for Postgis, and what is the recommended version?
>> Again, postGIS 2.5 was released recently, so if people need to upgrade
>> anyhow it makes sense to upgrade to the latest, tested version...
>>
>> Regards
>> Calle
>>
>> On Wed, 31 Oct 2018 at 09:15, Calle Hedberg 
>> wrote:
>>
>>> Lars,
>>>
>>> With postgresql version 11 out - are there any specific reasons for NOT
>>> using pg 11? Many of the key features introduced in 10 - like table
>>> partitioning - have been further enhanced in 11.
>>>
>>> Regards
>>> Calle
>>>
>>> On Wed, 31 Oct 2018 at 08:04, stepho...@gmail.com 
>>> wrote:
>>>
 Thanks Lars.

 Just to be clear, Is that the minimum requirements for PostgreSQL?

 Sent from my HTC

 - Reply message -
 From: "Lars Helge Øverland" 
 To: "DHIS 2 Users list" , "DHIS 2
 Developers list" 
 Subject: [Dhis2-users] postgresql version 9.6 required for dhis version
 2.31
 Date: Tue, Oct 30, 2018 23:33

 Hi all,

 heads up: for DHIS 2 version 2.31 we will require PostgreSQL version
 9.6.

 This is in order to take advantage of certain SQL features introduced
 in that version. The current required version is 9.4.

 If you plan to upgrade your PostgreSQL version we recommend going
 straight to version 10, as it contains several great features and
 performance improvements. Also, we will eventually require this version and
 so going directly to version 10 will avoid multiple successive upgrades.


 best regards,

 Lars



 Lars Helge Øverland
 Technical lead, DHIS 2
 University of Oslo
 l...@dhis2.org
 https://www.dhis2.org

 ___
 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

>>>
>>>
>>> --
>>>
>>> ***
>>>
>>> Calle Hedberg
>>>
>>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>>
>>> Tel/fax (home): +27-21-685-6472
>>>
>>> Cell: +27-82-853-5352
>>>
>>> Iridium SatPhone: +8816-315-19119
>>>
>>> Email: calle.hedb...@gmail.com
>>>
>>> Skype: calle_hedberg
>>>
>>> ***
>>>
>>>
>>
>> --
>>
>> ***
>>
>> Calle Hedberg
>>
>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>
>> Tel/fax (home): +27-21-685-6472
>>
>> Cell: +27-82-853-5352
>>
>> Iridium SatPhone: +8816-315-19119
>>
>> Email: calle.hedb...@gmail.com
>>
>> Skype: calle_hedberg
>>
>> ***
>>
>>
>
> --
> Bjørn Sandvik
> GIS developer, DHIS 2
> University of Oslo
> www.dhis2.org
> ___
> 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
>
-- 
developer_lusaka_systems
___
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] Clear analytics tables

2018-10-31 Thread moses mwale
I have a test database which every time I import and connect a dhis2
instance automatically starts analytics and loads data. I don’t need that
data it’s old, how do I clear this data from the database? Which table hold
a that data I want to clear it.
-- 
developer_lusaka_systems
___
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] startup error upgrade from 2.28 to 2.29

2018-10-27 Thread moses mwale
Hey Sandvold
please below


select pushanalysisid, uid, code, name, title, schedulingdayoffrequency
from pushanalysis;
 pushanalysisid | uid | code  |
name|   title   |
schedulingdayoffrequency
+-+---+---+---+--
4030992 | JmuWTH9oUcn |   | Child Health monthly
newsletter   | Child Health Monthly Newsletter
|   22
4029471 | MWotV5Va75Q |   | HIV Testing and Counselling
Newsletter   | HIV Testing and Counselling  Newsletter
|   22
4028842 | GeryOIbsWhg |   | Maternal Health_News Letter
(Test)| Maternal Health_News Letter (Test)
|   22
2946234 | a19w4BhUNo8 |   | Quarterly News Letter
(Testing)   |
|   16
4029684 | PNhbOVQfNzv |   | Immunization Monthly
Newsletter   | Immunization Monthly Newsletter
|   22
5460302 | BbXhhJ02EbV | xx890 |
RBF-report| RBF _Report 2017
health   |
4453262 | rIAnKBuPpPG |   | Self
Assessment   | Self
Assessment   |   20
5460325 | mLFU0RdEboH | gt567 | Consolidated District RBF Invoice
for HCs | Consolidated District RBF Invoice for HCs
|
4030951 | uOqRtK7ditU |   | Health Services
Utilazation   | Health Services Utilazation
|   22
4627355 | PSnTgqRWv8V |   | HIV Test and Treat  monthly
newsletter| HIV Test and Treat  monthly newsletter
|   22
4028510 | OrJLwiOSVbO |   | Mothly Report Completeness
(Submitted)| Mothly Report Completeness (Submitted)
|   21
4029128 | Vs4qna0Li1u |   | Circumcision_News Letter
(Test)   | Circumcision News Letter (Test)
|   22
(12 rows)



On Thu, Oct 25, 2018 at 4:15 PM Stian Sandvold  wrote:

> Hi Moses,
>
> I am not sure exactly why it fails, but could you let me know how many
> rows you have in your "pushanalysis" table, and if there are more than 5,
> could you attach the data of those not mentioned in the log:
>
> * INFO  2018-10-25 15:11:30,520 'system-process' create
> org.hisp.dhis.scheduling.JobConfiguration, name: PushAnalysis:
> JmuWTH9oUcn, uid: bqBqbARSW8s (AuditLogUtil.java [localhost-startStop-1])
> * INFO  2018-10-25 15:11:30,530 'system-process' create
> org.hisp.dhis.scheduling.JobConfiguration, name: PushAnalysis:
> MWotV5Va75Q, uid: Y9mDJj6AuqP (AuditLogUtil.java [localhost-startStop-1])
> * INFO  2018-10-25 15:11:30,539 'system-process' create
> org.hisp.dhis.scheduling.JobConfiguration, name: PushAnalysis:
> GeryOIbsWhg, uid: jPJ6dV7ojuC (AuditLogUtil.java [localhost-startStop-1])
> * INFO  2018-10-25 15:11:30,543 'system-process' create
> org.hisp.dhis.scheduling.JobConfiguration, name: PushAnalysis:
> a19w4BhUNo8, uid: I49TPE2wGcu (AuditLogUtil.java [localhost-startStop-1])
> * INFO  2018-10-25 15:11:30,546 'system-process' create
> org.hisp.dhis.scheduling.JobConfiguration, name: PushAnalysis:
> PNhbOVQfNzv, uid: qAS36jVFphT (AuditLogUtil.java [localhost-startStop-1])
>
>
> On Thu, Oct 25, 2018 at 3:39 PM moses mwale  wrote:
>
>> whenever i upgrade from 2.28 to 2.29 i see error below
>>
>> * INFO  2018-10-25 15:11:29,932 'system-process' create
>> org.hisp.dhis.scheduling.JobConfiguration, name: Analytics, uid:
>> rIxDo7LeidU (AuditLogUtil.java [localhost-startStop-1])
>> * ERROR 2018-10-25 15:11:29,940 Could not map job type
>> '[resourceTableTask]' with cron '0 0 23 * * ?' (SchedulerUpgrade.java
>> [localhost-startStop-1])
>> * ERROR 2018-10-25 15:11:29,940 Could not map job type
>> '[resourceTableTask]' with cron '0 0 23 * * ?' (SchedulerUpgrade.java
>> [localhost-startStop-1])
>> * ERROR 2018-10-25 15:11:29,941 Could not map job type
>> '[resourceTableTask]' with cron '0 0 23 * * ?' (SchedulerUpgrade.java
>> [localhost-startStop-1])
>> * ERROR 2018-10-25 15:11:29,941 Could not map job type
>> '[resourceTableTask]' with cron '0 0 23 * * ?' (SchedulerUpgrade.java
>> [localhost-startStop-1])
>> * ERROR 2018-10-25 15:11:29,941 Could not map job type
>> '[resourceTableTask]' with cron '0 0 23 * * ?' (SchedulerUpgrade.java
>> [localhost-startStop-1])
>> * INFO  2018-10-25 15:11:29,941 'system-process' create
>> org.hisp.dhis.scheduling.JobConfiguration, name: Resource table, uid:
>> VE0d6NQqXGy (AuditLogUtil.java [localhost-startStop-1])
>> * INFO  2018-10-25 15:11:29,945 Moving existing Push Analysis jobs.
>> 

[Dhis2-devs] (no subject)

2018-10-16 Thread moses mwale
Hey All i was upgrading from 2.8 to 2.9 but i see this error and my app
cant start on test environment.



Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Server version:Apache Tomcat/7.0.68 (Ubuntu)
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Server built:  Jun 27 2016 18:13:17 UTC
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Server number: 7.0.68.0
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: OS Name:   Linux
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: OS Version:4.4.0-31-generic
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Architecture:  amd64
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: JVM Version:   1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: JVM Vendor:Oracle Corporation
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: CATALINA_BASE: /home/dhis/tomcat-dhis
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: CATALINA_HOME: /usr/share/tomcat7
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument:
-Djava.util.logging.config.file=/home/dhis/tomcat-dhis/conf/logging.properties
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument:
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument: -Xmx2000m
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument: -Xms1000m
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument:
-Djava.endorsed.dirs=/usr/share/tomcat7/endorsed
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument: -Dcatalina.base=/home/dhis/tomcat-dhis
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument: -Dcatalina.home=/usr/share/tomcat7
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument: -Djava.io.tmpdir=/home/dhis/tomcat-dhis/temp
Oct 15, 2018 12:33:03 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-10.129.192.186-8080"]
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 691 ms
Oct 15, 2018 12:33:03 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Oct 15, 2018 12:33:03 PM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.68 (Ubuntu)
Oct 15, 2018 12:33:03 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive
/home/dhis/tomcat-dhis/webapps/ROOT.war
Oct 15, 2018 12:33:12 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable
debug logging for this logger for a complete list of JARs that were scanned
but no TLDs were found in them. Skipping unneeded JARs during scanning can
improve startup time and JSP compilation time.
* INFO  2018-10-15 12:33:16,510 System property dhis2.home not set
(DefaultLocationManager.java [localhost-startStop-1])
* INFO  2018-10-15 12:33:16,515 Environment variable DHIS2_HOME points to
/home/dhis/config (DefaultLocationManager.java [localhost-startStop-1])
* INFO  2018-10-15 12:33:16,536 File
/home/dhis/config/dhis-google-auth.json does not exist
(DefaultLocationManager.java [localhost-startStop-1])
* INFO  2018-10-15 12:33:16,536 Could not find dhis-google-auth.json
(DefaultDhisConfigurationProvider.java [localhost-startStop-1])
* INFO  2018-10-15 12:33:16,537 File
/home/dhis/config/dhis-google-auth.json does not exist
(DefaultLocationManager.java [localhost-startStop-1])
* INFO  2018-10-15 12:33:16,537 Could not find dhis-google-auth.json
(DefaultDhisConfigurationProvider.java [localhost-startStop-1])
* INFO  2018-10-15 12:33:18,112 Hibernate configuration loaded, using
dialect: org.hisp.dhis.hibernate.dialect.DhisPostgresDialect, region
factory: org.hibernate.cache.ehcache.EhCacheRegionFactory
(DefaultHibernateConfigurationProvider.java [localhost-startStop-1])
* INFO  2018-10-15 12:33:36,786 Old apps folder does not exist, stopping
discovery (LocalAppStorageService.java [localhost-startStop-1])
* INFO  2018-10-15 12:33:37,846 File store configured 

Re: [Dhis2-devs] calculating totals in custom designed form

2018-06-26 Thread moses mwale
Thanks Big man, let me try that.

On Tue, Jun 26, 2018 at 10:40 PM, Barnabas Akumba 
wrote:

> Hello Moses,
> Create an indicator of type Totals and use the formula for the summation
> of the 3 data elements as the numerator of the indicator.  Assign the
> indicator to the Dataset.
> In the Custom form design page, place the Total on the page design. It'll
> now be calculating the totals on the fly as data is entered.
>
> Regards
>
>
> On Tue, Jun 26, 2018, 9:32 PM moses mwale  wrote:
>
>> Hello people i need to show totals in the custom form datasets of 3 data
>> elements ART month 1, 2 and 3. So another column will be for total, but how
>> do i calculate the total of these data elements as the data is being
>> captured?
>>
>> developer_lusaka_systems
>> ___
>> 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
>>
>


-- 
developer_lusaka_systems
___
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] calculating totals in custom designed form

2018-06-26 Thread moses mwale
Hello people i need to show totals in the custom form datasets of 3 data
elements ART month 1, 2 and 3. So another column will be for total, but how
do i calculate the total of these data elements as the data is being
captured?

developer_lusaka_systems
___
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] data write

2018-06-07 Thread moses mwale
This sharing issue solves this error am facing of not showing attributes
also? Example in Tracker

On Thu, Jun 7, 2018 at 4:04 PM, Knut Staring  wrote:

> Hi Moses,
> There is a series of 4 videos on sharing here:
> https://www.youtube.com/channel/UC7lT6wGX_IXkfguh2DvcrSA
>
> Regards,
> Knut
>
> On Thu, Jun 7, 2018 at 2:16 PM moses mwale  wrote:
>
>> The link between user roles and data sets/programs have been replaced by
>> the new "data write" sharing levels.
>>
>>
>> Somebody to make make me understand what that statement mean and how to
>> achieve it please
>>
>> thanks
>>
>>
>> --
>> developer_lusaka_systems
>> ___
>> 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
>>
>
>
> --
> Knut Staring
>
> Department of Information, Evidence and Research
> World Health Organization, Geneva, Switzerland
> Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
> Skype: knutstar
>



-- 
developer_lusaka_systems
___
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] data write

2018-06-07 Thread moses mwale
The link between user roles and data sets/programs have been replaced by
the new "data write" sharing levels.


Somebody to make make me understand what that statement mean and how to
achieve it please

thanks


-- 
developer_lusaka_systems
___
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] Tracker capture not showing Attributes to be entered

2018-06-06 Thread moses mwale
I am trying to create a tracker capture program, when am done to test it
the attributes i created under profile cant be seen, when i try to save and
continue i see error

Error

Form is empty, please fill at least one


but there is nothing to fill, where am i going wrong am using 2.29 i have
gone through several times but to no solution please help.

-- 
developer_lusaka_systems
___
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] could not execute statement

2018-06-06 Thread moses mwale
when creating programes and deleting data elemnts i get this error


*could not execute statement*

Catalina.out gives these issues pleease help

* INFO  2018-06-06 19:38:41,761 (moses) Updating 1 object(s) of type
Program (DefaultObjectBundleService.java [http-bio-8080-exec-33])
* WARN  2018-06-06 19:38:41,770 SQL Error: 0, SQLState: 23502
(SqlExceptionHelper.java [http-bio-8080-exec-33])
* ERROR 2018-06-06 19:38:41,770 ERROR: null value in column
"programattributeid" violates not-null constraint
  Detail: Failing row contains (null, null, null, t, null, 253827, 253604,
f, null, CIxPhUUpKcN, null, 2018-06-06 19:38:41.704, 2018-06-06
19:38:41.762, null, f, null, t). (SqlExceptionHelper.java
[http-bio-8080-exec-33])
javax.persistence.PersistenceException:
org.hibernate.exception.ConstraintViolationException: could not execute
statement
at
org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:149)
at
org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:157)
at
org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:164)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1443)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1423)
at
org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.handleUpdates(DefaultObjectBundleService.java:428)
at
org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at
org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy198.commit(Unknown Source)
at
org.hisp.dhis.dxf2.metadata.DefaultMetadataImportService.importMetadata(DefaultMetadataImportService.java:137)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at
org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy200.importMetadata(Unknown Source)
at
org.hisp.dhis.webapi.controller.metadata.MetadataImportController.postJsonMetadata(MetadataImportController.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)

[Dhis2-devs] SEVERE: Failed to start connector [Connector[HTTP/1.1-auto-1]]

2018-05-24 Thread moses mwale
blank page i see this error in catalina.log

SEVERE: Failed to start connector [Connector[HTTP/1.1-auto-1]]
org.apache.catalina.LifecycleException: Failed to start component
[Connector[HTTP/1.1-auto-1]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:460)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:738)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.startup.Catalina.start(Catalina.java:693)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: The connector cannot
start since the specified port value of [-1] is invalid
at
org.apache.catalina.connector.Connector.startInternal(Connector.java:1000)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 11 more

May 24, 2018 7:55:05 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 37521 ms

whats the solution

-- 
developer_lusaka_systems
___
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] indicators suming up as average in total

2018-05-24 Thread moses mwale
please can someone help me, my indicators are suming up as Average instead
of Sum please help

-- 
developer_lusaka_systems
___
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] indicators gives total and average in total

2018-05-24 Thread moses mwale
my indicator type is sum but on pivot reports gives both sum and average.
what could be the problem. kindly see attached.

-- 
developer_lusaka_systems
___
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] program stage deletion

2018-02-10 Thread moses mwale
How do i delete the program stage instance of a program? i dont see any
option of deleting.

-- 
developer_lusaka_systems
___
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] Date issue after upgrading dhis2 version

2018-02-10 Thread moses mwale
I have a problem with dates after an upgrade to a new version of dhis2 2.28
from version 2.26, 2.27. An Event Captured with dates seen but after
running Analytics and running Event Reports for that particular Event dates
are missing. Until a new Date Element is created e.g seen in the image
(Date_1) then date is retrieved in the report.

what is really the issue please help, below are the images showing the
happenings

developer_lusaka_systems
___
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] Event reports does not retrieve dates

2018-02-04 Thread moses mwale
Hey Please help i have created a program for event capture and with data
elements (Tracker). i can capture dates like start and end dates. Under
section i have checked show in reports. But when i run event reports i the
date column in emty, everything else is showing.

Am using Dhis2 version 2.26

what am  doing wrong?

-- 
developer_lusaka_systems
___
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] merging facilities (org-units) without losing data

2018-01-29 Thread moses mwale
Alright thanks Jason on it.

On Mon, Jan 29, 2018 at 1:10 PM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Hi Moses,
>
> The version of the function looks to be a bit outdated. I just updated it
> again in this commit
> <https://github.com/dhis2/dhis2-utils/commit/0b5026c70c6f0117dad83c7215ca89395f271f18>.
> Maybe you can try again with this new version and see if it works?
>
> Regards,
> Jason
>
>
> On Mon, Jan 29, 2018 at 11:25 AM, moses mwale <isoftcom...@gmail.com>
> wrote:
>
>> wow some major progress i thought it was special sql. I now know its
>> normal sql.
>>
>> dhis2_test=> SELECT merge_organisationunits('FfX6DGeVsJd', 'qqkYhasbAcf'
>> ,'SUM');
>> ERROR:  column "attributeoptioncomboid" is of type integer but expression
>> is of type character varying
>> LINE 6: value,
>> ^
>> HINT:  You will need to rewrite or cast the expression.
>> QUERY:  INSERT INTO datavalueaudit SELECT nextval('hibernate_sequence'::
>> regclass),
>> dataelementid,
>> periodid,
>> ( SELECT organisationunitid from organisationunit where uid =
>> 'qqkYhasbAcf' ) as organisationunitid,
>> categoryoptioncomboid,
>> value,
>> now()::timestamp without time zone,
>> 'admin'::character varying(100) as modifiedby,
>> 'MERGE_SOURCE'::character varying(255) as audittype,
>> attributeoptioncomboid
>> FROM datavalue where sourceid = ( SELECT organisationunitid
>> from organisationunit where uid = 'FfX6DGeVsJd' )
>> CONTEXT:  PL/pgSQL function 
>> merge_organisationunits(character,character,character
>> varying) line 178 at EXECUTE
>>
>> if i change in the function will it work?
>>
>> On Mon, Jan 29, 2018 at 10:01 AM, Jason Pickering <
>> jason.p.picker...@gmail.com> wrote:
>>
>>> Hi Moses,
>>>
>>> You need to use the UID of the organisation unit not their integer ID.
>>>
>>> You need to place string literals in single quotes.
>>>
>>> So, it should be something like
>>>
>>> SELECT merge_organisationunits('foo', 'bar' ,'SUM');
>>>
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>> On Sun, Jan 28, 2018 at 5:28 PM, moses mwale <isoftcom...@gmail.com>
>>> wrote:
>>>
>>>> Hello Jason, Knut and Bob
>>>>
>>>> I did according to your per instruction, i had a dump or copy of the
>>>> db, i created a test db with it and loaded the functions then called using
>>>> the shared query
>>>>
>>>> dhis2_test=> SELECT merge_organisationunits(37442, 24872 ,SUM);
>>>> ERROR:  column "sum" does not exist
>>>> LINE 1: SELECT merge_organisationunits(37442, 24872 ,SUM);
>>>>  ^
>>>> That's the error i receive, what is wrong?
>>>>
>>>> thanks in advance.
>>>>
>>>> On Thu, Jan 25, 2018 at 3:32 PM, moses mwale <isoftcom...@gmail.com>
>>>> wrote:
>>>>
>>>>> Thanks all you are really help i appreciate so much. let me do test
>>>>> first on the backed up db if satisfied will run the merge on the Prod.
>>>>> Thanks.
>>>>>
>>>>> On Fri, Jan 26, 2018 at 3:24 AM, Bob Jolliffe <bobjolli...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> If you really must work on your production database directly then at
>>>>>> the very least you should shutdown the dhis2 instance while you make
>>>>>> changes.  Naturally you want to keep that down time to a minimum.
>>>>>>
>>>>>> So I would suggest a sequence of:
>>>>>>
>>>>>> (i) make a copy of the database to test these procedures
>>>>>> (ii) test out all of this sql stuff against your db copy (making sure
>>>>>> you keep your sql in files so you can rerun against production)
>>>>>> Once you are happy you can do what you need to do quickly and
>>>>>> correctly,
>>>>>> (iii) shutdown the dhis2 instance
>>>>>> (iv) make a backup of database (again)
>>>>>> (v) run the sql
>>>>>> (vi) restart dhis2 instance
>>>>>>
>>>>>> Stay safe.
>>>>>>
>>>>>> On 25 January 2018 at 13:05, moses mwale <isoftcom...@gmail.com>
>>>>>> wrote:
>>>>>> > 

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-29 Thread moses mwale
Thanks very much it has worked just analyzing the data now. You a savior.

On Mon, Jan 29, 2018 at 1:20 PM, moses mwale <isoftcom...@gmail.com> wrote:

> Alright thanks Jason on it.
>
> On Mon, Jan 29, 2018 at 1:10 PM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> Hi Moses,
>>
>> The version of the function looks to be a bit outdated. I just updated it
>> again in this commit
>> <https://github.com/dhis2/dhis2-utils/commit/0b5026c70c6f0117dad83c7215ca89395f271f18>.
>> Maybe you can try again with this new version and see if it works?
>>
>> Regards,
>> Jason
>>
>>
>> On Mon, Jan 29, 2018 at 11:25 AM, moses mwale <isoftcom...@gmail.com>
>> wrote:
>>
>>> wow some major progress i thought it was special sql. I now know its
>>> normal sql.
>>>
>>> dhis2_test=> SELECT merge_organisationunits('FfX6DGeVsJd',
>>> 'qqkYhasbAcf' ,'SUM');
>>> ERROR:  column "attributeoptioncomboid" is of type integer but
>>> expression is of type character varying
>>> LINE 6: value,
>>> ^
>>> HINT:  You will need to rewrite or cast the expression.
>>> QUERY:  INSERT INTO datavalueaudit SELECT nextval('hibernate_sequence'::
>>> regclass),
>>> dataelementid,
>>> periodid,
>>> ( SELECT organisationunitid from organisationunit where uid =
>>> 'qqkYhasbAcf' ) as organisationunitid,
>>> categoryoptioncomboid,
>>> value,
>>> now()::timestamp without time zone,
>>> 'admin'::character varying(100) as modifiedby,
>>> 'MERGE_SOURCE'::character varying(255) as audittype,
>>> attributeoptioncomboid
>>> FROM datavalue where sourceid = ( SELECT organisationunitid
>>> from organisationunit where uid = 'FfX6DGeVsJd' )
>>> CONTEXT:  PL/pgSQL function 
>>> merge_organisationunits(character,character,character
>>> varying) line 178 at EXECUTE
>>>
>>> if i change in the function will it work?
>>>
>>> On Mon, Jan 29, 2018 at 10:01 AM, Jason Pickering <
>>> jason.p.picker...@gmail.com> wrote:
>>>
>>>> Hi Moses,
>>>>
>>>> You need to use the UID of the organisation unit not their integer ID.
>>>>
>>>> You need to place string literals in single quotes.
>>>>
>>>> So, it should be something like
>>>>
>>>> SELECT merge_organisationunits('foo', 'bar' ,'SUM');
>>>>
>>>>
>>>> Regards,
>>>> Jason
>>>>
>>>>
>>>> On Sun, Jan 28, 2018 at 5:28 PM, moses mwale <isoftcom...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hello Jason, Knut and Bob
>>>>>
>>>>> I did according to your per instruction, i had a dump or copy of the
>>>>> db, i created a test db with it and loaded the functions then called using
>>>>> the shared query
>>>>>
>>>>> dhis2_test=> SELECT merge_organisationunits(37442, 24872 ,SUM);
>>>>> ERROR:  column "sum" does not exist
>>>>> LINE 1: SELECT merge_organisationunits(37442, 24872 ,SUM);
>>>>>  ^
>>>>> That's the error i receive, what is wrong?
>>>>>
>>>>> thanks in advance.
>>>>>
>>>>> On Thu, Jan 25, 2018 at 3:32 PM, moses mwale <isoftcom...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thanks all you are really help i appreciate so much. let me do test
>>>>>> first on the backed up db if satisfied will run the merge on the Prod.
>>>>>> Thanks.
>>>>>>
>>>>>> On Fri, Jan 26, 2018 at 3:24 AM, Bob Jolliffe <bobjolli...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> If you really must work on your production database directly then at
>>>>>>> the very least you should shutdown the dhis2 instance while you make
>>>>>>> changes.  Naturally you want to keep that down time to a minimum.
>>>>>>>
>>>>>>> So I would suggest a sequence of:
>>>>>>>
>>>>>>> (i) make a copy of the database to test these procedures
>>>>>>> (ii) test out all of this sql stuff against your db copy (making sure
>>>>>>> you keep your sql in files so you can rerun against production)
>>>>>

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-29 Thread moses mwale
wow some major progress i thought it was special sql. I now know its normal
sql.

dhis2_test=> SELECT merge_organisationunits('FfX6DGeVsJd', 'qqkYhasbAcf'
,'SUM');
ERROR:  column "attributeoptioncomboid" is of type integer but expression
is of type character varying
LINE 6: value,
^
HINT:  You will need to rewrite or cast the expression.
QUERY:  INSERT INTO datavalueaudit SELECT
nextval('hibernate_sequence'::regclass),
dataelementid,
periodid,
( SELECT organisationunitid from organisationunit where uid = 'qqkYhasbAcf'
) as organisationunitid,
categoryoptioncomboid,
value,
now()::timestamp without time zone,
'admin'::character varying(100) as modifiedby,
'MERGE_SOURCE'::character varying(255) as audittype,
attributeoptioncomboid
FROM datavalue where sourceid = ( SELECT organisationunitid
from organisationunit where uid = 'FfX6DGeVsJd' )
CONTEXT:  PL/pgSQL function
merge_organisationunits(character,character,character varying) line 178 at
EXECUTE

if i change in the function will it work?

On Mon, Jan 29, 2018 at 10:01 AM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Hi Moses,
>
> You need to use the UID of the organisation unit not their integer ID.
>
> You need to place string literals in single quotes.
>
> So, it should be something like
>
> SELECT merge_organisationunits('foo', 'bar' ,'SUM');
>
>
> Regards,
> Jason
>
>
> On Sun, Jan 28, 2018 at 5:28 PM, moses mwale <isoftcom...@gmail.com>
> wrote:
>
>> Hello Jason, Knut and Bob
>>
>> I did according to your per instruction, i had a dump or copy of the db,
>> i created a test db with it and loaded the functions then called using the
>> shared query
>>
>> dhis2_test=> SELECT merge_organisationunits(37442, 24872 ,SUM);
>> ERROR:  column "sum" does not exist
>> LINE 1: SELECT merge_organisationunits(37442, 24872 ,SUM);
>>      ^
>> That's the error i receive, what is wrong?
>>
>> thanks in advance.
>>
>> On Thu, Jan 25, 2018 at 3:32 PM, moses mwale <isoftcom...@gmail.com>
>> wrote:
>>
>>> Thanks all you are really help i appreciate so much. let me do test
>>> first on the backed up db if satisfied will run the merge on the Prod.
>>> Thanks.
>>>
>>> On Fri, Jan 26, 2018 at 3:24 AM, Bob Jolliffe <bobjolli...@gmail.com>
>>> wrote:
>>>
>>>> If you really must work on your production database directly then at
>>>> the very least you should shutdown the dhis2 instance while you make
>>>> changes.  Naturally you want to keep that down time to a minimum.
>>>>
>>>> So I would suggest a sequence of:
>>>>
>>>> (i) make a copy of the database to test these procedures
>>>> (ii) test out all of this sql stuff against your db copy (making sure
>>>> you keep your sql in files so you can rerun against production)
>>>> Once you are happy you can do what you need to do quickly and correctly,
>>>> (iii) shutdown the dhis2 instance
>>>> (iv) make a backup of database (again)
>>>> (v) run the sql
>>>> (vi) restart dhis2 instance
>>>>
>>>> Stay safe.
>>>>
>>>> On 25 January 2018 at 13:05, moses mwale <isoftcom...@gmail.com> wrote:
>>>> > This is live (Production) db created a backup. if something goes
>>>> wrong will
>>>> > revert. But the function itself doesnt affect anything right? what am
>>>> going
>>>> > to write now will i guess by merging duplicate orgs right?
>>>> >
>>>> > On Fri, Jan 26, 2018 at 2:59 AM, Jason Pickering
>>>> > <jason.p.picker...@gmail.com> wrote:
>>>> >>
>>>> >> That looks correct.
>>>> >>
>>>> >> It is of course worth saying, that you should not attempt to perform
>>>> this
>>>> >> procedure on your production system, unless you have thoroughly
>>>> tested it in
>>>> >> a development environment!
>>>> >>
>>>> >> Regards,
>>>> >> Jason
>>>> >>
>>>> >>
>>>> >>
>>>> >> On Thu, Jan 25, 2018 at 1:55 PM, moses mwale <isoftcom...@gmail.com>
>>>> >> wrote:
>>>> >>>
>>>> >>> Am using psql. see attached if its correct loading procedure.
>>>> >>>
>>>> >>> On Fri, Jan 26, 2018 at 2:42 AM, Knut Staring <knu...@gm

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-28 Thread moses mwale
Hello Jason, Knut and Bob

I did according to your per instruction, i had a dump or copy of the db, i
created a test db with it and loaded the functions then called using the
shared query

dhis2_test=> SELECT merge_organisationunits(37442, 24872 ,SUM);
ERROR:  column "sum" does not exist
LINE 1: SELECT merge_organisationunits(37442, 24872 ,SUM);
 ^
That's the error i receive, what is wrong?

thanks in advance.

On Thu, Jan 25, 2018 at 3:32 PM, moses mwale <isoftcom...@gmail.com> wrote:

> Thanks all you are really help i appreciate so much. let me do test first
> on the backed up db if satisfied will run the merge on the Prod. Thanks.
>
> On Fri, Jan 26, 2018 at 3:24 AM, Bob Jolliffe <bobjolli...@gmail.com>
> wrote:
>
>> If you really must work on your production database directly then at
>> the very least you should shutdown the dhis2 instance while you make
>> changes.  Naturally you want to keep that down time to a minimum.
>>
>> So I would suggest a sequence of:
>>
>> (i) make a copy of the database to test these procedures
>> (ii) test out all of this sql stuff against your db copy (making sure
>> you keep your sql in files so you can rerun against production)
>> Once you are happy you can do what you need to do quickly and correctly,
>> (iii) shutdown the dhis2 instance
>> (iv) make a backup of database (again)
>> (v) run the sql
>> (vi) restart dhis2 instance
>>
>> Stay safe.
>>
>> On 25 January 2018 at 13:05, moses mwale <isoftcom...@gmail.com> wrote:
>> > This is live (Production) db created a backup. if something goes wrong
>> will
>> > revert. But the function itself doesnt affect anything right? what am
>> going
>> > to write now will i guess by merging duplicate orgs right?
>> >
>> > On Fri, Jan 26, 2018 at 2:59 AM, Jason Pickering
>> > <jason.p.picker...@gmail.com> wrote:
>> >>
>> >> That looks correct.
>> >>
>> >> It is of course worth saying, that you should not attempt to perform
>> this
>> >> procedure on your production system, unless you have thoroughly tested
>> it in
>> >> a development environment!
>> >>
>> >> Regards,
>> >> Jason
>> >>
>> >>
>> >>
>> >> On Thu, Jan 25, 2018 at 1:55 PM, moses mwale <isoftcom...@gmail.com>
>> >> wrote:
>> >>>
>> >>> Am using psql. see attached if its correct loading procedure.
>> >>>
>> >>> On Fri, Jan 26, 2018 at 2:42 AM, Knut Staring <knu...@gmail.com>
>> wrote:
>> >>>>
>> >>>> Just run everything in your PgAdmin SQL interface.
>> >>>>
>> >>>> On Thu, Jan 25, 2018 at 1:22 PM, moses mwale <isoftcom...@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> okay nice thanks, is it to load user-defined functions the same way
>> you
>> >>>>> load stored procedures, by packaging the Java class or classes into
>> a JAR
>> >>>>> file and then loading the JAR file using the LOAD CLASSES statement?
>> >>>>>
>> >>>>> On Thu, Jan 25, 2018 at 11:38 PM, Jason Pickering
>> >>>>> <jason.p.picker...@gmail.com> wrote:
>> >>>>>>
>> >>>>>> Hi Moses,
>> >>>>>>
>> >>>>>> You need to load both of those functions into your database.
>> >>>>>>
>> >>>>>> 1) Script to delete an orgunit is here
>> >>>>>> 2) Script to merge two orgunits is here
>> >>>>>>
>> >>>>>> After that, just call the function with
>> >>>>>>
>> >>>>>> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>> >>>>>>
>> >>>>>> where `source_uid` is the UID of the organisation unit you want to
>> get
>> >>>>>> rid of, `dest_uid` is the UID of the organisation unit you want to
>> keep and
>> >>>>>> move data to
>> >>>>>> and `strategy` is one of the following:
>> >>>>>>
>> >>>>>> SUM: Returns the sum of the values, when there is overlapping data.
>> >>>>>> MAX: Returns the max of the values, when there is overlapping data.
>> >>>>>> 

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread moses mwale
Thanks all you are really help i appreciate so much. let me do test first
on the backed up db if satisfied will run the merge on the Prod. Thanks.

On Fri, Jan 26, 2018 at 3:24 AM, Bob Jolliffe <bobjolli...@gmail.com> wrote:

> If you really must work on your production database directly then at
> the very least you should shutdown the dhis2 instance while you make
> changes.  Naturally you want to keep that down time to a minimum.
>
> So I would suggest a sequence of:
>
> (i) make a copy of the database to test these procedures
> (ii) test out all of this sql stuff against your db copy (making sure
> you keep your sql in files so you can rerun against production)
> Once you are happy you can do what you need to do quickly and correctly,
> (iii) shutdown the dhis2 instance
> (iv) make a backup of database (again)
> (v) run the sql
> (vi) restart dhis2 instance
>
> Stay safe.
>
> On 25 January 2018 at 13:05, moses mwale <isoftcom...@gmail.com> wrote:
> > This is live (Production) db created a backup. if something goes wrong
> will
> > revert. But the function itself doesnt affect anything right? what am
> going
> > to write now will i guess by merging duplicate orgs right?
> >
> > On Fri, Jan 26, 2018 at 2:59 AM, Jason Pickering
> > <jason.p.picker...@gmail.com> wrote:
> >>
> >> That looks correct.
> >>
> >> It is of course worth saying, that you should not attempt to perform
> this
> >> procedure on your production system, unless you have thoroughly tested
> it in
> >> a development environment!
> >>
> >> Regards,
> >> Jason
> >>
> >>
> >>
> >> On Thu, Jan 25, 2018 at 1:55 PM, moses mwale <isoftcom...@gmail.com>
> >> wrote:
> >>>
> >>> Am using psql. see attached if its correct loading procedure.
> >>>
> >>> On Fri, Jan 26, 2018 at 2:42 AM, Knut Staring <knu...@gmail.com>
> wrote:
> >>>>
> >>>> Just run everything in your PgAdmin SQL interface.
> >>>>
> >>>> On Thu, Jan 25, 2018 at 1:22 PM, moses mwale <isoftcom...@gmail.com>
> >>>> wrote:
> >>>>>
> >>>>> okay nice thanks, is it to load user-defined functions the same way
> you
> >>>>> load stored procedures, by packaging the Java class or classes into
> a JAR
> >>>>> file and then loading the JAR file using the LOAD CLASSES statement?
> >>>>>
> >>>>> On Thu, Jan 25, 2018 at 11:38 PM, Jason Pickering
> >>>>> <jason.p.picker...@gmail.com> wrote:
> >>>>>>
> >>>>>> Hi Moses,
> >>>>>>
> >>>>>> You need to load both of those functions into your database.
> >>>>>>
> >>>>>> 1) Script to delete an orgunit is here
> >>>>>> 2) Script to merge two orgunits is here
> >>>>>>
> >>>>>> After that, just call the function with
> >>>>>>
> >>>>>> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
> >>>>>>
> >>>>>> where `source_uid` is the UID of the organisation unit you want to
> get
> >>>>>> rid of, `dest_uid` is the UID of the organisation unit you want to
> keep and
> >>>>>> move data to
> >>>>>> and `strategy` is one of the following:
> >>>>>>
> >>>>>> SUM: Returns the sum of the values, when there is overlapping data.
> >>>>>> MAX: Returns the max of the values, when there is overlapping data.
> >>>>>> MIN: Returns the min of the values, when there is overlapping data.
> >>>>>> AVG: Returns the mean of the values, when there is overlapping data.
> >>>>>> LAST: Returns the last value entered, when there is overlapping
> data.
> >>>>>> FIRST: Returns the first vale entered, when there is overlapping
> data.
> >>>>>>
> >>>>>> Note that this only applies to numeric data. For other data
> (Boolean,
> >>>>>> text, etc) which cannot be aggregated numerically, the last value
> will
> >>>>>> always be taken.
> >>>>>>
> >>>>>> The merge script will not handle situations where you have
> overlapping
> >>>>>> tracker/event data, so you would need to figure out how to handle
> that
> >>>>&

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread moses mwale
This is live (Production) db created a backup. if something goes wrong will
revert. But the function itself doesnt affect anything right? what am going
to write now will i guess by merging duplicate orgs right?

On Fri, Jan 26, 2018 at 2:59 AM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> That looks correct.
>
> It is of course worth saying, that you should not attempt to perform this
> procedure on your production system, unless you have thoroughly tested it
> in a development environment!
>
> Regards,
> Jason
>
>
>
> On Thu, Jan 25, 2018 at 1:55 PM, moses mwale <isoftcom...@gmail.com>
> wrote:
>
>> Am using psql. see attached if its correct loading procedure.
>>
>> On Fri, Jan 26, 2018 at 2:42 AM, Knut Staring <knu...@gmail.com> wrote:
>>
>>> Just run everything in your PgAdmin SQL interface.
>>>
>>> On Thu, Jan 25, 2018 at 1:22 PM, moses mwale <isoftcom...@gmail.com>
>>> wrote:
>>>
>>>> okay nice thanks, is it to load user-defined functions the same way you
>>>> load stored procedures, by packaging the Java class or classes into a JAR
>>>> file and then loading the JAR file using the LOAD CLASSES statement?
>>>>
>>>> On Thu, Jan 25, 2018 at 11:38 PM, Jason Pickering <
>>>> jason.p.picker...@gmail.com> wrote:
>>>>
>>>>> Hi Moses,
>>>>>
>>>>> You need to load both of those functions into your database.
>>>>>
>>>>> 1) Script to delete an orgunit is here
>>>>> <https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/delete_orgunit_with_data.sql>
>>>>> 2) Script to merge two orgunits is here
>>>>> <https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/merge_orgunits.sql>
>>>>>
>>>>> After that, just call the function with
>>>>>
>>>>> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>>>>>
>>>>> where `source_uid` is the UID of the organisation unit you want to get
>>>>> rid of, `dest_uid` is the UID of the organisation unit you want to keep 
>>>>> and
>>>>> move data to
>>>>> and `strategy` is one of the following:
>>>>>
>>>>> SUM: Returns the sum of the values, when there is overlapping data.
>>>>> MAX: Returns the max of the values, when there is overlapping data.
>>>>> MIN: Returns the min of the values, when there is overlapping data.
>>>>> AVG: Returns the mean of the values, when there is overlapping data.
>>>>> LAST: Returns the last value entered, when there is overlapping data.
>>>>> FIRST: Returns the first vale entered, when there is overlapping data.
>>>>>
>>>>> Note that this only applies to numeric data. For other data (Boolean,
>>>>> text, etc) which cannot be aggregated numerically, the last value will
>>>>> always be taken.
>>>>>
>>>>> The merge script will not handle situations where you have overlapping
>>>>> tracker/event data, so you would need to figure out how to handle that
>>>>> yourself!
>>>>>
>>>>> Hope that helps to clarify and good luck!
>>>>>
>>>>> Regards,
>>>>> Jason Pickering
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale <isoftcom...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hey Jason And Knut, thanks for the information, i have been trying to
>>>>>> understand the sql script shared and tried to execute but to no effect,
>>>>>> please can you help me understand where to place the source id and 
>>>>>> orgunit
>>>>>> ids in the script after several attempts of try its has became more
>>>>>> complex.
>>>>>>
>>>>>> I have attached a datavalue table and 1 duplicate orgunit to be
>>>>>> merged. please help me.
>>>>>>
>>>>>> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale <isoftcom...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Thanks very much, allow me to go through and implement the given
>>>>>>> knowledge
>>>>>>>
>>>>>>> On Sun, Jan 7, 2018 at 11:29 PM, Jason Pic

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread moses mwale
Am using psql. see attached if its correct loading procedure.

On Fri, Jan 26, 2018 at 2:42 AM, Knut Staring <knu...@gmail.com> wrote:

> Just run everything in your PgAdmin SQL interface.
>
> On Thu, Jan 25, 2018 at 1:22 PM, moses mwale <isoftcom...@gmail.com>
> wrote:
>
>> okay nice thanks, is it to load user-defined functions the same way you
>> load stored procedures, by packaging the Java class or classes into a JAR
>> file and then loading the JAR file using the LOAD CLASSES statement?
>>
>> On Thu, Jan 25, 2018 at 11:38 PM, Jason Pickering <
>> jason.p.picker...@gmail.com> wrote:
>>
>>> Hi Moses,
>>>
>>> You need to load both of those functions into your database.
>>>
>>> 1) Script to delete an orgunit is here
>>> <https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/delete_orgunit_with_data.sql>
>>> 2) Script to merge two orgunits is here
>>> <https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/merge_orgunits.sql>
>>>
>>> After that, just call the function with
>>>
>>> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>>>
>>> where `source_uid` is the UID of the organisation unit you want to get
>>> rid of, `dest_uid` is the UID of the organisation unit you want to keep and
>>> move data to
>>> and `strategy` is one of the following:
>>>
>>> SUM: Returns the sum of the values, when there is overlapping data.
>>> MAX: Returns the max of the values, when there is overlapping data.
>>> MIN: Returns the min of the values, when there is overlapping data.
>>> AVG: Returns the mean of the values, when there is overlapping data.
>>> LAST: Returns the last value entered, when there is overlapping data.
>>> FIRST: Returns the first vale entered, when there is overlapping data.
>>>
>>> Note that this only applies to numeric data. For other data (Boolean,
>>> text, etc) which cannot be aggregated numerically, the last value will
>>> always be taken.
>>>
>>> The merge script will not handle situations where you have overlapping
>>> tracker/event data, so you would need to figure out how to handle that
>>> yourself!
>>>
>>> Hope that helps to clarify and good luck!
>>>
>>> Regards,
>>> Jason Pickering
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale <isoftcom...@gmail.com>
>>> wrote:
>>>
>>>> Hey Jason And Knut, thanks for the information, i have been trying to
>>>> understand the sql script shared and tried to execute but to no effect,
>>>> please can you help me understand where to place the source id and orgunit
>>>> ids in the script after several attempts of try its has became more
>>>> complex.
>>>>
>>>> I have attached a datavalue table and 1 duplicate orgunit to be merged.
>>>> please help me.
>>>>
>>>> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale <isoftcom...@gmail.com>
>>>> wrote:
>>>>
>>>>> Thanks very much, allow me to go through and implement the given
>>>>> knowledge
>>>>>
>>>>> On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
>>>>> jason.p.picker...@gmail.com> wrote:
>>>>>
>>>>>> Hi Moses
>>>>>> We have some SQL scripts for this here.
>>>>>>
>>>>>> https://github.com/dhis2/dhis2-utils/blob/master/resources/s
>>>>>> ql/merge_orgunits.sql
>>>>>>
>>>>>> This script will not handle tracker data but could probably be
>>>>>> adapted fairly easily to do so.
>>>>>>
>>>>>> Regards,
>>>>>> Jason
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Jan 7, 2018 7:28 AM, "Knut Staring" <knu...@gmail.com> wrote:
>>>>>>
>>>>>>> Hi Moses,
>>>>>>> I would take a backup of the database and then do this with an sql
>>>>>>> script, just changing the sourceid (the database internal referent to 
>>>>>>> the
>>>>>>> organisationunitid) in the datavalues table. But you may get blocked if 
>>>>>>> the
>>>>>>> same period has been filled for both, in which case you may want to do a
>>>>>>> &q

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-25 Thread moses mwale
okay nice thanks, is it to load user-defined functions the same way you
load stored procedures, by packaging the Java class or classes into a JAR
file and then loading the JAR file using the LOAD CLASSES statement?

On Thu, Jan 25, 2018 at 11:38 PM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Hi Moses,
>
> You need to load both of those functions into your database.
>
> 1) Script to delete an orgunit is here
> <https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/delete_orgunit_with_data.sql>
> 2) Script to merge two orgunits is here
> <https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/merge_orgunits.sql>
>
> After that, just call the function with
>
> SELECT merge_organisationunits(source_uid,dest_uid ,strategy);
>
> where `source_uid` is the UID of the organisation unit you want to get rid
> of, `dest_uid` is the UID of the organisation unit you want to keep and
> move data to
> and `strategy` is one of the following:
>
> SUM: Returns the sum of the values, when there is overlapping data.
> MAX: Returns the max of the values, when there is overlapping data.
> MIN: Returns the min of the values, when there is overlapping data.
> AVG: Returns the mean of the values, when there is overlapping data.
> LAST: Returns the last value entered, when there is overlapping data.
> FIRST: Returns the first vale entered, when there is overlapping data.
>
> Note that this only applies to numeric data. For other data (Boolean,
> text, etc) which cannot be aggregated numerically, the last value will
> always be taken.
>
> The merge script will not handle situations where you have overlapping
> tracker/event data, so you would need to figure out how to handle that
> yourself!
>
> Hope that helps to clarify and good luck!
>
> Regards,
> Jason Pickering
>
>
>
>
>
> On Thu, Jan 25, 2018 at 5:30 AM, moses mwale <isoftcom...@gmail.com>
> wrote:
>
>> Hey Jason And Knut, thanks for the information, i have been trying to
>> understand the sql script shared and tried to execute but to no effect,
>> please can you help me understand where to place the source id and orgunit
>> ids in the script after several attempts of try its has became more
>> complex.
>>
>> I have attached a datavalue table and 1 duplicate orgunit to be merged.
>> please help me.
>>
>> On Mon, Jan 8, 2018 at 8:26 PM, moses mwale <isoftcom...@gmail.com>
>> wrote:
>>
>>> Thanks very much, allow me to go through and implement the given
>>> knowledge
>>>
>>> On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
>>> jason.p.picker...@gmail.com> wrote:
>>>
>>>> Hi Moses
>>>> We have some SQL scripts for this here.
>>>>
>>>> https://github.com/dhis2/dhis2-utils/blob/master/resources/s
>>>> ql/merge_orgunits.sql
>>>>
>>>> This script will not handle tracker data but could probably be adapted
>>>> fairly easily to do so.
>>>>
>>>> Regards,
>>>> Jason
>>>>
>>>>
>>>>
>>>> On Jan 7, 2018 7:28 AM, "Knut Staring" <knu...@gmail.com> wrote:
>>>>
>>>>> Hi Moses,
>>>>> I would take a backup of the database and then do this with an sql
>>>>> script, just changing the sourceid (the database internal referent to the
>>>>> organisationunitid) in the datavalues table. But you may get blocked if 
>>>>> the
>>>>> same period has been filled for both, in which case you may want to do a
>>>>> "NOT IN" or left join.
>>>>>
>>>>> Knut
>>>>>
>>>>> On Jan 7, 2018 10:29, "moses mwale" <isoftcom...@gmail.com> wrote:
>>>>>
>>>>>> Hey devs is it possible to merge facilities without losing data, some
>>>>>> admin accidentally created other duplicates units into the system. anyone
>>>>>> knows how its done?
>>>>>>
>>>>>> developer_lusaka_systems
>>>>>>
>>>>>> ___
>>>>>> 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
>>>>>
>>>>>
>>>
>>>
>>> --
>>> developer_lusaka_systems
>>>
>>
>>
>>
>> --
>> developer_lusaka_systems
>>
>
>
>
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+46764147049 <+46%2076%20414%2070%2049>
>



-- 
developer_lusaka_systems
___
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] merging facilities (org-units) without losing data

2018-01-24 Thread moses mwale
Hey Jason And Knut, thanks for the information, i have been trying to
understand the sql script shared and tried to execute but to no effect,
please can you help me understand where to place the source id and orgunit
ids in the script after several attempts of try its has became more
complex.

I have attached a datavalue table and 1 duplicate orgunit to be merged.
please help me.

On Mon, Jan 8, 2018 at 8:26 PM, moses mwale <isoftcom...@gmail.com> wrote:

> Thanks very much, allow me to go through and implement the given knowledge
>
> On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
> jason.p.picker...@gmail.com> wrote:
>
>> Hi Moses
>> We have some SQL scripts for this here.
>>
>> https://github.com/dhis2/dhis2-utils/blob/master/resources/
>> sql/merge_orgunits.sql
>>
>> This script will not handle tracker data but could probably be adapted
>> fairly easily to do so.
>>
>> Regards,
>> Jason
>>
>>
>>
>> On Jan 7, 2018 7:28 AM, "Knut Staring" <knu...@gmail.com> wrote:
>>
>>> Hi Moses,
>>> I would take a backup of the database and then do this with an sql
>>> script, just changing the sourceid (the database internal referent to the
>>> organisationunitid) in the datavalues table. But you may get blocked if the
>>> same period has been filled for both, in which case you may want to do a
>>> "NOT IN" or left join.
>>>
>>> Knut
>>>
>>> On Jan 7, 2018 10:29, "moses mwale" <isoftcom...@gmail.com> wrote:
>>>
>>>> Hey devs is it possible to merge facilities without losing data, some
>>>> admin accidentally created other duplicates units into the system. anyone
>>>> knows how its done?
>>>>
>>>> developer_lusaka_systems
>>>>
>>>> ___
>>>> 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
>>>
>>>
>
>
> --
> developer_lusaka_systems
>



-- 
developer_lusaka_systems
___
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] connect to dhis2 live db

2018-01-22 Thread moses mwale
Thank you very much. let me have a try.

On Tue, Jan 23, 2018 at 12:52 AM, Knut Staring <knu...@gmail.com> wrote:

> For Dhis live, the dhis.conf file is in the conf folder, and you don't
> need to set up DHIS_HOME
>
> On Jan 22, 2018 11:43, "Stian Sandvold" <st...@dhis2.org> wrote:
>
>> Hi Moses Mwale.
>>
>> If you want to access your database using PgAdmin, you need to connect to
>> your database. To do this, you can choose "Create -> Server". In the
>> version I am using of PgAdmin, this option is available by right-clicking
>> the "Prosgres" item in the menu. This might be different for the different
>> versions of PgAdmin.
>>
>> If you want to connect DHIS2 to your database, you need to configure that
>> in the dhis.conf file, located in your DHIS2_HOME folder. For more
>> information about how to set up this, you should look at the implementation
>> docs: https://docs.dhis2.org/master/en/implementer/html/dhis
>> 2_implementation_guide_full.html
>>
>> In either case, you need to know the following information:
>> * Database hostname/address (If you have the database on the same server
>> as your dhis2 instance, you can use "localhost")
>> * Database port (The default is 5432)
>> * Database name
>> * Username (User must have access to the database you want to use)
>> * Password
>>
>> Hope this helps!
>>
>> On Sun, Jan 21, 2018 at 10:38 AM, moses mwale <isoftcom...@gmail.com>
>> wrote:
>>
>>> How do i achieve connection to dhis2 live database using pgadmin
>>> postgreSQL
>>>
>>> thanks
>>>
>>> --
>>> developer_lusaka_systems
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Stian Sandvold
>> Software developer, DHIS2
>> University of Oslo
>> http://www.dhis2.org
>>
>> ___
>> 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
>>
>>


-- 
developer_lusaka_systems
___
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] connect to dhis2 live db

2018-01-21 Thread moses mwale
How do i achieve connection to dhis2 live database using pgadmin postgreSQL

thanks

-- 
developer_lusaka_systems
___
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] merging facilities (org-units) without losing data

2018-01-07 Thread moses mwale
Thanks very much, allow me to go through and implement the given knowledge

On Sun, Jan 7, 2018 at 11:29 PM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> Hi Moses
> We have some SQL scripts for this here.
>
> https://github.com/dhis2/dhis2-utils/blob/master/
> resources/sql/merge_orgunits.sql
>
> This script will not handle tracker data but could probably be adapted
> fairly easily to do so.
>
> Regards,
> Jason
>
>
>
> On Jan 7, 2018 7:28 AM, "Knut Staring" <knu...@gmail.com> wrote:
>
>> Hi Moses,
>> I would take a backup of the database and then do this with an sql
>> script, just changing the sourceid (the database internal referent to the
>> organisationunitid) in the datavalues table. But you may get blocked if the
>> same period has been filled for both, in which case you may want to do a
>> "NOT IN" or left join.
>>
>> Knut
>>
>> On Jan 7, 2018 10:29, "moses mwale" <isoftcom...@gmail.com> wrote:
>>
>>> Hey devs is it possible to merge facilities without losing data, some
>>> admin accidentally created other duplicates units into the system. anyone
>>> knows how its done?
>>>
>>> developer_lusaka_systems
>>>
>>> ___
>>> 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
>>
>>


-- 
developer_lusaka_systems
___
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] merging facilities (org-units) without losing data

2018-01-06 Thread moses mwale
Hey devs is it possible to merge facilities without losing data, some admin
accidentally created other duplicates units into the system. anyone knows
how its done?

developer_lusaka_systems
___
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] Tracker capture continuously loading meta data

2017-03-02 Thread moses mwale
am trying to load a new tracker capture but its just continuously loading
without displaying anything. Am using 2.24. What could cause this

-- 
developer
___
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] Data set combination

2016-10-19 Thread moses mwale
Is it possible to combine under a single Data set a dataElement with a
combination Sex(male-female) and a dataElement with default combination?

-- 
developer_lusaka_systems
___
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] printing report to .doc

2016-08-17 Thread moses mwale
is there a way that i can edit the print button to be able to print word
docs in standard html report

-- 
developer_lusaka_systems
___
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] conflict

2016-03-19 Thread moses mwale
when capturing data using event capture android app
i get that error. where am i going wrong
-- 
developer_lusaka_systems
___
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] Error 503

2016-03-18 Thread moses mwale
*HTTP ERROR*:
problem accessin/.reason:

service unavailable

How do i solve this one when am using dhis2 live?

-- 
developer_lusaka_systems
___
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] connecting to play.dhis2.org fails using event capture

2016-03-15 Thread moses mwale
which address do i use to connect to the play.dhis2.org/dev using event
capture apk app.
is it possible?

-- 
developer_lusaka_systems
___
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] Reset to original org unit

2016-03-14 Thread moses mwale
I accidentally gave admin admin user, user by organisation specific
districts removed it from parent org. How do i set it back to have parent
org units?
___
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] data entry form no complete button

2016-03-10 Thread moses mwale
yebo i need help my custom design data entry form has no complete,
incomplete and validate buttons.

any help

-- 
developer_lusaka_systems
___
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] (no subject)

2016-02-23 Thread moses mwale
hello

someone have an idea on how to convert data Elements which are created as
aggregates to tracker using sql at once.. please need your help


-- 
developer_lusaka_systems
___
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] Manually creating periods

2015-09-21 Thread moses mwale
Is there a way of setting manually periods in dhis2.  I see I can select
automatically in a data set. how do I create my own period and use them?


developer_lusaka_systems
___
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] Importing meta-data from dhis2 v2.20 from dhis2 v2.18 error

2015-09-18 Thread moses mwale
hello Devs
I am finding difficulties Importing meta-data from dhis2 v2.20 from dhis2
v2.18 it gives error, what is the solution?
___
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] Converted tables to charts but API link fails generate image

2015-09-17 Thread moses mwale
The Charts i have just converted from tables cannot be generated as images,
the API link clicked has to generate an image to be downloaded. but for
these links it gives this error_

HTTP Status 500 -
--

*type* Exception report

*message*

*description* *The server encountered an internal error () that prevented
it from fulfilling this request.*

*exception*

org.springframework.web.util.NestedServletException: Request
processing failed; nested exception is java.lang.ClassCastException:
java.lang.Integer cannot be cast to java.lang.Double

org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)

org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


and a lot more down.

where am I going wrong?

thank you in advance.
___
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] uploading dataValues with category combo

2015-09-16 Thread moses mwale
hello
how do I upload dataValues connected to category combo.
any reference?
___
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] (no subject)

2015-09-15 Thread moses mwale
Hello Devs, when uploading data using a csv format which is shown below.
how do I include a category combination e.g. gender

name,uid,code,shortname,description,formname,domaintype,type,numbertype,texttype,aggregationoperator,categorycombo,url,zero
"undergoing HIV testing",,"x3,"undergoing HIV testing",,"",,"",,"",,
how do I separate them
___
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] Error 415 UNSUPPORTED_MEDIA_TYPE

2015-09-14 Thread moses mwale
Am trying to create a new dataElement using CSV format. this is what am
getting.

curl --data-binary @dataElements.csv "localhost:8082/api/dataElements" -H
"Content-Type:application/csv" -u admin:district -v

*   Trying ::1...
* Connected to localhost (::1) port 8082 (#0)
* Server auth using Basic with user 'admin'
> POST /api/dataElements HTTP/1.1
> Authorization: Basic YWRtaW46ZGlzdHJpY3Q=
> User-Agent: curl/7.40.0
> Host: localhost:8082
> Accept: */*
> Content-Type:application/csv
> Content-Length: 333
>
* upload completely sent off: 333 out of 333 bytes
< HTTP/1.1 415 Unsupported Media Type
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: DENY
< X-Content-Type-Options: nosniff
< Set-Cookie: JSESSIONID=1aaykhq834qennrisui46cx1z;Path=/
< Content-Type: text/html; charset=iso-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 1407
< Server: Jetty(6.1.x)
<



Error 415 UNSUPPORTED_MEDIA_TYPE

HTTP ERROR 415
Problem accessing /api/dataElements. Reason:
UNSUPPORTED_MEDIA_TYPEPowered by
Jetty://
___
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] Where do I place the metadata file when uploading

2015-09-11 Thread moses mwale
hello,

Where do I place or put the metadata file when uploading, when using curl.

curl -H "Content-type: Application/xml" -u admin:district -d @ metaData.xml
"http://localhost:8082/api/metaData; -X POST -v
___
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] HTML Chart Standard report

2015-09-08 Thread moses mwale
Hello DHIS2 Neds

may any one in here show me how I can create standard reports html based in
chart format? I know how to from Events, pivot etc. to html standard
tables, but to charts am missing out, any help.
___
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] Pivot Tables (ReportTable) to Standard Report HTML report format

2015-09-04 Thread moses mwale
Hello All, am keenly interested to learn how to convert Pivot Tables
(ReportTable) to Standard Report HTML report format. I know how to do that
from event report to standard report html report format,

How can I arrange indicators, period which are connected to 2 Organization
Units?
Am used to the one having Program and program stage, But this does not
have, only Having indicator and 2 organization Units

Any Examples on How to complete it.




DB01_Erongo_1Dem_L2_Disability rates 0-24
years_Census_2011




var orgUnit = dhis2.report.organisationUnit;
var orgUnitHierarchy = dhis2.report.organisationUnitHierarchy;
var orgUnitChildren = dhis2.report.organisationUnitChildren;
var date = dhis2.report.date; // A date in -MM-dd format

var periods = dhis2.report.periods; // An array with period identifiers

var period = periods[0]; //var reportUrl = "/api/analytics/events/aggregate/rU1vrYCoRBs.html?stage=BmNIrl52sMO&dimension=ou:" + orgUnit.id + "&dimension=bSsRJcDBG9T&filter=pe:" + period + "&displayProperty=NAME"; var reportUrl = "/api/analytics.xml?dimension=dx:C3KcWZPN5YZ;esQvh8XBqUi;hoAIpggVIaw&dimension=ou:LMGPF478UMN;rgY3dWuhztf&filter=pe:2013&displayProperty=NAME"; Ext.onReady(function() { $("#ou").append("Org Unit: " + orgUnit.name); $("#pe").append("Period: " + period); DHIS.getTable({ "url": "../", "el": "dvReport", "dataType": "aggregated_values", // or "individual_records" "indicators":{ "id" : "JkKAuCwFFM" }, "columns": [{ "dimension": "ou", "items": [{ "id": "" + orgUnit.id + "" //"ImspTQPwCqd" }] } }); }); ___ 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] Pivot tables or event reports

2015-09-02 Thread moses mwale
How about to word? How about those charts in data visualizer, can they also
be downloaded to word or as excel?
Thank you for the help
On 2 Sep 2015 09:25, "Lars Helge Øverland" <larshe...@gmail.com> wrote:

> Hi Moses,
>
> you can download pivot tables as Excel from the Download top menu item.
>
>
> [image: Inline image 1]
>
> regards,
>
> Lars
>
> On Tue, Sep 1, 2015 at 1:14 PM, moses mwale <isoftcom...@gmail.com> wrote:
>
>> Hello, is it possible that fact sheets (Pivot tables or event reports)
>> can be converted into word or excel?
>>
>> ___
>> 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
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org <https://www.dhis2.org>
>
>
___
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] Pivot or event report (Facts Sheets) into word

2015-09-01 Thread moses mwale
Hello, is it possible that fact sheets (Pivot tables or event reports) can
be converted into word or excel?
___
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] Pivot tables or event reports

2015-09-01 Thread moses mwale
Hello, is it possible that fact sheets (Pivot tables or event reports) can
be converted into word or excel?
___
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