/** * Save */ public ims.admin.vo.PaymentTreatmentHospitalLinkVo savePaymentHospitalLink(ims.admin.vo.PaymentTreatmentHospitalLinkVo paymentVo) throws ims.domain.exceptions.StaleObjectException { if (!paymentVo.isValidated()) throw new DomainRuntimeException("paymentVo has not been validated"); DomainFactory factory = getDomainFactory(); PaymentTreatingHospitalLink doPay = PaymentTreatmentHospitalLinkVoAssembler.extractPaymentTreatingHospitalLink(factory, paymentVo); factory.save(doPay); return PaymentTreatmentHospitalLinkVoAssembler.create(doPay); }
/** * Get Payment Hospitals */ public ims.admin.vo.PaymentTreatmentHospitalLinkVo getPaymentHospitalConfig(ims.core.vo.LocationLiteVo voLoc) { DomainFactory factory = getDomainFactory(); String hql = "from PaymentTreatingHospitalLink as pt where pt.paymentHospital.id = :ID"; List list = factory.find(hql, new String[] {"ID"}, new Object[] {voLoc.getID_Location()}); if(list == null || list.size() == 0) return null; return PaymentTreatmentHospitalLinkVoAssembler.create((PaymentTreatingHospitalLink) list.get(0)); }
/** * List Oraganisations */ public ims.admin.vo.PaymentTreatmentHospitalLinkVoCollection listPaymentTreatmentHospitalLinks() { return PaymentTreatmentHospitalLinkVoAssembler.createPaymentTreatmentHospitalLinkVoCollectionFromPaymentTreatingHospitalLink(getDomainFactory().find("from PaymentTreatingHospitalLink")); }