converting reports from npr to sql - acmeware repo… · · 2015-07-20converting reports from npr...
TRANSCRIPT
Converting Reports from NPR to SQL
2015 MUSE International
Session #703
Date/Time: Tuesday, May 23rd, 9:30am
Presenter: Glen R. D’Abate
Workshop Objectives
To review, compare and contrast the
design, development, deployment,
security and validation processes
encountered when reconstructing NPR
reports in a Data Repository (DR), SQL
Server environment. This evaluation is
often necessary when converting from
MAGIC or Client Server to a MEDITECH
6.X environment
Workshop Agenda
• Pros and cons of DR/SQL report solutions versus NPR RW or Report Designer (RD) based solution
• IDE (Interactive Development Environment) comparison between NPR and DR/SQL
• How are report writers trained and who can be a report author
• How reports are organized, accessed, secured and audited
• Scheduling reports to execute automatically
• Examples of NPR to DR report conversions
• Open discussion
Data Repository – Report Development • Uses industry standard Structured Query Language (SQL) for report business logic
development
• Can use industry standard report presentation development environments (SQL Server Reporting Services SSRS, Microsoft Access, Query from Excel, Crystal Reports, Cognos, etc.)
• Runs in a “report processing” environment, not “transaction processing” environment (i.e., report execution will not impact application users)
• Retains data after it is purged from live environment
• Optimized for reports that run over large datasets (e.g., data analytics, retrospective reporting, studies, predictive analysis)
• Environment can be optimized with addition of indexes
• Easily integrated with other data from open systems
PROs
CONs
• Data is not from source of truth (this lies in application database)
• New environment and language to learn
NPR RW / Report Designer - Development
• Large investment in NPR report development
• Investment in NPR training over many years
• Large knowledge base and set of code samples available on line
• Easy to attach to user Menus and control user access to reports
• Report Designer may not require programming knowledge
• Runs directly against source of truth (application databases)
PROs
CONs
• Proprietary language – developer must be specifically trained
• Slow processing….especially when across applications and computational analytics
• Shared environment and interferes with day-to-day users trying to get there work completed
• RD, requires code logic only through the Creation of Rules (i.e., no direct access to source code and limitations to developing complex logic)
• Limited output formatting options and inability to use industry standard reporting tools
• In 6.0 and 6.1 NPR RW limited access to NPR DPMs.
• RD slow to retrieve M-AT data, slower to retrieve NPR data
Application Database Technology
Reporttool
Application Access
DR Access to all application in all technologies. livedb, livendb, livefdb.
NPR Limited to NPR application regardless of technology. Inefficient across moduless
RD Available in 6.Xonly. Efficient for M-AT structures, Inefficient for NPR structures
DR Developer Environment
Microsoft Visual Studio, a.k.a. Data Tool (2012) and Business Intelligence Development Studio (BIDS) in 2008
Same development environment as VBasic, VC#, VC++, etc.)
NPR / Macro Code Example
Macro code can reference NPR object codes or be written at the compiled programming level
Brining data together across applications database requires fragments, prefix management, etc.
DR / SQL Code Example
DR report data extract logic is developed using ANSI standard SQL extended by Microsoft to Transact-SQL
DR code is typically packaged and saved in SQL Stored Procedure objects
NPR C/S – Data Intense Report
Non-indexed Example: Find charges by insurances with a specified Service Date range, not Batch Date
Complex Example: Meaningful Use VTE-3 (Venus Thromboembolism - Patients with Anticoagulation Overlap Therapy
Computational Example: Find average charges by DRG and Provider over past 3 years
SQL Server – Data Intense Reporting
• DR environment dedicated and optimized for report generation, not transaction processing
• When real-time information is not require, datamart extractions can be further report optimization and performance
• Data indexes can be added to produce data “seeks” not “scans”
• “Data types” are stored and processed much more efficiently than data “strings”
• SQL Analysis Services pre-compiles data into a multi-dimensional database for optimal data aggregate reports (i.e., slicing and dicing across dimensions and viewing aggregate measures like totals, counts, averages, max, min, etc.)
RD Has Some Additional FormattingMnemonic Name Description Choices
BarcodeHeightInches Barcode Height (Inches)
Allows the height of the barcode to be defined. The BarcodeType attribute must be defined prior to BarcodeHeight.
Positive Decimal (2 Decimal places max)
BarcodeOrientation Barcode Orientation
Allows the orientation of the barcode to be defined. The BarcodeType attribute must be defined prior to BarcodeOrientation. Horizontal, Vertical
BarcodeType Barcode Type Allows the barcode type to be defined. 39, 128A, 128B, 128C
BarcodeWidthInInches Barcode Width (Inches)
Allows the width of the barcode to be defined. The BarcodeType attribute must be defined prior to BarcodeHeight.
Positive Decimal (2 Decimal places max)
BgColor Font Background Color Defined the Background Color for a Field.
Black, Blue,Dark, Gray, Green, Light Gray, Red, White, Yellow
Bold Font Bold Determines if a Field should print Bold. Yes/No
FgColor Font Foreground Color Defines the Foreground Color for a Field.
Black, Blue,Dark, Gray, Green, Light Gray, Red, White, Yellow
FontSize Font Size
Defines the size of the field as it will appear on a report's output. Overrides the size of the field from the font size set for the whole report on the General Page. Numbers 0 thru 9
FontStyle Font Style
Defines the Font Style for a Field. Overrides the style of the field from the font type set for the whole report on the General Page.
Fixed, VariableSerif, VariableSansSerif
ImageHeightInInches Image Height (Inches)
Defines the Height in inches for an image. ImageWidth is required before ImageHeight can be defined. Only valid for certain data types.
Positive Decimal (2 Decimal places max)
RD can embed images and barcodes but data presentation is still highly restricted
DR / SQL Charts, Maps, Graphs & more
Registrations by County
Small sample of data presentation options available directly from VS
Lots of 3rd party add-ins (e.g., Dundas controls)
Report Writer Development Features
Basically, any report writer tool will have a similar set of base functionality that is used in the:• identification and selection of data
• filtering of records
• paging & grouping of data
• sorting of information
• field formatting and layout
• presentation design
• linking to additional report detail
• passing of parameters
IDE Applications (NPR / DR)NPR RW Application is launched from MEDITECH Menu
NPR RW performs both data extraction and data presentation functions
DR reporting Typically separates data extraction and data presentation functions, though not required
Typically SQL Stored Procedures perform data extraction into datasets
Visual Studio Data Tools (formerly BIDs) performs formatting, layout, etc.
NPR General Tab
Source location of data
Title
Index
Page Formatting
Header & Trailer Details
Report documentations
DR / SQL Equivalent (SSRS)
Column Layout
Report Sections
Field Headers
No need to use shorthand names in layout
NPR RW Development Environment
Call to Macro, perhaps to Frag to another segment
Additional MAGIC Code referenced
DR / SQL Equivalent (SSRS)
Call to embedded subreport
Can pass parameters to subreport similar to \FRAG.R.VAL[#]
NPR RW Training
• Basic and advanced training available from MEDITECH and other ancillary vendors
• Requires technical capability (read programming skills) to write sophisticated reports
• Extremely capable report writing environment with 30+ years of development and hundreds of trained developers
• Good resources available on-line at MEDITECH and from 3rd parties
• Dying technology with conversions to 6.X
MEDITEH web site with a vast amount of NPR RW content
On line webinar classes available from MEDITCH
Four day class from MEDITECH goes through all of the features of RD
Nine pages of configuration options versus three for NPR
No Programming Required (the real NPR?) . What does that mean for report development?
DR / SQL Server Reporting Services (SSRS) Training• Different level training courses available from Microsoft and many other
vendors and schools
• Easier to learn on your own, with Google, You Tube.
• Content is not DR specific
• SSRS Environment includes Visual Studio as well as less technically challenging Report Builder ad-hoc report writing toolc
SSRS Report Development Tool Set
SSAS is easiest to use. Drag &
Drop, Slice & Dice. Only provides
numeric analysis. Difficult to
develop & modify data.
Functionality similar to ESS.
Report Projects require programmer-level technical
skill set to develop reports. Uses Visual Studio
programmer environment for report development.
Most flexibility in report design and can link to
complex T-SQL statements for reports requiring data
manipulation and analysis.
Too Hot!
Too Cold!
Just Right!Report Builder allows non-technical users to build
and format custom ad-hoc reports. Report
developers need not understand data relationships.
Requires IT to build Report Models which limit
available data columns. Complex data analysis /
manipulation is not possible.
SSRS Report Manger – DR/SQL Reports
Report Manger is Web “Front End” component of SSRS, which is part of SQL Server database on which DR resides
SQL Server offers an alternative to Report Manager by deploying reports to Microsoft SharePoint Server
SQL / DR Reports in a Web Application
SQL / DR reports can be easily organized, accessed and launched from any web-based application
Adding an NPR Report via MIS Menu
Identify a Menu
Menus can have additional menus added or can directly access a NPR RW report
Adding DR/SQL Reports to Menus
Microsoft Visual Studio (BIDS 2008 or Data Tools 2012)
SQL Server Report Projects are linked to a web server URL address
Reports can be entered at the parent level or within a folders hierarchy
Adding a DR/SQL Report to an NPR Menu
•%Z.link.to.shell() MAGIC•@Shell.execute() CS•@Call.windows() 6.X
Client PC must have a browser installed and access to web server containing DR/SQL reports
Assigning Users to Profiles
Security can easily be replicated by assigning Users to a pre-defined Profile
Active Directory Security for SQL/DR
Users and Groups can be assigned at the report level or inherited from the folder level
Security at the Database Level
Groups and Users can be assigned have access limited at the Table Level, Column Level and even at the Data Level
Through use of Views and access to SQL objects, users can have data limited access:
• to non-confidential patients• exclude certain lab results• specific MEDITECH modules or
dictionaries
NPR Menu Based Access and Auditing
User Activity can be audited based on who ran what Menu item and what patient account may have been accessed and viewed
User Activity can only be maintained in the application database for a short period of time
NPR Database Access Auditing
When an NPR Report Writer accesses PHI data directly (using Macro logic or dropping into programming mode), it may be difficult or impossible to identify who accessed what PHI data
While developing and testing an NPR report, access to PHI data is not logged
Tracking Access to PHI Data in DR/SQL
• Tracks who ran a SSRS report• When it was run• What parameters were passed• Location of report
Tracking Access to PHI DR/SQL Database
• SQL Standard Edition – build Trace manually
• SQL Enterprise Edition – use Security Audit feature
• Third party application option
SQL Job Scheduler
SQL Agent Job Scheduler is used for database query execution
Can be used for:• Compiling data to a datamart• Exporting “raw” data to a file share• Initiating a SSIS Package to FTP, Send
XML, Launch a process, and an almost unlimited number of other database related actions
SQL Job Creation
SQL Agent Jobs can be comprised of may components
Downtime MAR Example:• Runs a SP• Saves results to a file• Converts to .pdf• Distributes to Nursing Units• Removes old version• Alerts Operator on any
failureExtremely flexible scheduler
Report Subscription Options
To E-Mail or File Share
Report delivery and configuration options
Enterprise edition has option for data drive report subscriptions
Example #1
Develop a report that allows the user to select a Facility then displays all current inpatients in the Facility. Group patients by Service then by Location and sort the patients by Room and Bed within each location. Output Service, Location, Name, Acct #, DOB, Room and Bed
Example #2
Develop a report that identifies patients who have had a Glucose Test within a given date range for a specified Facility. Group the results by Attending Provider and list basic patient demographics and the laboratory test results including status, abnormal flags and normal ranges
Discussion, Q&ACome see our other MUSE sessions or visit us at
Booth #516!
• Tuesday 5/26 9:30-12:00
701 - Soup to Nuts – Data Repository 101
703 - Converting reports from NPR to SQL
• Tuesday 5/26 1:00-3:30
801 - Soup to Nuts – Data Repository 102
803 - Alphabet Soup of Clinical Quality Reporting
• Wednesday 5/27 10:30
1095 - Using Meditech Data to Drive Clinical Decision Support
• Thursday 5/28 9:15
1094 - Meaningful Use Audit, Is Your Organization Ready?
1133 – Click Here to Upgrade your DR to 6.1