summaryrefslogtreecommitdiff
path: root/client/pracro.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/pracro.cc')
-rw-r--r--client/pracro.cc54
1 files changed, 12 insertions, 42 deletions
diff --git a/client/pracro.cc b/client/pracro.cc
index 2a6a109..b4d06d8 100644
--- a/client/pracro.cc
+++ b/client/pracro.cc
@@ -61,21 +61,20 @@ QFont *fixedfont = NULL;
static void print_usage()
{
- printf("Usage: pracro -m MACRO -c CPR -U USER\n");
+ printf("Usage: pracro [params]\n");
printf("Executes the requested Pracro MACRO using supplied CPR and USER.\n");
printf("\n");
printf(" -h, --help Displays this help text.\n");
printf(" -t, --template TEMPLATE Requests template TEMPLATE from the Pracro \n"
" Server, defaults to \""TEMPLATE_DEFAULT"\".\n");
- printf(" -C, --cpr CPR Defines the cpr for use with the macro,\n"
+ printf(" -C --course COURSE Lists templates in COURSE.\n");
+ printf(" -P, --patient PATIENTID Defines the patientid for use with the macro,\n"
" defaults to \""CPR_DEFAULT"\".\n");
printf(" -c, --config FILE The configfile to use. Default is \""CONFIG_DEFAULT"\"\n");
printf(" -u, -U, --user USER Defines the requesting user(not the patient),\n"
" defaults to \""USER_DEFAULT"\"\n");
printf(" -v, --version Print version information and exit.\n");
printf(" -d, --debug Make debug console available.\n");
- printf(" -V, --viewer TEMPLATES Show the viewer with TEMPLATES.\n");
- printf(" -O, --viewer-only TEMPLATES\n");
printf(" Show the viewer only (no pracro editor window) with TEMPLATES.\n");
}
@@ -100,8 +99,7 @@ int main(int argc, char *argv[])
QString macro = MACRO_DEFAULT;
QString templ = TEMPLATE_DEFAULT;
- bool show_viewer = false;
- bool show_editor = true;
+ QString course;
QString templs;
QStringList args = app.arguments();
@@ -128,8 +126,12 @@ int main(int argc, char *argv[])
*arg == "-t") {
templ = getParam(args, arg);
}
- else if(*arg == "--cpr" ||
+ else if(*arg == "--course" ||
*arg == "-C") {
+ course = getParam(args, arg);
+ }
+ else if(*arg == "--patientid" ||
+ *arg == "-P") {
cpr = getParam(args, arg);
}
else if(*arg == "--config" ||
@@ -140,17 +142,6 @@ int main(int argc, char *argv[])
*arg == "-d") {
dbg_init();
}
- else if(*arg == "--viewer" ||
- *arg == "-V") {
- templs = getParam(args, arg);
- show_viewer = true;
- }
- else if(*arg == "--viewer-only" ||
- *arg == "-O") {
- templs = getParam(args, arg);
- show_viewer = true;
- show_editor = false;
- }
else {
print_version();
print_usage();
@@ -188,31 +179,10 @@ int main(int argc, char *argv[])
}
}
- if(show_editor && show_viewer) {
- MainWindow mainwindow(cpr, templ, host, port, user);
- mainwindow.show();
-
- Viewer v(cpr, templs, host, port, user, journalpath);
- viewer = &v;
- v.show();
- return app.exec();
- }
-
- if(show_editor) {
- MainWindow mainwindow(cpr, templ, host, port, user);
- mainwindow.show();
-
- return app.exec();
- }
-
- if(show_viewer) {
- Viewer viewer(cpr, templs, host, port, user, journalpath);
- viewer.show();
-
- return app.exec();
- }
+ MainWindow mainwindow(cpr, templ, host, port, user);
+ mainwindow.show();
- return 1;
+ return app.exec();
}