summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2011-11-23 14:56:47 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2011-11-23 14:56:47 +0100
commit867a4bee43cad43aa5855c138e53ce27c7ea5847 (patch)
treea60d1f59b432276ca58b85fe50fb25ddc086ad72
parent0db0201087d44a567e82708270d9e6ecbb546a2b (diff)
Fix horrible bug in PatientParser using only the last sogeord in the list if more than one present.
-rw-r--r--client/praxisd.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/client/praxisd.cc b/client/praxisd.cc
index 001eb90..161b471 100644
--- a/client/praxisd.cc
+++ b/client/praxisd.cc
@@ -104,18 +104,16 @@ static Patient getPatient(QByteArray data)
DOPATIENT(frilinie5);
if(element.tagName() == "sogeords") {
- sogeord_t sogeord;
-
QDomNodeList nodes = element.childNodes();
for(int j = 0; j < nodes.count(); j++) {
+ sogeord_t sogeord;
QDomNode node = nodes.at(j);
QDomElement element = node.toElement();
sogeord.sogenr = element.attribute("sogenr");
sogeord.sogedato = element.attribute("sogedato");
sogeord.sogetxt = element.text();
+ patient.sogeord.push_back(sogeord);
}
-
- patient.sogeord.push_back(sogeord);
}
DOPATIENT(ydernr);