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 |
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.
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]
Ready for user testing on DEV.
Verified on DEV. Thanks!
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.
Tier, please?
On QA. Thanks!
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.
Okay, thanks! Can it be enhanced in the future to include items in list items?
Verified on QA.
Sure.
Verified on PROD.
Elapsed: 0:00:00.001358