CDR Tickets

Issue Number 3798
Summary Custom validation rule for TranslationOf element
Created 2014-09-03 12:00:41
Issue Type New Feature
Submitted By Osei-Poku, William (NIH/NCI) [C]
Assigned To alan
Status Closed
Resolved 2015-01-29 13:50:31
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.137271
Description

We would like a new custom validation rule implemented on the TranslationOf element of the summary schema. This will prevent the occasional user error of failing to link to the correct summary and consequently creating a toggle error on Cancer.gov. The rule should be:

1. When the TranslationOf element is selected for a Spanish HP summary, the summary to be retrieved should be an English HP summary and…

2. When the TranslationOf element is selected for a Spanish Patient summary, the summary to be retrieved should be an English Patient summary.

Comment entered 2014-10-09 11:25:25 by alan

We added a custom rule in March 2014 that validates that the languages match. I'm assuming that works fine, so I'll just add a similar rule with similar logic to ensure that the SummaryAudience values also match.

Comment entered 2014-10-09 11:52:37 by alan

Actually, the rule we added in March isn't exactly what we need to match for languages here. I'll therefore be adding two new validation tests, one for language and one for audience.

Comment entered 2014-10-14 16:57:57 by alan

I believe that I have this working on DEV. It can be tested there.

There was no change to software, just to the SummarySchema.xml file.

Comment entered 2014-10-16 12:23:30 by Osei-Poku, William (NIH/NCI) [C]

This appears to be working on DEV. Thanks! I will test with a few more documents and sign off on DEV.

Comment entered 2014-10-30 10:56:46 by Osei-Poku, William (NIH/NCI) [C]

Verified on DEV.

Comment entered 2014-10-30 18:47:43 by alan

I have verified that the modified schema that implements the new rules has no other changes from the Summary schema in production. We can install the new schema into production without requiring CBIIT assistance.

I have removed the CDR-Awaiting Release label.

The new schema is in the Ampere branch in subversion.

Comment entered 2015-01-22 08:04:58 by Osei-Poku, William (NIH/NCI) [C]

This change does not appear to be on QA yet. A search retrieves both HP and Patient summaries.

Comment entered 2015-01-22 11:59:38 by alan

I'll check it out.

Comment entered 2015-01-29 11:55:20 by alan

Sorry it took me this long to get to this.

I don't remember whether I updated the schemas before or after you did your test on QA (which I had not done in the original QA deployment), but I must have done it after your test. The updated schema fixes the problem.

To test again, I called up the Nausea and Vomiting Spanish document 256629 in XMetal and ran schema validation. That worked fine. Then I modified the TranslationOf element cdr:ref to point back to itself, 256629, i.e., a Spanish language document declared as the translation of a Spanish language document. That failed validation, as it should.

So I'm thinking that everything is okay here.

Please re-test.

Thanks.

Comment entered 2015-01-29 17:11:28 by Osei-Poku, William (NIH/NCI) [C]

I think this had been working all along. I had forgotten about how it is supposed to work. I thought that it should prevent me from retrieving summaries that had mismatched audience but instead, it is let's you see both audiences however, when you choose the incorrect audience, it displays a validation error message. Sorry about this, Alan. I have tested it now and it is working correctly.

Comment entered 2015-01-29 17:11:41 by Osei-Poku, William (NIH/NCI) [C]

Verified on QA.

Comment entered 2015-02-16 09:03:07 by Osei-Poku, William (NIH/NCI) [C]

Verified on Stage

Comment entered 2015-02-19 12:27:22 by Osei-Poku, William (NIH/NCI) [C]

Verified on PROD.

Elapsed: 0:00:00.001542