Re: [Dhis2-users] Re-implement DHIS2 android data capture applications to use shared database

2016-03-09 Thread Araz Abishov
Hello Anshul,

Thank you for getting interested in DHIS2. 

First of all you should get familiar with data capture application. Best way to 
do it is to build it from source code (link to project repository is provided 
in description). 

You can test app against demo server:

URL: https://play.dhis2.org/demo
Username: admin
Password: district

Any type of small contributions (like bug fixes) are welcome.

Best Regards,
Araz Abishov

On March 9, 2016 at 2:29:54 PM, Anshul Shah (anshulsha...@gmail.com) wrote:

I am Anshul Shah, currently pursuing B.Tech 2nd Year at CSE Indian Institute of 
Technology, Roorkee. I am a member of Mobile Development Group in my college 
and have a good experience in building Android Apps.

My Android projects:
Campus Lancer: App for facilitating the Free-Lancing at IIT-Roorkee. It focus 
on helping communication between entrepreneurs and developers in the campus.
Use of: HTTP requests, JSON parsing, Fragments, REST.
Curve - Fever : A two player game which can be played either against AI or 
another person over bluetooth.
Use of : Threads, Game Loop, Sockets. 
I have knowledge of various other aspects of Android like SQLite, 
SharedPreferences. Along with this I am proficient in native JAVA.
Github: https://github.com/anshulshah96/

I am very eager to work with DHIS2 and awaiting for your response and comments.

Anshul Shah
___  
Mailing list: https://launchpad.net/~dhis2-users  
Post to : dhis2-users@lists.launchpad.net  
Unsubscribe : https://launchpad.net/~dhis2-users  
More help : https://help.launchpad.net/ListHelp  
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] [DHIS] Unable to delete a user

2016-03-09 Thread Lars Helge Øverland
Hi Archana,

I think this happens due to some leak in our application cache. Try going
to data admin > cache statistics > clear cache and try again.

regards,

Lars


On Fri, Mar 4, 2016 at 11:52 AM, Archana Chillala  wrote:

> Hi Morten,
>
> We are using DHIS version 2.23 and created some sample metadata on it.
> When we try to delete a user, the user does not get removed.
>
> Following are the logs for the exception:
>
> * INFO  2016-03-04 16:13:13,146 'admin' update
> org.hisp.dhis.user.UserAuthorityGroup, name: Superuser, uid: gETZb5SDObu
> (AuditLogUtil.java [qtp1727373358-105])
> * ERROR 2016-03-04 16:13:13,151 Failed to invoke method deleteUser on
> DeletionHandler 'UserSettingDeletionHandler' (DefaultDeletionManager.java
> [qtp1727373358-105])
> java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedMethodAccessor618.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> org.hisp.dhis.system.deletion.DefaultDeletionManager.execute(DefaultDeletionManager.java:147)
> at
> org.hisp.dhis.system.deletion.DeletionInterceptor.intercept(DeletionInterceptor.java:54)
> 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:497)
> Caused by: org.hibernate.NonUniqueObjectException: a different object with
> the same identifier value was already associated with the session:
> [org.hisp.dhis.user.UserSetting#org.hisp.dhis.user.UserSetting@528fc6ba]
> at
> org.hibernate.engine.internal.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:696)
> at
> org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:119)
> at
> org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:74)
> at org.hibernate.internal.SessionImpl.fireDelete(SessionImpl.java:918)
> at org.hibernate.internal.SessionImpl.delete(SessionImpl.java:855)
> at
> org.hisp.dhis.user.hibernate.HibernateUserSettingStore.deleteUserSetting(HibernateUserSettingStore.java:107)
> at
> org.hisp.dhis.user.DefaultUserSettingService.deleteUserSetting(DefaultUserSettingService.java:160)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> * INFO  2016-03-04 16:13:13,154 'admin' delete org.hisp.dhis.user.User,
> name: user new, uid: bSJzGJPYnWi (AuditLogUtil.java [qtp1727373358-105])
> * INFO  2016-03-04 16:13:13,155 'admin' delete
> org.hisp.dhis.user.UserCredentials, name: admin admin (AuditLogUtil.java
> [qtp1727373358-105])
> * INFO  2016-03-04 16:13:13,158 'admin' delete org.hisp.dhis.user.User,
> name: user new, uid: bSJzGJPYnWi (AuditLogUtil.java [qtp1727373358-105])
> * WARN  2016-03-04 16:13:13,174 SQL Error: 0, SQLState: 23503
> (SqlExceptionHelper.java [qtp1727373358-105])
> * ERROR 2016-03-04 16:13:13,175 ERROR: update or delete on table
> "userinfo" violates foreign key constraint "fk_usersetting_userinfoid" on
> table "usersetting"
>   Detail: Key (userinfoid)=(289) is still referenced from table
> "usersetting". (SqlExceptionHelper.java [qtp1727373358-105])
> * ERROR 2016-03-04 16:13:13,175 Error while executing action
> (ExceptionInterceptor.java [qtp1727373358-105])
> org.springframework.dao.DataIntegrityViolationException: could not execute
> statement; SQL [n/a]; constraint [fk_usersetting_userinfoid]; nested
> exception is org.hibernate.exception.ConstraintViolationException: could
> not execute statement
> at
> org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:163)
> at
> org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:730)
> at
> org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:592)
> at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757)
> at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726)
> at
> org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:521)
> at
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
> Caused by: org.hibernate.exception.ConstraintViolationException: could not
> execute statement
> at
> org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
> at
> org.hibernate.exception.i

