Issue Number | 4839 |
---|---|
Summary | Clean up DLL code |
Created | 2020-06-08 19:48:37 |
Issue Type | Improvement |
Submitted By | Kline, Bob (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2020-11-18 14:34:25 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.263636 |
The C++ code for the CDR DLL underneath XMetaL has suffered from neglect over the years, and is well overdue for some spring cleaning (or fall cleaning, if that's when Maxwell is tackled). This was brought home to me when I had occasion to show Volker some of it and I realized I wouldn't want any other developer to have to deal with the code in the state it's in. This is particularly true of the XML handling, which is largely home-grown parsing and creation, because of the poor state the existing tools were in when the project started.
This has been implemented in the ocecdr-4839
GitHub
branch and I'm going through my own testing suite.
Developer testing on CDR DEV complete. Here is the set of commands exposed by the DLL. Many are marked as unchanged, meaning there should be no impact of this cleanup for those commands (though bug reports against them are accepted cheerfully).
Command |
Location |
Unchanged |
Passed Developer Testing |
---|---|---|---|
acceptOrRejectMarkup |
Review All Changes on CDR Markup menu |
✔ |
✔ |
addGlossaryPhrase |
Add Glossary Phrase on context menu |
|
✔ |
advancedSearch |
Advanced Search icon on CDR toolbar |
✔ |
✔ |
checkIn |
Unlock on the CDR menu |
|
✔ |
chooseRevisionLevel |
Apply Revision Level on context menu |
✔ |
✔ |
edit |
Ctrl+Enter in linking element |
|
✔ |
editComment |
Edit Comment & View Comment on context menu (editing comment attributes on protocol or citation links) |
✔ |
✔ |
getBoardMemberId |
Open Board Member Doc icon on Person toolbar |
|
✔ |
getGlossaryTermNameIds |
View GT Name Docs & Edit GT Name Docs icons on GTC toolbar |
|
✔ |
getGlossaryTermNames |
Term Names icon on GTC toolbar |
|
✔ |
getNextValidationError |
Alt+E after validation command |
✔ |
✔ |
getOrgAddress |
Retrieve Org Postal Address on context menu from OtherPracticeLocation element in Person document |
|
✔ |
getPatientDocId |
Patient icon on the toolbar for an HP summary |
|
✔ |
getTranslatedDocId |
Toolbar icon for opening Spanish summary or media doc |
|
✔ |
get_hostname |
used for any action which opens a web page on the tier's CDR server |
✔ |
✔ |
get_selectionCharacterCount |
Character Count on the context menu |
✔ |
✔ |
get_session |
Used by any command launching a CDR admin web page needing a login session (e.g., Checked Out icon on the CDR toolbar |
✔ |
✔ |
get_userPath |
Used for finding local file resources, such as CSS files or templates |
✔ |
✔ |
get_username |
Used for things like populating Insertion/Deletion attributes and the User Name icon on the CDR toolbar |
✔ |
✔ |
glossify |
Used by the glossify toolbar icons and context menu |
|
✔ |
launchBlob |
Launch Media File on the Media toolbar |
|
✔ |
logClientEvent |
Used internally (not testable by users) |
|
✔ |
logoff |
Invoked when XMetaL is closed (not testable by users) |
|
✔ |
logon |
Invoked when CDR XMetaL is launched; if this succeeds the Document Type dropdown on the Search dialog will be populated |
|
✔ |
navigateComments |
Find Comments icon on the CDR toolbar |
✔ |
✔ |
navigateMarkup |
Find Next Change on CDR Markup menu |
✔ |
✔ |
openCdrDoc |
Invoked by any action which results in loading a CDR document into a pane in XMetaL |
|
✔ |
pasteDocLink |
Paste Fragment Link on the context menu |
|
✔ |
retrieve |
Retrieve [by ID] icon on the CDR toolbar |
|
✔ |
save |
Save icon on the CDR toolbar |
|
✔ |
search |
Search icon on the CDR toolbar |
|
✔ |
setTitleBar |
Puts "CDR Editor (TIER NAME)" on the XMetaL application title bar |
✔ |
✔ |
showPage |
Used when launching a CDR web page (such as Publish Preview) |
✔ |
✔ |
validate |
Validate on the CDR toolbar and menu |
|
✔ |
The most significant change was the replacement of home-grown XML parsing and building tools with wrapper classes built around Microsoft's MSXML. Because this change affects most of the publicly exposed commands, testing for memory leaks or crashes was a high priority. So I created a script which exercised each of the methods provided by the new classes in a loop which executed as many times as specified on the command line. I performed several runs of one million iterations each, and there were zero crashes and zero memory leaks.
Merged into the newton
branch.
Looks good on QA.
I've tested what I could without actually making changes to documents in PROD. Everything looked good to me - closing ticket.
Elapsed: 0:00:00.001711