changeset 95:a807a4699eb4

testing of metadata SopClassUid
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Dec 2016 14:49:23 +0100
parents 09afe3616660
children 272d1229cb49
files Database/Worklists/Encodings/database.dump Database/Worklists/Encodings/query.dump GenerateConfigurationForTests.py Plugins/Worklists/Run.py Tests/Tests.py
diffstat 5 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Database/Worklists/Encodings/database.dump	Fri Dec 09 14:49:23 2016 +0100
@@ -0,0 +1,2 @@
+(0008,0005) CS [ISO_IR 192]
+(0010,0010) PN [Test-éüäöòДΘĝדصķћ๛ネİ]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Database/Worklists/Encodings/query.dump	Fri Dec 09 14:49:23 2016 +0100
@@ -0,0 +1,3 @@
+# Wildcard query over the patient name
+(0008,0005) CS [ISO_IR 192]
+(0010,0010) PN [*ü*]
--- a/GenerateConfigurationForTests.py	Fri Dec 09 11:25:17 2016 +0100
+++ b/GenerateConfigurationForTests.py	Fri Dec 09 14:49:23 2016 +0100
@@ -88,7 +88,7 @@
 
 del config['DefaultEncoding']
 
-config['AllowFindSopClassesInStudy'] = True
+config['AllowFindSopClassesInStudy'] = False
 config['AuthenticationEnabled'] = True
 config['DicomAet'] = 'ORTHANC'
 config['DicomAssociationCloseDelay'] = 0
--- a/Plugins/Worklists/Run.py	Fri Dec 09 11:25:17 2016 +0100
+++ b/Plugins/Worklists/Run.py	Fri Dec 09 14:49:23 2016 +0100
@@ -211,6 +211,7 @@
         self.assertEqual(2, len(RunQuery('Sequences/Queries/7814.without.length.dump', [])))
         self.assertEqual(2, len(RunQuery('Sequences/Queries/7814.without.seq.dump', [])))
         self.assertEqual(2, len(RunQuery('Sequences/Queries/orig.7814.dump', [])))
+        #self.assertEqual(2, len(RunQuery('Sequences/Queries/orig.7814.without.station.aet.dump', [])))
 
 
     def test_encodings(self):
--- a/Tests/Tests.py	Fri Dec 09 11:25:17 2016 +0100
+++ b/Tests/Tests.py	Fri Dec 09 14:49:23 2016 +0100
@@ -923,16 +923,18 @@
         self.assertEqual('LastUpdate', m[0])
 
         m = DoGet(_REMOTE, '/instances/%s/metadata' % i)
-        self.assertEqual(5, len(m))
+        self.assertEqual(6, len(m))
         self.assertTrue('IndexInSeries' in m)
         self.assertTrue('ReceptionDate' in m)
         self.assertTrue('RemoteAET' in m)
         self.assertTrue('Origin' in m)
         self.assertTrue('TransferSyntax' in m)
+        self.assertTrue('SopClassUid' in m)
         self.assertEqual(DoGet(_REMOTE, '/instances/%s/metadata/IndexInSeries' % i), 1)
         self.assertEqual(DoGet(_REMOTE, '/instances/%s/metadata/Origin' % i), 'RestApi')
         self.assertEqual(DoGet(_REMOTE, '/instances/%s/metadata/RemoteAET' % i), '')  # None, received by REST API
         self.assertEqual(DoGet(_REMOTE, '/instances/%s/metadata/TransferSyntax' % i), '1.2.840.10008.1.2.4.91')  # JPEG2k
+        self.assertEqual(DoGet(_REMOTE, '/instances/%s/metadata/SopClassUid' % i), '1.2.840.10008.5.1.4.1.1.4')
 
         # Play with custom metadata
         DoPut(_REMOTE, '/patients/%s/metadata/5555' % p, 'coucou')
@@ -1047,16 +1049,18 @@
         i = DoGet(_REMOTE, '/instances')
         self.assertEqual(1, len(i))
         m = DoGet(_REMOTE, '/instances/%s/metadata' % i[0])
-        self.assertEqual(5, len(m))
+        self.assertEqual(6, len(m))
         self.assertTrue('IndexInSeries' in m)
         self.assertTrue('ReceptionDate' in m)
         self.assertTrue('RemoteAET' in m)
         self.assertTrue('Origin' in m)
         self.assertTrue('TransferSyntax' in m)
+        self.assertTrue('SopClassUid' in m)
         self.assertEqual(DoGet(_REMOTE, '/instances/%s/metadata/IndexInSeries' % i[0]), 1)
         self.assertEqual(DoGet(_REMOTE, '/instances/%s/metadata/Origin' % i[0]), 'DicomProtocol')
         self.assertEqual(DoGet(_REMOTE, '/instances/%s/metadata/RemoteAET' % i[0]), 'STORESCU')
         self.assertEqual(DoGet(_REMOTE, '/instances/%s/metadata/TransferSyntax' % i[0]), '1.2.840.10008.1.2.1')
+        self.assertEqual(DoGet(_REMOTE, '/instances/%s/metadata/SopClassUid' % i[0]), '1.2.840.10008.5.1.4.1.1.7')
 
 
     def test_incoming_findscu(self):