Demo Data Generator

Little project I’m working on to create a wide array of demo data, beginning with basic patient info.

See GitHub - openemr/demo-data-generator: Generate fictional demo data for testing of OpenEMR

1 Like

python, very nice, cool find with the barnum module

1 Like

works fine, one of the dummy dudes was from Vermont!

Goal is to eventually automate facilities, insurance companies, pharmacies, users, encounters, lab providers. Basically everything you’d need to simulate a fully functioning clinic.

The most challenging part will probably be encounter data (Since it’s linked to a PT)

The other stuff should be rather mundane.

Also want to actually dump it to a SQL file so there’s no copying. I threw this together super quick today and just wanted to get a basic, functional version posted

1 Like

Very nice!

Just pushed a new commit that generates a large majority of patient data. Hoping to next add the ability to create insurance companies, pharmacies and a handful of procedures to further easy problem solving.

For now I suggest piping output to a file, so ./main.py patients 25 > patient_data.sql (Note I tried to create 50,000 patients but was running into a indices out of range error when generating the title… not sure why, also not sure why I tried to create 50,000 patient :laughing: but I did)

Tried it via instructions on README, but getting following error:
(venv) [18:27][brady2@nonsense:~/git/demo-data-generator(master)]$ ./main.py patients 25
Traceback (most recent call last):
File “./main.py”, line 3, in
import click
ImportError: No module named click

Ah, forgot to include the updated requirements.txt. Will do that tomorrow. If you’re itching to use it you can do pip install click From inside your virtualenvironment

Very cool!
Was able to get it to work with most recent changes. I noted the following mapping issues in OpenEMR (this means a FIX THIS in red shows up when edit the patient at the following fields):
Contact->Country
Choices->Pharmacy
Choices->HIPAA Notice Reviewed
Choices->Allow Voice Message
Choices->Allow Mail Message
Choices->Allow Email
Choices->Allow SMS
Employer->Occupation

Noted that as well, should be resolved with the latest commit (or perhaps I forgot to push, either way I’ll check tonight)

Hi,

Sorry if this is a little to late, but checking the git now, the steps are:

demodata <global options> COMMAND <options>

However when i try the command:
demodata --count 25 patients

it just says that count is not a valid option, and if i try running just:
demodata patients

It just generates 1 patient record. Am I doing something wrong?

Hi @JP_Talusan ,

I think it is:
demodata patients --count 25

If that doesn’t work, let me know, and I’ll look into this.
-brady

2 Likes

Thank you very much! It worked perfectly!

Hi folks:

Can this be added as an example to the README.md under ##usage?

“demodata patients --count 25”

Also, patient generation worked great, but not the facility generation. In case there is interest, these are the errors:

table name is facility, not facilities
And I guess there have been changes to the table structure. Way above my level

Thanks

Did this ever get completed? If theres any alternative pls let me know I really need demo data with encounters