public class DoseReporterWithLegacyOCRAndAutoSendToRegistry extends 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(String propertiesFileName)
Wait for incoming dose screen images and SRs and send to registry.
|
protected String buildDate
protected DatabaseInformationModel databaseInformationModel
protected static int daysBackwardsFromTodayToQuery
protected String defaultDaysBackwardsFromTodayToQuery
protected String defaultIntervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected static String defaultPropertiesFileName
protected String defaultRetainDeidentifiedFiles
protected String defaultRetainGeneratedRDSRFiles
protected String defaultRetainSourceFilesUsedForSRGeneration
protected String defaultSleepTimeBetweenPassesToProcessReceivedFiles
protected String defaultSleepTimeBetweenPassesToQueryRemoteAEs
protected String imageTypeColumnName
protected String instanceCreatorUIDColumnName
protected String instanceHasBeenSentToRegistryColumnName
protected String instanceIsExposureDoseSequenceColumnName
protected String instanceIsRadiationDoseScreenColumnName
protected String instanceIsRadiationDoseSRColumnName
protected String instanceLocalFileNameColumnName
protected String instanceLocalFileReferenceTypeColumnName
protected String instanceLocalParentReferenceColumnName
protected String instanceLocalPrimaryKeyColumnName
protected static int intervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected String manufacturerColumnName
protected static final long millisecondsPerDay
protected NetworkApplicationInformationFederated networkApplicationInformation
protected NetworkApplicationProperties networkApplicationProperties
protected String ourCalledAETitle
protected Properties properties
protected static String propertyDelimitersForTokenizer_RemoteAEsForQuery
protected static String propertyName_DaysBackwardsFromTodayToQuery
protected static String propertyName_IntervalAfterLastInstanceReceivedToWaitBeforeProcessingStudy
protected static String propertyName_RemoteAEsForQuery
protected static String propertyName_RetainDeidentifiedFiles
protected static String propertyName_RetainGeneratedRDSRFiles
protected static String propertyName_RetainSourceFilesUsedForSRGeneration
protected static String propertyName_SelectedDoseRegistry
protected static String propertyName_SleepTimeBetweenPassesToProcessReceivedFiles
protected static String propertyName_SleepTimeBetweenPassesToQueryRemoteAEs
protected FTPRemoteHost remoteHost
protected boolean retainDeidentifiedFiles
protected boolean retainGeneratedRDSRFiles
protected boolean retainSourceFilesUsedForSRGeneration
protected File savedImagesFolder
protected static int sleepTimeBetweenPassesToProcessReceivedFiles
protected static int sleepTimeBetweenPassesToQueryRemoteAEs
protected String sopClassUIDColumnName
protected String sourceApplicationEntityTitleColumnName
protected StoredFilePathStrategy storedFilePathStrategy
protected String studyHasBeenProcessedColumnName
protected String studyInstanceUIDColumnName
public DoseReporterWithLegacyOCRAndAutoSendToRegistry(String propertiesFileName) throws DicomException, DicomNetworkException, IOException, InterruptedException, FTPException
Wait for incoming dose screen images and SRs and send to registry.
propertiesFileName
- DicomException
DicomNetworkException
IOException
InterruptedException
FTPException
protected boolean alreadyHaveIt(AttributeList uniqueKeys) throws DicomException
DicomException
protected String deidentifyFile(String dicomFileName) throws DicomException, IOException
DicomException
IOException
protected void deleteFilesAndDatabaseRecords(Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfFiles) throws DicomException, IOException
DicomException
IOException
protected void deleteFilesAndSetDatabaseRecordsToReferenced(Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfFiles) throws DicomException, IOException
DicomException
IOException
protected long findCandidateFilesToSendToRegistry(InformationEntity ie, String localPrimaryKeyValue, Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfOriginalSRFiles, Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfLegacyOCRSRFiles, Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfDoseScreenFiles, long mostRecentInsertionTime) throws DicomException
DicomException
protected boolean findSuitableSRFilesAndSendThemToRegistry(String studyLocalPrimaryKeyValue) throws DicomException, IOException, NoSuchAlgorithmException, Exception
protected String getBuildDate()
Get the date the package was built.
protected void loadProperties(String propertiesFileName) throws IOException
Load properties.
IOException
- thrown if properties file is missingpublic static void main(String[] arg)
Wait for incoming dose screen images and SRs and send to registry.
arg
- noneprotected void makeSRFileAndSendFileToRegistry(CTDose ctDose)
protected void sendFilesToRegistry(Set<DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile> setOfSRFiles) throws DicomException, IOException, NoSuchAlgorithmException, Exception
protected void sendFileToRegistry(DoseReporterWithLegacyOCRAndAutoSendToRegistry.CandidateFile candidateFile) throws DicomException, IOException, NoSuchAlgorithmException, Exception
protected void sendFileToRegistry(String fileName) throws DicomException, IOException, NoSuchAlgorithmException, Exception
protected void setSelectedDatabaseRecordHasBeenSentToRegistry(String filename) throws DicomException
DicomException
protected void setSelectedDatabaseRecordIsExposureDoseSequence(String filename) throws DicomException
DicomException
protected void setSelectedDatabaseRecordIsRadiationDoseScreen(String filename) throws DicomException
DicomException
protected void setSelectedDatabaseRecordIsRadiationDoseSR(String filename) throws DicomException
DicomException