
from django.db import models
import csv
class Beneficiary(models.Model):
    BeneID = models.CharField(max_length=20, null=True)
    DOB = models.DateField(null=True)
    DOD = models.DateField(null=True)
    Gender = models.IntegerField(null=True)
    Race = models.IntegerField(null=True)
    RenalDiseaseIndicator = models.CharField(max_length=1,null=True)
    State = models.IntegerField(null=True)
    Country = models.IntegerField(null=True)
    NoOfMonths_PartACov = models.IntegerField(null=True)
    NoOfMonths_PartBCov = models.IntegerField(null=True) 
    ChronicCond_Alzheimer = models.IntegerField(null=True)
    ChronicCond_Heartfailure = models.IntegerField(null=True) 
    ChronicCond_KidneyDisease = models.IntegerField(null=True) 
    ChronicCond_Cancer = models.IntegerField(null=True)
    ChronicCond_ObstrPulmonary = models.IntegerField(null=True)
    ChronicCond_Depression = models.IntegerField(null=True)
    ChronicCond_Diabetes = models.IntegerField(null=True)
    ChronicCond_IschemicHeart = models.IntegerField(null=True) 
    ChronicCond_Osteoporasis = models.IntegerField(null=True) 
    ChronicCond_rheumatoidarthritis = models.IntegerField(null=True) 
    ChronicCond_stroke = models.IntegerField(null=True) 
    IPAnnualReimbursementAmt = models.IntegerField(null=True)
    IPAnnualDeductibleAmt = models.IntegerField(null=True)
    OPAnnualReimbursementAmt = models.IntegerField(null=True) 
    OPAnnualDeductibleAmt = models.IntegerField(null=True) 

class Inpatient(models.Model):
    BeneID = models.CharField(max_length=20, null=True)
    ClaimID = models.CharField(max_length=20, null=True)
    ClaimStartDt = models.DateField(null=True)
    ClaimEndDt = models.DateField(null=True)
    Provider = models.CharField(max_length=20, null=True)
    InscClaimAmtReimbursed = models.IntegerField(null=True) 
    AttendingPhysician = models.CharField(max_length=20, null=True)
    OperatingPhysician = models.CharField(max_length=20, null=True) 
    OtherPhysician = models.CharField(max_length=20, null=True) 
    AdmissionDt = models.DateField(null=True)
    ClmAdmitDiagnosisCode = models.CharField(max_length=20, null=True) 
    DeductibleAmtPaid = models.IntegerField(null=True) 
    DischargeDt = models.DateField(null=True)
    DiagnosisGroupCode = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_1 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_2 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_3 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_4 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_5 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_6 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_7 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_8 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_9 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_10 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_1 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_2 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_3 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_4 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_5 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_6 = models.CharField(max_length=20, null=True) 

class Outpatient(models.Model):	
    BeneID = models.CharField(max_length=20, null=True) 
    ClaimID = models.CharField(max_length=20, null=True) 
    ClaimStartDt = models.DateField(null=True)
    ClaimEndDt = models.DateField(null=True)
    Provider = models.CharField(max_length=20, null=True) 
    InscClaimAmtReimbursed = models.IntegerField(null=True) 
    AttendingPhysician = models.CharField(max_length=20, null=True) 
    OperatingPhysician = models.CharField(max_length=20, null=True) 
    OtherPhysician = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_1 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_2 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_3 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_4 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_5 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_6 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_7 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_8 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_9 = models.CharField(max_length=20, null=True)  
    ClmDiagnosisCode_10 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_1 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_2 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_3 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_4 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_5 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_6 = models.CharField(max_length=20, null=True) 
    DeductibleAmtPaid = models.IntegerField(null=True) 
    ClmAdmitDiagnosisCode = models.CharField(max_length=20, null=True) 


