summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2011-10-13 11:30:41 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2011-10-13 11:30:41 +0200
commit3a7e8f62d40f9fc03fd212a71b0f9a9a8b9bd5fe (patch)
tree5039e11833c69202d3913625db85e6819991644f
parentc73d1d01ba6b57f664c21a189fa9297e2c75456a (diff)
Add Patient request.
-rw-r--r--client/praxisd.cc11
-rw-r--r--client/praxisd.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/client/praxisd.cc b/client/praxisd.cc
index 5309b66..740825e 100644
--- a/client/praxisd.cc
+++ b/client/praxisd.cc
@@ -181,6 +181,7 @@ static DokMenuVector getDokMenu(QByteArray data)
Praxisd::Praxisd(QString host, unsigned short int port)
{
qRegisterMetaType<CaveVector>("CaveVector");
+ qRegisterMetaType<Patient>("Patient");
qRegisterMetaType<DokMenuVector>("DokMenuVector");
QUrl url;
@@ -305,6 +306,9 @@ void PraxisdSync::run()
connect(&praxisd, SIGNAL(gotCaveList(CaveVector)),
this, SLOT(gotCaveList(CaveVector)), Qt::DirectConnection);
+ connect(&praxisd, SIGNAL(gotPatient(Patient)),
+ this, SLOT(gotPatient(Patient)), Qt::DirectConnection);
+
connect(&praxisd, SIGNAL(gotDokMenu(DokMenuVector)),
this, SLOT(gotDokMenu(DokMenuVector)), Qt::DirectConnection);
@@ -318,6 +322,7 @@ void PraxisdSync::run()
praxisd.diverse_get_cave(request_sogenr);
break;
case Praxisd::patient:
+ praxisd.patient_get_by_cpr(request_cpr);
break;
case Praxisd::dokmenu:
praxisd.dokmenu_get_all_by_cpr(request_cpr);
@@ -334,7 +339,13 @@ void PraxisdSync::gotCaveList(CaveVector cl)
{
cavelist = cl;
rsem.release();
+ quit();
+}
+void PraxisdSync::gotPatient(Patient p)
+{
+ patient = p;
+ rsem.release();
quit();
}
diff --git a/client/praxisd.h b/client/praxisd.h
index b4b673c..1268be7 100644
--- a/client/praxisd.h
+++ b/client/praxisd.h
@@ -167,6 +167,7 @@ public:
public slots:
void gotCaveList(CaveVector);
+ void gotPatient(Patient);
void gotDokMenu(DokMenuVector);
private:
@@ -181,6 +182,7 @@ private:
QString request_cpr;
CaveVector cavelist;
+ Patient patient;
DokMenuVector dokmenu;
};