Package com.pixelmed.apps
Class DoseReporterWithLegacyOCRAndAutoSendToRegistry
- java.lang.Object
-
- com.pixelmed.apps.DoseReporterWithLegacyOCRAndAutoSendToRegistry
-
public class DoseReporterWithLegacyOCRAndAutoSendToRegistry extends java.lang.ObjectA 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:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classDoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFileprotected classDoseReporterWithLegacyOCRAndAutoSendToRegistry.OurPatientStudySeriesInstanceModelprotected classDoseReporterWithLegacyOCRAndAutoSendToRegistry.OurReceivedObjectHandlerprotected classDoseReporterWithLegacyOCRAndAutoSendToRegistry.ReceivedFileProcessorprotected classDoseReporterWithLegacyOCRAndAutoSendToRegistry.WatchDatabaseAndSendToRegistryprotected classDoseReporterWithLegacyOCRAndAutoSendToRegistry.WatchRemoteAEsForNewDoseInformation
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DoseReporterWithLegacyOCRAndAutoSendToRegistry(java.lang.String propertiesFileName)Wait for incoming dose screen images and SRs and send to registry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanalreadyHaveIt(AttributeList uniqueKeys)protected java.lang.StringdeidentifyFile(java.lang.String dicomFileName)protected voiddeleteFilesAndDatabaseRecords(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfFiles)protected voiddeleteFilesAndSetDatabaseRecordsToReferenced(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfFiles)protected longfindCandidateFilesToSendToRegistry(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 booleanfindSuitableSRFilesAndSendThemToRegistry(java.lang.String studyLocalPrimaryKeyValue)protected java.lang.StringgetBuildDate()Get the date the package was built.protected voidloadProperties(java.lang.String propertiesFileName)Load properties.static voidmain(java.lang.String[] arg)Wait for incoming dose screen images and SRs and send to registry.protected voidmakeSRFileAndSendFileToRegistry(CTDose ctDose)protected voidsendFilesToRegistry(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfSRFiles)protected voidsendFileToRegistry(DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile candidateFile)protected voidsendFileToRegistry(java.lang.String fileName)protected voidsetSelectedDatabaseRecordHasBeenSentToRegistry(java.lang.String filename)protected voidsetSelectedDatabaseRecordIsExposureDoseSequence(java.lang.String filename)protected voidsetSelectedDatabaseRecordIsRadiationDoseScreen(java.lang.String filename)protected voidsetSelectedDatabaseRecordIsRadiationDoseSR(java.lang.String filename)
-
-
-
Field Detail
-
defaultPropertiesFileName
protected static java.lang.String defaultPropertiesFileName
-
propertyName_SelectedDoseRegistry
protected static java.lang.String propertyName_SelectedDoseRegistry
-
propertyName_SleepTimeBetweenPassesToProcessReceivedFiles
protected static java.lang.String propertyName_SleepTimeBetweenPassesToProcessReceivedFiles
-
propertyName_IntervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected static java.lang.String propertyName_IntervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
-
propertyName_SleepTimeBetweenPassesToQueryRemoteAEs
protected static java.lang.String propertyName_SleepTimeBetweenPassesToQueryRemoteAEs
-
propertyName_DaysBackwardsFromTodayToQuery
protected static java.lang.String propertyName_DaysBackwardsFromTodayToQuery
-
propertyName_RetainSourceFilesUsedForSRGeneration
protected static java.lang.String propertyName_RetainSourceFilesUsedForSRGeneration
-
propertyName_RetainGeneratedRDSRFiles
protected static java.lang.String propertyName_RetainGeneratedRDSRFiles
-
propertyName_RetainDeidentifiedFiles
protected static java.lang.String propertyName_RetainDeidentifiedFiles
-
propertyName_RemoteAEsForQuery
protected static java.lang.String propertyName_RemoteAEsForQuery
-
propertyName_ApplicationDebugLevel
protected static java.lang.String propertyName_ApplicationDebugLevel
-
propertyName_OCRDebugLevel
protected static java.lang.String propertyName_OCRDebugLevel
-
propertyDelimitersForTokenizer_RemoteAEsForQuery
protected static java.lang.String propertyDelimitersForTokenizer_RemoteAEsForQuery
-
retainDeidentifiedFiles
protected boolean retainDeidentifiedFiles
-
retainGeneratedRDSRFiles
protected boolean retainGeneratedRDSRFiles
-
retainSourceFilesUsedForSRGeneration
protected boolean retainSourceFilesUsedForSRGeneration
-
defaultRetainDeidentifiedFiles
protected java.lang.String defaultRetainDeidentifiedFiles
-
defaultRetainGeneratedRDSRFiles
protected java.lang.String defaultRetainGeneratedRDSRFiles
-
defaultRetainSourceFilesUsedForSRGeneration
protected java.lang.String defaultRetainSourceFilesUsedForSRGeneration
-
defaultSleepTimeBetweenPassesToProcessReceivedFiles
protected java.lang.String defaultSleepTimeBetweenPassesToProcessReceivedFiles
-
defaultIntervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected java.lang.String defaultIntervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
-
defaultSleepTimeBetweenPassesToQueryRemoteAEs
protected java.lang.String defaultSleepTimeBetweenPassesToQueryRemoteAEs
-
defaultDaysBackwardsFromTodayToQuery
protected java.lang.String defaultDaysBackwardsFromTodayToQuery
-
sleepTimeBetweenPassesToProcessReceivedFiles
protected static int sleepTimeBetweenPassesToProcessReceivedFiles
-
intervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected static int intervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
-
sleepTimeBetweenPassesToQueryRemoteAEs
protected static int sleepTimeBetweenPassesToQueryRemoteAEs
-
daysBackwardsFromTodayToQuery
protected static int daysBackwardsFromTodayToQuery
-
millisecondsPerDay
protected static final long millisecondsPerDay
- See Also:
- Constant Field Values
-
properties
protected java.util.Properties properties
-
networkApplicationProperties
protected NetworkApplicationProperties networkApplicationProperties
-
networkApplicationInformation
protected NetworkApplicationInformationFederated networkApplicationInformation
-
ourCalledAETitle
protected java.lang.String ourCalledAETitle
-
remoteAEsForQuery
protected java.util.List<java.lang.String> remoteAEsForQuery
-
databaseInformationModel
protected DatabaseInformationModel databaseInformationModel
-
remoteHost
protected FTPRemoteHost remoteHost
-
ftpClientDebugLevel
protected int ftpClientDebugLevel
-
ocrDebugLevel
protected int ocrDebugLevel
-
applicationDebugLevel
protected int applicationDebugLevel
-
buildDate
protected java.lang.String buildDate
-
savedImagesFolder
protected java.io.File savedImagesFolder
-
storedFilePathStrategy
protected StoredFilePathStrategy storedFilePathStrategy
-
studyHasBeenProcessedColumnName
protected java.lang.String studyHasBeenProcessedColumnName
-
instanceHasBeenSentToRegistryColumnName
protected java.lang.String instanceHasBeenSentToRegistryColumnName
-
instanceIsRadiationDoseSRColumnName
protected java.lang.String instanceIsRadiationDoseSRColumnName
-
instanceIsRadiationDoseScreenColumnName
protected java.lang.String instanceIsRadiationDoseScreenColumnName
-
instanceIsExposureDoseSequenceColumnName
protected java.lang.String instanceIsExposureDoseSequenceColumnName
-
studyInstanceUIDColumnName
protected java.lang.String studyInstanceUIDColumnName
-
sopClassUIDColumnName
protected java.lang.String sopClassUIDColumnName
-
manufacturerColumnName
protected java.lang.String manufacturerColumnName
-
imageTypeColumnName
protected java.lang.String imageTypeColumnName
-
instanceCreatorUIDColumnName
protected java.lang.String instanceCreatorUIDColumnName
-
sourceApplicationEntityTitleColumnName
protected java.lang.String sourceApplicationEntityTitleColumnName
-
instanceLocalParentReferenceColumnName
protected java.lang.String instanceLocalParentReferenceColumnName
-
instanceLocalFileNameColumnName
protected java.lang.String instanceLocalFileNameColumnName
-
instanceLocalFileReferenceTypeColumnName
protected java.lang.String instanceLocalFileReferenceTypeColumnName
-
instanceLocalPrimaryKeyColumnName
protected java.lang.String instanceLocalPrimaryKeyColumnName
-
-
Constructor Detail
-
DoseReporterWithLegacyOCRAndAutoSendToRegistry
public DoseReporterWithLegacyOCRAndAutoSendToRegistry(java.lang.String propertiesFileName) throws DicomException, DicomNetworkException, java.io.IOException, java.lang.InterruptedException, FTPExceptionWait for incoming dose screen images and SRs and send to registry.
- Parameters:
propertiesFileName-- Throws:
DicomExceptionDicomNetworkExceptionjava.io.IOExceptionjava.lang.InterruptedExceptionFTPException
-
-
Method Detail
-
getBuildDate
protected java.lang.String getBuildDate()
Get the date the package was built.
- Returns:
- the build date
-
loadProperties
protected void loadProperties(java.lang.String propertiesFileName) throws java.io.IOExceptionLoad properties.
- Throws:
java.io.IOException- thrown if properties file is missing
-
deidentifyFile
protected java.lang.String deidentifyFile(java.lang.String dicomFileName) throws DicomException, java.io.IOException- Throws:
DicomExceptionjava.io.IOException
-
sendFileToRegistry
protected void sendFileToRegistry(java.lang.String fileName) throws DicomException, java.io.IOException, java.security.NoSuchAlgorithmException, java.lang.Exception- Throws:
DicomExceptionjava.io.IOExceptionjava.security.NoSuchAlgorithmExceptionjava.lang.Exception
-
sendFileToRegistry
protected void sendFileToRegistry(DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile candidateFile) throws DicomException, java.io.IOException, java.security.NoSuchAlgorithmException, java.lang.Exception
- Throws:
DicomExceptionjava.io.IOExceptionjava.security.NoSuchAlgorithmExceptionjava.lang.Exception
-
sendFilesToRegistry
protected void sendFilesToRegistry(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfSRFiles) throws DicomException, java.io.IOException, java.security.NoSuchAlgorithmException, java.lang.Exception
- Throws:
DicomExceptionjava.io.IOExceptionjava.security.NoSuchAlgorithmExceptionjava.lang.Exception
-
makeSRFileAndSendFileToRegistry
protected void makeSRFileAndSendFileToRegistry(CTDose ctDose)
-
deleteFilesAndDatabaseRecords
protected void deleteFilesAndDatabaseRecords(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfFiles) throws DicomException, java.io.IOException
- Throws:
DicomExceptionjava.io.IOException
-
deleteFilesAndSetDatabaseRecordsToReferenced
protected void deleteFilesAndSetDatabaseRecordsToReferenced(java.util.Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfFiles) throws DicomException, java.io.IOException
- Throws:
DicomExceptionjava.io.IOException
-
findCandidateFilesToSendToRegistry
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
- Throws:
DicomException
-
findSuitableSRFilesAndSendThemToRegistry
protected boolean findSuitableSRFilesAndSendThemToRegistry(java.lang.String studyLocalPrimaryKeyValue) throws DicomException, java.io.IOException, java.security.NoSuchAlgorithmException, java.lang.Exception- Throws:
DicomExceptionjava.io.IOExceptionjava.security.NoSuchAlgorithmExceptionjava.lang.Exception
-
setSelectedDatabaseRecordIsRadiationDoseSR
protected void setSelectedDatabaseRecordIsRadiationDoseSR(java.lang.String filename) throws DicomException- Throws:
DicomException
-
setSelectedDatabaseRecordIsRadiationDoseScreen
protected void setSelectedDatabaseRecordIsRadiationDoseScreen(java.lang.String filename) throws DicomException- Throws:
DicomException
-
setSelectedDatabaseRecordIsExposureDoseSequence
protected void setSelectedDatabaseRecordIsExposureDoseSequence(java.lang.String filename) throws DicomException- Throws:
DicomException
-
setSelectedDatabaseRecordHasBeenSentToRegistry
protected void setSelectedDatabaseRecordHasBeenSentToRegistry(java.lang.String filename) throws DicomException- Throws:
DicomException
-
alreadyHaveIt
protected boolean alreadyHaveIt(AttributeList uniqueKeys) throws DicomException
- Throws:
DicomException
-
main
public static void main(java.lang.String[] arg)
Wait for incoming dose screen images and SRs and send to registry.
- Parameters:
arg- none
-
-