An Introduction to LifeLines and the Data Structures Used in It
Partha Ghosh, Graduate Research Assistant, HCIL
  Introduction
 

            Lifelines is a personal history visualization technique in which an overview of a personal history is seen in a single screen as a series of timelines. A simple representation of a personal history would be seen as a sequence of point events that have a date or interval events that have a range of dates. However as the number of events and intervals grow large, it becomes increasingly difficult to browse or review a personal life history. To counter the effect, Lifelines makes use of a hierarchical data structure of aggregates and events.

            Individuals or decision-makers often segment personal data into categories such as educational, financial, and medical, or into further specifics such as physician visits, hospitalizations, medications and lab tests. These are termed as facets. Small records may have a non-hierarchical list of facets while large and complex records will require a hierarchy of facets. For an academic resume, facets might be the research topics, journal articles, conference papers, grants, courses taught, positions held, and lectures given.

            Facets are permanent and do not change over a person's life. For end-users, facets are a natural level for assigning access privileges and these might be achieved by electing to protect certain facets with additional passwords. Often groups of events are closely related and users would like to see them as an aggregate or provide information about all the events in an aggregate. So within the Entity-Relationship model, aggregates are created which combines several events or previously created aggregates. Aggregates are meant to represent tight clusters or events and intervals, whose span of time is limited. An event or interval may participate in at most one aggregate.

            Tightly clustered hierarchies of sequential or parallel aggregates within a facet accommodate many situations, but there is a need for an additional mechanism to represent looser aggregations of events and intervals. A series of events or intervals may have a meaningful relationship even if they are widely separated in time or occur across several facets. Hence, the introduction of crosslinks which will normally not be visible, but that when users select to view a crosslink, they will be able to see lines or highlight the crosslink components.
 
 

Data Structures
 

            The figure below shows the system architecture for LifeLines. Before users can look at the personal data structure in Lifelines a conversion has to take place to map the event types and attributes to display the attributes. The information architecture relies on a  novel data format. A personal history data structure (phd) is stored in a database (e.g. MS Access) which is read in by a Lifelines java applet.  A control panel  enables a database administrator or user to specify the visual presentation and generate the LifeLines Data (lld).
 
 


 
 
 
 

The lld file is not really needed by the Lifelines applet. If facilitates our own development (i.e. to prepare the Lifelines data directly without the Preference Module). Our requirements were that it should be readable enough to allow someone to write simple test data files by hand, and flexible enough to allow changes as our project evolves.
 

LLD Data Format
 

Key:    *      indicates single or multiple ocurrences of the attribute prededing it.
           identifier indicates the attribute name
           label indicates name of event/summary.
           p in thickness indicates pixel
 

The data structure can be formally represented as:

<lld file> = <timeline> <updateline> <header-line> <facets> <line*> <endline> <line>

<timeline> = <occurence> <month><yyyy>
<occurence> = before | after

<updateline> = <dayname>,<date>
<dayname> = today

<header-line> = <type>, <firstname> <lastname> , <sex>, <age>,  <addinfo*> | <empty>

<facets> = <identifier>, <name>, <color>, <summary>

<line> = <aggregate line> | <summary line> | <event line> | <commentline>

<aggregate line> = <identifier>, <type>,<items>,<summary>

<items> = <number>

<type> = normal

<summary line> = %- , <date> , <date>, <color>, <thickness>, <label>, <URL>,

                                                                                        <addinfo*> |< empty>

<event line> = %- , <date> , <date>, <color>, <thickness>, <label>, <URL>,

                                                                                            <addinfo*> |< empty>

<identifier> = facets | agg

<firstname> = String

<lastname> = String

<summary> = yes/no

<color> = red | green | brown | lightbrown | blue | darkbrown | black | severe

<number> = 1 | 2 | 3 | .....| infinity

<thickness> = p<number>

<label> = String

<URL> =" " (String) | <empty>

<addinfo> = "  " (String) | <image>

<image> = "*.jpg" | "*.gif" | <empty>

<date> = mm-dd-yyyy | (empty)

 <commentline> = %c

<endline> = %end
 
 

The "lld" file structure is described below with the help of a current "live" lld file which is used to generate the lifelines model. The explanations are given in coloredblock letters within asterisks(*).

%beforeSeptember1997 /*deals with changes with fileformats */

%today,6-1-1997 /*specifies the hypothetical value of today. This is to freeze the demo so that the data makes sense */

