# From VistA EMR Community: Would like to collaborate on synthetic patient data

**URL:** <https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905>\
**Category:** Education\
**Created:** [June 29, 2017, 1:09pm UTC](https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905 "2017-06-29T13:09:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![shabiel](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@shabiel](https://forums.librehealth.io/u/shabiel)\
**Post date:** [June 29, 2017, 1:09pm UTC](https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905/1 "2017-06-29T13:09:18Z")

</div>

Hello there,

I am Sam Habiel, Pharm.D.; Technical Fellow at the Open Source Electronic Health Record Alliance (OSEHRA). I met Tony McCormick at the OSEHRA Summit this year.

Tony told me about the project to create synthetic patients using NHANES data. I am interested as that will help us produce educational and demo instances of VistA. Lack of good demo data is a big issue for our community. I saw that there is big thread on the topic here. If somebody can summarize where you are at right now and how outsiders can contribute, I would appreciate it.

I have another project that I would like collaboration on: I and others in an organization called WorldVistA–are working on creating a public domain high quality drug interactions set. We have made several releases. The latest can be found here: [https://github.com/glilly/osdi](https://github.com/glilly/osdi). You may find this data useful for your EMR. If you would like to use it and support us in maintaining the data, we will be happy to collaborate.

–Sam Habiel, Pharm.D. Technical Fellow OSEHRA

---

<div class="post-metadata">

**Author:** ![yehster](https://forums.librehealth.io/user_avatar/forums.librehealth.io/yehster/32/400_2.png) [@yehster](https://forums.librehealth.io/u/yehster)\
**Post date:** [June 29, 2017, 3:46pm UTC](https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905/2 "2017-06-29T15:46:34Z")

</div>

Hi Sam, We are using the NHANES data set to create simulated patients. There are 9000+ records created on [nhanes.librehealth.io](http://nhanes.librehealth.io)[https://www.cdc.gov/nchs/nhanes/index.htm](https://www.cdc.gov/nchs/nhanes/index.htm) username/password admin/password If you want to check it out.

In addition Dr. Hoyt has been manual creating some more detail patient histories (10 or so at the moment.)

I have scripts which download and parse the 2011-2012 NHANES datasets, then create patients records with demographics, problem lists, medications, a few labs and other things like smoking, alcohol, race, income.

It should be possible to use the same data to create records in VistA, the key issue to solve would be the interface to create the records.

Because LibreEHR is web based, my scripts are simulating browser activity to create records by mimicking the same actions a human would to manually enter the data.

One big question is what we need to accomplish to secure additional funding/resources to sustain this effort.

---

<div class="post-metadata">

**Author:** ![shabiel](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@shabiel](https://forums.librehealth.io/u/shabiel)\
**Post date:** [June 29, 2017, 5:04pm UTC](https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905/3 "2017-06-29T17:04:34Z")

</div>

Thank you Kevin.

I actually will be writing M code to add the data directly into VistA. Can you share the scripts with me? We tried using runnable scripts for other projects and they just take too long for a Continuous Integration pipeline, which is what we are aiming for.

–Sam

---

<div class="post-metadata">

**Author:** ![yehster](https://forums.librehealth.io/user_avatar/forums.librehealth.io/yehster/32/400_2.png) [@yehster](https://forums.librehealth.io/u/yehster)\
**Post date:** [June 29, 2017, 5:08pm UTC](https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905/4 "2017-06-29T17:08:24Z")

</div>

It’s nodejs code, not well documented yet but shared on github.

> **[yehster/NHANESImport](https://github.com/yehster/NHANESImport)**
>
> Tools to analyze and import NHANES data. Contribute to yehster/NHANESImport development by creating an account on GitHub.

I can also share database dumps/csv files of the NHANES data.

---

<div class="post-metadata">

**Author:** ![shabiel](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@shabiel](https://forums.librehealth.io/u/shabiel)\
**Post date:** [June 29, 2017, 5:32pm UTC](https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905/5 "2017-06-29T17:32:24Z")

</div>

Thank you.

Where’s the code that reads the NHANES files?

–Sam

---

<div class="post-metadata">

**Author:** ![yehster](https://forums.librehealth.io/user_avatar/forums.librehealth.io/yehster/32/400_2.png) [@yehster](https://forums.librehealth.io/u/yehster)\
**Post date:** [June 29, 2017, 6:26pm UTC](https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905/6 "2017-06-29T18:26:13Z")

</div>

I am using R to load the NHANES data and converting them to .csv [https://www.r-project.org/](https://www.r-project.org/)

> <https://github.com/yehster/NHANESImport/blob/master/main.js#L205>

This part of my scripts uses the command line to load the files and make .csv files.

I can send you the .csv files as a .zip if you want. Probably simpler.

---

<div class="post-metadata">

**Author:** ![shabiel](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@shabiel](https://forums.librehealth.io/u/shabiel)\
**Post date:** [June 29, 2017, 7:45pm UTC](https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905/7 "2017-06-29T19:45:05Z")

</div>

Let’s do that. .zip will be good.

---

<div class="post-metadata">

**Author:** ![yehster](https://forums.librehealth.io/user_avatar/forums.librehealth.io/yehster/32/400_2.png) [@yehster](https://forums.librehealth.io/u/yehster)\
**Post date:** [June 30, 2017, 12:14pm UTC](https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905/8 "2017-06-30T12:14:41Z")

</div>

The “pieces” of this process, are as follows.

1. Web crawler which downloads the data files from the CDC and a conversion step from SAS to .csv (resulting in the .zip file contents)

2. Scripts which load the .CSV files into MySQL/MariaDB. (1 to 1 mapping of the .csv files to database tables/columns)

3. Code which translates the database representations into JavaScript object This maps the “numeric values” from the CDC data into things like problem lists For example, based on yes/no (1/2) answers to parts of the questionnaire for each respondent, we build problem lists. [https://github.com/yehster/NHANESImport/blob/master/NHANESData.js#L180](https://github.com/yehster/NHANESImport/blob/master/NHANESData.js#L180)

4. Code which then uses these JavaScript objects and “applies them” to the EHR Example here is a form post to create the patients [https://github.com/yehster/NHANESImport/blob/master/EHRConnection.js#L128](https://github.com/yehster/NHANESImport/blob/master/EHRConnection.js#L128)

---

<div class="post-metadata">

**Author:** ![shabiel](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@shabiel](https://forums.librehealth.io/u/shabiel)\
**Post date:** [June 30, 2017, 12:28pm UTC](https://forums.librehealth.io/t/from-vista-emr-community-would-like-to-collaborate-on-synthetic-patient-data/905/9 "2017-06-30T12:28:29Z")

</div>

Kevin,

You are a good elucidator! Thank you.

–Sam
