Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Next up  up is a worked example for embedding an archetype in the GLIF. We will use the archetype editor  editor contained within the GLIF Editor and put some GELLO in the archetype itself to calculate a Body Mass Index (BMI) for some inputted values. Then we will retrieve the BMI value out of the persisted archetype instance to execute a GLIF Decision.
-- -- -- -- -- -- -- -- --
Open a blank GLIF file in the GLIF Editor and save it as BMI.GLIF
[We don't need to load test.xml as this example will use the archetype as the data source.]
Click on the the Allow Modifications button again to enable editing.

Image Added

 

Now we build the archetype.

Click on the Edit Archetypes button Image Added  and you get the Medical Objects Template Editor screen opening:

Image Added

 

Click on the New Archetype button ( looks the same as the Edit Archetypes button in the GLIFEditor top menu). And give the the archetype a name such as CEN.BodyMassIndex.v1.

Unfold the archetype in the workspace. Unfold on 'Definition' and 'ENTRY'.

Click on 'ENTRY' and note how the right hand side (RHS) now shows attributes for this archetype node. Now right click on 'ENTRY' and go Add Local Term. Give the it the name 'BMI'. Notice this now appears in the bottom pane. We need to change the Local Code to a new at code - namely 'at0000'. You can do that by double clicking on 'at0002' and typing over it. Click then in the same row to commit it, then go to the RHS for the ENTRY node again up above where you were and change the at code again for where it says LocalCode. Don't worry that the local term has now temporarily disappeared on the LHS. It will come back.

Right click on Items and go Add Element, do this four times.

Image Added

 

Click on the first ELEMENT. Then right click on it. Give it a Local term name of 'Height'. name the following two ELEMENTS 'Weight' and 'BMI' . Leave the fourth ELEMENT blank. In fact the fourth element is just there as it is a good idea  to have some blank elements in reserve for if you want to extend the archetype at a later time. Hide it away now by clicking on it and saying False for VisibleAtStart in RHS .

Image Added

 

 

Lets have a look in the preview mode for what we have done. Click on Preview Archetype in the editor Image Added` The fields are blank as this is the default UI representation for the 'Any' datatype which is the default for the ELEMENT nodes we have done. We will add some types soon.