data management marco gonzales, pharm.d. ucsf, partners in e [email protected]
TRANSCRIPT
Data Management
Marco Gonzales, Pharm.D.UCSF, Partners in [email protected]
Objectives:
• Describe the core components of database management systems.
• Describe the differences between transactional data and analytical data.
• Describe the role of data warehouses, clinical data repositories and data mining in healthcare.
• Describe the various ways a pharmacist may interact with analytical data.
Fox
Chapters 6 & 7
Data(Numbers, dates, names, codes, descriptive text)
Information(who, what, when, where, how)
Knowledge(information transformed into something we can use)
“Data mining” helps us get to Knowledge Discovery in Databases (KDD)
Why is data managementimportant for the pharmacist?
• To effectively communicate with both clinicians & IT professionals in order to improve quality and efficiency of healthcare systems.
• To be data-independent, and not reliant on others to manage your data needs.
• To not be just a passive consumer of data.Rather, to actively participate in knowledge discovery from data… data is power.
Meaningful Use for Pharmacist?
Transaction Data
The data contained within a transaction or message event.
Every lab/x-ray order & result, every med order and administration, every claim and payment is transmitted and then stored in a system to be used later.
The primary use of most data is communication, like transmitting and messaging.
Transaction Data
Structured (and hopefully standardized) data are streamed ‘computer to computer’
Transactions may still be accessible as history.
HHS-mandatedHIPAA Transaction Standards
• In the pharmacy/medical domain:NCPDP Telecommunications D.ØASC X12 5010 (telecom)NCPDP SCRIPT HL7 v2 or v3
• ANSI-accredited Standards Development Organizations (SDO)– NCPDP (National Council for Prescription Drug Plans)– ASC X12 (Accredited Standards Committee)– HL7 (Health Level Seven)
Transaction Data
5827934|Garcia|Jerry|11.7|54.2|2343135827935|Moon|Keith|12.7|63.7|2963135827936|Bonham|John|12.1|55.2|2343135827937|Lennon|John|12.3|54.7|2343135827938|Cobain|Kurt|12.7|55.5|2343135827939|Murcury|Fred|13.2|60.2|2343135827940|Garcia|Jerry|12.5|59.9|2343135827935|Moon|Keith|12.7|63.7|2963135827935|Moon|Keith|12.7|63.7|296313
5827934|Garcia|Jerry|11.7|54.2|234313
The primary use of most data is communication, like transmitting and messaging.
In above use case, transaction was an HL7 message sent within an affiliated medical system
Lab
Transmission of lab results as a message
EHR
Transaction Data5827934|Garcia|Jerry|11.7|54.2|2343135827935|Moon|Keith|12.7|63.7|2963135827936|Bonham|John|12.1|55.2|2343135827937|Lennon|John|12.3|54.7|2343135827938|Cobain|Kurt|12.7|55.5|2343135827939|Murcury|Fred|13.2|60.2|2343135827940|Garcia|Jerry|12.5|59.9|2343135827935|Moon|Keith|12.7|63.7|2963135827935|Moon|Keith|12.7|63.7|296313
Transaction data: (example of one source)
Moon, Keith Clinic: Mission
AGE: 64 eRx:Y Consent:Y
Diagnosis History: 30 OCT 2012 PERSISTANT DEATH 25 SEP 1980 DEATH BY ASPHYXIATION
Lab History Lab 45 Lab 46 17 OCT 2012 12.7 63.7 05 OCT 2012 12.7 63.7 26 SEP 2012 12.7 63.7
Clinical data repository
Structure and store transactions for quick and reliable retrieval of patient-level “real-time” information
EMR/EHR
Might also be considered an Operational Data Store
updating
Transaction (Operational) Data
Transaction data is continuously inserted into EMR’s clinical data repository from various clinical sources to deliver real-time patient-specific information.Extracting data for standardized Quality Improvement (QI) and other population-based reports can be automated without manual chart reviews.
Pharmacy Data Example
• Pharmacy Provider Info• Patient (beneficiary) Info• Prescriber Info• Drug Info (Name(s), Strength, Quantity, mfg, aux
warnings, etc)• Date, Prescription Number, Barcode, Days Supply, Sig
Image source: http://www.pharmacy.ca.gov/licensing/labels.shtml
Transaction Data
7817934222|Garcia|Jerry|30|90|552223|…8148416605|Moon|Keith|30|30|552224|…0005027901|Bonham|John|30|30|552225|…6525558505|Lennon|John|60|60|552226|…8845788115|Cobain|Kurt|10|150|552227|…8058777701|Murcury|Fred|30|60|552228|…5525569330|Garcia|Jerry|30|90|552229|…5827936601|Moon|Keith|60|120|552230|…5827937601|Moon|Keith|30|30|552231|…
7817934222|Garcia|Jerry|30|60|552232|…
PayerPBM
The primary use of most data is communication, like transmitting and messaging.In above use case:• transaction used the NCPDP Telecom standard.• Transaction did not interact with EHR.
Rather, pharmacy interacted with a Pharmacy Benefits Manager (PBM)
Pharmacy
Transmission of pharmacy claim requesting reimbursement
Transmission of paid pharmacy reimbursement
7817934222|Garcia|Jerry|paid|$73.54|…
NCPDP
• Telecom (messaging for payment)• SCRIPT (messaging for ePrescribing)• Post Adjudication• Billing Unit Standard
• NCPDP Telecom Standard D.0• Sends real time online ‐ Rx data for payment.• Product Based Pricing from NDC
Transmitting Pharmacy Data for Payment
Transaction (Operational) Data• Transaction data can be difficult to summarize from native
applications. Mostly reliant on ‘canned’ reports.
• Transaction data may be difficult to query, unless user has special privileges and and/or special extraction skills.
• Used for adding, updating, omitting info in a standard view/list of patient’s “chart”.
• However,Patient’s “chart” can be packaged into a standardized HL7 document for exchange with another system. (CCD)
Transaction (Operational) Data
• Most EHRs are programmed in “M”
• M is robust for setting and retrieving key & value combinations, but …
• M is not user friendly, hard to link to other data sources, and potentially quite dangerous to the healthcare system.
Transactional (operational) Dataversus
Data Warehouse Analytical Data
Transactional data need to be extracted and then loaded into a data warehouse for substantive analytical database functionality to occur. i.e. ad hoc QI reporting, data mining and outcomes research,… or any kind of secondary use.
Analytical Data
Data that are stored and structured for analysis.
Transaction data that have been extracted, transformed, and combined with many other data sources into a database framework that allows: sophisticated reporting (QI, trending, financial), decision support, data mining, research extraction, or other type of complex/experimental population analysis.
Analytical Data
5827934|Garcia|Jerry|11.7|54.2|2343135827935|Moon|Keith|12.7|63.7|2963135827936|Bonham|John|12.1|55.2|2343135827937|Lennon|John|12.3|54.7|2343135827938|Cobain|Kurt|12.7|55.5|2343135827939|Murcury|Fred|13.2|60.2|2343135827940|Garcia|Jerry|12.5|59.9|2343135827935|Moon|Keith|12.7|63.7|2963135827935|Moon|Keith|12.7|63.7|296313
Transaction data: (example of one source)
Transaction sources and data from other data sources are periodically extracted and then loaded into a data warehouse for in-depth analysis.
Reports, Decision Support, Dashboards & Data Mining
Data Warehouse: Usually as tables within a relational database
ETL
SQLSASR
Relational DatabaseAn approach to designing databases based on mathematical set theory to ensure that data integrity is maintained during ‘update’, ‘add’, and ‘remove’.*
Standard Query Language (SQL) can effectively interrogate, query, and maintain database.
Business Intelligence. Data -> Info -> Knowledge
*Dumitru, D. The Pharmacy Informatics Primer. 2009 ASHP.
Relational Database
Table 2. Patients
Patient_ID Name Gender DOB2589 Marco M 2/29/19729987 Lisa F 4/30/19628976 Mike M 1/21/1966
Table 1. Pharmacy Prescriptions
RxNumber NDC DrugName Patient_ID7405 63402051001 Xopenex 25897407 63739052010 Prednisone 25897408 44183044001 Midrin 9987
• Normalized
• Joined by Primary Key and Foreign Key
• Tuple or Row. Column, Field, or Data Element
Foreign Key Primary KeyPrimary Key
Data Warehouse
Data Warehouse
5827934|Garcia|Jerry|11.7|54.2|2343135827935|Moon|Keith|12.7|63.7|2963135827936|Bonham|John|12.1|55.2|2343135827937|Lennon|John|12.3|54.7|2343135827938|Cobain|Kurt|12.7|55.5|2343135827939|Murcury|Fred|13.2|60.2|2343135827940|Garcia|Jerry|12.5|59.9|2343135827935|Moon|Keith|12.7|63.7|2963135827935|Moon|Keith|12.7|63.7|296313
Clinical data repository
This kind of operational data is great for patient care and canned reports.However, harvesting data could be tricky.
Normalized Relational DatabaseGreat for analytics, research & sophisticated reporting
Data Warehouse
7817934222|Garcia|Jerry|30|90|552223|…8148416605|Moon|Keith|30|30|552224|…0005027901|Bonham|John|30|30|552225|…6525558505|Lennon|John|60|60|552226|…8845788115|Cobain|Kurt|10|150|552227|…8058777701|Murcury|Fred|30|60|552228|…5525569330|Garcia|Jerry|30|90|552229|…5827936601|Moon|Keith|60|120|552230|…5827937601|Moon|Keith|30|30|552231|…
Periodic
extract, transfo
rm & load
Many Different Transaction Data Sources
Continuously updating
Structured Data• Unstructured is just free text or some binary artifact.
Computers are unable to “make sense” of data and is unable to do something with it. The computer just passes on the data to human for interpretation.
• Structured data utilizes Controlled vocabularies so information can be machine readable:
NDC, FDB GCNs, ETCs, & SKsSNOMED, ICD-9 -> ICD-10
Using Analytical Pharmacy Data
• Reporting (Fiscal and Quality)• Unsupervised Machine Learning:
– Fourier Transform– Principal Component Analysis => Plotting
• Predictive Analysis• Dashboards and Visualizations• Research
For example:• Formulary management• Clinical decision support• Policy development• Patient population healthcare management
Using Analytical Pharmacy Data
Data mining is defined as the process of discovering patterns in data.
Source: Witten & Frank (2005). Data Mining: Practical Machine Learning Tools and Techniques. Elsevier. 2nd Edition, p 5.
Safety SurveillanceSaving MoneyOutlier DetectionFinding Topics to Research
Databases & Business Intelligence Tools
1. MS Access, MySQL, Oracle, …2. SAS, SPSS, STATA, MATLAB, & R3. WEKA & Python (with ML Libraries)
4. Business Objects5. MS Excel6. GraphViz7. Online tools (mind your PHI)
Tip for working with “little data”
preparing
understand what data elements are available and which ones you will need. for example, do you need to consider other explanatory variables. create practice data and go thru the entire exercise.
sample size
spreadsheets and database what tools will you need?
collecting
download and import whenever possibledata cleansing?
if not, meticulously gather & transcribe
assume you will need to export data to another software program. i.e. keep your data clean
keep your data clean
small and descriptive data element names, without spaces or special characters.ex) DtService, PtId, NDC, DrugDesc, Prescriber, …
use discrete buckets- limit the possible values for categorical variables and be consistent with your convention
if you really must, you may have one field for all of your messy notes
keep your data clean
use existing controlled terminologies, if possible.ex. SNOMED, ICD-9, DSM, RxNorm, NDC, MRN
or, create your own controlled way to express your data, without using subjective and inconsistent free-text.
keep your data clean
keep your data clean
keep your data clean
IDServiceDatehiclgnnMRNQTYDaysSupplyPrescriberNotes
hiclgnnCategoryPriceClassMax
NPIProvNameAddressCityStateProvType
Edward Tufte
• Data-Ink Ratio:
• A large share of ink on a graphic should present data-information, the ink changing as the data change. Data-ink is the non-erasable core of a graphic, the non-redundant ink arranged in response to variation in the numbers represented.
chartjunk
please read Edward Tufte “data-ink-ratio”
chartjunk
chartjunk
A B
C
Some Recent Work
Heatmap
SAS 9.2™
Unsupervised Machine Learning
SAS 9.2™
Social Network Analysis
GraphViz™
Predictive Analysis: Regression
GeoSpatial
Medi-Cal Pharmacy Providers that “specialize” in HIV
GeoSpatial
FFT: Normal
FFT: Abnormal
After Intervention($1.4M recovery)
Flow Analysis
Westminster gets has high transactions per prescriber 55
Slopegraph
DASHBOARDS
Conclusion
• Operational Data and Analytical Data have different functions
• Pharmacists need to understand where data come from, how we can get it, and how we can use it.