Skip to content

Commit 540f5fe

Browse files
JFrieljas88
andauthored
Task/rename bad medicine (#195)
* rename badmedicine to SynthEHR * fix missing file rename --------- Co-authored-by: James A Sutherland <j@sutherland.pw>
1 parent 48d3ad6 commit 540f5fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+153
-153
lines changed

.github/workflows/testpack.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
run: dotnet test --nologo
1515
- name: Package
1616
run: |
17-
dotnet publish BadMedicine/BadMedicine.csproj -o linux-x64 -r linux-x64 -c Release --self-contained --nologo -p:PublishSingleFile=true -p:GenerateDocumentationFile=false
18-
dotnet publish BadMedicine/BadMedicine.csproj -o win-x64 -r win-x64 -c Release --self-contained --nologo -p:PublishSingleFile=true -p:GenerateDocumentationFile=false
19-
dotnet pack BadMedicine.Core/BadMedicine.Core.csproj -p:DebugType=full -p:SymbolPackageFormat=snupkg -p:PackageVersion=$(fgrep AssemblyInformationalVersion SharedAssemblyInfo.cs|cut -d'"' -f2) -o . --include-source --include-symbols --nologo -c Release
20-
tar czf badmedicine-cli-linux-x64.tgz ./linux-x64
21-
zip -9rj badmedicine-cli-win-x64.zip win-x64
17+
dotnet publish SynthEHR/SynthEHR.csproj -o linux-x64 -r linux-x64 -c Release --self-contained --nologo -p:PublishSingleFile=true -p:GenerateDocumentationFile=false
18+
dotnet publish SynthEHR/SynthEHR.csproj -o win-x64 -r win-x64 -c Release --self-contained --nologo -p:PublishSingleFile=true -p:GenerateDocumentationFile=false
19+
dotnet pack SynthEHR.Core/SynthEHR.Core.csproj -p:DebugType=full -p:SymbolPackageFormat=snupkg -p:PackageVersion=$(fgrep AssemblyInformationalVersion SharedAssemblyInfo.cs|cut -d'"' -f2) -o . --include-source --include-symbols --nologo -c Release
20+
tar czf SynthEHR-cli-linux-x64.tgz ./linux-x64
21+
zip -9rj SynthEHR-cli-win-x64.zip win-x64
2222
- name: Nuget push
2323
if: contains(github.ref,'refs/tags/')
2424
run: nuget push HIC.*.nupkg -skipDuplicate -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_KEY }}
@@ -27,7 +27,7 @@ jobs:
2727
if: contains(github.ref, 'refs/tags/v')
2828
with:
2929
repo_token: ${{ secrets.GITHUB_TOKEN }}
30-
file: badmedicine-cli-*
30+
file: SynthEHR-cli-*
3131
tag: ${{ github.ref }}
3232
overwrite: true
3333
file_glob: true

.gitignore

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
BadMedicine/obj/
2-
BadMedicine/bin/
1+
SynthEHR/obj/
2+
SynthEHR/bin/
33
*.user
4-
BadMedicine/.vs/
4+
SynthEHR/.vs/
55
.vs/
66
Visual Studio 2017/
7-
BadMedicineTests/obj/
7+
SynthEHRTests/obj/
88
*.vspx
99
*.psess
10-
BadMedicineTests/bin/
11-
BadMedicine.Core/obj/
12-
BadMedicine.Core/bin/
10+
SynthEHRTests/bin/
11+
SynthEHR.Core/obj/
12+
SynthEHR.Core/bin/
1313
.idea/

CHANGELOG.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [1.2.2] - 2024-035-16
7+
## [2.0.0] - Unreleased
8+
9+
- Rename package to SynthEHR
10+
11+
## [1.2.2] - 2024-05-16
812

