Hi,
I'm trying to verify some data here with the sample database that OC kindly provided. particularly I'm looking at Discrepancy Notes. And if my understanding is correct, the three table of discrepancy_note, discrepancy_note_type and resolution_status would provide us with all the key info to us.
Here I'm looking into three things or from three angles. The data and sql queries that I construct to get on-demand data view, the existing data view such as Views that came with OC, and the OC web portal. And I'd like to see if they are all or largely consistent.
I'm a bit puzzled by the following finding.
-- run two sql queries
-- a) with the existing View about discrepancy notes
SELECT *
FROM view_discrepancy_note
order by discrepancy_note_type_id;
-- results
/*
3 of discrepancy_note_type_id 1 Failed Validation Check
1 of 2 Incomplete
2 of 3 Unclear/Unreadable
1 of 4 Annotation
5 Other
6 Query
7 Reason for Change
*/
-- b)
-- construct a straight-forward sql query to get discrepany notes, its type and status
select distinct dnt.name as note_type, dn.*
from discrepancy_note dn, discrepancy_note_type dnt
where dn.discrepancy_note_type_id = dnt.discrepancy_note_type_id
and dn.parent_dn_id is null
order by dn.discrepancy_note_type_id
Both returns identical results. However, the following baffles me.
According the sql queries,
Q1:
discrepancy_note_id of 5 has data of 2 for discrepancy_note_type_id. According to the discrepany_note_type look up table, discrepancy_note_type_id of 2 is for "Incomplete" notes, but it seems the OC portal has it for "Annotation".
Q2:
discrepancy_note_id of 9 has data of 3 for discrepancy_note_type_id. According to the discrepany_note_type look up table, discrepancy_note_type_id of 3 is for "Unclear/Unreadable" notes, but it seems the OC portal has it for "Query".
Q3:
discrepancy_note_id of 11 has data of 4 for discrepancy_note_type_id. According to the discrepany_note_type look up table, discrepancy_note_type_id of 4 is for "Annotation" notes, but it seems the OC portal has it for "Annotation".
So, what are correct?
Many thanks.
Don
P.S.
A note on the OC new forum, if you're using Chrome browser, the way to move from Discussion Title to [ Body ] area is to use the Tab key, attempt to use cursor directly won't work while it works fine with IE11
Answers
Hello Don,
This puzzling situation was also addressed at: https://forums.openclinica.com/discussion/4680/problems-concerning-recording-and-presentation-of-discrepancy-note-information/p1
Bottomline is: do not use discrepancy_note_type.
I think you will find what you're looking for in DiscrepancyNoteType.java of the source.
Hope this helps,
Gerben Rienk
http://www.trialdatasolutions.com
Is "DiscrepancyNoteBean" what your looking for ?
If you're looking for the class file on your web server, it's within the
OpenClinica-core*.jar (that's in your webapp lib folder, e.g.
webapps/OpenClinica/WEB-INF/classes/OpenClinica-core-*.jar). But isn't
it easier to have a look at the source code?
Regards,
Christian
The discrepancy note type is a bunch of static variables its been defined here
DiscrepancyNoteType.java under this directory org.akaza.openclinica.bean.core
Please note that we have hibernate files in 3.1-SNAPSHOT which look similar and will have similar name but it will be under dataMap folder. These files are not tied to the entire system yet.