HealthRecord importedHealthRecord;
String curFile;
File[] fileList = chooser.getSelectedFile().listFiles();
for (int i = 0; i < fileList.length; i++) {
curFile = fileList[i].getAbsolutePath();
if (curFile.toUpperCase().endsWith(".XML")) {
importedHealthRecord = getHealthRecordDataFromDocument(parseXMLFile(curFile));
try {
importedHealthRecord.setIdentifier(ObjectID.getNewOId());
} catch (Exception e) {
throw new Exception(e);