913
-Add warning about naming deprecation, see [README](./README.md#Deprecation)
1014

@@ -16,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1620

1721
- Now targets .Net 8.0
1822
- Some bugfixes change random data generation, cross-version consistency not preserved
19-
- BadMedicine itself now AOT/trim clean, but dependencies are not
23+
- SynthEHR itself now AOT/trim clean, but dependencies are not
2024
- Improve BucketList performance
2125
- Add Equ 2.3.0
2226
- Bump HIC.FAnsiSql from 3.0.1 to 3.2.0
@@ -88,15 +92,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8892

8993
- Patient birth dates now go from 1914 (Person.MinimumYearOfBirth) allowing for patients aged up to 100 years
9094

91-
[Unreleased]: https://github.com/HicServices/BadMedicine/compare/v1.2.2...main
92-
[1.2.2]: https://github.com/HicServices/BadMedicine/compare/v1.2.1...v1.2.2
93-
[1.2.1]: https://github.com/HicServices/BadMedicine/compare/v1.2.0...v1.2.1
94-
[1.2.0]: https://github.com/HicServices/BadMedicine/compare/v1.1.2...v1.2.0
95-
[1.1.2]: https://github.com/HicServices/BadMedicine/compare/v1.1.1...v1.1.2
96-
[1.1.1]: https://github.com/HicServices/BadMedicine/compare/v1.1.0...v1.1.1
97-
[1.1.0]: https://github.com/HicServices/BadMedicine/compare/v1.0.0...v1.1.0
98-
[1.0.0]: https://github.com/HicServices/BadMedicine/compare/v0.1.6...v1.0.0
99-
[0.1.6]: https://github.com/HicServices/BadMedicine/compare/v0.1.5...v0.1.6
100-
[0.1.5]: https://github.com/HicServices/BadMedicine/compare/v0.1.4...v0.1.5
101-
[0.1.4]: https://github.com/HicServices/BadMedicine/compare/v0.1.3...v0.1.4
102-
[0.1.3]: https://github.com/HicServices/BadMedicine/compare/0.0.1.2...v0.1.3
95+
[Unreleased]: https://github.com/HicServices/SynthEHR/compare/v2.0.0...main
96+
[2.0.0]: https://github.com/HicServices/SynthEHR/compare/v1.2.2...v2.0.0
97+
[1.2.2]: https://github.com/HicServices/SynthEHR/compare/v1.2.1...v1.2.2
98+
[1.2.1]: https://github.com/HicServices/SynthEHR/compare/v1.2.0...v1.2.1
99+
[1.2.0]: https://github.com/HicServices/SynthEHR/compare/v1.1.2...v1.2.0
100+
[1.1.2]: https://github.com/HicServices/SynthEHR/compare/v1.1.1...v1.1.2
101+
[1.1.1]: https://github.com/HicServices/SynthEHR/compare/v1.1.0...v1.1.1
102+
[1.1.0]: https://github.com/HicServices/SynthEHR/compare/v1.0.0...v1.1.0
103+
[1.0.0]: https://github.com/HicServices/SynthEHR/compare/v0.1.6...v1.0.0
104+
[0.1.6]: https://github.com/HicServices/SynthEHR/compare/v0.1.5...v0.1.6
105+
[0.1.5]: https://github.com/HicServices/SynthEHR/compare/v0.1.4...v0.1.5
106+
[0.1.4]: https://github.com/HicServices/SynthEHR/compare/v0.1.3...v0.1.4
107+
[0.1.3]: https://github.com/HicServices/SynthEHR/compare/0.0.1.2...v0.1.3

README.md

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
# BadMedicine
1+
# SynthEHR (Previously BadMedicine)
22

3-
## <a name="Deprecation"></a> Deprecation Notice
4-
5-
BadMedicine v1.2.2 will be the final release under this name.
6-
7-
The project will be renamed SynthEHR in all future releases, starting at v2.0.0
8-
9-
The project will be able to be found on [Github](https://gituhb.com/HICServices/SynthEHR) and on [Nuget](https://www.nuget.org/packages/HIC.SynthEHR/)
10-
11-
[![Build Status](https://github.com/HICServices/BadMedicine/actions/workflows/testpack.yml/badge.svg?branch=develop)](https://travis-ci.org/HicServices/BadMedicine) [![NuGet Badge](https://buildstats.info/nuget/HIC.BadMedicine)](https://www.nuget.org/packages/HIC.BadMedicine/)
3+
[![Build Status](https://github.com/HICServices/SynthEHR/actions/workflows/testpack.yml/badge.svg?branch=develop)](https://travis-ci.org/HicServices/SynthEHR) [![NuGet Badge](https://buildstats.info/nuget/HIC.SynthEHR)](https://www.nuget.org/packages/HIC.SynthEHR/)
124

135
Library and CLI for randomly generating medical data like you might get out of an Electronic Health Records (EHR) system. It is intended for generating data for demos and testing ETL / cohort generation/ data management tools.
146

15-
BadMedicine differs from other random data generators e.g. Mockaroo, SQL Data Generator etc in that data generated is based on (simple) models generated from live EHR datasets collected for over 30 years in Tayside and Fife (UK). This makes the data generated recognisable (codes used, frequency of codes etc) from a clinical perspective and representative of the problems (ontology mapping etc) that data analysts would encounter working with real medical data.
7+
SynthEHR differs from other random data generators e.g. Mockaroo, SQL Data Generator etc in that data generated is based on (simple) models generated from live EHR datasets collected for over 30 years in Tayside and Fife (UK). This makes the data generated recognisable (codes used, frequency of codes etc) from a clinical perspective and representative of the problems (ontology mapping etc) that data analysts would encounter working with real medical data.
168

179
Datasets generated are not suitable for training AI algorithms etc (See [What is Modelled?](#what-is-modelled))
1810

11+
## Rename
12+
As of v2.0.0 BadMedicine was renamed to SynthEHR. Previous versions of the software can be found at [nuget.org](https://www.nuget.org/packages/HIC.BadMedicine).
13+
1914
## Datasets
2015

2116
The following synthetic datasets can be produced.
@@ -31,32 +26,32 @@ The following synthetic datasets can be produced.
3126

3227
## Usage:
3328

34-
BadMedicine is available as a [nuget package](https://www.nuget.org/packages/HIC.BadMedicine/) for linking as a library
29+
SynthEHR is available as a [nuget package](https://www.nuget.org/packages/HIC.SynthEHR/) for linking as a library
3530

36-
The standalone CLI (BadMedicine.exe) is available in the [releases section of Github](https://github.com/HicServices/BadMedicine/releases)
31+
The standalone CLI (SynthEHR.exe) is available in the [releases section of Github](https://github.com/HicServices/SynthEHR/releases)
3732

3833
Usage is as follows:
3934

4035
```
41-
BadMedicine.exe c:\temp\
36+
SynthEHR.exe c:\temp\
4237
```
4338

4439
You can change how much data is produced (e.g. 500 patients, 10000 records per dataset):
4540

4641
```
47-
BadMedicine.exe c:\temp\ 500 10000
42+
SynthEHR.exe c:\temp\ 500 10000
4843
```
4944

5045
Or run only a single dataset:
5146

5247
```
53-
BadMedicine.exe c:\omg 5000 200000 -l -d CarotidArteryScan
48+
SynthEHR.exe c:\omg 5000 200000 -l -d CarotidArteryScan
5449
```
5550

5651
You can seed the generator (Guids generated will still differ)
5752

5853
```
59-
BadMedicine.exe c:\omg 5000 200000 -l -d CarotidArteryScan -s 5000
54+
SynthEHR.exe c:\omg 5000 200000 -l -d CarotidArteryScan -s 5000
6055
```
6156

6257
## Building
@@ -65,16 +60,16 @@ Building requires MSBuild 15 or later (or Visual Studio 2017 or later). You wil
6560

6661
You can build a OS specific binary
6762

68-
First build BadMedicine.csproj
63+
First build SynthEHR.csproj
6964
```
70-
dotnet publish BadMedicine.csproj -r win-x64 --self-contained
65+
dotnet publish SynthEHR.csproj -r win-x64 --self-contained
7166
cd .\bin\Debug\netcoreapp2.2\win-x64\
7267
```
7368
## Direct to Database
7469

7570
You can generate data directly into a relational database (instead of onto disk).
7671

77-
To turn this mode on rename the file `BadMedicine.template.yaml` to `BadMedicine.yaml` and provide the connection strings to your database e.g.:
72+
To turn this mode on rename the file `SynthEHR.template.yaml` to `SynthEHR.yaml` and provide the connection strings to your database e.g.:
7873

7974
```yaml
8075
Database:
@@ -85,12 +80,12 @@ Database:
8580
# Your DBMS provider ('MySql', 'PostgreSql','Oracle' or 'MicrosoftSQLServer')
8681
DatabaseType: MicrosoftSQLServer
8782
# Database to create/use on the server
88-
DatabaseName: BadMedicineTestData
83+
DatabaseName: SynthEHRTestData
8984
```
9085
9186
## Library Usage
9287
93-
You can generate test data for your program yourself by referencing the [nuget package](https://www.nuget.org/packages/HIC.BadMedicine/):
88+
You can generate test data for your program yourself by referencing the [nuget package](https://www.nuget.org/packages/HIC.SynthEHR/):
9489
9590
```csharp
9691
//Seed the random generator if you want to always produce the same randomisation
@@ -113,7 +108,7 @@ Assert.IsNotNull(a.Condition1);
113108

114109
## What is Modelled?
115110

116-
Data generated by BadMedicine is driven by Aggregate distributions of real health data collected in Tayside (UK). This means that codes appear in data with the frequency that match real data. For example in the Hospital Admissions data we can see that ICD9 codes (denoted by dash) cease being recorded in ~1997 in favour of ICD10 codes and we can see the most common admission conditions are sensible:
111+
Data generated by SynthEHR is driven by Aggregate distributions of real health data collected in Tayside (UK). This means that codes appear in data with the frequency that match real data. For example in the Hospital Admissions data we can see that ICD9 codes (denoted by dash) cease being recorded in ~1997 in favour of ICD10 codes and we can see the most common admission conditions are sensible:
117112

118113
![alt text](./Images/MainConditionDistribution.png)
119114

SharedAssemblyInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using System.Reflection;
22

33
[assembly: AssemblyCompany("Health Informatics Centre, University of Dundee")]
4-
[assembly: AssemblyProduct("Bad Medicine")]
4+
[assembly: AssemblyProduct("SynthEHR")]
55
[assembly: AssemblyCopyright("Copyright (c) 2018 - 2024")]
66
[assembly: AssemblyTrademark("")]
77
[assembly: AssemblyCulture("")]
88

99
// These should be replaced with correct values by the release process
10-
[assembly: AssemblyVersion("1.2.2")]
11-
[assembly: AssemblyFileVersion("1.2.2")]
12-
[assembly: AssemblyInformationalVersion("1.2.2")]
10+
[assembly: AssemblyVersion("2.0.0")]
11+
[assembly: AssemblyFileVersion("2.0.0")]
12+
[assembly: AssemblyInformationalVersion("2.0.0")]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Linq;
55
using System.Threading;
66

7-
namespace BadMedicine;
7+
namespace SynthEHR;
88

99
/// <summary>
1010
/// Picks random object of Type T based on a specified probability for each element.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
using System;
88

9-
namespace BadMedicine.Datasets;
9+
namespace SynthEHR.Datasets;
1010

1111
/// <summary>
1212
/// Data class describing an appointment including a guid identifier
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
using System;
88

9-
namespace BadMedicine.Datasets;
9+
namespace SynthEHR.Datasets;
1010

1111
/// <include file='../../Datasets.doc.xml' path='Datasets/Biochemistry'/>
1212
/// <inheritdoc/>
File renamed without changes.

0 commit comments

Comments
 (0)