/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package clips.delegate.service.mes;
import beans.service.mes.MedicEconomicStandartSearchBean;
import beans.service.mes.MedicEconomicStandartSearchBeanRemote;
import clips.delegate.directory.complex.DirectoryMKB10Item;
import cli_fmw.delegate.DelegateSimple;
import cli_fmw.main.ClipsException;
import clips.delegate.directory.simple.mes.DirectoryClinicTypeItem;
import beans.service.mes.entity.MedicEconomicStandartDetail;
import cli_fmw.delegate.AuditListener;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author finder
*/
public class MedicEconomicStandartSearchLocal extends DelegateSimple<MedicEconomicStandartSearchBeanRemote> {
public MedicEconomicStandartSearchLocal(AuditListener al) {
super(MedicEconomicStandartSearchBean.class.getSimpleName());
am = al;
}
public ArrayList<MedicEconomicStandartLocal> getList(DirectoryClinicTypeItem type) throws ClipsException {
try {
List<MedicEconomicStandartDetail> detals = bean().getList(type.getID());
ArrayList<MedicEconomicStandartLocal> target = new ArrayList<MedicEconomicStandartLocal>(detals.size());
for (MedicEconomicStandartDetail detal : detals) {
target.add(new MedicEconomicStandartLocal(detal, am));
}
return target;
} catch (Exception ex) {
clearBean();
throw new ClipsException("Ошибка при получении списка мэсов", ex);
}
}
@Deprecated
public MedicEconomicStandartLocal getMes(DirectoryClinicTypeItem type, DirectoryMKB10Item mkb) throws ClipsException {
try {
MedicEconomicStandartDetail detal = bean().getMes(type.getID(), mkb.getID());
return new MedicEconomicStandartLocal(detal, am);
} catch (Exception ex) {
clearBean();
throw new ClipsException("Ошибка при получении списка мэсов", ex);
}
}
}