class ManterObtOutraCausaON extends BaseBusiness {

	public void versionarObtOutraCausa(MpmAltaSumario altaSumario, Short antigoAsuSeqp) throws ApplicationBusinessException {
		
		if(altaSumario!=null){
			
			List<MpmObtOutraCausa> listaObtOutraCausa = this.getMpmObtOutraCausaDAO().obterMpmObtOutraCausa(altaSumario.getId().getApaAtdSeq(), altaSumario.getId().getApaSeq(), antigoAsuSeqp);
			
			for (MpmObtOutraCausa obtOutraCausa : listaObtOutraCausa) {
				
				MpmObtOutraCausa novoObtOutraCausa = new MpmObtOutraCausa();
				novoObtOutraCausa.setMpmAltaSumarios(altaSumario);
				novoObtOutraCausa.setCid(obtOutraCausa.getCid());
				novoObtOutraCausa.setComplCid(obtOutraCausa.getComplCid());
				novoObtOutraCausa.setDescCid(obtOutraCausa.getDescCid());
				novoObtOutraCausa.setDiagnostico(obtOutraCausa.getDiagnostico());
				novoObtOutraCausa.setIndCarga(obtOutraCausa.getIndCarga());
				novoObtOutraCausa.setIndSituacao(obtOutraCausa.getIndSituacao());
				novoObtOutraCausa.setMpmCidAtendimentos(obtOutraCausa.getMpmCidAtendimentos());
				this.getManterObtOutraCausaRN().inserirObtOutraCausa(novoObtOutraCausa);
				
			}
		}
	
	}

}