diff --git a/docker-compose-integrationtest.yml b/docker-compose-integrationtest.yml
index 844c43a9ffe88e70113f12d56de8054abb75b14d..c0a140060eb0b96751741ca3b9cb895051ebf351 100644
--- a/docker-compose-integrationtest.yml
+++ b/docker-compose-integrationtest.yml
@@ -47,6 +47,7 @@ services:
       - ./src/main/resources/db/migration/V2__Commit_Msg_to_Device.sql:/docker-entrypoint-initdb.d/V2__Commit_Msg_to_Device.sql
       - ./src/main/resources/db/migration/V3__Notification_CC_List.sql:/docker-entrypoint-initdb.d/V3__Notification_CC_List.sql
       - ./src/main/resources/db/migration/V4__Schema_data_migration.sql:/docker-entrypoint-initdb.d/V4__Schema_data_migration.sql
+      - ./src/main/resources/db/migration/V5__Data_transformation_status_deleted.sql:/docker-entrypoint-initdb.d/V5__Data_transformation_status_deleted.sql
 
 volumes:
   naming-data:
diff --git a/src/main/java/org/openepics/names/rest/controller/VerificationController.java b/src/main/java/org/openepics/names/rest/controller/VerificationController.java
index b77ac693ed12259f238353e9a08abaa31348d99b..9098baeb992937a10ebff1469ef17b9ab64fa936 100644
--- a/src/main/java/org/openepics/names/rest/controller/VerificationController.java
+++ b/src/main/java/org/openepics/names/rest/controller/VerificationController.java
@@ -385,8 +385,8 @@ public class VerificationController {
             namePartRevision = mapIdNamePartRevision.get(system.getId());
 
             check = namePartRevision != null
-                    && equals(system, namePartRevision, mapUuidMaxIdSystem)
-                    && system.getParentUuid().equals(namePartRevision.getParent().getUuid());
+                    && system.getParentUuid().equals(namePartRevision.getParent().getUuid())
+                    && equals(system, namePartRevision, mapUuidMaxIdSystem);
 
             // add to count
             if (check) {
@@ -404,8 +404,8 @@ public class VerificationController {
             namePartRevision = mapIdNamePartRevision.get(subsystem.getId());
 
             check = namePartRevision != null
-                    && equals(subsystem, namePartRevision, mapUuidMaxIdSubsystem)
-                    && subsystem.getParentUuid().equals(namePartRevision.getParent().getUuid());
+                    && subsystem.getParentUuid().equals(namePartRevision.getParent().getUuid())
+                    && equals(subsystem, namePartRevision, mapUuidMaxIdSubsystem);
 
             // add to count
             if (check) {
@@ -442,8 +442,8 @@ public class VerificationController {
             namePartRevision = mapIdNamePartRevision.get(deviceGroup.getId());
 
             check = namePartRevision != null
-                    && equals(deviceGroup, namePartRevision, mapUuidMaxIdDeviceGroup)
-                    && deviceGroup.getParentUuid().equals(namePartRevision.getParent().getUuid());
+                    && deviceGroup.getParentUuid().equals(namePartRevision.getParent().getUuid())
+                    && equals(deviceGroup, namePartRevision, mapUuidMaxIdDeviceGroup);
 
             // add to count
             if (check) {
@@ -461,8 +461,8 @@ public class VerificationController {
             namePartRevision = mapIdNamePartRevision.get(deviceType.getId());
 
             check = namePartRevision != null
-                    && equals(deviceType, namePartRevision, mapUuidMaxIdDeviceType)
-                    && deviceType.getParentUuid().equals(namePartRevision.getParent().getUuid());
+                    && deviceType.getParentUuid().equals(namePartRevision.getParent().getUuid())
+                    && equals(deviceType, namePartRevision, mapUuidMaxIdDeviceType);
 
             // add to count
             if (check) {
@@ -1051,6 +1051,9 @@ public class VerificationController {
         //     system.processed            = namepartrevision.processdate
         //     system.processed_by         = namepartrevision.processedby_id   (useraccount.id --> useraccount.username)
         //     system.processed_comment    = namepartrevision.processorcomment
+        //
+        //     check if deleted && (cancelled, rejected, pending) &&  no approved in line of uuid, then it might be ok from that perspective
+        //     consider - status, latest, deleted
 
         if (ValidateUtil.isAnyNull(structure, namePartRevision, mapUuidMaxId)) {
             return false;
@@ -1084,9 +1087,16 @@ public class VerificationController {
 
         // latest
         //     true if id = get max id for uuid
-        //     special rules for pending, not consider pending
-        check = check && structure.isLatest() == structure.getId().equals(mapUuidMaxId.get(structure.getUuid()));
-        check = check && structure.isDeleted() == namePartRevision.isDeleted();
+        //     special rules
+        //         for pending, not consider pending
+        //         for latest, deleted but not approved - ok because there are erroneous entries in database
+        //             handled with V5__Data_transformation_status_deleted.sql
+        check = check &&
+                (structure.isLatest() == structure.getId().equals(mapUuidMaxId.get(structure.getUuid()))
+                ||  structure.isLatest() && structure.isDeleted());
+        check = check &&
+                (structure.isDeleted() == namePartRevision.isDeleted()
+                ||  structure.isLatest() && structure.isDeleted());
 
         // date may be in different format for different objects, to be formatted before being compared
         check = check && ((structure.getRequested() == null && namePartRevision.getRequestDate() == null)
@@ -1197,10 +1207,10 @@ public class VerificationController {
         check = check && ((name.getRequested() == null && deviceRevision.getRequestDate() == null)
                             || StringUtils.equals(SDF.format(name.getRequested()), SDF.format(deviceRevision.getRequestDate())));
         check = check && StringUtils.equals(name.getRequestedBy(), deviceRevision.getRequestedBy().getUsername());
-        check = check && name.getRequestedComment() == null;
+        check = check && StringUtils.equals(name.getRequestedComment(), deviceRevision.getProcessorComment());
         check = check && name.getProcessed() == null;
         check = check && name.getProcessedBy() == null;
-        check = check && StringUtils.equals(name.getProcessedComment(), deviceRevision.getProcessorComment());
+        check = check && name.getProcessedComment() == null;
 
         return check;
     }
diff --git a/src/main/resources/db/migration/V5__Data_transformation_status_deleted.sql b/src/main/resources/db/migration/V5__Data_transformation_status_deleted.sql
new file mode 100644
index 0000000000000000000000000000000000000000..5a172a122931b9c2f70dfeec3a8d57289225ed4e
--- /dev/null
+++ b/src/main/resources/db/migration/V5__Data_transformation_status_deleted.sql
@@ -0,0 +1,48 @@
+-- --------------------------------------------------------------------------------
+-- About
+--     transformation script
+--     postgresql 9.6.7
+-- Content
+--     data structures
+--         set most recent content (without latest) to deleted = true
+-- Note
+--     to have most recent in line of uuid without latest as deleted in order to be possible to query and find data when status attribute is removed as query parameter
+--         may affect entries with statuses PENDING, CANCELLED, REJECTED
+--         will not affect entries considered history
+--     strong (!) recommendation to make sure that no items with status pending exist prior to running this script (any such to be approved, cancelled, rejected)
+--     order of items is important
+-- --------------------------------------------------------------------------------
+
+-- --------------------------------------------------------------------------------
+-- structures
+--     systemgroup
+--     system
+--     subsystem
+--     discipline
+--     devicegroup
+--     devicetype
+-- --------------------------------------------------------------------------------
+
+update systemgroup s set latest = true, deleted = true where (
+                 not exists (select s2.id from systemgroup s2 where s2."uuid" = s."uuid" and s2.latest=true) and s.id = (select max(s2.id) from systemgroup s2 where s2."uuid" = s."uuid" and s2.latest=false)
+);
+
+update system s set latest = true, deleted = true where (
+                 not exists (select s2.id from system s2 where s2."uuid" = s."uuid" and s2.latest=true) and s.id = (select max(s2.id) from system s2 where s2."uuid" = s."uuid" and s2.latest=false)
+);
+
+update subsystem s set latest = true, deleted = true where (
+                 not exists (select s2.id from subsystem s2 where s2."uuid" = s."uuid" and s2.latest=true) and s.id = (select max(s2.id) from subsystem s2 where s2."uuid" = s."uuid" and s2.latest=false)
+);
+
+update discipline s set latest = true, deleted = true where (
+                 not exists (select s2.id from discipline s2 where s2."uuid" = s."uuid" and s2.latest=true) and s.id = (select max(s2.id) from discipline s2 where s2."uuid" = s."uuid" and s2.latest=false)
+);
+
+update devicegroup s set latest = true, deleted = true where (
+                 not exists (select s2.id from devicegroup s2 where s2."uuid" = s."uuid" and s2.latest=true) and s.id = (select max(s2.id) from devicegroup s2 where s2."uuid" = s."uuid" and s2.latest=false)
+);
+
+update devicetype s set latest = true, deleted = true where (
+                 not exists (select s2.id from devicetype s2 where s2."uuid" = s."uuid" and s2.latest=true) and s.id = (select max(s2.id) from devicetype s2 where s2."uuid" = s."uuid" and s2.latest=false)
+);