Issue Number | 4425 |
---|---|
Summary | [Summary] Fragment ID not displaying in XMetal for Misc. Doc Links |
Created | 2018-02-20 20:14:14 |
Issue Type | Bug |
Submitted By | Osei-Poku, William (NIH/NCI) [C] |
Assigned To | Englisch, Volker (NIH/NCI) [C] |
Status | Closed |
Resolved | 2018-03-07 11:36:07 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.221470 |
Misc. Docs links usually display the inline text as well as the fragment ID in XMetal. However, we are finding out that this is not happening for new links recently. Only the inline text is displaying although the attribute inspector is displaying the CDR ID and fragment id correctly. Please see attached sample screenshots.
How do you enter this element? I don't seem to be able to select a fragment ID and when I select a misc. document it doesn't include a fragment that could be displayed.
You need to go into the Misc. Doc and Copy fragment link from there and then Paste the fragment link within the Misc Doc Link element in the summary.
~bkline, this looks like it may be a Gauss bug.
When the user adds a MiscellaneousDocLink and selects a fragment, the element text is first displaying the DocTitle
Patient Summary Fragments;Patient summary fragments
which gets replaced by the DocTitle up to the semi-colon, I think
Patient Summary Fragments
once the summary is saved.
If the user enters a document fragment link, however, the replaced text
would include the fragment ID
Patient Summary Fragments[Spanish] [_53]
but the system isn't replacing the original text anymore.
I have a strong feeling this again is related to a problem with the
hash-sign when filtering the misc. doc with a fragment link.
Could you point me to where the saved document updates the displayed text in the original document? I'm guessing this is done via a filter.
Could you point me to where the saved document updates the displayed text in the original document? I'm guessing this is done via a filter.
If you take a look at this summary CDR0000256491 on PROD and scroll down to the "Treatment for adult primary liver cancer may cause side effects." section, you will find one there and several below that section.
Sorry, ~oseipokuw, the question was actually for Bob. I wanted to know where in the CDR code the document gets saved and the link text gets filtered.
I think you're looking for the Fast Denormalization Filter (CDR0000000095). From a cursory glance, I'm going to guess it won't work properly if the `cdr:ref` attribute's value has a hash character in it.
xsl:template match = "*[@cdr:ref != '']">
<xsl:variable name = "link"
< select = "@cdr:ref"/>
xsl:variable name = "fragId">
<xsl:if test = "contains($link, '#')">
<xsl:value-of select = "substring-after($link, '#')"/>
<xsl:if>
</xsl:variable>
</xsl:variable name = "uri"
< select = "concat('cdrx:', $link, '/DocTitle')"/>
xsl:variable name = "tmp">
<xsl:value-of select = "document($uri)/CdrDocTitle"/> <!-- fails for # -->
<xsl:variable>
</xsl:variable name = "title">
<xsl:choose>
<xsl:when test = "contains($tmp, ';')">
<xsl:value-of select = "substring-before($tmp, ';')"/>
<xsl:when>
</xsl:otherwise>
<xsl:value-of select = "$tmp"/>
<xsl:otherwise>
</xsl:choose>
</xsl:variable>
</xsl:element name = "{name()}">
<xsl:apply-templates select = "@*"/>
<xsl:choose>
<xsl:when test = "$title=''">
<xsl:apply-templates/>
<xsl:when>
</xsl:otherwise>
<xsl:choose>
<xsl:when test = "$fragId=''">
<xsl:value-of select = "$title"/>
<xsl:when>
</xsl:otherwise>
<xsl:value-of select = "concat($title, ' [', $fragId, ']')"/>
<xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:template> </
I guess this is one of the filters we hadn't gotten to yet in the unit testing process.
Yes, that's what I was looking for. Thank you!
This problem has been fixed on DEV and QA by modifying the following filter:
CDR000095: Fast Denormalization Filter [cdr4425-fragid 3fa0d96]
Please verify on QA (since DEV is still sick).
Verified on QA. Thanks!
This change has been moved to STAGE and PROD.
Please verify on PROD and close the ticket.
~oseipokuw can we close this ticket since the filter changes are already in production?
Yes, this can be closed. I will go ahead and close it. Thanks!
File Name | Posted | User |
---|---|---|
Misc Doc Link.png | 2018-02-20 20:13:03 | Osei-Poku, William (NIH/NCI) [C] |
Misc Doc Link ERROR.png | 2018-02-20 20:13:03 | Osei-Poku, William (NIH/NCI) [C] |
Elapsed: 0:00:00.001857