From 3a7e8f62d40f9fc03fd212a71b0f9a9a8b9bd5fe Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 13 Oct 2011 11:30:41 +0200 Subject: Add Patient request. --- client/praxisd.cc | 11 +++++++++++ client/praxisd.h | 2 ++ 2 files changed, 13 insertions(+) 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"); + qRegisterMetaType("Patient"); qRegisterMetaType("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; }; -- cgit v1.2.3