/usr/share/freemedforms/forms/subforms/fortestonly/calculations/central.xml is in freemedforms-emr-resources 0.9.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | <?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.6.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="fr">Test des widgets de calcul</description>
<description lang="xx">Calcul widget test</description>
<category lang="xx">Test</category>
<category lang="fr">Test</category>
<specialties lang="fr">Test</specialties>
<specialties lang="xx">Test</specialties>
</formdescription>
<MedForm name="Test::Calculation::Sum">
<label lang="xx">Test Calcul (sum)</label>
<label lang="fr">Test Calcul (sum)</label>
<options>col=2;DontPrintEmptyValues;UseFormNameAsNameSpace</options>
<Item name="Phone" type="radio">
<label lang="xx"><b>Téléphone</b></label>
<options>vertical;labelontop;DontPrintEmptyValues</options>
<value>
<uuid id="0">P0</uuid>
<uuid id="1">P1</uuid>
<uuid id="2">P2</uuid>
<uuid id="3">P3</uuid>
<possible id="0" lang="fr">Se sert du téléphone de sa propre initiative. Recherche des numéros et les compose, etc.</possible>
<possible id="1" lang="fr">Compose seulement quelques numéros de téléphone bien connus.</possible>
<possible id="2" lang="fr">Peut répondre au téléphone, mais ne peut pas appeler.</possible>
<possible id="3" lang="fr">Ne se sert pas du tout du téléphone.</possible>
<possible id="0" lang="xx">Operates telephone on own initiative; looks up and dials numbers.</possible>
<possible id="1" lang="xx">Dials a few well-known numbers.</possible>
<possible id="2" lang="xx">Answers telephone, but does not dial.</possible>
<possible id="3" lang="xx">Does not use telephone at all.</possible>
<numerical id="0">1</numerical>
<numerical id="1">1</numerical>
<numerical id="2">1</numerical>
<numerical id="3">0</numerical>
</value>
</Item>
<Item name="Shopping" type="radio">
<label lang="xx"><b>Shopping</b></label>
<label lang="fr"><b>Courses</b></label>
<options>vertical;labelontop;DontPrintEmptyValues</options>
<value>
<uuid id="0">S0</uuid>
<uuid id="1">S1</uuid>
<uuid id="2">S2</uuid>
<uuid id="3">S3</uuid>
<possible id="0" lang="fr">Peut faire toutes les courses nécessaires de façon autonome.</possible>
<possible id="1" lang="fr">N'est indépendant que pour certaines courses.</possible>
<possible id="2" lang="fr">A besoin d'être accompagné pour faire ses courses.</possible>
<possible id="3" lang="fr">Est complètement incapable de faire des courses.</possible>
<possible id="0" lang="xx">Takes care of all shopping needs independently.</possible>
<possible id="1" lang="xx">Shops independently for small purchases.</possible>
<possible id="2" lang="xx">Needs to be accompanied on any shopping trip.</possible>
<possible id="3" lang="xx">Is completely unable to shop.</possible>
<numerical id="0">1</numerical>
<numerical id="1">0</numerical>
<numerical id="2">0</numerical>
<numerical id="3">0</numerical>
</value>
</Item>
<Item name="Total" type="sum">
<label lang="fr"><b>Résultat</b></label>
<label lang="xx"><b>Total</b></label>
<options>vertical;labelontop;changeepisodelabel;DontPrintEmptyValues</options>
<sumof_regexp>Test::Calculation::Sum::*</sumof_regexp>
</Item>
</MedForm>
<MedForm name="Test::Calculation::Script">
<label lang="xx">Test Calcul (script)</label>
<label lang="fr">Test Calcul (script)</label>
<options>col=2;DontPrintEmptyValues;UseFormNameAsNameSpace</options>
<Item name="First" type="radio">
<label lang="xx">First item</label>
<options>vertical;labelontop;DontPrintEmptyValues</options>
<value>
<uuid id="0">P0</uuid>
<uuid id="1">P1</uuid>
<uuid id="2">P2</uuid>
<uuid id="3">P3</uuid>
<possible id="0" lang="xx">-1</possible>
<possible id="1" lang="xx">0</possible>
<possible id="2" lang="xx">+1</possible>
<possible id="3" lang="xx">+2</possible>
<numerical id="0">-1</numerical>
<numerical id="1">0</numerical>
<numerical id="2">1</numerical>
<numerical id="3">2</numerical>
</value>
</Item>
<Item name="Second" type="combo">
<label lang="xx">Second Item</label>
<options>vertical;labelontop;DontPrintEmptyValues</options>
<value>
<uuid id="0">S0</uuid>
<uuid id="1">S1</uuid>
<uuid id="2">S2</uuid>
<uuid id="3">S3</uuid>
<uuid id="4">S4</uuid>
<possible id="0" lang="xx">-3</possible>
<possible id="1" lang="xx">-1</possible>
<possible id="2" lang="xx">1</possible>
<possible id="3" lang="xx">3</possible>
<possible id="4" lang="xx">5</possible>
<numerical id="0">-3</numerical>
<numerical id="1">-1</numerical>
<numerical id="2">1</numerical>
<numerical id="3">3</numerical>
<numerical id="4">5</numerical>
</value>
</Item>
<Item name="Formula" type="combo">
<label lang="xx">Select formula</label>
<options>vertical;labelontop;DontPrintEmptyValues</options>
<value>
<uuid id="0">S0</uuid>
<uuid id="1">S1</uuid>
<uuid id="2">S2</uuid>
<uuid id="3">S3</uuid>
<uuid id="4">S4</uuid>
<possible id="0" lang="xx">first*second</possible>
<possible id="1" lang="xx">((+first)+(+second))*(second-1)</possible>
<possible id="2" lang="xx">first/second</possible>
<possible id="3" lang="xx">(first*second)/(second*2.3)</possible>
<possible id="4" lang="xx">(+first)+(+second)</possible>
</value>
</Item>
<Item name="Total" type="scriptcalculation">
<label lang="xx">Result</label>
<options>vertical;labelontop;changeepisodelabel;DontPrintEmptyValues</options>
<connect_regexp>Test::Calculation::Script::*</connect_regexp>
<calcScript>
var s = "Script test: ";
freemedforms.forms.namespaceInUse = "Test::Calculation::Script";
var first = freemedforms.forms.item("First").currentValue;
var second = freemedforms.forms.item("Second").currentValue;
var calc = freemedforms.forms.item("Formula").currentText;
var tmp = calc;
tmp = tmp.replace(/first/g, first.toString());
tmp = tmp.replace(/second/g, second.toString());
s += "(Formula:"+calc+"="+tmp+") = " + eval(calc);
s;
</calcScript>
</Item>
</MedForm>
</FreeMedForms>
|