Skip to content
Snippets Groups Projects
Commit 8e488059 authored by R.W.Majeed's avatar R.W.Majeed
Browse files

fixed non-working dropfact/conceptoverride for value mappings

parent 5e0a72e2
Branches
Tags
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment