[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13241: Replace fixed attributes to dynamic attributes (WIP)

revision-diff.txt (1.44 KB)

Hi Tran,

These fixed attributes

  1. should be inserted only once - not every time we start dhis2

  2. shouldn’t we make at least gender and date of birth mandatory?

  3. also, do we need to have some kind of sorting mechanism so that we control how we display registration form

Abyot.

···

On Mon, Dec 16, 2013 at 5:47 AM, noreply@launchpad.net wrote:


revno: 13241

committer: Tran Chau tran.hispvietnam@gmail.com

branch nick: dhis2

timestamp: Mon 2013-12-16 11:45:10 +0700

message:

Replace fixed attributes to dynamic attributes (WIP)

modified:

dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java

lp:dhis2

https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.

To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription

=== modified file ‘dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java’

— dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-16 04:27:26 +0000

+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-16 04:45:10 +0000

@@ -611,12 +611,12 @@

         + max + ".age]";

     updateFixedAttributeInCaseAggregate( source, target );
  •    // executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN registrationDate" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN isDead" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN underAge" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN dobType" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN registrationDate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN isDead" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN underAge" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN dobType" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
    

    }

    private void updateFixedAttributeInCaseAggregate( String source, String target )


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

Hi Abyot,

I like the idea of the dynamic attributes, and not requiring gender or anything. We have considered using the tracker for monitoring of boreholes and other sanitation resources, and in this case, gender and age are not really relevant. Maybe a “corner case”, but I think where is this headed, should allow a lot more flexibility.

Regards,
Jason

···

On Mon, Dec 16, 2013 at 2:59 PM, Abyot Gizaw abyota@gmail.com wrote:

Hi Tran,

These fixed attributes

  1. should be inserted only once - not every time we start dhis2
  1. shouldn’t we make at least gender and date of birth mandatory?
  1. also, do we need to have some kind of sorting mechanism so that we control how we display registration form

Abyot.


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

On Mon, Dec 16, 2013 at 5:47 AM, noreply@launchpad.net wrote:


revno: 13241

committer: Tran Chau tran.hispvietnam@gmail.com

branch nick: dhis2

timestamp: Mon 2013-12-16 11:45:10 +0700

message:

Replace fixed attributes to dynamic attributes (WIP)

modified:

dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java

lp:dhis2

https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.

To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription

=== modified file ‘dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java’

— dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-16 04:27:26 +0000

+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-16 04:45:10 +0000

@@ -611,12 +611,12 @@

         + max + ".age]";

     updateFixedAttributeInCaseAggregate( source, target );
  •    // executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN registrationDate" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN isDead" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN underAge" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN dobType" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN registrationDate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN isDead" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN underAge" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN dobType" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
    

    }

    private void updateFixedAttributeInCaseAggregate( String source, String target )


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

Very interesting use-case. Yes that’s the idea, allowing for tracking of everything - lab samples, logistics, medicines, equipment, and now boreholes. There won’t be required attributes.

Lars

···

On Mon, Dec 16, 2013 at 2:59 PM, Abyot Gizaw abyota@gmail.com wrote:

Hi Tran,

These fixed attributes

  1. should be inserted only once - not every time we start dhis2
  1. shouldn’t we make at least gender and date of birth mandatory?
  1. also, do we need to have some kind of sorting mechanism so that we control how we display registration form

Abyot.


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

On Mon, Dec 16, 2013 at 5:47 AM, noreply@launchpad.net wrote:


revno: 13241

committer: Tran Chau tran.hispvietnam@gmail.com

branch nick: dhis2

timestamp: Mon 2013-12-16 11:45:10 +0700

message:

Replace fixed attributes to dynamic attributes (WIP)

modified:

dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java

lp:dhis2

https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.

To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription

=== modified file ‘dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java’

— dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-16 04:27:26 +0000

+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-16 04:45:10 +0000

@@ -611,12 +611,12 @@

         + max + ".age]";

     updateFixedAttributeInCaseAggregate( source, target );
  •    // executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN registrationDate" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN isDead" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN underAge" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN dobType" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN registrationDate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN isDead" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN underAge" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN dobType" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
    

    }

    private void updateFixedAttributeInCaseAggregate( String source, String target )


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

Yes that is very interesting - and I agree with that.

But what is funny is - we removed those attributes from html forms and put them in java codes - they are still there. There is no point in pre-populating them. We just let the user define what ever is needed and decide to make mandatory or not.

