use of com.hartwig.hmftools.common.ecrf.reader.XMLEcrfDatamodel in project hmftools by hartwigmedical.
the class CpctEcrfModel method loadFromXML.
@NotNull
public static CpctEcrfModel loadFromXML(@NotNull final String ecrfXmlPath, @NotNull final FormStatusModel formStatusModel) throws XMLStreamException, FileNotFoundException {
final XMLInputFactory factory = XMLInputFactory.newInstance();
final XMLStreamReader reader = factory.createXMLStreamReader(new FileInputStream(ecrfXmlPath));
final XMLEcrfDatamodel datamodel = XMLEcrfDatamodelReader.readXMLDatamodel(reader);
final Iterable<EcrfPatient> patients = XMLPatientReader.readPatients(reader, datamodel, formStatusModel);
return new CpctEcrfModel(datamodel, patients);
}
Aggregations