← Back to team overview

dhis2-devs-core team mailing list archive

Re: person attributes, model change

 

To maintain the convention what about TrackableObject?

On Dec 8, 2013, at 12:01 PM, Lars Helge Øverland <larshelge@xxxxxxxxx> wrote:

> Hello there,
> 
> I suspect we are talking past each other to some degree here.
> 
> Firstly, there is no doubt that having a class that encapsulates "thing with attributes" would be good. We have seen how the introduction of IdentifiableObject has greatly  improved the source code and allowed for generic use of objects. A similar benefit could come from introducing a base class for things with attributes.
> 
> But this discussion is not primarily about that. From a model perspective, we need a concrete class which is associated with attributes, events and other entities in the "tracker" model. This class must also be mapped as a unique Hibernate entity. For this we need a concrete class which name is generic enough to represent persons, lab samples, stock, medicines and other things we might want to track. For that I think TrackedEntity is a good name. We are not prohibited from letting that class inherit properties and logic from another base class later.
> On Dec 7, 2013 11:43 PM, "Bob Jolliffe" <bobjolliffe@xxxxxxxxx> wrote:
> ah ok.  Then I suppose we are sitting with an opportunity.  As we come up with a better solution to patient attributes we keep in mind that what we do come up with should be possible to be reused to address the other inadequacies when we eventually have the opportunity decide to address them.   Hence my quibbling about names ... the Ministry of Silly Names as Lars is fond of referring to :-)
> 
> 
> On 8 December 2013 00:36, Morten Olav Hansen <mortenoh@xxxxxxxxx> wrote:
> Actually, I don't think we have had any discussion of attributes at all... today, we have attributes (for 'aggregates', ou, de, etc) and we have patientattributes... both seem inadequate for this purpose.. and I would hope we don't reuse any of them.
> 
> --
> Morten
> 
> 
> On Sat, Dec 7, 2013 at 11:34 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
> Sorry I don't have much idea on how the detailed discussion has been on actually implementing the attributes.  I had assumed (now it seems wrongly) that you would use something based on our existing attributes mechanism.  Having yet-another-object-with-attributes seems to me like the wrong approach.  Either try to use existing mechanism or generalize and improve that if there are deficiencies.  For example liked the discussion I was hearing about labels etc.
> 
> Anyway too late here now I must sleep.  Catch up later.
> 
> 
> On 7 December 2013 23:59, Morten Olav Hansen <mortenoh@xxxxxxxxx> wrote:
> I'm curious to know how we will model attributes on this tracked entity. I think we should open the discission up to more people. It's not like these kinds of changes will come soon anyways.
> 
> Maybe it should be modelled as a new kind of 'idObject' with attributes.. If so, the name tracked entity is completely wrong. A tracked entity would need something that sets it apart from idObject + attributes. Maybe we should simply use the name Entity.
> 
> On Dec 7, 2013 10:53 PM, "Bob Jolliffe" <bobjolliffe@xxxxxxxxx> wrote:
> Hi Morten
> 
> Fully understand that you want to do this with tracker and not suggesting we have to attack the other  stuff simultaneously.  I'm just at this stage talking about what we name this new creature.  We shouldn't name it as if it was somehow only related to tracker, when in fact we are implementing a more generally very useful mechanism which we plan initially to use with tracker, but could and possibly should turn out to be useful for other things.
> 
> Bob
> 
> 
> On 7 December 2013 21:10, Morten Olav Hansen <mortenoh@xxxxxxxxx> wrote:
> Bob,
> 
> I kinda agree with that. From what you're saying, you want something more along the lines of an idObject + attributes? I would like that also, for all our types really, but I don't think that's what's happening now... it's just the tracker module that is changing..
> 
> I would like us to even look at our aggregate datamodel this way, but (correct me if I'm wrong) Lars said it would impact our performance quite badly... not to mention that everything would need to be rewritten
> 
> There are many benefits to at least doing this within the tracker domain, especially with validation... 
> 
> --
> Morten
> 
> 
> On Sat, Dec 7, 2013 at 3:52 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
> I don't like this name at all :-(
> 
> I am not sure there is anything about this new entity object which logically ties it to tracking. So for example such an object could serve equally well as a base class for an orgunit or other dhis2 metadata objects in any future refactoring.  Isn't the key innovation that it is an object with minimal fixed properties?
> 
> So I would be in favour of a more generic name which reflects more what this class will actually do rather than which area you see it its current specific use (things to be tracked).
> 
> Something along the lines of DynamicEntity (or DynamicObject) or the like makes sense.   Of course you can layer tracked things on top of that.
> 
> A passing thought (which also relates to other "complex" objects whose attributes are spread across multiple tables) is that this might also be an opportunity to also address the problem of how to determine "lastUpdated" on such objects.  Recall that this is an outstanding concern currently with orgunits making correct facility registry implementation impossiible.
> 
> So perhaps again this is an opportunity to address the concerns in the current discussion in as general a way as possible so that we can try and reap benefits across the system.
> 
> Bob
> 
> 
> On 6 December 2013 17:45, Morten Olav Hansen <mortenoh@xxxxxxxxx> wrote:
> 
> On Fri, Dec 6, 2013 at 1:56 PM, Jim Grace <jimgrace@xxxxxxxxx> wrote:
> TrackedEntity
> 
> +1
> 
> --
> Morten
> 
> --
> Mailing list: https://launchpad.net/~dhis2-devs-core
> Post to     : dhis2-devs-core@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs-core
> More help   : https://help.launchpad.net/ListHelp
> 
> 
> 
> 
> 
> 
> 
> 
> --
> Mailing list: https://launchpad.net/~dhis2-devs-core
> Post to     : dhis2-devs-core@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs-core
> More help   : https://help.launchpad.net/ListHelp
> 
> -- 
> Mailing list: https://launchpad.net/~dhis2-devs-core
> Post to     : dhis2-devs-core@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs-core
> More help   : https://help.launchpad.net/ListHelp

Attachment: smime.p7s
Description: S/MIME cryptographic signature


References