%person,Linda Simpson, Female,40,more info,images/cath.gif/*the first block of relevant data has a sample information associated with the patient which serves as sort of an identification. hence the next line of code describes the patient whose record is supplied by the lld file "c7.lld". Also an image is also included (cath.gif) as a special field at the end under images/*/


 

%facet,Notes,lightbrown,yes /*this is the first facet. the second variable is the title. the third variable is the background color. note that the last field is set to "yes", which signifies that the facet supports summarization*/

 

%c,comment

%agg, normal,1, no/*Aggregate specification is the first field in this case, the second field is the type (only "normal" exist at the moment), the third field defines the number of aggregates or "events" in this case. The fourth field answers the question "does the aggregate have summary? (in this case "no"). */

%-,1-9-1992,11-20-1993,lightgray,p5,Tobacco,"url",""/*Event. All events, even single ones like this one have to be within aggregates*/

/* The event structure begins with a "-" signifying that it is an event. The second field is the event STARTDATE followed by the third field event ENDDATE. The fourth field is the COLOR of the of the line in pixels, the fifth field is the coding for the thickness of the line (coded as p2, p5, etc.). The sixth field is the label for the event. The next to last field contain URL information in the form of a string and the last field contains additional information which is basically a string to contain any other information that could be useful in a string search to filter results.*/

%agg, normal,1, no
 

%-,2-15-1992,5-20-1992,lightgray,p5,Depression,"url",""


%agg, normal,1, no
 

%-,5-15-1992,8-1-1992,lightgray,p5,Lyme,"url",""


%agg, normal,1, no
 

%-,10-20-1992,5-9-1993,lightgray,p5,Arthritis,"url",""


%agg, normal,3, no /*Note that this aggregate has 3 items (events) but no summary. Because they are aggregateed, the 2 small events (#2 and #3) appear on top of the line (even #1) instead of being pushed to another line */
 

%-,1-1-1994,today,black,p5,Obesity,"url",""

%-,6-1-1995,6-3-1995,black,p10, ,"url",""

%-,3-1-1997,3-3-1997,black,p10, ,"url",""



 
 

%agg, normal,1, no
 

%-,3-1-1994,3-3-1994,black,p10,Checkup,"url","physician=Goldman"


%agg, normal,1, no
 

%-,6-1-1995,6-3-1995,black,p10,Checkup,"url",""


%agg, normal,1, no
 

%-,6-1-1996,6-3-1996,black,p10,Checkup,"url",""


%agg, normal,1, no
 

%-,3-11-1997,3-13-1997,black,p10,Checkup,images/image3.jpg,"" /*Note that the above event has an image field instead of an URL */


%agg,normal,6,no
 

%-,6-4-1994,6-30-1994,severe,p16,AtrialFlutter,"url","physician=Goldman"

%-,6-30-1994,5-8-1995,black,p1,AtrialFlutter,"url","physician=Goldman"

%-,9-20-1994,9-20-1994,black,p8, ,"url",""

%-,12-20-1994,12-20-1994,black,p8, ,"url",""

%-,2-20-1995,2-20-1995,black,p8, ,"url",""

%-,5-8-1995,5-8-1995,black,p8, ,"url",""


%agg,normal,1,no
 

%-,05-15-1996,12-01-1996,black,p6,Migraine,aaron/drug.html,"indication=migraine prevention" /*Another event that has an image */


%agg, normal,1,no
 

%-,1-10-1997,7-1-1997,black,p8,Pregnancy,"url",""
 
 
 

/* The following example is interesting because the events have noticeably different attributes, for example the color coding, additional information, etc. Notice that even when the timeframe is very small, the different bandlike formation of colors over a single line imparts useful information at a glance.*/

/*Note that this aggregate supports summary, or, in other words, the patient condition under Pneumonia can correspond to a complex aggregate event. The summarization rules can be generic or they can be complex and the key to summarization rules vary from place to place.*/

%agg,normal,4,yes /*Note that the aggregate is made up of a summary and 4 events. That accounts for the five lines under it. */

    %-,10-5-1994,4-20-1995,severe,p10,Pneumonia,"url","" /*This first "event" actually is  the summary of the 4 events following it. Note the range on the date corresponds to the start of the first event and end of the last event. */

        %-,10-5-1994,11-7-1994,black,p10,Flu,"url","physician=Goldman, NoteID=1" /* Event 1 */

      %-,11-7-1994,1-15-1994,blue,p10,Bronchitis,"url", "NoteID=1"
         /* Event 2 */

        %-,1-15-1995,2-20-1995,severe,p10,Pneumonia,"url","NoteID=1"
        /* Event 3 */

        %-,2-20-1995,4-20-1995,blue,p10,Pneumonia,"url","NoteID=1"
          /* Event 4 */

