Class ChunkReader
- java.lang.Object
-
- javax.batch.api.chunk.AbstractItemReader
-
- com.ibm.fhir.jbatch.bulkdata.export.patient.ChunkReader
-
- All Implemented Interfaces:
javax.batch.api.chunk.ItemReader
- Direct Known Subclasses:
ChunkReader
@Dependent public class ChunkReader extends javax.batch.api.chunk.AbstractItemReaderBulk patient export Chunk implementation - the Reader.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringfhirDatastoreIdFHIR data store id.protected StringfhirExportFormatFHIR export format.protected FHIRPersistencefhirPersistenceprotected StringfhirResourceTypeFHIR resource type to process.(package private) StringfhirSearchFromDateFHIR Search from date.(package private) StringfhirSearchPageSizeFHIR search page size.(package private) StringfhirSearchToDateFHIR search to date.protected StringfhirTenantFHIR tenant id.(package private) StringfhirTypeFiltersFHIR export type filters.(package private) StringincomingUrl(package private) booleanisDoDuplicationCheck(package private) Set<String>loadedResourceIdsprotected intpageNumprotected intpageSize(package private) Class<? extends Resource>resourceType(package private) Map<Class<? extends Resource>,List<Map<String,List<String>>>>searchParametersForResoureTypes(package private) javax.batch.runtime.context.StepContextstepCtx
-
Constructor Summary
Constructors Constructor Description ChunkReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SerializablecheckpointInfo()voidclose()protected voidfillChunkData(List<Resource> resources, List<String> patientIds)protected voidfillChunkDataBuffer(List<String> patientIds)protected voidfillChunkPatientDataBuffer(List<Resource> patients)voidopen(Serializable checkpoint)ObjectreadItem()
-
-
-
Field Detail
-
pageNum
protected int pageNum
-
pageSize
protected int pageSize
-
fhirPersistence
protected FHIRPersistence fhirPersistence
-
searchParametersForResoureTypes
Map<Class<? extends Resource>,List<Map<String,List<String>>>> searchParametersForResoureTypes
-
isDoDuplicationCheck
boolean isDoDuplicationCheck
-
fhirTenant
@Inject protected String fhirTenant
FHIR tenant id.
-
fhirDatastoreId
@Inject protected String fhirDatastoreId
FHIR data store id.
-
fhirResourceType
@Inject protected String fhirResourceType
FHIR resource type to process.
-
fhirExportFormat
@Inject protected String fhirExportFormat
FHIR export format.
-
fhirSearchFromDate
@Inject String fhirSearchFromDate
FHIR Search from date.
-
fhirSearchToDate
@Inject String fhirSearchToDate
FHIR search to date.
-
fhirSearchPageSize
@Inject String fhirSearchPageSize
FHIR search page size.
-
fhirTypeFilters
@Inject String fhirTypeFilters
FHIR export type filters.
-
incomingUrl
@Inject String incomingUrl
-
stepCtx
@Inject javax.batch.runtime.context.StepContext stepCtx
-
-
Method Detail
-
fillChunkDataBuffer
protected void fillChunkDataBuffer(List<String> patientIds) throws Exception
- Throws:
Exception
-
fillChunkPatientDataBuffer
protected void fillChunkPatientDataBuffer(List<Resource> patients) throws Exception
- Throws:
Exception
-
fillChunkData
protected void fillChunkData(List<Resource> resources, List<String> patientIds) throws Exception
- Throws:
Exception
-
readItem
public Object readItem() throws Exception
- Specified by:
readItemin interfacejavax.batch.api.chunk.ItemReader- Specified by:
readItemin classjavax.batch.api.chunk.AbstractItemReader- Throws:
Exception
-
open
public void open(Serializable checkpoint) throws Exception
- Specified by:
openin interfacejavax.batch.api.chunk.ItemReader- Overrides:
openin classjavax.batch.api.chunk.AbstractItemReader- Throws:
Exception
-
close
public void close() throws Exception- Specified by:
closein interfacejavax.batch.api.chunk.ItemReader- Overrides:
closein classjavax.batch.api.chunk.AbstractItemReader- Throws:
Exception
-
checkpointInfo
public Serializable checkpointInfo() throws Exception
- Specified by:
checkpointInfoin interfacejavax.batch.api.chunk.ItemReader- Overrides:
checkpointInfoin classjavax.batch.api.chunk.AbstractItemReader- Throws:
Exception
-
-