/usr/share/freemedforms/forms/subforms/generic/soap_with_biomeasurements/scripts/xx/script.js 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 | namespace.module('com.freemedforms.generic.soapWithBio', function (exports, require) {
exports.extend({
'setupUi': setupUi,
'computePulsePressure': computePulsePressure
});
// Ui vars (retrieved from the ui)
var syst, diast, pulse;
// var weight, weightUnit, height, heightUnit;
function setupUi() {
print("com.freemedforms.generic.soapWithBio Setup UI");
freemedforms.forms.namespaceInUse = "";
var formItem = freemedforms.forms.item("Subs::Tools::SOAP::WithBio");
print(formItem);
formUi = formItem.ui();
syst = formUi.findChild("bpSyst");
diast = formUi.findChild("bpDiast");
pulse = formUi.findChild("bpPulse");
// weight = formUi.findChild("weight");
// weightUnit = formUi.findChild("weightUnit");
// height = formUi.findChild("height");
// heightUnit = formUi.findChild("heightUnit");
populateCombos();
// connect data changed on spins
syst['valueChanged(int)'].connect(this, computePulsePressure);
diast['valueChanged(int)'].connect(this, computePulsePressure);
// weight['valueChanged(int)'].connect(this, computeBMI);
// height['valueChanged(int)'].connect(this, computeBMI);
// weightUnit['currentIndexChanged(int)'].connect(this, computeBMI);
// heightUnit['currentIndexChanged(int)'].connect(this, computeBMI);
}
function retranslateUi() {
var lang = freemedforms.forms.currentLanguage;
}
function populateCombos() {
// TODO: add weight and height units
// freemedforms.uiTools.addItems(cholCombo, totalCholRanges);
// freemedforms.uiTools.addItems(hdlCombo, hdlCholRanges);
// freemedforms.uiTools.addItems(systCombo, systolicRanges);
}
function prepareSlider() {
}
function computePulsePressure() {
var text = syst.value - diast.value;
pulse.setText(text);
}
// function computeBMI() {
// var metricWeight = weight.value;
// }
});
namespace.com.freemedforms.generic.soapWithBio.setupUi();
|