001/*- 002 * #%L 003 * Smile CDR - CDR 004 * %% 005 * Copyright (C) 2016 - 2025 Smile CDR, Inc. 006 * %% 007 * All rights reserved. 008 * #L% 009 */ 010package ca.cdr.api.camel; 011 012import ca.cdr.api.model.enm.TransactionLogEventTypeEnum; 013import ca.cdr.api.model.json.TransactionLogStepJson; 014import ca.cdr.api.pub.cdaexchange.model.CdaToFhirConversionResultJson; 015import org.apache.camel.Exchange; 016 017import java.util.List; 018 019/** 020 * Transaction log helper to be used by for CDA Camel procedures 021 */ 022public interface ICdaCamelProcessorTxLogHelper extends ICamelProcessorTxLogHelper { 023 /** 024 * Adds a transaction log step If a transaction log is present or a new transaction log otherwise 025 * @param theProcedureName the calling procedure name 026 * @param theExchange the camel exchange 027 * @param theMessage the CDA message 028 * 029 */ 030 void logRawCcd(String theProcedureName, Exchange theExchange, String theMessage); 031 032 /** 033 * If transaction logging is active, logs a step if transaction log is present or a new transaction log otherwise 034 * @param theExchange the camel exchange 035 * @param theConversionResult the input {@code CdaToFhirConversionResultJson} 036 * 037 * @param theLogType the {@code TransactionLogEventTypeEnum} 038 * @param theStepsProvider the {@code ICdaTxLogStepsProvider} 039 * 040 */ 041 void addCdaLogStepOrNewLog( 042 Exchange theExchange, 043 CdaToFhirConversionResultJson theConversionResult, 044 TransactionLogEventTypeEnum theLogType, 045 ICdaTxLogStepsProvider theStepsProvider) 046 throws Exception; 047 048 /** 049 * @param theExchange the camel exchange 050 * @param theConversionResult the input {@code CdaToFhirConversionResultJson} 051 * @param theProcedureName the calling procedure name 052 * 053 */ 054 List<TransactionLogStepJson> getCdaLogStepsForBundles( 055 Exchange theExchange, CdaToFhirConversionResultJson theConversionResult, String theProcedureName); 056}