Commit 8e488059 authored by R.W.Majeed's avatar R.W.Majeed

fixed non-working dropfact/conceptoverride for value mappings

parent 5e0a72e2
......@@ -77,17 +77,8 @@ public class Concept{
String concept = this.id;
MapFeedback mf = new MapFeedback();
if( mf.isActionDrop() ){
return null; // ignore this fact
}
if( mf.hasConceptOverride() ){
concept = mf.getConceptOverride();
}
Observation o = factory.createObservation(patid, concept, start);
if( visit != null ){
o.setEncounterId(visit);
}
// parse value
String unit = null;
if( this.unit != null ){
unit = this.unit.valueOf(map, row);
......@@ -98,6 +89,18 @@ public class Concept{
// Objects.requireNonNull(this.value, "No value for concept: "+id);
val = this.value.valueOf(map, row, mf);
}
if( mf.hasConceptOverride() ){
concept = mf.getConceptOverride();
}
if( mf.isActionDrop() ){
return null; // ignore this fact
}
Observation o = factory.createObservation(patid, concept, start);
if( visit != null ){
o.setEncounterId(visit);
}
if( val == null ){
// no value
o.setValue(null);
......@@ -117,6 +120,7 @@ public class Concept{
throw new ParseException("Unsupported value type for concept id "+this.id+": "+val.getClass());
}
// TODO: modifiers
return o;
......
......@@ -50,7 +50,9 @@ public class WideTable extends Table<WideRow> implements ConceptTable{
WideRow rec = new WideRow(patid,visit);
for( Concept c : concepts ){
Observation o = c.createObservation(patid, visit, factory, map, row);
rec.addFact(o);
if( o != null ){
rec.addFact(o);
}
}
return rec;
}
......
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