public class DoseReporterWithLegacyOCRAndAutoSendToRegistry
extends java.lang.Object
A class to wait for incoming dose screen images and SRs and send them to pre-configured registry.
The class has no public methods other than the constructor and a main method that is useful as a utility.
External (unsecure) SQL access to the database is possible if the Application.DatabaseServerName property is specified; further
details are described in com.pixelmed.database.DatabaseInformationModel
; for example:
% java -cp lib/additional/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing --url "jdbc:hsqldb:hsql://localhost/testserverdb"
For how to configure the necessary properties file, see:
Modifier and Type | Class and Description |
---|---|
protected class |
DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile |
protected class |
DoseReporterWithLegacyOCRAndAutoSendToRegistry.OurPatientStudySeriesInstanceModel |
protected class |
DoseReporterWithLegacyOCRAndAutoSendToRegistry.OurReceivedObjectHandler |
protected class |
DoseReporterWithLegacyOCRAndAutoSendToRegistry.ReceivedFileProcessor |
protected class |
DoseReporterWithLegacyOCRAndAutoSendToRegistry.WatchDatabaseAndSendToRegistry |
protected class |
DoseReporterWithLegacyOCRAndAutoSendToRegistry.WatchRemoteAEsForNewDoseInformation |
Constructor and Description |
---|
DoseReporterWithLegacyOCRAndAutoSendToRegistry(java.lang.String propertiesFileName)
Wait for incoming dose screen images and SRs and send to registry.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
alreadyHaveIt(AttributeList uniqueKeys) |
protected java.lang.String |
deidentifyFile(java.lang.String dicomFileName) |
protected void |
deleteFilesAndDatabaseRecords(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfFiles) |
protected void |
deleteFilesAndSetDatabaseRecordsToReferenced(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfFiles) |
protected long |
findCandidateFilesToSendToRegistry(InformationEntity ie,
java.lang.String localPrimaryKeyValue,
java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfOriginalSRFiles,
java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfLegacyOCRSRFiles,
java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfDoseScreenFiles,
long mostRecentInsertionTime) |
protected boolean |
findSuitableSRFilesAndSendThemToRegistry(java.lang.String studyLocalPrimaryKeyValue) |
protected java.lang.String |
getBuildDate()
Get the date the package was built.
|
protected void |
loadProperties(java.lang.String propertiesFileName)
Load properties.
|
static void |
main(java.lang.String[] arg)
Wait for incoming dose screen images and SRs and send to registry.
|
protected void |
makeSRFileAndSendFileToRegistry(CTDose ctDose) |
protected void |
sendFilesToRegistry(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfSRFiles) |
protected void |
sendFileToRegistry(DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile candidateFile) |
protected void |
sendFileToRegistry(java.lang.String fileName) |
protected void |
setSelectedDatabaseRecordHasBeenSentToRegistry(java.lang.String filename) |
protected void |
setSelectedDatabaseRecordIsExposureDoseSequence(java.lang.String filename) |
protected void |
setSelectedDatabaseRecordIsRadiationDoseScreen(java.lang.String filename) |
protected void |
setSelectedDatabaseRecordIsRadiationDoseSR(java.lang.String filename) |
protected static java.lang.String defaultPropertiesFileName
protected static java.lang.String propertyName_SelectedDoseRegistry
protected static java.lang.String propertyName_SleepTimeBetweenPassesToProcessReceivedFiles
protected static java.lang.String propertyName_IntervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected static java.lang.String propertyName_SleepTimeBetweenPassesToQueryRemoteAEs
protected static java.lang.String propertyName_DaysBackwardsFromTodayToQuery
protected static java.lang.String propertyName_RetainSourceFilesUsedForSRGeneration
protected static java.lang.String propertyName_RetainGeneratedRDSRFiles
protected static java.lang.String propertyName_RetainDeidentifiedFiles
protected static java.lang.String propertyName_RemoteAEsForQuery
protected static java.lang.String propertyName_ApplicationDebugLevel
protected static java.lang.String propertyName_OCRDebugLevel
protected static java.lang.String propertyDelimitersForTokenizer_RemoteAEsForQuery
protected boolean retainDeidentifiedFiles
protected boolean retainGeneratedRDSRFiles
protected boolean retainSourceFilesUsedForSRGeneration
protected java.lang.String defaultRetainDeidentifiedFiles
protected java.lang.String defaultRetainGeneratedRDSRFiles
protected java.lang.String defaultRetainSourceFilesUsedForSRGeneration
protected java.lang.String defaultSleepTimeBetweenPassesToProcessReceivedFiles
protected java.lang.String defaultIntervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected java.lang.String defaultSleepTimeBetweenPassesToQueryRemoteAEs
protected java.lang.String defaultDaysBackwardsFromTodayToQuery
protected static int sleepTimeBetweenPassesToProcessReceivedFiles
protected static int intervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected static int sleepTimeBetweenPassesToQueryRemoteAEs
protected static int daysBackwardsFromTodayToQuery
protected static final long millisecondsPerDay
protected java.util.Properties properties
protected NetworkApplicationProperties networkApplicationProperties
protected NetworkApplicationInformationFederated networkApplicationInformation
protected java.lang.String ourCalledAETitle
protected java.util.List<java.lang.String> remoteAEsForQuery
protected DatabaseInformationModel databaseInformationModel
protected FTPRemoteHost remoteHost
protected int ftpClientDebugLevel
protected int ocrDebugLevel
protected int applicationDebugLevel
protected java.lang.String buildDate
protected java.io.File savedImagesFolder
protected StoredFilePathStrategy storedFilePathStrategy
protected java.lang.String studyHasBeenProcessedColumnName
protected java.lang.String instanceHasBeenSentToRegistryColumnName
protected java.lang.String instanceIsRadiationDoseSRColumnName
protected java.lang.String instanceIsRadiationDoseScreenColumnName
protected java.lang.String instanceIsExposureDoseSequenceColumnName
protected java.lang.String studyInstanceUIDColumnName
protected java.lang.String sopClassUIDColumnName
protected java.lang.String manufacturerColumnName
protected java.lang.String imageTypeColumnName
protected java.lang.String instanceCreatorUIDColumnName
protected java.lang.String sourceApplicationEntityTitleColumnName
protected java.lang.String instanceLocalParentReferenceColumnName
protected java.lang.String instanceLocalFileNameColumnName
protected java.lang.String instanceLocalFileReferenceTypeColumnName
protected java.lang.String instanceLocalPrimaryKeyColumnName
public DoseReporterWithLegacyOCRAndAutoSendToRegistry(java.lang.String propertiesFileName) throws DicomException, DicomNetworkException, java.io.IOException, java.lang.InterruptedException, FTPException
Wait for incoming dose screen images and SRs and send to registry.
propertiesFileName
- DicomException
DicomNetworkException
java.io.IOException
java.lang.InterruptedException
FTPException
protected java.lang.String getBuildDate()
Get the date the package was built.
protected void loadProperties(java.lang.String propertiesFileName) throws java.io.IOException
Load properties.
java.io.IOException
- thrown if properties file is missingprotected java.lang.String deidentifyFile(java.lang.String dicomFileName) throws DicomException, java.io.IOException
DicomException
java.io.IOException
protected void sendFileToRegistry(java.lang.String fileName) throws DicomException, java.io.IOException, java.security.NoSuchAlgorithmException, java.lang.Exception
DicomException
java.io.IOException
java.security.NoSuchAlgorithmException
java.lang.Exception
protected void sendFileToRegistry(DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile candidateFile) throws DicomException, java.io.IOException, java.security.NoSuchAlgorithmException, java.lang.Exception
DicomException
java.io.IOException
java.security.NoSuchAlgorithmException
java.lang.Exception
protected void sendFilesToRegistry(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfSRFiles) throws DicomException, java.io.IOException, java.security.NoSuchAlgorithmException, java.lang.Exception
DicomException
java.io.IOException
java.security.NoSuchAlgorithmException
java.lang.Exception
protected void makeSRFileAndSendFileToRegistry(CTDose ctDose)
protected void deleteFilesAndDatabaseRecords(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfFiles) throws DicomException, java.io.IOException
DicomException
java.io.IOException
protected void deleteFilesAndSetDatabaseRecordsToReferenced(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfFiles) throws DicomException, java.io.IOException
DicomException
java.io.IOException
protected long findCandidateFilesToSendToRegistry(InformationEntity ie, java.lang.String localPrimaryKeyValue, java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfOriginalSRFiles, java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfLegacyOCRSRFiles, java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfDoseScreenFiles, long mostRecentInsertionTime) throws DicomException
DicomException
protected boolean findSuitableSRFilesAndSendThemToRegistry(java.lang.String studyLocalPrimaryKeyValue) throws DicomException, java.io.IOException, java.security.NoSuchAlgorithmException, java.lang.Exception
DicomException
java.io.IOException
java.security.NoSuchAlgorithmException
java.lang.Exception
protected void setSelectedDatabaseRecordIsRadiationDoseSR(java.lang.String filename) throws DicomException
DicomException
protected void setSelectedDatabaseRecordIsRadiationDoseScreen(java.lang.String filename) throws DicomException
DicomException
protected void setSelectedDatabaseRecordIsExposureDoseSequence(java.lang.String filename) throws DicomException
DicomException
protected void setSelectedDatabaseRecordHasBeenSentToRegistry(java.lang.String filename) throws DicomException
DicomException
protected boolean alreadyHaveIt(AttributeList uniqueKeys) throws DicomException
DicomException
public static void main(java.lang.String[] arg)
Wait for incoming dose screen images and SRs and send to registry.
arg
- none