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 java.lang.String buildDate
protected DatabaseInformationModel databaseInformationModel
protected static int daysBackwardsFromTodayToQuery
protected java.lang.String defaultDaysBackwardsFromTodayToQuery
protected java.lang.String defaultIntervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected static java.lang.String defaultPropertiesFileName
protected java.lang.String defaultRetainDeidentifiedFiles
protected java.lang.String defaultRetainGeneratedRDSRFiles
protected java.lang.String defaultRetainSourceFilesUsedForSRGeneration
protected java.lang.String defaultSleepTimeBetweenPassesToProcessReceivedFiles
protected java.lang.String defaultSleepTimeBetweenPassesToQueryRemoteAEs
protected java.lang.String imageTypeColumnName
protected java.lang.String instanceCreatorUIDColumnName
protected java.lang.String instanceHasBeenSentToRegistryColumnName
protected java.lang.String instanceIsExposureDoseSequenceColumnName
protected java.lang.String instanceIsRadiationDoseScreenColumnName
protected java.lang.String instanceIsRadiationDoseSRColumnName
protected java.lang.String instanceLocalFileNameColumnName
protected java.lang.String instanceLocalFileReferenceTypeColumnName
protected java.lang.String instanceLocalParentReferenceColumnName
protected java.lang.String instanceLocalPrimaryKeyColumnName
protected static int intervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected java.lang.String manufacturerColumnName
protected static final long millisecondsPerDay
protected NetworkApplicationInformationFederated networkApplicationInformation
protected NetworkApplicationProperties networkApplicationProperties
protected java.lang.String ourCalledAETitle
protected java.util.Properties properties
protected static java.lang.String propertyDelimitersForTokenizer_RemoteAEsForQuery
protected static java.lang.String propertyName_DaysBackwardsFromTodayToQuery
protected static java.lang.String propertyName_IntervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected static java.lang.String propertyName_RemoteAEsForQuery
protected static java.lang.String propertyName_RetainDeidentifiedFiles
protected static java.lang.String propertyName_RetainGeneratedRDSRFiles
protected static java.lang.String propertyName_RetainSourceFilesUsedForSRGeneration
protected static java.lang.String propertyName_SelectedDoseRegistry
protected static java.lang.String propertyName_SleepTimeBetweenPassesToProcessReceivedFiles
protected static java.lang.String propertyName_SleepTimeBetweenPassesToQueryRemoteAEs
protected java.util.List<java.lang.String> remoteAEsForQuery
protected FTPRemoteHost remoteHost
protected boolean retainDeidentifiedFiles
protected boolean retainGeneratedRDSRFiles
protected boolean retainSourceFilesUsedForSRGeneration
protected java.io.File savedImagesFolder
protected static int sleepTimeBetweenPassesToProcessReceivedFiles
protected static int sleepTimeBetweenPassesToQueryRemoteAEs
protected java.lang.String sopClassUIDColumnName
protected java.lang.String sourceApplicationEntityTitleColumnName
protected StoredFilePathStrategy storedFilePathStrategy
protected java.lang.String studyHasBeenProcessedColumnName
protected java.lang.String studyInstanceUIDColumnName
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 boolean alreadyHaveIt(AttributeList uniqueKeys) throws DicomException
DicomException
protected java.lang.String deidentifyFile(java.lang.String dicomFileName) throws DicomException, java.io.IOException
DicomException
java.io.IOException
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 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 missingpublic static void main(java.lang.String[] arg)
Wait for incoming dose screen images and SRs and send to registry.
arg
- noneprotected void makeSRFileAndSendFileToRegistry(CTDose ctDose)
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 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 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 setSelectedDatabaseRecordHasBeenSentToRegistry(java.lang.String filename) throws DicomException
DicomException
protected void setSelectedDatabaseRecordIsExposureDoseSequence(java.lang.String filename) throws DicomException
DicomException
protected void setSelectedDatabaseRecordIsRadiationDoseScreen(java.lang.String filename) throws DicomException
DicomException
protected void setSelectedDatabaseRecordIsRadiationDoseSR(java.lang.String filename) throws DicomException
DicomException