A first version of a real world example of complex data to be entered
through Woody widgets.

It might very well turn out to be not so complex, but let's see.

Background:

I'm doing a PhD project in the healthcare domain where I need an electronic
healthcare record system (EHR) which will be used in the rehabilitation of
stroke patients. Currently I'm reworking my EHR into a Cocoon based
webapplication.

The "data fields" are not predefined by tables and rows in a relational
database, but by structures that follow a common structure. These structures
define the "datatype", possible values etc., but also metadata called
qualifiers.

I'll give an example of how such an element would look like for a test
called Barthel Index. This test consists of 10 activities on which a patient
can score 0, 1, 2 or 3 points. The more points the better. Also a total
score is kept.

Example data definition, names and structure are fictitious but
representative:

Yes, I know it might also be defined in XML Schema, but there are definition
problems there too.


<element name="DNS:cva-domain/ICF/BarthelIndex/V1.0">
        <qualifier name="DNS:omg.org/HL72.3/ResponsibleObserver">
                <dataType>QualifiedPersonId</dataType>
        </qualifier>
        <qualifier name="DNS:omg.org/HL72.3/ObservationDate_Time">
                <dataType>TimeStamp</dataType>
        </qualifier>
        <qualifier name="DSN:omg.org/HL72.3/ObservationEndDate_Time">
                <dataType>TimeStamp</dataType>
        </qualifier>
        <!-- more qualifiers -->
        <element name="Urine" codingscheme="ICF" code="ICF B6202"
occurrence="0..1"> 

<!-- note there is a difference in meaning between nothing entered and 0
entered -->

                <dataType>Number</dataType>
                <values>
                        <value label="incontinent">0</value>
                        <value label="sometimes incontinent">1</value>
                        <value label="continent">2</value>
                </values>
        </element>
        <!-- nine more elements -->
        <score name="BarthelScore"> <!-- this is not yet defined so I'm
making the syntax up as I go along here -->
                <dataType>Number</dataType>
                <total>Urine + Toilet + ... + Stairs<total>
                <meaning>
                        <range start="0" end="9">severly limited</range>
                        <range start="10" end="19">limited</range>
                        <range start="20" end="20">independent</range>
                </meaning>
        <score>
</element>

I suppose I could write an XSL style sheet that transforms this into Woody
wd:widgets, but then I run into trouble:

1. my names are too complex to be handled as is. So I need a mapping
somewhere to a more Cocoonfriendly name. Already fixed this.
2. there are several forms necessary/possible.

A. a simple display of a test like this:

Barthel Index 
        
Responsible Observer: XXX
Observation Start: dd-MM-yyyy
Observation End: dd-MM-yyyy
Urine: 0
...
Stairs: 1
Total: 5 of 20, severly limited

B. an entry form for a test. Approximately the same layout as A.

C. an overview of several Barthel tests taken at different times:

Barthel Index

           dd-MM-yyyy    dd-MM-yyyy
Urine         0             1
....
Stairs        2             1
Total         5             7

D. the same as C but then as input form where the one Barthel Index is one
column.

E. a summary form that contains only the total score:

Most recent values:

....
Barthel Index at dd-MM-yyyy:  12


Comments:
A., C. and E. I could do this using plain HTML, but then I'd have to write
my own DateFormatting routines to localize the date format. Also: the score
is not really stored but should be calculated.

B. and D. I could do this with a simple set of widgets but it would be nice
if I don't have to hand code the ID's of all the elements myself. Also: if C
is changed from a simple overview to one where the columns are editable I
need a mechanism to connect the items to the appropriate test. 
Again: the score has to be updated as scores are entered.

Although I don't want users to enter a QualifiedPersonId by hand, it would
be nice to have a way of defining my own datatypes (a QualifiedPersonId
looks like this: "DNS:some-domain.nl/12345" other formats are also possible,
but the : and the / are required).

The Barthel Index could be part of a bigger entry form in which case there
should also be a sort of aggregation to keep the barthel scores together.


And:

I want to handle all forms in the same way, so I don't want to set up a
pipeline for each form. Actually the system should be so flexible that I can
add new data elements and the corresponding form definitions (or updates of
others) and after an autoreload they are available for use.

I also don't want to write 5 different wd:form files for the above four
forms. So maybe I could use a union widget here to switch between wd:widget
and wd:output.

I suppose the templates have to be separate as they represent completely
different layouts. If I give each widget that represents "Urine" the same id
I could do with only one binding file, but then I run into trouble with form
D.

Well. That's it for now.

Bye, Helma

Reply via email to