Re: [Dhis2-users] one to many relation ability- tracker module

2016-03-09 Thread Abyot Asalefew Gizaw
It is possible to record multiple visits each having different issues - for
this one has to simply create multiple stages. The limitation here is one
needs to know before hand how many TYPES of issues or diagnosis one is
expecting. It is not like we have a unlimited number of blank sheets and we
record whatever issue or diagnosis we are observing. We need to define the
TYPES before hand - that is what the program stages are doing. Then each
program stage can be repeated as many times as needed - there is no limit
on the amount of visits.

It is also possible to add new visit type - program stage - at any point in
the process.


---
Thank you,
Abyot.

On Wed, Mar 9, 2016 at 9:50 AM, Uwe Wahser  wrote:

> Hi Markus and Abyott,
>
> without knowing Hariris use-case I think that he is touching an interesting
> point about mapping relational data models into the tracker-module. Am I
> actually able to create relations as in a relational DBMS? Extending
> Hariris
> case, could he actually record a patient having multiple visits, each visit
> showing multiple issues, each issue getting multiple medications? (Patient
> <-
> Visit <- Issue <- Prescription)
>
> In my current understanding I can only have Objects and (mulitple) Events,
> while
> the objects can form relational models, but not the events, which would be
> necessary if I wanted to record the prescribing doctor in the above
> example. Is
> this because of an eventual integration into the dimensional model with
> dimensions and dataelements in analysis and the aggregate level?
>
> Best regards,
>
> Uwe
>
> > Markus Bekken  hat am 9. März 2016 um 10:18
> > geschrieben:
> >
> >
> > Hi Hariri,
> > The only way to collect the same data elements multiple times is to make
> a
> > repeatable program stage that only contains the repeating data elements.
> You
> > could then use the table entry mode to enter one row for each medication:
> >
> >
> > Markus
> >
> > > 8. mar. 2016 kl. 18.28 skrev Hariri, Ousama Al :
> > >
> > > Hallo Abyott,
> > > Many thanks for prompt reply; I did what you said already.. Please,
> check
> > > the attached screenshot.
> > > But, I have added secondary section, in order to input in: the second
> > > disease, second medication… etc.
> > > But, I’m still restricted to those fields. When it is needed to add a
> third
> > > or fourth medication, then I’m obliged to add new data elements.
> > > Is there a better solution?
> > > Best regards
> > >
> > >
> > >
> > > From: Abyot Asalefew Gizaw [mailto:ab...@dhis2.org  ab...@dhis2.org>]
> > >
> > > Sent: Dienstag, 8. März 2016 18:03
> > > To: Hariri, Ousama Al mailto:har...@gfa-bis.de>>;
> DHIS 2
> > > Users list  > > >
> > > Subject: Re: one to many relation ability- tracker module
> > >
> > > Dear Ousama,
> > >
> > > You can record as many patient visits as you can - there is no limit.
> > >
> > > What you can do is create a program and program stage. The data
> elements you
> > > created needs to be assigned to program stage.
> > >
> > > You can have one or more program stages depending on the number and
> type of
> > > disease you wanted to record.
> > >
> > > If you make a program stage repeatable, you will be able to record as
> many
> > > visits as you have.
> > >
> > > Please refer to our documentation for more details
> > >
> http://dhis2.github.io/dhis2-docs/master/en/user/html/dhis2_user_manual_en_full.html#d5e5778
> > > <
> http://dhis2.github.io/dhis2-docs/master/en/user/html/dhis2_user_manual_en_full.html#d5e5778
> >
> > >
> > >
> > > ---
> > > Thank you,
> > > Abyot.
> > >
> > > On Tue, Mar 8, 2016 at 5:31 PM, Ousama Hariri  > > > wrote:
> > > Dear admins,
> > > I am trying to setup a tracker system that can capture a basic patient
> > > visit.
> > > Therefore, I have created "data elements" for disease and medicine.
> > > But, I can record only 1 disease and 1 medicine... while it is much
> > > possible that the patient has a main disease and secondary diseases as
> > > well as main medicine and many supplementary medicines.
> > > Can you help me in such a case?
> > > Thanks in advance
> > > hariri
> > > --
> > > This message was sent from Launchpad by
> > > Ousama Hariri (https://launchpad.net/~hariri
> > > )
> > > using the "Contact this team's admins" link on the DHIS 2 Users team
> page
> > > (https://launchpad.net/~dhis2-users <
> https://launchpad.net/~dhis2-users>).
> > > For more information see
> > > https://help.launchpad.net/YourAccount/ContactingPeople
> > > 
> > >
> > > ___
> > > Mailing list: https://launchpad.net/~dhis2-users
> > > 
> > > Post to : dhis2-users@lists.launchpad.net
> > > 
> > > Unsubscribe : https://launchpad.net/~dhis2-users
> > > 
> > > 

Re: [Dhis2-users] one to many relation ability- tracker module

2016-03-09 Thread Uwe Wahser
Hi Markus and Abyott,

without knowing Hariris use-case I think that he is touching an interesting
point about mapping relational data models into the tracker-module. Am I
actually able to create relations as in a relational DBMS? Extending Hariris
case, could he actually record a patient having multiple visits, each visit
showing multiple issues, each issue getting multiple medications? (Patient <-
Visit <- Issue <- Prescription) 

In my current understanding I can only have Objects and (mulitple) Events, while
the objects can form relational models, but not the events, which would be
necessary if I wanted to record the prescribing doctor in the above example. Is
this because of an eventual integration into the dimensional model with
dimensions and dataelements in analysis and the aggregate level?

Best regards,

Uwe

> Markus Bekken  hat am 9. März 2016 um 10:18
> geschrieben:
> 
> 
> Hi Hariri,
> The only way to collect the same data elements multiple times is to make a
> repeatable program stage that only contains the repeating data elements. You
> could then use the table entry mode to enter one row for each medication:
> 
> 
> Markus
> 
> > 8. mar. 2016 kl. 18.28 skrev Hariri, Ousama Al :
> > 
> > Hallo Abyott,
> > Many thanks for prompt reply; I did what you said already.. Please, check
> > the attached screenshot.
> > But, I have added secondary section, in order to input in: the second
> > disease, second medication… etc.
> > But, I’m still restricted to those fields. When it is needed to add a third
> > or fourth medication, then I’m obliged to add new data elements.
> > Is there a better solution?
> > Best regards
> >  
> >  
> >  
> > From: Abyot Asalefew Gizaw [mailto:ab...@dhis2.org ]
> > 
> > Sent: Dienstag, 8. März 2016 18:03
> > To: Hariri, Ousama Al mailto:har...@gfa-bis.de>>; DHIS 2
> > Users list  > >
> > Subject: Re: one to many relation ability- tracker module
> >  
> > Dear Ousama,
> >  
> > You can record as many patient visits as you can - there is no limit.
> >  
> > What you can do is create a program and program stage. The data elements you
> > created needs to be assigned to program stage.
> >  
> > You can have one or more program stages depending on the number and type of
> > disease you wanted to record.
> >  
> > If you make a program stage repeatable, you will be able to record as many
> > visits as you have.
> >  
> > Please refer to our documentation for more details
> > http://dhis2.github.io/dhis2-docs/master/en/user/html/dhis2_user_manual_en_full.html#d5e5778
> > 
> >  
> > 
> > ---
> > Thank you,
> > Abyot.
> >  
> > On Tue, Mar 8, 2016 at 5:31 PM, Ousama Hariri  > > wrote:
> > Dear admins,
> > I am trying to setup a tracker system that can capture a basic patient
> > visit.
> > Therefore, I have created "data elements" for disease and medicine.
> > But, I can record only 1 disease and 1 medicine... while it is much
> > possible that the patient has a main disease and secondary diseases as
> > well as main medicine and many supplementary medicines.
> > Can you help me in such a case?
> > Thanks in advance
> > hariri
> > --
> > This message was sent from Launchpad by
> > Ousama Hariri (https://launchpad.net/~hariri
> > )
> > using the "Contact this team's admins" link on the DHIS 2 Users team page
> > (https://launchpad.net/~dhis2-users ).
> > For more information see
> > https://help.launchpad.net/YourAccount/ContactingPeople
> > 
> >  
> > ___
> > Mailing list: https://launchpad.net/~dhis2-users
> > 
> > Post to : dhis2-users@lists.launchpad.net
> > 
> > Unsubscribe : https://launchpad.net/~dhis2-users
> > 
> > More help   : https://help.launchpad.net/ListHelp
> > 
> 
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp