@@ -988,18 +988,27 @@ public Encounter loadEncounter(Row row, ArrayList<Annotation> annotations, Strin
988988 for (int bg = 0 ; bg < numMeasureVals ; bg ++) {
989989 // by index
990990 String colName = "Encounter.measurement" + bg ;
991- Double val = getDouble (row , colName , colIndexMap , verbose , missingColumns ,
992- unusedColumns , feedback );
991+ String samplingProtocolName = colName +".samplingProtocol" ;
992+ String samplingProtocol ="" ;
993+
994+ Double val = getDouble (row , colName , colIndexMap , verbose , missingColumns , unusedColumns , feedback );
993995
994996 //if Encounter.measurementX is not found, then look for Encounter.measurementName from commonConfiguration.properties
995997 if (val ==null ) {
996998 colName = "Encounter." +measureVals .get (bg );
999+ samplingProtocolName = colName +".samplingProtocol" ;
9971000 val = getDouble (row , colName , colIndexMap , verbose , missingColumns , unusedColumns , feedback );
9981001 }
9991002
1003+ //get sampling protocol name
1004+ String samplingProtocolVal = getString (row , samplingProtocolName , colIndexMap , verbose , missingColumns , unusedColumns , feedback );
1005+ if (samplingProtocolVal !=null ) {
1006+ samplingProtocol =samplingProtocolVal ;
1007+ }
1008+
10001009 if (val != null ) {
10011010 Measurement valMeas = new Measurement (encID , measureVals .get (bg ), val ,
1002- measureUnits .get (bg ), "" );
1011+ measureUnits .get (bg ), samplingProtocol );
10031012 if (committing ) enc .setMeasurement (valMeas , myShepherd );
10041013 if (unusedColumns != null ) unusedColumns .remove (colName );
10051014 }
@@ -1009,7 +1018,7 @@ public Encounter loadEncounter(Row row, ArrayList<Annotation> annotations, Strin
10091018 feedback );
10101019 if (val != null ) {
10111020 Measurement valMeas = new Measurement (encID , measureVals .get (bg ), val ,
1012- measureUnits .get (bg ), "" );
1021+ measureUnits .get (bg ), samplingProtocol );
10131022 if (committing ) enc .setMeasurement (valMeas , myShepherd );
10141023 if (unusedColumns != null ) unusedColumns .remove (colName );
10151024 }
0 commit comments