Commit d835be1f authored by R.W.Majeed's avatar R.W.Majeed

fixed null patientId in XMLObservationProvider

parent 744fdcc5
......@@ -155,7 +155,6 @@ public class SAXObservationProvider extends XMLObservationParser implements Cont
parseEncounter(atts);
}else if( qName.equals("facts") ){
// visit section is complete
patientId = visitData.get("patid");
// patient and visit objects are created, once the first fact is complete
......
......@@ -40,7 +40,7 @@ class XMLObservationParser extends AbstractObservationParser{
// visit
protected DateTimeAccuracy encounterStart;
protected DateTimeAccuracy encounterEnd;
protected String patientId;
//protected String patientId;
protected Map<String,String> visitData;
/**
......@@ -91,7 +91,7 @@ class XMLObservationParser extends AbstractObservationParser{
start = encounterStart;
fact = factory.createObservation(patientId, atts.getValue("concept"), start);
fact = factory.createObservation(visitData.get("patid"), atts.getValue("concept"), start);
// set encounter id to visitData.get("encounter")
fact.setEncounterId(visitData.get("encounter"));
......
......@@ -112,6 +112,7 @@ public class XMLObservationProvider extends XMLObservationParser implements File
// go to next element start or </facts>
reader.nextTag();
}
reader.nextTag();
// should be an observation
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment