private String getPrinter(DischargeDetailsRefVo dischargeDetails) { if(dischargeDetails == null || dischargeDetails.getID_DischargeDetails() == null) throw new CodingRuntimeException("DischargeDetailsRefVo is null or id not provided for getPrinter"); DomainFactory factory = getDomainFactory(); DischargeDetails doDD = (DischargeDetails)factory.getDomainObject(DischargeDetails.class,dischargeDetails.getID_DischargeDetails()); if (doDD.getDischargingWard() != null) { Location doLoc = (Location)factory.getDomainObject(Location.class,doDD.getDischargingWard().getId()); PrinterVo voDefaultPrinter = LocationFullVoAssembler.create(doLoc).getDefaultPrinter(); return voDefaultPrinter != null ? voDefaultPrinter.getName() : ""; } return ""; }
private Object getlocationMapping(Integer id_Location) { LocationFullVo locations = LocationFullVoAssembler.create((Location)domFactory.getDomainObject(Location.class, id_Location)); if(locations == null) return ""; TaxonomyMapCollection mappings = locations.getCodeMappings(); if(mappings != null && mappings.size() > 0) { for(int i=0; i<mappings.size(); i++) { ims.core.vo.TaxonomyMap volocMap = mappings.get(i); if(volocMap != null && volocMap.getTaxonomyCode() != null && volocMap.getTaxonomyName() != null && volocMap.getTaxonomyName().getID() == TaxonomyType.NAT_LOC_CODE.getID()) { return volocMap.getTaxonomyCode(); } } } return ""; }
private Object getLocationAddressPCT(int id) { LocationFullVo locvo = LocationFullVoAssembler.create((Location)domFactory.getDomainObject(Location.class, id)); return locvo.getAddressIsNotNull()?locvo.getAddress().getPCTIsNotNull()?locvo.getAddress().getPCT():"":""; }