Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlueButton 2 RIF Exporter #770

Merged
merged 131 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
3164b24
Initial skeleton BB2 exporter
hadleynet Aug 19, 2020
53612dc
Add beneficiary details. Add inpatient and outpatient files. Fix chec…
hadleynet Aug 19, 2020
7a7fee5
Initial BB2 Inpatient claims. Required fields only.
jawalonoski Aug 21, 2020
c3237ab
Fix broken unit tests.
jawalonoski Aug 21, 2020
a85f4b3
Fix claim costs.
jawalonoski Aug 21, 2020
e9d37e8
Export BB2 race code
hadleynet Aug 21, 2020
e729c5e
Fix FHIR export with cost changes.
jawalonoski Aug 21, 2020
fdc0adf
Add missing properties.
jawalonoski Aug 24, 2020
3e33942
Add reference year and age at end of reference year fields to the ben…
hadleynet Aug 24, 2020
c71555d
Initial outpatient file for bb2.
jawalonoski Aug 25, 2020
e6edb8b
Add carrier claims to BB2.
jawalonoski Aug 28, 2020
b1169a0
Add PDE export to BB2.
jawalonoski Sep 1, 2020
030687a
Barebones beneficiary history file (required fields only)
hadleynet Sep 2, 2020
301c0be
added provider state codes and logic to generate compliant hic ids
babraham33 Sep 3, 2020
c412015
removed print statement
babraham33 Sep 3, 2020
f6d3269
Disable BB2 export of everything except beneficiary and inpatient tab…
hadleynet Sep 11, 2020
851ee3a
added ssa county code lookups for beneficiary data
babraham33 Sep 15, 2020
9a617cd
Ensure BB2 cost fields are two decimal places.
hadleynet Sep 15, 2020
cdd320b
converted default ssa value to dummy zipcode since field is required.
babraham33 Sep 15, 2020
4d1ee2c
changed default value for ssa lookup to Bedford ssa code
babraham33 Sep 15, 2020
ce7c7ac
Remove bad comment and unused import.
jawalonoski Sep 16, 2020
15f1fbd
Fix state and sex codes. Fix checkstyle warnings.
hadleynet Sep 16, 2020
f894059
Add diagnosis map.
jawalonoski Sep 16, 2020
5b50b00
Fix exceptions when running without map.
jawalonoski Sep 16, 2020
95ae29c
Add procedures codes to BB inpatient.
jawalonoski Sep 17, 2020
bb8c6f9
BB optional num columns must be zero if empty.
jawalonoski Sep 18, 2020
6f07506
Rename BB2 RIF export property
hadleynet Oct 1, 2020
d2100fe
Add DME: crutches, nebulizer, blood glucose meter and test strips.
jawalonoski Feb 12, 2021
b0844ac
Add code translation for medications, refactor condition code transla…
hadleynet Feb 17, 2021
1f6e92e
Fix catch blck for Java 8
hadleynet Feb 18, 2021
b46ef0f
Fix comment
hadleynet Feb 18, 2021
523aceb
Enable prescription exports, fix deprecated warnings.
hadleynet Feb 18, 2021
b4b12d9
Re-enable prescription file flush at end
hadleynet Feb 18, 2021
3737705
Add CLM_DRG_CD code to inpatient output
hadleynet Feb 19, 2021
de9fbd5
Hk 4 bb export (#860)
hkong Feb 23, 2021
061c548
new property to synthea.properties: exporter.bfd.default_config_file;
hkong Feb 26, 2021
d98d8d1
undo rebase errors (add back CodeMapper code)
hkong Mar 5, 2021
3a344b3
remove test that fails in Java 8 but works in Java 11;
hkong Mar 5, 2021
64b442a
Remove some stuff that got merged back in by mistake. Remove new sour…
hadleynet Mar 8, 2021
2f08c3a
delete obsolete comments
hkong Mar 9, 2021
ac61ef6
Add extra test with fixed patient creation. Change exception handling…
hadleynet Mar 9, 2021
c0c491a
Add support for device and supply costs
hadleynet Mar 3, 2021
26a53da
Fix JDK8 test failure
hadleynet Mar 3, 2021
a40bc87
Pull TSV config classes into main BFD exporter class. Move TSV macros…
hadleynet Mar 15, 2021
ab4b4ad
Fix issues that prevent loading into BFD
hadleynet Mar 15, 2021
98a1b6d
Update BFD inpatient table export
hadleynet Mar 22, 2021
8eb69bc
Fix CI test
hadleynet Mar 22, 2021
fed48db
Really fix CI test this time
hadleynet Mar 22, 2021
a6dbfce
Fix space/tab in tsv file.
jawalonoski Mar 25, 2021
39cab79
Fix my fix.
jawalonoski Mar 25, 2021
b5d59b7
BFD exporter now outputs NPI file.
jawalonoski Mar 26, 2021
81dc28b
Export NPIs for providers and clinicians
hadleynet Mar 30, 2021
9eca6c2
Updates to BFD outpatient file - now loads and passes BFD unit tests
hadleynet Apr 5, 2021
b243dee
Initial hospice.
jawalonoski Apr 8, 2021
4d33f68
Add basic home health module.
jawalonoski Apr 13, 2021
f7d83f1
Added enums for RIF HHA, SNF and Hospice tables. Updated BFD spreadsh…
hadleynet Apr 15, 2021
eece424
Added basic SNF module. Requires review.
jawalonoski Apr 15, 2021
c5612e5
Updates to get carrier file to import into BFD
hadleynet Apr 20, 2021
e222697
Updates to get dme file to import into BFD
hadleynet Apr 21, 2021
6b63081
Changes to support bene history import to BFD
hadleynet Apr 21, 2021
136c543
Only export DME that has a map.
jawalonoski Apr 21, 2021
8558c56
Add SNF export.
jawalonoski Apr 29, 2021
140ecc9
Initial changes for HHA csv file.
jawalonoski May 4, 2021
53f641e
Fix HHA export.
jawalonoski May 4, 2021
a23983a
Add hospice file entries
hadleynet May 5, 2021
39a6f9f
Update spreadsheet to match additional coded fields
hadleynet May 5, 2021
ca06d9c
Update MBI_NUM field to match CMS MBI format
hadleynet May 12, 2021
1b77d7c
Output more realistic HICN values
hadleynet May 19, 2021
e25ac7f
Add configuration options for generated id ranges for bene id, claim …
hadleynet May 19, 2021
9a4eca8
Add support for Part D contract IDs
hadleynet Jun 4, 2021
05eeb31
updated hospice module
May 20, 2021
671f592
updated home health module
May 20, 2021
542a826
updated snf module
May 20, 2021
c95dd28
removed medication administration
May 20, 2021
0d3b7c4
removed old count visit, end visits code
May 20, 2021
86a7b25
added conditions and concepts that bring patients to hospice
May 27, 2021
4f5461d
added conditions and concepts that bring patients to home health
May 27, 2021
52e85a0
added conditions and concepts that bring patients into snf
May 27, 2021
1bfe3a8
added terminal state
May 27, 2021
44b1115
Fix SetAttributes, Ranges, display values.
jawalonoski Jun 8, 2021
3bf1ce3
Adjust initiation of home, snf, hospice modules.
jawalonoski Jun 8, 2021
eba25b3
Add more diagnosis codes to RIF.
jawalonoski Jun 9, 2021
a75ff47
Add procedure codes to RIF SNF.
jawalonoski Jun 9, 2021
614961d
Add a manifest file to BB2 exports
hadleynet Jun 10, 2021
6663244
Add check digit to generated NPIs
hadleynet Jun 29, 2021
84d481a
Rebase bb-export branch on master, switch file output to use the new …
hadleynet Jul 9, 2021
848e4ce
Updates to hospice modules and updates to diagnosis codes for all BFD…
jawalonoski Jul 23, 2021
6af4499
Fix rare exception related to encounter.reason.
jawalonoski Jul 26, 2021
be41d93
Changed data types for ClaimId and Beneificiary Id to Long from Int
cbrunefearless Aug 5, 2021
62fa8c2
Output multiple line items for hospice claims. Needs new hospice code…
hadleynet Aug 5, 2021
d1128b5
Add HHA line items.
jawalonoski Aug 27, 2021
8aeec3d
Update home line item algorithm. Skips unmappable items.
jawalonoski Aug 30, 2021
2ad1ceb
HHA: clear out unused fields.
jawalonoski Aug 30, 2021
745a0e3
Rename mapping file.
jawalonoski Aug 30, 2021
b397696
Update hospice export to iterate over claim entries instead of encoun…
hadleynet Aug 30, 2021
d6b113e
Export line items for additional BFD file types. Throw exception if c…
hadleynet Sep 2, 2021
f03df9b
Add configuration option to allow running BFD exporter without code m…
hadleynet Sep 7, 2021
1bf4da8
Update DME exporter to use claim line items, update BFD field spreads…
hadleynet Sep 10, 2021
b8bb73b
Synchronize each claim output to ensure all line items are grouped to…
hadleynet Sep 14, 2021
728ee49
Add rendering physician NPI and diagnosis present on admission flag.
jawalonoski Sep 16, 2021
3cf029e
Attempt to fix thread issue and checkstyle warnings.
jawalonoski Sep 20, 2021
1fcd10d
Move BFD code mapping files. Change refs to newly static fields. Defa…
hadleynet Sep 21, 2021
0d7a551
Remove unused attribute.
jawalonoski Sep 28, 2021
885ca52
Address some PR review comments: removing duplicate functionality, mo…
hadleynet Oct 1, 2021
3550a99
AB2D missing fields.
jawalonoski Oct 1, 2021
4bf06a7
Factor out PartD contract history and change algorithm so bene's only…
hadleynet Oct 1, 2021
c672335
Address PR review comments. Adjust part d contract history so only 20…
hadleynet Oct 7, 2021
ce49709
Only generate a single beneficiary file but group rows for each benef…
hadleynet Oct 7, 2021
32a3624
Improved Medicare Part D output for RIF exporter.
hadleynet Oct 11, 2021
4f27c19
Additional missing AB2D field.
jawalonoski Oct 14, 2021
f6d67e4
Export a properties file that captures the end state of all of the RI…
hadleynet Oct 21, 2021
6c0fe8d
Only write RIF file headers if the file is empty, otherwise append to…
hadleynet Oct 22, 2021
3c3e65a
Add new option to SetAttribute for valueAttribute.
jawalonoski Oct 22, 2021
2bfa21c
Add RIF export for FI_DOC_CLM_CNTL_NUM and CARR_CLM_CNTL_NUM fields
hadleynet Oct 29, 2021
3f080f8
Separate BFD bene export into two files: one for INSERTS, the other f…
hadleynet Nov 1, 2021
2e791de
Bene file is now exported to three files: one for all inserts, one fo…
hadleynet Nov 3, 2021
e503ec3
DME updates for supplies.
jawalonoski Nov 5, 2021
02c953b
Move wellness claims from outpatient file to carrier file. Adjust enc…
hadleynet Nov 9, 2021
b5ce580
Only test certain bb export assertions when corresponding code maps a…
hadleynet Nov 10, 2021
05764cb
Assorted additional BFD fields and tweaks for consistency across files.
hadleynet Nov 19, 2021
c3cc699
Fix BFD TSV error
hadleynet Nov 23, 2021
2175bce
Assorted updates to align BFD field coverage spreadsheet with code an…
hadleynet Nov 24, 2021
e2c320c
Another batch of small changes to reconcile field coverage across fil…
hadleynet Nov 30, 2021
ac3ea24
Update cost adjustments with 2019 CMS Geographic Variation Public Use…
jawalonoski Dec 2, 2021
af8931b
Re-add end_stage_renal_disease attribute for Medicare eligibility det…
jawalonoski Dec 3, 2021
7bdefc5
Remove empty assign_to_attribute fields.
jawalonoski Dec 3, 2021
c0d0866
Add betos codes to carrier and dme, add ESRD codes to bene and bene_h…
hadleynet Dec 3, 2021
0e597ff
Post rebase updates to restore function and address new checkstyle wa…
hadleynet Dec 10, 2021
cb92986
Address PR review comments. Rework low income indicator field.
hadleynet Dec 16, 2021
65b0403
Undo a change that introduces slightly different behavior when the va…
hadleynet Dec 16, 2021
a74506b
Trying to track down a couple of CI-only test failures
hadleynet Dec 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ bin/**
# don't commit the autobuilt version file
src/main/resources/version.txt

# don't commit the code maps
src/main/resources/export/condition_code_map.json
src/main/resources/export/medication_code_map.json
src/main/resources/export/drg_code_map.json
src/main/resources/export/dme_code_map.json
src/main/resources/export/hcpcs_code_map.json
src/main/resources/export/betos_code_map.json

# H2 database files
**/*.mv.db
**/*.trace.db
Expand All @@ -26,5 +34,5 @@ src/main/resources/version.txt
.vscode/settings.json
/build/

src/main/resources/map.json

# VS Code plugin files
.history
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ repositories {
}
}

// Uncomment to see deprecation warnings
// tasks.withType(JavaCompile) {
// options.compilerArgs << "-Xlint:deprecation"
// }

checkstyle {
toolVersion '8.4'
//showViolations = true
Expand Down
2 changes: 2 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
<property name="eachLine" value="true"/>
</module>

<module name="SuppressWarningsFilter" />
<module name="TreeWalker">
<module name="OuterTypeFilename"/>
<module name="SuppressWarningsHolder" />
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
<property name="format" value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/org/mitre/synthea/engine/State.java
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,8 @@ public static class SetAttribute extends State {
// For GMF 1.0 Support
private Object value;
private Code valueCode;
/** When the value of the attribute should be the value of another attribute. */
private String valueAttribute;
private Range<Double> range;
private String expression;
private transient ThreadLocal<ExpressionProcessor> threadExpProcessor;
Expand Down Expand Up @@ -709,6 +711,11 @@ public boolean process(Person person, long time) {
value = distribution.generate(person);
} else if (valueCode != null) {
value = valueCode;
} else if (valueAttribute != null) {
// the module is setting an attribute to be the value of an existing attribute
if (person.attributes.containsKey(valueAttribute)) {
value = person.attributes.get(valueAttribute);
hadleynet marked this conversation as resolved.
Show resolved Hide resolved
}
}

if (value != null) {
Expand Down Expand Up @@ -845,8 +852,13 @@ public boolean process(Person person, long time) {

if (reason != null) {
if (person.attributes.containsKey(reason)) {
Entry condition = (Entry) person.attributes.get(reason);
encounter.reason = condition.codes.get(0);
Object value = person.attributes.get(reason);
if (value instanceof Entry) {
Entry condition = (Entry) person.attributes.get(reason);
encounter.reason = condition.codes.get(0);
} else if (value instanceof Code) {
encounter.reason = (Code) value;
}
} else if (person.hadPriorState(reason)) {
// loop through the present conditions, the condition "name" will match
// the name of the ConditionOnset state (aka "reason")
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/org/mitre/synthea/engine/Transition.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@ private void loadLookupTable() {
String fileName = Config.get("generate.lookup_tables") + lookupTableName;
List<? extends Map<String, String>> lookupTable = null;
try {
String csv = Utilities.readResource(fileName);
if (csv.startsWith("\uFEFF")) {
csv = csv.substring(1); // Removes BOM.
}
String csv = Utilities.readResourceAndStripBOM(fileName);
lookupTable = SimpleCSV.parse(csv);
} catch (IOException e) {
e.printStackTrace();
Expand Down
Loading