001/*- 002 * #%L 003 * Smile CDR - CDR 004 * %% 005 * Copyright (C) 2016 - 2024 Smile CDR, Inc. 006 * %% 007 * All rights reserved. 008 * #L% 009 */ 010package ca.cdr.api.model.json; 011 012import ca.cdr.api.pub.hl7v2.model.Hl7v2ToFhirConversionResultJson; 013import io.swagger.v3.oas.annotations.Operation; 014import io.swagger.v3.oas.annotations.Parameter; 015import io.swagger.v3.oas.annotations.media.Schema; 016import org.hl7.fhir.instance.model.api.IBaseBundle; 017 018import java.util.ArrayList; 019import java.util.List; 020 021/** 022 * @deprecated Use {@link Hl7v2ToFhirConversionResultJson} instead 023 */ 024@Schema( 025 name = "ConvertedTransactionBundlesJson", 026 description = 027 "Contains the set of Transaction Bundles about to be executed by the FHIR Persistence Processor. These are generated by the HL7V2 Listening Processor.") 028@Deprecated(since = "2023.11.R01") 029public class ConvertedTransactionBundlesJson implements IModelJson { 030 031 @Schema(description = "An array of Bundle resources containing transactions to be submitted to the FHIR server") 032 private List<IBaseBundle> myTransactionBundles = new ArrayList<>(); 033 034 public ConvertedTransactionBundlesJson() { 035 super(); 036 } 037 038 @Operation(summary = "addTransaction", description = "Add a FHIR transaction Bundle to process") 039 @SuppressWarnings("unused") 040 public void addTransaction( 041 @Parameter(name = "theTransaction", description = "The transaction bundle to add to the processing result") 042 IBaseBundle theBundle) { 043 myTransactionBundles.add(theBundle); 044 } 045 046 @SuppressWarnings("unused") 047 public void removeTransaction( 048 @Parameter( 049 name = "theTransaction", 050 description = "The transaction bundle to remove from the processing result") 051 IBaseBundle theBundle) { 052 myTransactionBundles.remove(theBundle); 053 } 054 055 public List<IBaseBundle> getTransactionBundles() { 056 return myTransactionBundles; 057 } 058 059 public void setTransactionBundles(List<IBaseBundle> theTransactionBundles) { 060 myTransactionBundles = theTransactionBundles; 061 } 062}