Versions Compared

Key

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

...

I demo-miljön finns en mall med 4 decimaltal (profylax_dos, manad1, manad2 och manad3). Mallen innehåller 4 beräkningar, se skärmbilder.

Här är droolskoden koden om någon vill använda copy-paste.

Code Block
languagejava
when
  questions: Questions()
  eval(questions.get("profylax_dos") != null)
  eval(questions.get("manad1") != null)
then
  outcome.set(questions.get("profylax_dos") * questions.get("manad1"));
end
Code Block
when
  questions: Questions()
  eval(questions.get("profylax_dos") != null)
  eval(questions.get("manad2") != null)
then
  outcome.set(questions.get("profylax_dos") * questions.get("manad2"));
end
Code Block
when
  questions: Questions()
  eval(questions.get("profylax_dos") != null)
  eval(questions.get("manad3") != null)
then
  outcome.set(questions.get("profylax_dos") * questions.get("manad3"));
end
Code Block
languagejava
when
  questions: Questions()
  eval(questions.get("profylax_dos") != null)
  eval(questions.get("manad1") != null)
  eval(questions.get("manad2") != null)
  eval(questions.get("manad3") != null)
then
  outcome.set(
      questions.get("profylax_dos") * questions.get("manad1") +
      questions.get("profylax_dos") * questions.get("manad2") +
      questions.get("profylax_dos") * questions.get("manad3")
  );
end

...