GNUmed never sleeps TWiki > Gnumed > HooksFramework TWiki webs:
Main | TWiki | Sandbox
Gnumed . { Changes | Index | Search | Go } Hello Karsten Hilbert!

Using Hooks to make GNUmed do what you want

At various points in the workflow (such as directly after activating a patient) GNUmed can invoke a script to allow you to customize what is happening. This is both powerful and possibly dangerous: You can make GNUmed do nearly anything you want - but an attacker might also find a hole to exploit that for evil deeds. GNUmed has, however, taken a few precautions to try to thwart the average script kiddy or wannabe E7EET haxxor.

The documentation which comes with your package holds an example script hook_script_example.py. It shows a dialog box for each hook it receives.

The hook script

One single script is used for all hooks.

This script must meet the following conditions:

GNUmed will then at various times import that file and execute the run_script() function. The single argument passed into this function is named =hook?. It will hold the actual hook name the script was called from. This way appropriate action can be taken depending on the hook the script is called from. It can then do pretty much anything Python can do within the GNUmed framework - including finding out which user it is running for and which workplace it was called from.

Note that some hooks may be callled before or after the wxPython GUI is available.

Known hooks

Note that some hooks may not yet be available in the currently released version.

Topic HooksFramework . { Edit | Attach | Backlinks: Web All webs | Printable | Historie: %REVISIONS% More }

This site is powered by the TWiki collaboration platformDas Urheberrecht © liegt bei den mitwirkenden Autoren. Alle Inhalte dieser Kollaborations-Plattform sind Eigentum der Autoren.
Ideen, Anfragen oder Probleme bezüglich TWiki? Feedback senden