class BeneficiaryTest(models.Model):
    BeneID = models.CharField(max_length=20, null=True)
    DOB = models.DateField(null=True)
    DOD = models.DateField(null=True)
    Gender = models.IntegerField(null=True)
    Race = models.IntegerField(null=True)
    RenalDiseaseIndicator = models.CharField(max_length=1,null=True)
    State = models.IntegerField(null=True)
    Country = models.IntegerField(null=True)
    NoOfMonths_PartACov = models.IntegerField(null=True)
    NoOfMonths_PartBCov = models.IntegerField(null=True) 
    ChronicCond_Alzheimer = models.IntegerField(null=True)
    ChronicCond_Heartfailure = models.IntegerField(null=True) 
    ChronicCond_KidneyDisease = models.IntegerField(null=True) 
    ChronicCond_Cancer = models.IntegerField(null=True)
    ChronicCond_ObstrPulmonary = models.IntegerField(null=True)
    ChronicCond_Depression = models.IntegerField(null=True)
    ChronicCond_Diabetes = models.IntegerField(null=True)
    ChronicCond_IschemicHeart = models.IntegerField(null=True) 
    ChronicCond_Osteoporasis = models.IntegerField(null=True) 
    ChronicCond_rheumatoidarthritis = models.IntegerField(null=True) 
    ChronicCond_stroke = models.IntegerField(null=True) 
    IPAnnualReimbursementAmt = models.IntegerField(null=True)
    IPAnnualDeductibleAmt = models.IntegerField(null=True)
    OPAnnualReimbursementAmt = models.IntegerField(null=True) 
    OPAnnualDeductibleAmt = models.IntegerField(null=True) 

class InpatientTest(models.Model):
    BeneID = models.CharField(max_length=20, null=True)
    ClaimID = models.CharField(max_length=20, null=True)
    ClaimStartDt = models.DateField(null=True)
    ClaimEndDt = models.DateField(null=True)
    Provider = models.CharField(max_length=20, null=True)
    InscClaimAmtReimbursed = models.IntegerField(null=True) 
    AttendingPhysician = models.CharField(max_length=20, null=True)
    OperatingPhysician = models.CharField(max_length=20, null=True) 
    OtherPhysician = models.CharField(max_length=20, null=True) 
    AdmissionDt = models.DateField(null=True)
    ClmAdmitDiagnosisCode = models.CharField(max_length=20, null=True) 
    DeductibleAmtPaid = models.IntegerField(null=True) 
    DischargeDt = models.DateField(null=True)
    DiagnosisGroupCode = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_1 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_2 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_3 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_4 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_5 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_6 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_7 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_8 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_9 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_10 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_1 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_2 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_3 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_4 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_5 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_6 = models.CharField(max_length=20, null=True) 

class OutpatientTest(models.Model):
    BeneID = models.CharField(max_length=20, null=True) 
    ClaimID = models.CharField(max_length=20, null=True) 
    ClaimStartDt = models.DateField(null=True)
    ClaimEndDt = models.DateField(null=True)
    Provider = models.CharField(max_length=20, null=True) 
    InscClaimAmtReimbursed = models.IntegerField(null=True) 
    AttendingPhysician = models.CharField(max_length=20, null=True) 
    OperatingPhysician = models.CharField(max_length=20, null=True) 
    OtherPhysician = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_1 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_2 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_3 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_4 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_5 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_6 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_7 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_8 = models.CharField(max_length=20, null=True) 
    ClmDiagnosisCode_9 = models.CharField(max_length=20, null=True)  
    ClmDiagnosisCode_10 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_1 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_2 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_3 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_4 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_5 = models.CharField(max_length=20, null=True) 
    ClmProcedureCode_6 = models.CharField(max_length=20, null=True) 
    DeductibleAmtPaid = models.IntegerField(null=True) 
    ClmAdmitDiagnosisCode = models.CharField(max_length=20, null=True) 


class Test(models.Model):
    Provider = models.CharField(max_length=20, null=True) 


class Train(models.Model):
    Provider = models.CharField(max_length=20, null=True) 
    PotentialFraud = models.CharField(max_length=20, null=True) 

