Repository navigation
Releases: rahulbyrapuneni/bhsim
Release list
BHSim v1.0.1 - First Stable Release
BHSim v1.0.1 - First Stable Release
BHSim is an open-source Python library for generating synthetic behavioral health data for analytics, education, and software development.
Designed for data analysts, developers, researchers, and students, BHSim creates interconnected, realistic-looking fictional datasets without requiring access to real patient information.
With built-in relationships, reproducible data generation, and ready-to-query SQLite databases, BHSim makes it easier to develop, test, and explore behavioral health analytics workflows.
What's included in v1.0.0
This marks the first stable release of BHSim, following the successful testing and validation of its public release candidates.
Key features
- Synthetic behavioral health records: Generate fictional individuals, behavioral health programs, employees, and enrollment histories.
- Appointment simulation: Create completed, no-show, canceled, rescheduled, and scheduled appointments.
- Workforce and productivity analytics: Simulate employee assignments, scheduling, and productivity records.
- Behavioral health assessments: Generate PHQ-9 and GAD-7 assessments with structured questions, responses, and calculated scores.
- Relational data model: Explore connected records using SQL joins and analytical queries.
- SQLite and CSV support: Generate a ready-to-query SQLite database and export records to CSV for Power BI, Excel, and other analytical tools.
- Reproducible datasets: Generate consistent results using configurable random seeds.
- Built-in validation: Check generated data for relationship integrity and supported business-rule consistency.
Release highlights
BHSim v1.0.0 introduces the first officially stable package, building on the functionality tested throughout the release-candidate phase.
Highlights include:
- Stable public release available through PyPI
- Successful automated testing across Python 3.10, 3.12, and 3.14
- SQL-based data-quality validation
- Verified reproducibility using identical configurations and random seeds
- Successful validation of small dataset configurations
- Updated documentation, installation instructions, and project branding
- Automated testing and package publishing through GitHub Actions
Installation
Requirements: Python 3.10 or newer.
Install BHSim directly from PyPI:
pip install bhsimNo external database server or paid API is required.
Quick start
Generate your first synthetic behavioral health dataset:
from bhsim import BHSimulator
sim = BHSimulator(
clients=1000,
employees=100,
history_months=12,
seed=42
)
sim.generate("behavioral_health.db")
print(sim.validate())
sim.to_csv("output")This creates a SQLite database containing connected fictional behavioral health records, along with CSV exports suitable for further analysis.
Example SQL query
Explore appointment outcomes using the generated SQLite database:
SELECT
visit_status,
COUNT(*) AS total_visits
FROM visits
GROUP BY visit_status
ORDER BY total_visits DESC;BHSim data can also be used to practice SQL joins, investigate appointment no-show patterns, explore staff productivity, and create Power BI dashboards.
Intended use
BHSim is designed for:
- SQL learning and practice
- Power BI and healthcare analytics portfolio projects
- Database and application testing
- Synthetic dataset generation for development
- Behavioral health reporting demonstrations
- Educational and research prototyping
Important: All records generated by BHSim are fictional. The simulation is intended for development, learning, and analytical testing. Its clinical patterns are not validated for patient care, diagnosis, treatment, or official quality reporting.
Project links
- PyPI: https://pypi.org/project/bhsim/
- GitHub repository: https://github.com/rahulbyrapuneni/bhsim
- Documentation: https://github.com/rahulbyrapuneni/bhsim#readme
- Report issues: https://github.com/rahulbyrapuneni/bhsim/issues
License: MIT
Creator & Maintainer: Rahul Byrapuneni
Contributions, feedback, and suggestions are welcome.