%agg,normal,4,no
 

%-,10-1-1995,6-3-1996,black,p1,KneePain,"url",""

%-,10-2-1995,10-2-1995,black,p10, ,"url",""

%-,1-10-1996,1-10-1996,black,p10, ,"url",""

%-,6-3-1996,6-3-1996,black,p10, ,"url",""


%agg,normal,8,no
     /* Here again, notice how all events in the aggregate appear on the same line */
 

%-,6-2-1996,7-5-1996,black,p6,Fatigue,"url",""

%-,7-6-1996,4-1-1997,blue,p8,Diabetes,"url",""

%-,7-5-1996,7-5-1996,black,p10, ,"url",""

%-,7-10-1996,7-10-1996,black,p10, ,"url",""

%-,9-19-1996,9-19-1996,black,p10, ,"url",""

%-,3-1-1997,3-3-1997,black,p10, ,"url",""

%-,4-1-1997,today,severe,p10,Diabetes,"url",""

%-,5-1-1997,5-3-1997,black,p10, ,"url",""


---------------------------------------------------------------------------

%facet,Hosps.,darkbrown,yes   /*new facet*/

%agg,normal,1,no

    %-,2-22-1992,2-23-1992,lightgray,p10,Appendectomy,"url",""

%agg,normal,1,no

    %-,2-14-1995,2-20-1995,severe,p10,Pneumonia,"url",""

%agg,normal,1,no

    %-,1-15-1996,1-15-1996,blue,p10,KneeSurgery,"url",""

-----------------------------------------------------------

%facet,Tests,lightbrown,yes    /*new facet*/

%agg,normal,1,no

    %-,3-1-1994,3-3-1994,black,p10,Blood,"url",""

%agg,normal,1,no

    %-,6-4-1994,6-4-1994,severe,p16,EKG,images/ecgattrialflutter.jpg,""

%agg,normal,1,no

    %-,6-10-1994,6-10-1994,black,p10,EKG,images/ecgnormal.gif,""

%agg,normal,1,no

    %-,7-4-1994,7-4-1994,black,p10,Sonogram,images/ecgnormal.gif,""

%agg,normal,1,no

    %-,2-14-1995,2-15-1995,black,p10,EKG,images/ecgnormal.gif,""

%agg,normal,1,no

    %-,3-10-1997,3-12-1997,black,p10,Sonogram,images/babysonogram.jpg,""

%agg,normal,4,no
 

%-,2-14-1995,2-18-1995,black,p2,Xray,"url","NoteID=1"

%-,2-14-1995,2-14-1995,red,p12, ,images/pneumonia.gif,"NoteID=1"

%-,2-16-1995,2-16-1995,red,p12, ,images/pneumonia.gif,"NoteID=1"

%-,2-18-1995,2-18-1995,red,p10, ,images/pneumonia.gif,"NoteID=1"


%agg,normal,1,no

    %-,6-1-1995,6-3-1995,black,p10,Blood,"url",""

%agg,normal,1,no

    %-,5-1-1996,5-3-1996,black,p10,Blood,"url",""

%agg,normal,1,no

    %-,7-5-1996,7-5-1996,red,p14,Blood,"url",""

%agg,normal,1,no

    %-,7-10-1996,7-10-1996,black,p10,Blood,"url",""

%agg,normal,1,no

    %-,9-19-1996,9-19-1996,red,p14,Blood,"url",""

%agg,normal,1,no

    %-,3-1-1997,3-3-1997,red,p14,Blood,"url",""

%agg,normal,1,no

    %-,5-1-1997,5-3-1997,black,p10,Blood,"url",""

----------------------------------------------------------

%facet,Meds.,darkbrown,yes    /* new facet*/

%agg,normal,1,no

    %-,4-15-1992,5-20-1992,lightgray,p5,Prozac,"url",""

%agg,normal,1,no

    %-,6-4-1994,12-30-1994,red,p8,Cardizem,"url",""

%agg,normal,1,no

    %-,11-7-1994,2-15-1995,blue,p8,Ventolyn,"url","NoteID=1"

%agg,normal,1,no

    %-,2-25-1995,6-15-1995,blue,p8,Ventolyn,"url","NoteID=1"

%agg,normal,2,no
 

%-,1-15-1995,2-20-1995,blue,p8,Antib.,"url",""

%-,2-20-1995,2-30-1995,red,p10,Antib.,"url",""


%agg,normal,2,no
 

%-,10-1-1995,1-12-1996,black,p6,Advil,"url",""

%-,1-12-1996,2-20-1996,black,p8,Advil,"url",""


%agg,normal,2,no
 

%-,7-5-1996,4-1-1997,black,p5,Insulin,"url",""

%-,4-1-1997,today,black,p10,Insulin,"url",""


%agg,normal,4,yes /*Note that this is an aggregate of 4 events, one of which is also an aggreagate of 2 events*/

%-,05-15-1996,12-01-1996,black,p1,Betablocker,aaron/drug.html,"indication=migraine prevention" /*This is actually the summary with the summary label being given as Betablocker*/

%agg,normal,2,yes

    %-,05-15-1996,06-20-1996,black,p6,Propanolol,aaron/drug.html,"indication=migraine prevention" /*Note that Event1 under Betablocker is also an aggregate on its own which also supports summarization and has a label of Propanolol */
 

%-,05-15-1996,05-15-1996,black,p6,Tributonol,aaron/drug.html,"indication=migraine prevention"     /* Event1 of Propanolol */

%-,06-20-1996,06-20-1996,black,p6,Prapolol,aaron/drug.html,"indication=migraine prevention"       /* Event2 of Propanolol */


    %-,08-23-1996,08-23-1996,black,p6,Atenolol,aaron/drug.html,"indication=migraine prevention" /* Event2 of Betablocker*/

    %-,10-01-1996,10-01-1996,black,p6,Propanolol,aaron/drug.html,"indication=migraine prevention" /* Event3 of Betablocker*/

    %-,12-01-1996,12-01-1996,black,p6,Propanolol,aaron/drug.html,"indication=migraine prevention" /* Event4 of Betablocker*/

%agg,normal,4,no
 

%-,12-20-1993,12-26-1993,lightblue,p4,Lasilix,"url",""

%-,12-26-1993,1-5-1994,mediumblue,p4,registered,"url",""

%-,1-5-1994,5-5-1994,blue,p4,Dispensed,"url",""

%-,5-5-1994,5-5-1994,black,p6,refill,"url",""
 

%agg,normal,10,yes
  %-,7-20-1995,5-27-1996,blue,p4,Batramex 20>35>50mg,"url",""

%-,7-20-1995,7-21-1995,lightblue,p4,Batramex,"url","status=Ordered"

%-,7-21-1995,7-23-1995,mediumblue,p4, ,"url","status=Registered"

%-,7-23-1995,9-20-1995,blue,p4,Batramex,"url","status=Dispensed"

%-,9-20-1995,9-22-1995,lightblue,p4, ,"url","status=Ordered"

%-,9-22-1995,9-25-1995,mediumblue,p4, ,"url","status=registered"

%-,9-25-1995,1-5-1996,blue,p6,35mg, "url", "status=dispensed"

%-,1-5-1996,1-9-1996,lightblue,p6, ,"url",""

%-,1-9-1996,1-11-1996,mediumblue,p6, ,"url",""

%-,1-11-1996,5-27-1996,blue,p8,50mg/d,"url",""

%-,5-27-1996,5-27-1996,black,p8,stop,"url",""


%agg,normal,4,no
 

%-,4-20-1997,4-26-1997,lightblue,p4,Lasilix,"url","physician=Goldman"

%-,4-26-1997,4-30-1997,mediumblue,p4,registered,"url","physician=Goldman"

%-,4-30-1997,5-15-1997,blue,p4,Dispensed,"url","physician=Goldman"

%-,5-15-1997,today,red,p4,Lasilix(Missed refill),"url","physician=Goldman"


%facet,Others,lightbrown,yes

%agg,normal,1,no

    %-,1-12-1996,4-12-1996,blue,p8,PhysicalTherapy,"url",""

%agg,normal,5,no
 

%-,6-1-1995,today,green,p8,LowSaltFatDiet,"url",""

%-,6-2-1995,6-3-1995,black,p10, ,"url",""

%-,7-1-1996,7-1-1996,black,p10, ,"url",""

%-,3-1-1997,3-3-1997,black,p10, ,"url",""

%-,4-1-1997,4-1-1997,black,p10, ,"url",""


%facet,Immun.,darkbrown,yes

%agg,normal,1,no

    %-,12-1-1994,12-1-1994,black,p8,TBtest,"url",""

%agg,normal,1,no

    %-,2-14-1996,today,black,p4,Tetanos,"url",""

%agg,normal,1,no

    %-,10-1-1996,3-1-1997,black,p4,Flu,"url","NoteID=1"

%end

%c comment