Building a Portfolio with Electronic Health Records (EHR) Data

By Dr. Zubair Khalid, DVM, MS, PhD ·

Building a Portfolio with Electronic Health Records (EHR) Data

Quick Answer

  • Build a health data science portfolio using publicly available electronic health record datasets such as MIMIC-III, which bypasses patient privacy barriers while demonstrating real clinical data skills.
  • Focus projects on reproducible data cleaning pipelines, predictive modeling with clear evaluation metrics, and documentation that shows clinical context understanding.
  • The main limitation is that synthetic or de-identified datasets lack the full complexity of live EHR systems, so you must supplement portfolio work with knowledge of privacy regulations and clinical workflows.

Understanding the EHR Data Access Problem

Aspiring health data scientists face a fundamental barrier when trying to build practical skills: electronic health record data is among the most protected categories of information in the United States. The Health Insurance Portability and Accountability Act (HIPAA) creates strict controls around protected health information, and healthcare organizations are understandably cautious about sharing patient-level data with individuals who are not employees or authorized researchers. This creates a paradox where the very data needed to demonstrate competence is inaccessible to those who need to prove their skills.

The practical consequence is that many job seekers in the life science data science space find themselves in a portfolio gap. They have completed coursework, earned certifications, and studied algorithms, but they lack demonstrable projects that show employers they can work with real clinical data structures. This gap is particularly acute for biomedical data scientist roles, where employers expect familiarity with the specific quirks of EHR data, including messy free-text notes, inconsistent coding systems, missing values, and temporal relationships between events.

Publicly available EHR datasets solve this problem in a practical way. These datasets have been de-identified by their providers, meaning that direct identifiers such as names, social security numbers, and exact dates have been removed or transformed. The most well-known example is MIMIC-III, which contains de-identified health data from over 40,000 critical care patients at a single medical center. This dataset has been used in thousands of published research studies, which means you can compare your analytical approaches against established literature.

The career context for this work is well established. The U.S. Bureau of Labor Statistics Occupational Outlook Handbook describes the broader landscape of data science occupations, including the education pathways and work settings that apply to health data roles. The U.S. Department of Labor O*NET OnLine provides detailed task and skill descriptions for related occupations, which can help you align your portfolio projects with the competencies employers actually seek. These official sources do not provide specific salary figures for health data scientists, but they do establish the occupational context that makes portfolio development a rational career investment.

At a Glance: Public EHR Datasets for Portfolio Projects

DatasetPatient PopulationData Types IncludedBest Use for Portfolio
MIMIC-IIIOver 40,000 ICU patientsDemographics, vital signs, lab results, medications, notes, proceduresPredictive modeling, mortality prediction, length-of-stay analysis
MIMIC-IVCurrent version of MIMICICU and emergency department data, more recent recordsReplication studies, updated modeling, comparison with MIMIC-III
eICU Collaborative Research DatabaseOver 200,000 ICU admissionsMulti-center ICU data from across the United StatesGeneralizability studies, multi-site comparisons
PhysioNet Challenge DatasetsVaries by challengeVaries by challenge, often includes time-series dataSpecific clinical prediction tasks with defined evaluation metrics
CMS Public Use FilesMedicare and Medicaid claimsClaims data, not full EHRCost analysis, utilization patterns, policy-oriented projects

Core Principles for Working with Public EHR Data

Privacy and Ethics as a Design Constraint

The first principle is that privacy protection is not an obstacle to work around but a design constraint that shapes every project. When you use public datasets, you are working with data that has already been de-identified, but you still have obligations. You must not attempt to re-identify patients, you must not combine public datasets with other data in ways that could create identification risk, and you must follow the data use agreements that govern each dataset.

The National Institutes of Health Office of Intramural Training and Education provides guidance on research career development and the professional expectations that apply to data work. The NIH context is relevant because many public EHR datasets are hosted on NIH-supported platforms such as PhysioNet, and the responsible conduct of research principles that NIH emphasizes apply to your portfolio work. This means you should document your data handling procedures, acknowledge the dataset sources, and follow the specific terms of use for each dataset.

Understanding the Data Structure

EHR data is fundamentally different from the clean, rectangular datasets that appear in many online courses. A typical EHR dataset contains multiple tables that must be joined to create an analysis file. For example, MIMIC-III contains tables for patient demographics, admission records, ICU stays, laboratory measurements, medication administration, and clinical notes. Each table has its own structure, time stamps, and relationships to other tables.

