← Back to team overview

oship-dev team mailing list archive

Re: History class, how can I use it?

 

2010/6/27 Tim Cook <timothywayne.cook@xxxxxxxxx>

> Hi Wagner,
>
> Thanks for sending your questions to the list.  I hope I can help but
> Sergio may have something to add.
>
> On Sun, 2010-06-27 at 18:46 -0300, Wagner Francisco wrote:
> > Hello,
> >
> > I'm working in our use case and now I'm creating some objects to
> > represent clinical information (like observations, evaluations and so
> > on). But when I'm creating the observation1 instance (according to the
> > doc Sergio sent us) it's necessary to instantiate a History object.
>
> Correct.  Observations are something that has already happened.  So it
> is in the past and therefore a History.
>
> >  I saw our History implementation (openehr/datastructure/History) and
> > I didn't understand it very well. There is an EventContainer there,
> > and I haven't seen the EventContainer class in the DataStructure
> > Specification.
>
In fact, I implement this behaviour. I think a can explain why I choose this
way: that way I find to solve the circular problem[1]. It's more simple that
it sounds. Take a look at the history.txt[1] file where have tests that
exercise the behaviour properly. Just a hint: You don't have to interact
directly with that EventContainer object.Your focus is History object, right
? Try to pass a list of events at the object instantiation. Anyway, look at
the history.txt doctest to help you.

>
> In datastructure.py around line 200 you will find the EventContainer
> class.  The Interface is around line 128. However,  you are correct that
> there are classes here that are not in the specification.
>
> The EventContainer really isn't defined in the openEHR specification.
In the specification it was defined as a list[2]. If you think more
generically the intention to use a List object is define a collection of
objects. I prefered use the Container object than a List object why it
solved fast and pretty well, IMHO. I also could change that to use a
diferent class such as a PersistentList object [3]. This is a implementation
concern that have to be discussed.

>
> > Are we going to use that implementation? How can I use it? I tried to
> > instantiate but I couldn't. I'm not sure about that arguments.
>
> Take a look at the doctest.

> There is not any documentation on them either.  There should be a
> blueprint or a bug report stating the necessity for them as well as some
> documentation on their purpose and usage if they are in fact required.
>
Ok. Tests are not exactly documentation. If we look at this affirmation, I
could say all OSHIP code don't have a good documentation. Anyway, the
doctest that did looks like a documentation. Take a look and find out it's
ok.


[1] -
http://bazaar.launchpad.net/~oship-dev/oship/devel/annotate/head:/src/oship/openehr/tests/history.txt
[2] -
http://www.openehr.org/svn/specification/TRUNK/publishing/architecture/rm/data_structures_im.pdf

[3] -
http://www.zodb.org/documentation/guide/modules.html#persistent-list-persistentlist


>
> Maybe whomever added them will comment on this.
>
> Thanks,
> Tim
>
>
>
> --
> ***************************************************************
> Timothy Cook, MSc
>
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> Skype ID == (upon request)
> Academic.Edu Profile: http://uff.academia.edu/TimothyCook
>
> You may get my Public GPG key from  popular keyservers or
> from this link http://timothywayne.cook.googlepages.com/home
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~oship-dev
> Post to     : oship-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~oship-dev
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
http://dmpinheiro.net
-----------------------------------
Diego Manhães Pinheiro

Follow ups

References