Also - while refactoring, we should slowly move away from PatientXXX naming. For example instead of PatientAttribute, may be EntityAttribute or just Attribute

···

On Tue, Dec 17, 2013 at 8:08 AM, Lars Helge Øverland larshelge@gmail.com wrote:

Very interesting use-case. Yes that’s the idea, allowing for tracking of everything - lab samples, logistics, medicines, equipment, and now boreholes. There won’t be required attributes.

Lars

On Dec 17, 2013 5:06 AM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Abyot,

I like the idea of the dynamic attributes, and not requiring gender or anything. We have considered using the tracker for monitoring of boreholes and other sanitation resources, and in this case, gender and age are not really relevant. Maybe a “corner case”, but I think where is this headed, should allow a lot more flexibility.

Regards,
Jason


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

On Mon, Dec 16, 2013 at 2:59 PM, Abyot Gizaw abyota@gmail.com wrote:

Hi Tran,

These fixed attributes

  1. should be inserted only once - not every time we start dhis2
  1. shouldn’t we make at least gender and date of birth mandatory?
  1. also, do we need to have some kind of sorting mechanism so that we control how we display registration form

Abyot.


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

On Mon, Dec 16, 2013 at 5:47 AM, noreply@launchpad.net wrote:


revno: 13241

committer: Tran Chau tran.hispvietnam@gmail.com

branch nick: dhis2

timestamp: Mon 2013-12-16 11:45:10 +0700

message:

Replace fixed attributes to dynamic attributes (WIP)

modified:

dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java

lp:dhis2

https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.

To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription

=== modified file ‘dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java’

— dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-16 04:27:26 +0000

+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-16 04:45:10 +0000

@@ -611,12 +611,12 @@

         + max + ".age]";

     updateFixedAttributeInCaseAggregate( source, target );
  •    // executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN registrationDate" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN isDead" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN underAge" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN dobType" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN registrationDate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN isDead" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN underAge" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN dobType" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
    

    }

    private void updateFixedAttributeInCaseAggregate( String source, String target )


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

Yes that is very interesting - and I agree with that.

But what is funny is - we removed those attributes from html forms and put them in java codes - they are still there. There is no point in pre-populating them. We just let the user define what ever is needed and decide to make mandatory or not.

Yes right, attributes can be set as required by the user.

Also - while refactoring, we should slowly move away from PatientXXX naming. For example instead of PatientAttribute, may be EntityAttribute or just Attribute

Agree.

···

On Dec 17, 2013 8:17 AM, “Abyot Gizaw” abyota@gmail.com wrote:

On Tue, Dec 17, 2013 at 8:08 AM, Lars Helge Øverland larshelge@gmail.com wrote:

Very interesting use-case. Yes that’s the idea, allowing for tracking of everything - lab samples, logistics, medicines, equipment, and now boreholes. There won’t be required attributes.

Lars

On Dec 17, 2013 5:06 AM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Abyot,

I like the idea of the dynamic attributes, and not requiring gender or anything. We have considered using the tracker for monitoring of boreholes and other sanitation resources, and in this case, gender and age are not really relevant. Maybe a “corner case”, but I think where is this headed, should allow a lot more flexibility.

Regards,

Jason

On Mon, Dec 16, 2013 at 2:59 PM, Abyot Gizaw abyota@gmail.com wrote:

Hi Tran,

These fixed attributes

  1. should be inserted only once - not every time we start dhis2
  1. shouldn’t we make at least gender and date of birth mandatory?
  1. also, do we need to have some kind of sorting mechanism so that we control how we display registration form

Abyot.

On Mon, Dec 16, 2013 at 5:47 AM, noreply@launchpad.net wrote:


revno: 13241

committer: Tran Chau tran.hispvietnam@gmail.com

branch nick: dhis2

timestamp: Mon 2013-12-16 11:45:10 +0700

message:

Replace fixed attributes to dynamic attributes (WIP)

modified:

dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java

lp:dhis2

https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.

To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription

=== modified file ‘dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java’

— dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-16 04:27:26 +0000

+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-16 04:45:10 +0000

@@ -611,12 +611,12 @@

         + max + ".age]";
     updateFixedAttributeInCaseAggregate( source, target );
  •    // executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN registrationDate" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN isDead" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN underAge" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN dobType" );
    
  •    // executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN registrationDate" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN isDead" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN underAge" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN dobType" );
    
  •     executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
    
 }
 private void updateFixedAttributeInCaseAggregate( String source, String target )

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp