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

            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*/



%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


%agg, normal,1, no


%agg, normal,1, no


%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 */


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

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


%agg, normal,1, no


%agg, normal,1, no


%agg, normal,1, no


%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 */




%-,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",""


%-,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


/* 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 */

        /* Event 3 */

          /* Event 4 */



%-,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",""

     /* Here again, notice how all events in the aggregate appear on the same line */



%-,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",""


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


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








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















%-,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"
















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


















%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*/


    %-,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*/






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


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


%-,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",""







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






%-,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",""









%c comment

Web Accessibility