CDR Tickets

Issue Number 4284
Summary Glossary Term and Variant Search report broken on PROD
Created 2017-07-11 15:19:42
Issue Type Bug
Submitted By Osei-Poku, William (NIH/NCI) [C]
Assigned To Kline, Bob (NIH/NCI) [C]
Status Closed
Resolved 2017-10-26 11:37:46
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.211254
Description

It looks like the glossary term and variant search report is broken on on PROD. It appears there is a bug that is conflicting English terms with Spanish terms. I haven't checked on the lower tiers yet. When you enter certain terms or phrases like "chemotherapy", which is used in many summaries, no results are produced. However, the header of the report records the name of the Spanish term even though you select English.

To recreate the problem:
1. Type "chemotherapy" in the Term Name Field
2. Select Patient Summaries under Document Types
3. Leave English as default under Language and click on submit.

You should see the results page without any selected summaries and also the "English Term" header should read "quimioterapia".
Certain terms like "Radiation therapy". "Gene", "Biological therapy" and "Diagnosis" appear to produce the desired results. However, it still displays the name of the Spanish term instead of the name of the English term.

Comment entered 2017-07-12 16:13:59 by Kline, Bob (NIH/NCI) [C]

Patch for fix:

--- CdrLongReports.py-original  2017-05-11 10:29:37.897477400 -0400
+++ CdrLongReports.py   2017-07-12 16:10:08.375900200 -0400
@@ -1501,7 +1501,8 @@
         Glossary term and all phrases used for it.
         """

-        NAME_PATH = "/GlossaryTermName/TranslatedName/TermNameString"
+        ENGLISH_NAME_PATH = "/GlossaryTermName/TermName/TermNameString"
+        SPANISH_NAME_PATH = "/GlossaryTermName/TranslatedName/TermNameString"

         def __init__(self, cursor, id):
             """
@@ -1509,7 +1510,7 @@
             """

             query = cdrdb.Query("query_term", "value")
-            query.where("path = '%s'" % self.NAME_PATH)
+            query.where("path = '%s'" % self.ENGLISH_NAME_PATH)
             query.where(query.Condition("doc_id", id))
             rows = query.execute(cursor).fetchall()
             if not rows:
@@ -1517,7 +1518,7 @@
             self.id = id
             self.name = rows[0][0]
             query = cdrdb.Query("query_term", "value")
-            query.where("path = ''")
+            query.where("path = '%s'" % self.SPANISH_NAME_PATH)
             query.where(query.Condition("doc_id", id))
             rows = query.execute(cursor).fetchall()
             self.spanish_names = [row[0] for row in rows]
Comment entered 2017-09-08 09:49:39 by Kline, Bob (NIH/NCI) [C]
Comment entered 2017-09-13 13:45:33 by Osei-Poku, William (NIH/NCI) [C]

Verified on DEV. Thanks!

Comment entered 2017-10-25 13:46:52 by Osei-Poku, William (NIH/NCI) [C]

When we run the report for oculodermal melanocytosis - CDR0000785690, and select "Patient Summaries", nothing shows up on the report. However, we expect to see at least CDR0000062878 which contains a link to the GTN but nothing shows up.

Comment entered 2017-10-25 18:47:07 by Kline, Bob (NIH/NCI) [C]

Tier, please?

Comment entered 2017-10-25 18:49:35 by Osei-Poku, William (NIH/NCI) [C]

On QA. Thanks!

Comment entered 2017-10-26 11:37:37 by Kline, Bob (NIH/NCI) [C]

I was able to track down the cause of this behavior to the fact that "oculodermal melanocytosis" doesn't appear in running text, but is instead the content of a <li>...</li> element. This behavior is unrelated to the issue reported for this ticket.

Comment entered 2017-10-26 12:39:29 by Osei-Poku, William (NIH/NCI) [C]

Okay, thanks! Can it be enhanced in the future to include items in list items?

Comment entered 2017-10-26 12:39:48 by Osei-Poku, William (NIH/NCI) [C]

Verified on QA.

Comment entered 2017-10-26 13:05:59 by Kline, Bob (NIH/NCI) [C]

Sure.

Comment entered 2017-11-30 11:27:39 by Osei-Poku, William (NIH/NCI) [C]

Verified on PROD.

Elapsed: 0:00:00.001358