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

assertations for troubleshooting

parent 71389574
package de.sekmi.histream.impl;
import java.util.Objects;
import java.util.function.Consumer;
import de.sekmi.histream.Observation;
......@@ -79,6 +80,11 @@ public abstract class GroupedObservationHandler implements ObservationHandler, A
public final void accept(Observation observation) {
Patient thisPatient = observation.getExtension(Patient.class);
Visit thisVisit = observation.getExtension(Visit.class);
// assertations to simplify troubleshooting corrupt data
Objects.requireNonNull(thisPatient);
Objects.requireNonNull(thisPatient.getId());
Objects.requireNonNull(thisVisit);
Objects.requireNonNull(thisVisit.getId());
if( prevPatient == null ){
// write start document, meta, patient
......
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