private void btAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAddActionPerformed
try {
List<DiagnosisLocal> accompDiagnosis = diagnosisLocal.getAccompDiagnosis();
DiagnosisLocal newDiagnosis = new DiagnosisLocal(diagnosisLocal.getSerrenLocal());
newDiagnosis.addContentStateListener(getContainer());
DirectoryDialogMKB10 dlg = new DirectoryDialogMKB10(false, newDiagnosis.getMkb());
dlg.setVisible(true);
if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
Selector selectedItems = dlg.getSelectedItems();
if (selectedItems.size() > 0) {
DirectoryMKB10Item mkb10item = (DirectoryMKB10Item) selectedItems.get(0);
newDiagnosis.setMkb(mkb10item);
newDiagnosis.setReferencedDiagnosis(diagnosisLocal);
newDiagnosis.setEncounter(diagnosisLocal.getEncounter());