The practical implication is that a significant portion of your portfolio project will involve data engineering instead of modeling. You will need to understand how to navigate relational database structures, handle time zones and time stamps, manage units of measurement, and reconcile different coding systems. These skills are directly relevant to the tasks described in the O*NET OnLine database for data science occupations, which lists data preparation and cleaning as core tasks.

The Role of Clinical Context

A common failure pattern in health data science portfolios is the project that demonstrates technical skill but lacks clinical understanding. Employers in biomedical data scientist roles look for candidates who can interpret results in a clinical context. This means you need to understand what the data represents, why certain measurements are taken, and what the clinical implications of your findings might be.

For example, if you build a model to predict patient mortality, you should be able to explain which features are clinically meaningful, why they might be associated with outcomes, and what the limitations of your model are in a real clinical setting. This does not require a medical degree, but it does require that you read the documentation that accompanies each dataset and that you engage with the clinical literature that has used the same data.

Building Your EHR Data Science Portfolio

Step 1: Select a Dataset and Define a Question

The first practical decision is to choose a dataset and define a specific question that you will answer. The question should be narrow enough to be tractable but broad enough to demonstrate multiple skills. Good portfolio questions include predicting patient length of stay, identifying patients at risk for readmission, classifying the severity of a condition from vital signs, or analyzing the relationship between lab values and outcomes.

The dataset choice should match your question. MIMIC-III is appropriate for ICU-focused questions, while the eICU database is better for questions about multi-hospital care. The CMS data is appropriate for questions about utilization and cost. The question should be one that you can answer with the available data, and you should verify that the necessary variables exist before you commit to a project.

Step 2: Complete the Data Use Agreement and Access Process

Each public EHR dataset has its own access process. For MIMIC-III and eICU, you must complete a credentialing process through PhysioNet, which includes a data use agreement and a short training course on human subjects research. This process is not a formality. It demonstrates to employers that you understand the regulatory environment around health data, and it gives you a credential that you can list on your resume.

The access process also provides a natural checkpoint for your project. If you cannot complete the data use agreement, you cannot proceed, and this is an important limitation to understand. The process is designed to ensure that researchers understand their obligations, and it is a realistic preview of the compliance requirements you will encounter in professional roles.

Step 3: Build a Data Cleaning and Preparation Pipeline

The data cleaning phase is where you will spend most of your time, and it is the phase that produces the most portfolio value. A well-documented data cleaning pipeline demonstrates that you can handle the messiness of real-world data. The pipeline should include steps for handling missing values, standardizing units, converting time stamps, and merging tables.

The documentation is as important as the code. You should write a data dictionary that explains each variable, the source table, the units, and any transformations you applied. This documentation is what separates a portfolio project from a homework assignment. It shows that you can produce the kind of reproducible analysis that is expected in professional and research settings.

Step 4: Perform Exploratory Data Analysis

Exploratory data analysis (EDA) is the phase where you understand the data before you build models. This includes examining distributions, identifying outliers, checking for data quality issues, and understanding the relationships between variables. The EDA phase is also where you should check for the common failure patterns in EHR data, including:

  • Duplicate records that need to be identified and handled
  • Inconsistent coding between different time periods
  • Missing data that is not random but related to clinical factors
  • Units that vary between different measurement types

The EDA should produce visualizations and summary tables that you can include in your portfolio. These visualizations are important because they show employers that you can communicate findings effectively, which is a core skill for data science roles.

Step 5: Develop and Evaluate a Predictive Model

The modeling phase is where you apply the machine learning skills that you have learned. The choice of model depends on your question. For classification tasks, you might use logistic regression, random forests, or gradient boosting. For regression tasks, you might use linear regression or more complex approaches. The model choice is less important than the evaluation approach.

You should use appropriate evaluation metrics for your question. For classification, this includes accuracy, precision, recall, F1 score, and the area under the receiver operating characteristic curve. For regression, this includes mean absolute error, root mean squared error, and R-squared. You should also use cross-validation to estimate how well your model will perform on new data.

The most important part of the modeling phase is the interpretation. You should be able to explain which features are most important, why they are important, and what the limitations of your model are. This interpretation is what employers look for in portfolio projects.

Step 6: Document and Present Your Work

The final step is to document and present your work. This includes a written report, a code repository, and a presentation or blog post. The report should explain the clinical question, the data, the methods, the results, and the limitations. The code repository should be clean, well-commented, and reproducible. The presentation should be accessible to a non-technical audience.

