Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

package gov.va.med.ars.service.impl;

import java.math.BigDecimal;
import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;

import gov.va.med.ars.dao.ars.LoincCdRepository;
import gov.va.med.ars.service.ILoincCd;
import gov.va.med.domain.ars.LoincCd;

public class LoincCdServiceImpl implements ILoincCd {

@Autowired
private LoincCdRepository loincCdRepository;

@Override
public boolean modifyLoincCd(LoincCd c) {

boolean successResponse = false;
Date date = new Date();
LoincCd loincCd;
LoincCd loincCdSaved = null;

try {
loincCd = loincCdRepository.findOne(c.getLoincId());
loincCd.setDatecreated(c.getDatecreated());
loincCd.setDatemodified(c.getDatemodified());
loincCd.setIsactive(c.getIsactive());
loincCd.setStcloincCd(c.getStcloincCd());
loincCd.setStcloincCdDesc(c.getStcloincCdDesc());
loincCdSaved = loincCdRepository.save(loincCd);

if(loincCdSaved != null) {
successResponse = true;
}
} catch (Exception e) {
//TODO
}
return successResponse;
}

@Override
public LoincCd findOne(long loincCdId) {
LoincCd loincCd = loincCdRepository.findOne(loincCdId);
return loincCd;
}
}