<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE FreeMedForms>

<FreeMedForms>

  <formdescription>
    <!-- Non translatable values -->
    <authors>Eric Maeker, MD</authors>
    <version>0.9.4</version>
    <fmfv>0.7.0</fmfv>
    <cdate>2011-12-21</cdate>
    <lmdate>2011-12-21</lmdate>
    <icon>geriatrics.png</icon>
    <weblink></weblink>
    <bibliography pmid=""></bibliography>

    <!-- Translatable values -->
    <license>GPLv3</license>
    <description lang="xx">Test scripting engine with patient access</description>
    <description lang="fr">Test le moteur de script avec accès aux données des patients</description>
    <category lang="xx">Test</category>
    <category lang="fr">Test</category>
    <specialties lang="fr">Test</specialties>
    <specialties lang="xx">Test</specialties>

  </formdescription>

 <file type="script" name="onload">./scripts/xx/script.js</file>

 <MedForm name="Test::Script::ScriptCalculator::WithPatient">
   <label lang="xx">Test scripting engine (patient access)</label>
   <column>1</column>
   <options>DontPrintEmptyValues;UseFormNameAsNameSpace</options>

   <Item name="FakeClCrGroup" type="group">
     <column>1</column>

     <Item name="FakeClCrGroup::Weight" type="doublespin">
       <label lang="xx">Weight</label>
       <options>vertical;labelontop;DontPrintEmptyValues</options>
     </Item>

     <Item name="FakeClCrGroup::WeightUnit" type="combo">
       <label lang="xx">Weight unit</label>
       <options>notprintable;vertical;labelontop;DontPrintEmptyValues</options>
       <value>
         <uuid id="0">kg</uuid>
         <uuid id="1">lbl</uuid>
         <possible id="0" lang="xx">Kg</possible>
         <possible id="1" lang="xx">lbl</possible>
       </value>
     </Item>

     <Item name="FakeClCrGroup::Creatinine" type="doublespin">
       <label lang="xx">Creatinine</label>
       <options>vertical;labelontop;DontPrintEmptyValues</options>
     </Item>

     <Item name="FakeClCrGroup::CreatinineUnit" type="combo">
       <label lang="xx">Creatinine unit</label>
       <options>notprintable;vertical;labelontop;DontPrintEmptyValues</options>
       <value>
         <uuid id="0">mg/L</uuid>
         <uuid id="1">µmol/L</uuid>
         <possible id="0" lang="xx">mg/L</possible>
         <possible id="1" lang="xx">µmol/L</possible>
       </value>
     </Item>

   </Item>

   <Item name="ResultGroup" type="group">
     <column>1</column>

     <Item name="ResultGroup::Result" type="scriptcalculation">
       <label lang="xx">Creatinine clearance</label>
       <options>vertical;labelontop;DontPrintEmptyValues;showintexteditor</options>
       <connect_regexp>Test::Script::ScriptCalculator::WithPatient::FakeClCrGroup::*</connect_regexp>
       <calcScript>getClearance();</calcScript>
     </Item>

   </Item>

 </MedForm>

</FreeMedForms>