The documentation should also include a section on the limitations of your work. This is important because it shows that you understand the boundaries of what you have done. For example, you should note that the dataset is from a single institution, that the data is de-identified, and that your model has not been validated in a clinical setting.

Options and Tradeoffs in Dataset Selection

MIMIC-III versus MIMIC-IV

MIMIC-III has been the standard dataset for health data science education and research for many years. It has a large body of published literature, which means you can compare your results to established benchmarks. MIMIC-IV is the newer version, with more recent data and a different structure. The trade-off is that MIMIC-IV has less published literature, but it is the version that new researchers are likely to use going forward.

The choice between the two depends on your goals. If you want to replicate published results and compare your work to established benchmarks, MIMIC-III is the safer choice. If you want to demonstrate that you can work with the most current data, MIMIC-IV is the better choice. You can also do both, using MIMIC-III to learn the structure and MIMIC-IV to demonstrate current skills.

Single-Site versus Multi-Site Data

MIMIC-III and MIMIC-IV are single-site datasets, meaning they come from one hospital system. The eICU database is multi-site, meaning it comes from multiple hospitals. The trade-off is that single-site data is easier to understand and has more consistent data collection, while multi-site data is more realistic and allows you to examine generalizability.

For a portfolio project, the single-site data is often the better choice because it is easier to understand and the documentation is more complete. The multi-site data is a better choice if you want to demonstrate that you can handle the complexity of real-world health systems.

Claims Data versus Clinical Data

The CMSGED files provide claims data, which is different from EHR data. Claims data records what was billed, while EHR data records what was done clinically. Claims data is useful for questions about costs, utilization, and policy, while EHR data is useful for questions about clinical outcomes and processes.

The choice between the two depends on your career goals. If you are interested in health policy or health economics, claims data is the better choice. If you are interested in clinical research or predictive modeling, EHR data is the better choice.

Records and Measurements for Portfolio Quality

What to Track in Your Project

The quality of your portfolio project is determined by the records you keep. You should track the following:

  • The data version and access date
  • The data cleaning steps and the rationale for each step
  • The number of records before and after cleaning
  • The evaluation metrics for each model you test
  • The computational resources used

These records serve two purposes. They demonstrate your professional approach to data work, and they provide a basis for reproducing your analysis. The ability to reproduce your work is a core expectation in research and professional settings.

How to Measure Success

The success of a portfolio project is not measured by the performance of your model but by the quality of your analysis. A model with moderate performance but excellent documentation is more valuable than a model with high performance and no documentation. The evaluation should focus on:

  • The clarity of the clinical question
  • The appropriateness of the data for the question
  • The quality of the data cleaning and preparation
  • The rigor of the evaluation approach
  • The honesty of the limitations section

These criteria align with the professional expectations described in the O*NET OnLine database for data science occupations, which emphasizes the importance of communication, critical thinking, and attention to detail.

Common Failure Patterns in EHR Data Projects

Failure to Understand the Data Structure

The most common failure is to treat EHR data as if it were a simple spreadsheet. This leads to errors in joining tables, incorrect time calculations, and misinterpretation of variables. The solution is to spend time reading the data documentation and understanding the relationships between tables before you begin analysis.

Failure to Handle Missing Data Appropriately

Missing data in EHR is not random. Patients who are sicker may have more measurements, while patients who are healthier may have fewer. The missingness is often related to the outcome you are studying, which can bias your results. The failure pattern is to drop missing values without understanding why they are missing. The solution is to examine the missingness pattern and use appropriate methods for handling missing data.

Failure to Validate the Model

The failure to validate the model is a common problem. This includes using the same data for training and testing, not using cross-validation, and not checking for overfitting. The solution is to use appropriate validation techniques and to report the evaluation metrics honestly.

Failure to Document the Work

The failure to document the work is the most common reason that portfolio projects do not lead to job offers. The documentation is what allows an employer to evaluate your work. The solution is to write the documentation as you go, not at the end of the project.

Limitations and Professional Escalation Criteria

Limitations of Public EHR Data

Public EHR data has several limitations that you should understand. The data is de-identified, which means you cannot validate your findings against the original patient records. The data is from a specific institution or set of institutions, which means the findings may not generalize to other settings. The data is historical, which means it may not reflect current clinical practices.

These limitations do not make the data useless, but they do mean that you should be careful about the claims you make. You should not claim that your model is ready for clinical use, and you should not claim that your findings apply to all patients. The limitations section of your report should be honest and specific.

When to Seek Professional Guidance

