public PhlebotomyRoundVo savePhlebotomyRound(PhlebotomyRoundVo phlebotomyRoundItem, SpecimenWorkListitemCustomVoCollection collectionItems) throws StaleObjectException { //long t1 = System.currentTimeMillis(); DomainFactory factory = getDomainFactory(); PhlebotomyRound phlebotomyRoundItemBo = PhlebotomyRoundVoAssembler.extractPhlebotomyRound(factory, phlebotomyRoundItem); for (int i = 0; collectionItems!=null && i < collectionItems.size(); i++)//WDEV-12893 { SpecimenWorkListItem workListItemBo = (SpecimenWorkListItem) factory.getDomainObject(SpecimenWorkListItem.class, collectionItems.get(i).getWorkListitemId()); if(workListItemBo.getSpecimen() != null && workListItemBo.getSpecimen().getOrder() != null && workListItemBo.getSpecimen().getOrder().getPatient() != null) { //workListItemBo.setWard(workListItemBo.getSpecimen().getOrder().getPatient().getWard()); workListItemBo.setWard((Location) factory.getDomainObject(Location.class, collectionItems.get(i).getWardId())); factory.save(workListItemBo); } else if (workListItemBo.getDFTOrderInvestigation() != null) { workListItemBo.setWard((Location) factory.getDomainObject(Location.class, collectionItems.get(i).getWardId())); workListItemBo.setCollectionStatus(factory.getLookupInstance(SpecimenCollectionStatus.COLLECTIONCOMPLETE.getId())); } phlebotomyRoundItemBo.getCollectionItems().add(workListItemBo); } factory.save(phlebotomyRoundItemBo); //long t2 = System.currentTimeMillis(); //System.out.println((t2-t1) + " ms"); return PhlebotomyRoundVoAssembler.create(phlebotomyRoundItemBo); }
/** * getPhlebotomyRecord */ public ims.ocrr.vo.PhlebotomyRoundVo getPhlebotomyRecord(ims.ocrr.orderingresults.vo.PhlebotomyRoundRefVo ref) { return PhlebotomyRoundVoAssembler.create( (PhlebotomyRound)getDomainFactory().getDomainObject(PhlebotomyRound.class, ref.getID_PhlebotomyRound())); }