Giter VIP home page Giter VIP logo

medicare's Introduction

Medicare

Import Medicare Data into Neo4j

Instructions

This project uses maven, to build a jar-file with the procedure in this project, simply package the project with maven:

mvn clean package

This will produce a jar-file, target/medicare-1.0-SNAPSHOT.jar, that can be copied to the plugin directory of your Neo4j instance.

cp target/medicare-1.0-SNAPSHOT.jar neo4j-enterprise-3.5.6/plugins/.

Restart your Neo4j Server. Your new Stored Procedures are available:

CALL com.maxdemarzi.schema.generate();

CALL com.maxdemarzi.import(reltype, file)
CALL com.maxdemarzi.import("PRESCRIBED_2017", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/PartD_Prescriber_PUF_NPI_Drug_17.txt")

CALL com.maxdemarzi.import.shared(reltype, file)
CALL com.maxdemarzi.import.shared("SHARED_2015", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/physician-shared-patient-patterns-2015-days30.txt")

Data:

Download and unzip data (warning, large files ahead):

Medicare Provider Charge Data

Exclusion List (fraudsters)

FDA Drug Data

CMS Physician Shared Patient Patterns Data

Sequence:

  1. Create the Schema:

     CALL com.maxdemarzi.schema.generate();
    
  2. Import the PartD files in reverse order (10-15 minutes each):

     CALL com.maxdemarzi.import("PRESCRIBED_2017", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/PartD_Prescriber_PUF_NPI_Drug_17.txt")
     CALL com.maxdemarzi.import("PRESCRIBED_2016", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/PartD_Prescriber_PUF_NPI_Drug_16.txt")
     CALL com.maxdemarzi.import("PRESCRIBED_2015", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/PartD_Prescriber_PUF_NPI_Drug_15.txt")
     CALL com.maxdemarzi.import("PRESCRIBED_2014", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/PartD_Prescriber_PUF_NPI_Drug_14.txt")
     CALL com.maxdemarzi.import("PRESCRIBED_2013", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/PartD_Prescriber_PUF_NPI_Drug_13.txt")
    
  3. Import the Exclusions (10 seconds):

     USING PERIODIC COMMIT 
     LOAD CSV WITH HEADERS FROM "file:///exclusions-06-2019.csv" AS line WITH line
     MATCH (p:Provider {npi: line.NPI})
     SET p:Fraudster, p.excluded_date = date(line.EXCLDATE)
    
  4. Import the Shared Patients:

     CALL com.maxdemarzi.import.shared("SHARED_2015", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/physician-shared-patient-patterns-2015-days30.txt")
     CALL com.maxdemarzi.import.shared("SHARED_2014", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/physician-shared-patient-patterns-2014-days30.txt")
     CALL com.maxdemarzi.import.shared("SHARED_2013", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/physician-shared-patient-patterns-2013-days30.txt")
     CALL com.maxdemarzi.import.shared("SHARED_2012", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/physician-shared-patient-patterns-2012-days30.txt")
     CALL com.maxdemarzi.import.shared("SHARED_2011", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/physician-shared-patient-patterns-2011-days30.txt")
     CALL com.maxdemarzi.import.shared("SHARED_2010", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/physician-shared-patient-patterns-2010-days30.txt")
     CALL com.maxdemarzi.import.shared("SHARED_2009", "/Users/maxdemarzi/Documents/Projects/medicare/neo4j-enterprise-3.5.7/import/physician-shared-patient-patterns-2009-days30.txt")
    

medicare's People

Contributors

maxdemarzi avatar

Stargazers

Zhibo avatar

Watchers

James Cloos avatar

Forkers

anand7545

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.