Commit 7eb8750a authored by R.W.Majeed's avatar R.W.Majeed

ignore element moved outside of idat, to end of table.

parent d51e4447
......@@ -8,8 +8,4 @@ import javax.xml.bind.annotation.XmlElement;
public class DataTableIdat extends IdatColumns {
@XmlElement(name="visit-id")
StringColumn visitId;
/**
* Ignored columns
*/
Column<?>[] ignore;
}
......@@ -44,6 +44,12 @@ public class EavTable extends Table<EavRow> {
}
}
}
/**
* Ignored columns
*/
@XmlElement
Column<?>[] ignore;
public Column<?>[] getVirtualValueColumns(){
if( virtualColumnMap == null ){
return null;
......@@ -101,7 +107,7 @@ public class EavTable extends Table<EavRow> {
map.registerColumn(mdat.unit);
}
// make sure all columns are specified
validateAllHeaders(headers, map, idat.ignore);
validateAllHeaders(headers, map, this.ignore);
return map;
}
......
......@@ -26,9 +26,17 @@ public class PatientTable extends Table<PatientRow> implements ConceptTable{
@XmlElement
IDAT idat;
/**
* MDAT concepts
*/
@XmlElementWrapper(name="mdat")
@XmlElement(name="concept")
Concept[] concepts;
/**
* Columns which will be ignored during processing
*/
@XmlElement
Column<?>[] ignore;
@XmlAccessorType(XmlAccessType.FIELD)
public static class IDAT extends IdatColumns{
......@@ -38,7 +46,6 @@ public class PatientTable extends Table<PatientRow> implements ConceptTable{
DateTimeColumn birthdate;
DateTimeColumn deathdate;
StringColumn gender;
Column<?>[] ignore;
}
@Override
......@@ -68,7 +75,7 @@ public class PatientTable extends Table<PatientRow> implements ConceptTable{
map.registerColumn(idat.gender);
}
// make sure all headers are specified in configuration
Table.validateAllHeaders(headers, map, idat.ignore);
Table.validateAllHeaders(headers, map, this.ignore);
return map;
}
......
......@@ -21,6 +21,11 @@ public class VisitTable extends Table<VisitRow> implements ConceptTable{
@XmlElementWrapper(name="mdat")
@XmlElement(name="concept")
Concept[] concepts;
/**
* Columns which will be ignored during processing
*/
@XmlElement
Column<?>[] ignore;
@XmlType(name="patient-idat")
@XmlAccessorType(XmlAccessType.FIELD)
......@@ -32,7 +37,6 @@ public class VisitTable extends Table<VisitRow> implements ConceptTable{
StringColumn location;
StringColumn provider;
// TODO inpatient/outpatient state
Column<?>[] ignore;
}
@Override
public ColumnMap getColumnMap(String[] headers) throws ParseException {
......@@ -73,7 +77,7 @@ public class VisitTable extends Table<VisitRow> implements ConceptTable{
}
// make sure all columns are specified
validateAllHeaders(headers, map, idat.ignore);
validateAllHeaders(headers, map, this.ignore);
return map;
}
......
......@@ -24,12 +24,12 @@
<otherwise set-value="" log-warning="Unexpected gender value"/>
</map>
</gender>
<ignore xsi:type="string" column="ignoriert1"/>
<ignore xsi:type="string" column="patfakt1"/>
</idat>
<!-- for MDAT in patient table, use the same patient-table also as
a visit table (visit date needed). the patient id can be re-used
as visit id, or a constant visit ID can be used. -->
<ignore xsi:type="string" column="ignoriert1"/>
<ignore xsi:type="string" column="patfakt1"/>
</patient-table>
<!-- optional -->
<visit-table>
......@@ -96,8 +96,6 @@
<idat>
<patient-id column="patid"/>
<visit-id column="event"/>
<ignore column="locat" xsi:type="string"/>
<ignore column="user" xsi:type="string"/>
</idat>
<mdat>
<concept column="param"/>
......@@ -133,6 +131,8 @@
</value>
<!-- ... more value elements -->
</virtual>
<ignore column="locat" xsi:type="string"/>
<ignore column="user" xsi:type="string"/>
</eav-table>
<!-- scripts are run for each complete encounter in the order of occurrence -->
<script type="text/javascript"><![CDATA[
......
......@@ -24,12 +24,12 @@
<otherwise set-value="" log-warning="Unexpected gender value"/>
</map>
</gender>
<ignore xsi:type="string" column="ignoriert1"/>
<ignore xsi:type="string" column="patfakt1"/>
</idat>
<!-- for MDAT in patient table, use the same patient-table also as
a visit table (visit date needed). the patient id can be re-used
as visit id, or a constant visit ID can be used. -->
<ignore xsi:type="string" column="ignoriert1"/>
<ignore xsi:type="string" column="patfakt1"/>
</patient-table>
<!-- optional -->
<visit-table>
......@@ -96,8 +96,6 @@
<idat>
<patient-id column="patid"/>
<visit-id column="event"/>
<ignore column="locat" xsi:type="string"/>
<ignore column="user" xsi:type="string"/>
</idat>
<mdat>
<concept column="param"/>
......@@ -133,6 +131,8 @@
</value>
<!-- ... more value elements -->
</virtual>
<ignore column="locat" xsi:type="string"/>
<ignore column="user" xsi:type="string"/>
</eav-table>
</datasource>
......@@ -24,12 +24,12 @@
<otherwise set-value="" log-warning="Unexpected gender value"/>
</map>
</gender>
<ignore xsi:type="string" column="ignoriert1"/>
<ignore xsi:type="string" column="patfakt1"/>
</idat>
<!-- for MDAT in patient table, use the same patient-table also as
a visit table (visit date needed). the patient id can be re-used
as visit id, or a constant visit ID can be used. -->
<ignore xsi:type="string" column="ignoriert1"/>
<ignore xsi:type="string" column="patfakt1"/>
</patient-table>
<!-- optional -->
<visit-table>
......@@ -96,8 +96,6 @@
<idat>
<patient-id column="patid"/>
<visit-id column="event"/>
<ignore column="locat" xsi:type="string"/>
<ignore column="user" xsi:type="string"/>
</idat>
<mdat>
<concept column="param"/>
......@@ -133,6 +131,8 @@
</value>
<!-- ... more value elements -->
</virtual>
<ignore column="locat" xsi:type="string"/>
<ignore column="user" xsi:type="string"/>
</eav-table>
</datasource>
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