Gavin Brelstaff wrote:

>How do we generate "archetype rules" to provide constraints
>internally within archetypes.
>We would like to use such rules to constrain data at it's point of
>entry on the client.  We already generate handler code (in Javascript)
>to ensure the data-type and range constraints are valid.
>
what we did in the Eiffel implementation of GEHR was:

- when an XML archetype is read from the database, it is turned into 
Eiffel objects.

- for information creation, the archetype in memory has its 
create_default() routine called; this creates an initial data instance 
(say of a blood pressure of whatever). Each part of such an instance 
(which is of course a network of instances) is connected to a relevant 
part of the archetype (also a network of instances in memory)

- Data modification commences by the users on the data instances, with 
each routine which causes a change calling a a corresponding validating 
routine on the archetype. If this routine returns true, the modification 
is allowed; else it returns false, with an error message whcih can be 
used on the screen (e.g. "systolic blood pressue must be between 0 and 500).

- Changes proceed in this fashion until the user is satisfied and hits 
the "commit" button, which writes the information to the db.

A detailed explanation of what happens is given at: 
http://www.gehr.org/technical/kernel_architecture/kernel_architecture.html 
(see section 6 of the documents).

In openEHR, we will do the same thing (in variaous languages - not jsut 
Eiffel) but it will be more systematic.

hope this helps,

- thomas beale

>
>
>I can find no mention of any "archetype rules" in the openEHR
>Reference Model nor in the "Design Principles" document.
>In fact, all I can now find is the example of an
>invariant on page 25 of Thomas Beale's "Archetypes" report 
>(I've the version issued 21 /Aug/01).
>
>Am I missing something obvious or have "archetype rules" been
>omitted, delayed from consideration?  If so why?
>
>
>I do hope you can help.
>
>

-- 
..............................................................
Deep Thought Informatics Pty Ltd  

mailto:thomas at deepthought.com.au
openEHR - http://www.openEHR.org
openEHR drafts - http://www.deepthought.com.au/health/openEHR/openEHR.html
Archetype Methodology - http://www.deepthought.com.au/it/archetypes.html        
        
Community Informatics - http://www.deepthought.com.au/ci/rii/Output/mainTOC.html
..............................................................



-
If you have any questions about using this list,
please send a message to d.lloyd at openehr.org

Reply via email to