There are situations where you should seek professional guidance. If you are unsure about the ethical or legal requirements for using a dataset, you should consult the dataset documentation and the relevant institutional policies. If you are unsure about the clinical interpretation of your findings, you should consult a clinician or a clinical researcher. If you are unsure about the appropriate statistical methods, you should consult a statistician or a more experienced data scientist.

The professional escalation criteria are not a sign of failure but a sign of professional judgment. The NIH Office of Intramural Training and Education emphasizes the importance of mentorship and professional development in research careers, and this applies to portfolio work as well.

Career Context and Professional Development

The Health Data Science Career Landscape

The career context for health data science is established by official sources. The U.S. Bureau of Labor Statistics Occupational Outlook Handbook describes the work of data scientists, including the education and training pathways. The U.S. Department of Labor O*NET OnLine provides detailed task and skill descriptions for data science occupations. These sources do not provide a specific salary for health data scientists, but they do establish the professional context.

The career path is not limited to data science roles. The NIH Office of Intramural Training and Education describes research career development, and the NSF Careers page describes scientific and technical work in a federal research organization. The American Society for Microbiology Career Services provides context for microbiology career development, and the AAVMC Career Resources provides context for veterinary career paths. These sources are relevant because health data science is an interdisciplinary field that draws on biology, medicine, and computer science.

How to Use Your Portfolio in the Job Search

The portfolio is a tool for the job search, not the job search itself. You should use the portfolio to demonstrate your skills in interviews, to include in your resume, and to share with potential employers. The portfolio should be accompanied by a resume that describes your skills and experience, and by a cover letter that explains your interest in the role.

The portfolio is most effective when it is tailored to the specific role you are applying for. If you are applying for a role that focuses on predictive modeling, you should highlight the modeling project. If you are applying for a role that focuses on data engineering, you should highlight the data pipeline project. The portfolio should be a demonstration of your ability to do the work, not a general collection of projects.

Frequently Asked Questions

What is the best public EHR dataset for a beginner?

MIMIC-III is the best choice for a beginner because it has extensive documentation, a large body of published research, and a well-established access process. The documentation is thorough, and the published literature provides benchmarks for comparison. The dataset is large enough to support a variety of projects but structured enough to be manageable.

Do I need a medical background to work with EHR data?

No, you do not need a medical degree to work with EHR data. You do need to understand the clinical context of the data, which you can gain by reading the dataset documentation and the published literature. The clinical context is important for interpreting your findings, but it is not a prerequisite for the technical work.

How long does it take to complete a portfolio project?

The time depends on the scope of the project and your experience level. A focused project with a clear question and a well-defined dataset can be completed in a few weeks of part-time work. A more complex project with multiple models and extensive documentation can take several months. The time is an investment in your career, and the quality of the documentation is more important than the speed of the work.

Can I use the same dataset for multiple portfolio projects?

You can use the same dataset for multiple projects, but you should be careful to make each project distinct. The projects should address different questions, use different methods, or focus on different aspects of the data. The portfolio should demonstrate a range of skills, not a single analysis repeated multiple times.

How do I handle the data use agreement requirements?

The data use agreement requirements are a professional obligation. You should complete the required training, follow the terms of the agreement, and document your compliance. The agreement is not a barrier but a demonstration of your understanding of the regulatory environment for health data.

What if my model performance is not good?

The model performance is not the most important part of the portfolio. The most important part is the quality of the analysis and the documentation. A model with modest performance but excellent documentation is more valuable than a model with high performance and no documentation. You should be honest about the performance and explain the limitations.

How do I present my portfolio to employers?

The portfolio should be presented in a professional format. The code should be in a public repository, the report should be in a readable format, and the presentation should be accessible to a non-technical audience. The portfolio should be accompanied by a resume and a cover letter that describe your skills and experience.

What are the most important skills for health data science?

The most important skills are data cleaning, data analysis, statistical modeling, and communication. The technical skills are necessary, but the communication skills are what separate a successful portfolio from a collection of code. The ability to explain your work to a non-technical audience is a core skill for health data science roles.

Using the Evidence

SourceBest use in this topicImportant limitation
Occupational Outlook Handbookofficial guidanceCheck the linked page for current local requirements
O*NET OnLineofficial guidanceCheck the linked page for current local requirements
Office of Intramural Training and Educationofficial guidanceCheck the linked page for current local requirements

Related Articles

References and Further Reading

This article is educational and does not replace institutional policy, professional advice, or applicable safety and regulatory requirements.