SQL: Visibility Cleanup: Diagnostic Tests

OP sets all defaults to share all information. Any individual decisions by Practice-users to restrict information sharing (access, use, or exchange) are the responsibility of the Practice in the implementation of its 21st Century Cures Act Information Blocking policies and procedures for its Practice and patients.

About

The report will list the Diagnostic Test requisitions that can be considered sensitive. 

A sample image of this SQL report run in the Database Viewer is shown below:

Caveats

The SQL will list all diagnostic tests ordered for an entered date range. It is suggested the practice run the report for one year and make adjustments dependent upon speed and performance. In order to organize tests, click the TEST_NAME header or the filter button and select the diagnostic test from the list. Any test in the list, where the HEADER_PRIVACY contains a C, the diagnostic test is restricted. Any test in the list, where the HEADER_PRIVACY contains an A, the diagnostic test is not restricted and will display on the Patient Portal.

Code

To highlight and copy the code below to your clipboard, simply click the Copy button.

select distinct patno, fname, lname, birthdat, staffname as ordered_by, date1, test_name, lab_name, cptcode, dtoh.privacy_level as header_privacy, privacy_level as order_privacy from diag_test_order dto
inner join staff1 on staff1.staffid = dto.reqby_addr_id
inner join diag_test_order_header dtoh on dtoh.diag_test_order_header_id = dto.diag_test_order_header_id
inner join register on register.patno = dto.patno
 where date1 between :Start_date and :end_date