You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/bfd-model/bfd-model-idr/README.md
+33-21Lines changed: 33 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,28 @@ pass along the resource url with -r
74
74
pass along --test to run conformance tests
75
75
76
76
77
-
To generate synthetic claims data, the claims_generator.py script is used. As of 5/22/25, it will only generate inpatient institutional claims and their PAC equivalent claim type codes.
77
+
To generate synthetic patient data, the patient_generator.py script is used.
78
+
To utilize it:
79
+
```sh
80
+
uv run patient_generator.py
81
+
```
82
+
83
+
The script supports several options:
84
+
-`--benes <csv_file>`: Use a CSV file containing beneficiary data to populate fields. Empty fields will be filled with random data.
85
+
-`--claims`: Automatically generate claims after patient generation using the generated SYNTHETIC_BENE_HSTRY.csv file.
86
+
87
+
The files output will be in the out folder:
88
+
SYNTHETIC_BENE_HSTRY.csv
89
+
SYNTHETIC_BENE_MBI_ID.csv
90
+
SYNTHETIC_BENE_MDCR_ENTLMT_RSN.csv
91
+
SYNTHETIC_BENE_MDCR_ENTLMT.csv
92
+
SYNTHETIC_BENE_MDCR_STUS.csv
93
+
SYNTHETIC_BENE_TP.csv
94
+
SYNTHETIC_BENE_XREF.csv
95
+
96
+
The patient generator creates synthetic beneficiary data with realistic but SYNTHETIC MBIs, coverage information, and historical records. It can generate multiple MBI versions per beneficiary and handles beneficiary cross-references with kill credit switches.
97
+
98
+
To generate synthetic claims data, the claims_generator.py script is used.
78
99
To utilize it:
79
100
```sh
80
101
uv run claims_generator.py \
@@ -83,31 +104,22 @@ uv run claims_generator.py \
83
104
```
84
105
85
106
--sushi is not strictly needed, if you have a local copy of the compiled shorthand files, but recommended to reduce drift. To specify a list of benes, pass in a .csv file containing a column named BENE_SK.
86
-
The files output will be in the outputs folder, there are several files:
87
-
SYNTHETIC_CLM_DCMTN.csv
88
-
SYNTHETIC_CLM_LINE_INSTNL.csv
89
-
SYNTHETIC_CLM_INSTNL.csv
107
+
The files output will be in the out folder, there are several files:
108
+
SYNTHETIC_CLM.csv
109
+
SYNTHETIC_CLM_LINE.csv
110
+
SYNTHETIC_CLM_VAL.csv
90
111
SYNTHETIC_CLM_DT_SGNTR.csv
91
112
SYNTHETIC_CLM_PROD.csv
92
-
SYNTHETIC_CLM_VAL.csv
93
-
SYNTHETIC_CLM_LINE.csv
94
-
SYNTHETIC_CLM.csv
113
+
SYNTHETIC_CLM_INSTNL.csv
114
+
SYNTHETIC_CLM_LINE_INSTNL.csv
115
+
SYNTHETIC_CLM_DCMTN.csv
116
+
SYNTHETIC_CLM_FISS.csv
117
+
SYNTHETIC_CLM_PRFNL.csv
118
+
SYNTHETIC_CLM_LINE_PRFNL.csv
119
+
SYNTHETIC_CLM_ANSI_SGNTR.csv
95
120
96
121
These files represent the schema of the tables the information is sourced from, although for tables other than CLM_DT_SGNTR, the CLM_UNIQ_ID is propagated instead of the 5 part unique key from the IDR.
97
122
98
-
To generate synthetic patient data, the patient_generator.py script is used.
99
-
To utilize it:
100
-
```sh
101
-
uv run patient_generator.py
102
-
```
103
-
The files output will be in the outputs folder:
104
-
SYNTHETIC_BENE_HSTRY.csv
105
-
SYNTHETIC_BENE_MBI_ID.csv
106
-
SYNTHETIC_BENE_MDCR_ENTLMT_RSN.csv
107
-
SYNTHETIC_BENE_MDCR_ENTLMT.csv
108
-
SYNTHETIC_BENE_MDCR_STUS.csv
109
-
SYNTHETIC_BENE.csv
110
-
111
123
Data Dictionary Notes:
112
124
Generally, the data dictionary will source definitions from the IDR's table definitions. There are instances where this may not be the definition we wish to publish. To overwrite the definition from the IDR, or populate a definition not available from the IDR, populate the "definition" key for the relevant concept in the relevant StructureDefinition.
parser=argparse.ArgumentParser(description='Generate Synthetic Data for Ingestion by the BFD v3 pipeline.')
745
745
parser.add_argument('--sushi', '-s', action='store_true', help='Generate new StructureDefinitions. Use when testing locally if new .fsh files have been added.')
746
-
parser.add_argument('--benes', '-b', type=str, help='Pull BENE_SKs from the input file. Expected format is that of SYNTHETIC_BENE.csv')
746
+
parser.add_argument('--benes', '-b', type=str, help='Pull BENE_SKs from the input file. Expected format is that of SYNTHETIC_BENE_HSTRY.csv')
0 commit comments