class AccChem(BaseRMPModel): accchem_id = models.CopyFromIntegerField( primary_key=True, verbose_name='Accident Chemical Record ID', help_text='A unique ID for each accident chemical record.', ) accident = models.CopyFromForeignKey( 'Accident', on_delete=models.PROTECT, help_text='The unique ID for each accident record', ) chemical = models.CopyFromForeignKey( 'ChemCd', on_delete=models.PROTECT, help_text='The identifying ID for a particular chemical released in an ' 'accident.', ) quantity_lbs = models.CopyFromIntegerField( null=True, verbose_name='Amount Released (lbs)', help_text='The amount of the substance released in the accident, in ' 'pounds, to two significant digits.', ) percent_weight = models.CopyFromDecimalField( decimal_places=2, null=True, max_digits=5, verbose_name='Percent Weight (Within Mixture)', help_text='The percent weight of a chemical within a mixture released ' 'in an accident.', ) num_acc_flam = models.CopyFromIntegerField( null=True, verbose_name='Number of Flammable Components', help_text='The number of listed flammable component chemicals for this' ' chemical record.', ) cas = models.CopyFromCharField( max_length=9, verbose_name='CAS number', help_text='The identifying CAS number for a chemical.', ) CHEMICAL_TYPE_CHOICES = ( ('T', 'toxic'), ('F', 'flammable'), ) chemical_type = models.CopyFromCharField( max_length=1, choices=CHEMICAL_TYPE_CHOICES, help_text='"The type of chemical.', )
class Tbls7PreventionProgramChemicals(BaseRMPModel): primarykey = models.CopyFromIntegerField( primary_key=True) # Field name made lowercase. preventionprogram3id = models.CopyFromForeignKey( ) # Field name made lowercase. processchemicalid = models.CopyFromForeignKey( tbls1ProcessChemicals, on_delete=models.PROTECT, ) # Field name made lowercase. source_file = 'tblS7_Prevention_Program_Chemicals' class Meta: db_table = 'tblS7_Prevention_Program_Chemicals'
class Tbls4Flammablesworstcase(BaseRMPModel): flammableid = models.CopyFromIntegerField(primary_key=True) processchemicalid = models.CopyFromForeignKey(Tbls1Processchemicals, on_delete=models.PROTECT) analyticalbasis = models.CopyFromCharField(max_length=255, blank=True) quantityreleased = models.CopyFromDecimalField(max_digits=6, decimal_places=2, blank=True) endpoint_distance = models.CopyFromDecimalField(max_digits=5, decimal_places=1) residentialpopulation = models.CopyFromCharField(max_length=9, blank=True) pr_schools = models.CopyFromBooleanField() pr_residences = models.CopyFromBooleanField() pr_hospitals = models.CopyFromBooleanField() pr_prisons = models.CopyFromBooleanField() pr_publicrecreation = models.CopyFromBooleanField() pr_comm_ind = models.CopyFromBooleanField() pr_othertype = models.CopyFromCharField(max_length=200, blank=True) er_natlstateparks = models.CopyFromBooleanField() er_wildlifesactuary = models.CopyFromBooleanField() er_fedwilderness = models.CopyFromBooleanField() er_othertype = models.CopyFromCharField(max_length=200, blank=True) pm_blastwalls = models.CopyFromBooleanField() pm_othertype = models.CopyFromCharField(max_length=200, blank=True) ptrgraphic = models.CopyFromBooleanField(max_length=12, blank=True) cbi_flag = models.CopyFromBooleanField() source_file = 'tblS4FlammablesWorstCase' class Meta: db_table = 'tblS4FlammablesWorstCase'
class Tbls9Emergencyresponses(BaseRMPModel): facilityid = models.CopyFromForeignKey( Tbls1Facilities, on_delete=models.PROTECT, ) er_communityplan = models.CopyFromBooleanField() er_facilityplan = models.CopyFromBooleanField() er_responseactions = models.CopyFromBooleanField() er_publicinfoprocedures = models.CopyFromBooleanField() er_emergencyhealthcare = models.CopyFromBooleanField() er_reviewdate = models.CopyFromDateTime(blank=True) ertrainingdate = models.CopyFromDateTime(blank=True) coordinatingagencyname = models.CopyFromCharField(max_length=250, blank=True) coordinatingagencyphone = models.CopyFromCharField(max_length=10, blank=True) fr_osha1910_38 = models.CopyFromBooleanField() fr_osha1910_120 = models.CopyFromBooleanField() fr_spcc = models.CopyFromBooleanField() fr_rcra = models.CopyFromBooleanField() fr_opa90 = models.CopyFromBooleanField() fr_epcra = models.CopyFromBooleanField() fr_otherregulation = models.CopyFromCharField(max_length=200, blank=True) source_file = 'tblS9EmergencyResponses' class Meta: db_table = 'tblS9EmergencyResponses'
class Tbls3Toxicsaltreleases(models.Model): toxicid = models.CopyFromIntegerField(primary_key=True) processchemicalid = models.CopyFromForeignKey( Tbls1Processchemicals, on_delete=models.PROTECT, ) percentweight = models.CopyFromDecimalField(max_digits=4, decimal_places=1, blank=True) physicalstate = models.CopyFromCharField(max_length=1, blank=True) analyticalbasis = models.CopyFromCharField(max_length=255, blank=True) scenario = models.CopyFromCharField(max_length=200) quantityreleased = models.CopyFromDecimalField(max_digits=5, decimal_places=2) releaseduration = models.CopyFromDecimalField(max_digits=5, decimal_places=2) releaserate = models.CopyFromBooleanField(blank=True) windspeed = models.CopyFromDecimalField(max_digits=6, decimal_places=2) stabilityclass = models.CopyFromCharField(max_length=1, blank=True) topography = models.CopyFromCharField(max_length=1, blank=True) endpoint_distance = models.CopyFromDecimalField(max_digits=5, decimal_places=1) residentialpopulation = models.CopyFromCharField(max_length=9, blank=True) pr_schools = models.CopyFromBooleanField() pr_residences = models.CopyFromBooleanField() pr_hospitals = models.CopyFromBooleanField() pr_prisons = models.CopyFromBooleanField() pr_publicrecreation = models.CopyFromBooleanField() pr_comm_ind = models.CopyFromBooleanField() pr_othertype = models.CopyFromCharField(max_length=200, blank=True) er_natlstateparks = models.CopyFromBooleanField() er_wildlifesactuary = models.CopyFromBooleanField() er_fedwilderness = models.CopyFromBooleanField() er_othertype = models.CopyFromCharField(max_length=200, blank=True) pm_dikes = models.CopyFromBooleanField() pm_enclosures = models.CopyFromBooleanField() pm_berms = models.CopyFromBooleanField() pm_drains = models.CopyFromBooleanField() pm_sumps = models.CopyFromBooleanField() pm_othertype = models.CopyFromCharField(max_length=200, blank=True) am_sprinklersystems = models.CopyFromBooleanField() am_delugesystems = models.CopyFromBooleanField() am_watercurtain = models.CopyFromBooleanField() am_neutralization = models.CopyFromBooleanField() am_excessflowvalve = models.CopyFromBooleanField() am_flares = models.CopyFromBooleanField() am_scrubbers = models.CopyFromBooleanField() am_emergencyshutdown = models.CopyFromBooleanField() am_othertype = models.CopyFromCharField(max_length=200, blank=True) ptrgraphic = models.CopyFromCharField(max_length=12, blank=True) cbi_flag = models.CopyFromBooleanField() source_file = 'tblS3ToxicsAltReleases' class Meta: db_table = 'tblS3ToxicsAltReleases'
class Tbls2Toxicsworstcase(BaseRMPModel): toxicid = models.CopyFromIntegerField(primary_key=True) processchemicalid = models.CopyFromForeignKey(Tbls1Processchemicals, on_delete=models.PROTECT) percentweight = models.CopyFromDecimalField(max_digits=4, decimal_places=1, blank=True) physicalstate = models.CopyFromCharField(max_length=1, blank=True) analyticalbasis = models.CopyFromCharField(max_length=255, blank=True) scenario = models.CopyFromCopyFromBooleanField(blank=True) quantityreleased = models.CopyFromDecimalField(max_digits=6, decimal_places=2, blank=True) releaseduration = models.CopyFromDecimalField(max_digits=6, decimal_places=2, blank=True) releaserate = models.CopyFromDecimalField(max_digits=4, decimal_places=1, blank=True) windspeed = models.CopyFromDecimalField(max_digits=4, decimal_places=1, blank=True) stabilityclass = models.CopyFromCharField(max_length=1, blank=True) topography = models.CopyFromCharField(max_length=1, blank=True) endpoint_distance = models.CopyFromDecimalField(max_digits=5, decimal_places=1) residentialpopulation = models.CopyFromBooleanField(blank=True) pr_schools = models.CopyFromBooleanField() pr_residences = models.CopyFromBooleanField() pr_hospitals = models.CopyFromBooleanField() pr_prisons = models.CopyFromBooleanField() pr_publicrecreation = models.CopyFromBooleanField() pr_comm_ind = models.CopyFromBooleanField() pr_othertype = models.CopyFromCharField(max_length=200, blank=True) er_natlstateparks = models.CopyFromBooleanField() er_wildlifesactuary = models.CopyFromBooleanField() er_fedwilderness = models.CopyFromBooleanField() er_othertype = models.CopyFromCharField(max_length=200, blank=True) pm_dikes = models.CopyFromBooleanField() pm_enclosures = models.CopyFromBooleanField() pm_berms = models.CopyFromBooleanField() pm_drains = models.CopyFromBooleanField() pm_sumps = models.CopyFromBooleanField() pm_othertype = models.CopyFromCharField(max_length=200, blank=True) ptrgraphic = models.CopyFromBooleanField(max_length=12, blank=True) cbi_flag = models.CopyFromBooleanField() source_file = 'tblS2ToxicsWorstCase' class Meta: db_table = 'tblS2ToxicsWorstCase'
class Tbls5Flammablesaltreleases(BaseRMPModel): flammableid = models.CopyFromIntegerField(primary_key=True) processchemicalid = models.CopyFromForeignKey( Tbls1Processchemicals, on_delete=models.PROTECT, ) analyticalbasis = models.CopyFromCharField(max_length=255, blank=True) scenario = models.CopyFromCharField(max_length=200) quantityreleased = models.CopyFromDecimalField(max_digits=5, decimal_places=2) endpointused = models.CopyFromCharField(max_length=30, blank=True) lfl_value = models.CopyFromDecimalField(max_digits=5, decimal_places=1) endpoint_distance = models.CopyFromDecimalField(max_digits=5, decimal_places=1) residentialpopulation = models.CopyFromCharField(max_length=9, blank=True) pr_schools = models.CopyFromBooleanField() pr_residences = models.CopyFromBooleanField() pr_hospitals = models.CopyFromBooleanField() pr_prisons = models.CopyFromBooleanField() pr_publicrecreation = models.CopyFromBooleanField() pr_comm_ind = models.CopyFromBooleanField() pr_othertype = models.CopyFromCharField(max_length=200, blank=True) er_natlstateparks = models.CopyFromBooleanField() er_wildlifesactuary = models.CopyFromBooleanField() er_fedwilderness = models.CopyFromBooleanField() er_othertype = models.CopyFromCharField(max_length=200, blank=True) pm_dikes = models.CopyFromBooleanField() pm_firewalls = models.CopyFromBooleanField() pm_blastwalls = models.CopyFromBooleanField() pm_enclosures = models.CopyFromBooleanField() pm_othertype = models.CopyFromCharField(max_length=200, blank=True) am_sprinklersystems = models.CopyFromBooleanField() am_delugesystems = models.CopyFromBooleanField() am_watercurtain = models.CopyFromBooleanField() am_excessflowvalve = models.CopyFromBooleanField() am_othertype = models.CopyFromCharField(max_length=200, blank=True) ptrgraphic = models.CopyFromCharField(max_length=12, blank=True) cbi_flag = models.CopyFromBooleanField() source_file = 'tblS5FlammablesAltReleases' class Meta: db_table = 'tblS5FlammablesAltReleases'
class Tbls7PreventionProgram3(BaseRMPModel): preventionprogram3id = models.CopyFromIntegerField(primary_key=True) procnaics_id = models.CopyFromForeignKey(Tbls1ProcessNaics, on_delete=models.CASCADE) safety_info_date = models.CopyFromDateTime() last_pha_date = models.CopyFromDateTime() pha_whatif = models.CopyFromBooleanField() pha_checklist = models.CopyFromBooleanField() pha_whatifcheck = models.CopyFromBooleanField() pha_hazop = models.CopyFromBooleanField() pha_fmea = models.CopyFromBooleanField() pha_fta = models.CopyFromBooleanField() pha_other = models.CopyFromCharField(max_length=200, blank=True) change_comp_date = models.CopyFromDateTime() mh_toxicrelease = models.CopyFromBooleanField() mh_fire = models.CopyFromBooleanField() mh_explosion = models.CopyFromBooleanField() mh_runawayreact = models.CopyFromBooleanField() mh_polymerization = models.CopyFromBooleanField() mh_overpressure = models.CopyFromBooleanField() mh_corrosion = models.CopyFromBooleanField() mh_overfilling = models.CopyFromBooleanField() mh_contamination = models.CopyFromBooleanField() mh_equipfailure = models.CopyFromBooleanField() mh_cooling_loss = models.CopyFromBooleanField() mh_earthquake = models.CopyFromBooleanField() mh_floods = models.CopyFromBooleanField() mh_tornado = models.CopyFromBooleanField() mh_hurricanes = models.CopyFromBooleanField() mh_othertype = models.CopyFromCharField(max_length=200, blank=True) pc_vents = models.CopyFromBooleanField() pc_reliefvalves = models.CopyFromBooleanField() pc_checkvalves = models.CopyFromBooleanField() pc_scrubbers = models.CopyFromBooleanField() pc_flares = models.CopyFromBooleanField() pc_manualshutoffs = models.CopyFromBooleanField() pc_autoshutoffs = models.CopyFromBooleanField() pc_interlocks = models.CopyFromBooleanField() pc_alarms = models.CopyFromBooleanField() pc_keyedbypass = models.CopyFromBooleanField() pc_emergencyair = models.CopyFromBooleanField() pc_emergencypower = models.CopyFromBooleanField() pc_backuppump = models.CopyFromBooleanField() pc_groundingequip = models.CopyFromBooleanField() pc_inhibitoradd = models.CopyFromBooleanField() pc_rupturedisks = models.CopyFromBooleanField() pc_excessflowdev = models.CopyFromBooleanField() pc_quenchsystem = models.CopyFromBooleanField() pc_purgesystem = models.CopyFromBooleanField() pc_none = models.CopyFromBooleanField() pc_other = models.CopyFromCharField(max_length=200, blank=True) mx_sprinklersys = models.CopyFromBooleanField() ms_dikes = models.CopyFromBooleanField() ms_firewalls = models.CopyFromBooleanField() ms_blastwalls = models.CopyFromBooleanField() ms_delugesystem = models.CopyFromBooleanField() ms_watercurtain = models.CopyFromBooleanField() ms_enclosure = models.CopyFromBooleanField() ms_neutralization = models.CopyFromBooleanField() ms_none = models.CopyFromBooleanField() ms_other = models.CopyFromCharField(max_length=200, blank=True) md_processare = models.CopyFromBooleanField() md_perimetermon = models.CopyFromBooleanField() md_none = models.CopyFromBooleanField() md_other = models.CopyFromCharField(max_length=200, blank=True) ch_reduceinv = models.CopyFromBooleanField() ch_increaseinv = models.CopyFromBooleanField() ch_changeparam = models.CopyFromBooleanField() ch_proccontrol = models.CopyFromBooleanField() ch_procdetect = models.CopyFromBooleanField() ch_perimetermon = models.CopyFromBooleanField() ch_mitigationsys = models.CopyFromBooleanField() ch_nonerequired = models.CopyFromBooleanField() ch_none = models.CopyFromBooleanField() ch_other = models.CopyFromCharField(max_length=200, blank=True) proc_review_date = models.CopyFromDateTime() train_review_date = models.CopyFromDateTime() tr_classroom = models.CopyFromBooleanField() tr_onthejob = models.CopyFromBooleanField() tr_other = models.CopyFromCharField(max_length=200, blank=True) ct_writtentest = models.CopyFromBooleanField() ct_oraltest = models.CopyFromBooleanField() ct_demonstration = models.CopyFromBooleanField() ct_observation = models.CopyFromBooleanField() ct_other = models.CopyFromCharField(max_length=200, blank=True) maint_review_date = models.CopyFromDateTime() maint_inspect_date = models.CopyFromDateTime() equip_tested = models.CopyFromCharField(max_length=200, blank=True) change_manage_date = models.CopyFromDateTime() change_review_date = models.CopyFromDateTime() prestart_rev_date = models.CopyFromDateTime() comp_audit_date = models.CopyFromDateTime() audit_comp_date = models.CopyFromDateTime() inc_invest_date = models.CopyFromDateTime() inc_change_date = models.CopyFromDateTime() part_review_date = models.CopyFromDateTime() hotwork_rev_date = models.CopyFromDateTime() con_safety_date = models.CopyFromDateTime() con_eval_date = models.CopyFromDateTime() cbi_flag = models.CopyFromBooleanField() description = models.CopyFromTextField( ) # TODO to rmp_prev3text with prevention programID source_file = 'tblS7PreventionProgram3' class Meta: db_table = 'tblS7PreventionProgram3'
class Tbls8PreventionProgram2(BaseRMPModel): preventionprogram2id = models.CopyFromIntegerField(primary_key=True) process_naics_id = models.CopyFromForeignKey( tblS1Process_NAICS, on_delete=models.PROTECT, ) safetyreviewdate = models.CopyFromDateTime(blank=True) fr_nfpa58 = models.CopyFromBooleanField() fr_osha = models.CopyFromBooleanField() fr_astm = models.CopyFromBooleanField() fr_ansi = models.CopyFromBooleanField() fr_asme = models.CopyFromBooleanField() fr_none = models.CopyFromBooleanField() fr_othertype = models.CopyFromCharField(max_length=200, blank=True) fr_comments = models.CopyFromCharField(max_length=200, blank=True) hazardreviewdate = models.CopyFromDateTime(blank=True) changecompletiondate = models.CopyFromDateTime(blank=True) mh_toxicrelease = models.CopyFromBooleanField() mh_fire = models.CopyFromBooleanField() mh_explosion = models.CopyFromBooleanField() mh_runawayreaction = models.CopyFromBooleanField() mh_polymerization = models.CopyFromBooleanField() mh_overpressurization = models.CopyFromBooleanField() mh_corrosion = models.CopyFromBooleanField() mh_overfilling = models.CopyFromBooleanField() mh_contamination = models.CopyFromBooleanField() mh_equipmentfailure = models.CopyFromBooleanField() mh_coolingloss = models.CopyFromBooleanField() mh_earthquake = models.CopyFromBooleanField() mh_floods = models.CopyFromBooleanField() mh_tornado = models.CopyFromBooleanField() mh_hurricanes = models.CopyFromBooleanField() mh_othertype = models.CopyFromCharField(max_length=200, blank=True) pc_vents = models.CopyFromBooleanField() pc_reliefvalves = models.CopyFromBooleanField() pc_checkvalves = models.CopyFromBooleanField() pc_scrubbers = models.CopyFromBooleanField() pc_flares = models.CopyFromBooleanField() pc_manualshutoffs = models.CopyFromBooleanField() pc_automaticshutoffs = models.CopyFromBooleanField() pc_interlocks = models.CopyFromBooleanField() pc_alarms = models.CopyFromBooleanField() pc_keyedbypass = models.CopyFromBooleanField() pc_emergencyairsupply = models.CopyFromBooleanField() pc_emergencypower = models.CopyFromBooleanField() pc_backuppump = models.CopyFromBooleanField() pc_groundingequipment = models.CopyFromBooleanField() pc_inhibitoraddition = models.CopyFromBooleanField() pc_rupturedisks = models.CopyFromBooleanField() pc_excessflowdevice = models.CopyFromBooleanField() pc_quenchsystem = models.CopyFromBooleanField() pc_purgesystem = models.CopyFromBooleanField() pc_none = models.CopyFromBooleanField() pc_othertype = models.CopyFromCharField(max_length=200, blank=True) ms_sprinklersystem = models.CopyFromBooleanField() ms_dikes = models.CopyFromBooleanField() ms_firewalls = models.CopyFromBooleanField() ms_blastwalls = models.CopyFromBooleanField() ms_delugesystem = models.CopyFromBooleanField() ms_watercurtain = models.CopyFromBooleanField() ms_enclosure = models.CopyFromBooleanField() ms_neutralization = models.CopyFromBooleanField() ms_none = models.CopyFromBooleanField() ms_othertype = models.CopyFromCharField(max_length=200, blank=True) md_processareadetectors = models.CopyFromBooleanField() md_perimetermonitors = models.CopyFromBooleanField() md_none = models.CopyFromBooleanField() md_othertype = models.CopyFromCharField(max_length=200, blank=True) ch_chemicalreduction = models.CopyFromBooleanField() ch_chemicalincrease = models.CopyFromBooleanField() ch_changeprocessparameters = models.CopyFromBooleanField() ch_installprocesscontrols = models.CopyFromBooleanField() ch_installprocessdetection = models.CopyFromBooleanField() ch_installperimetermonitoring = models.CopyFromBooleanField() ch_installmitigationsystems = models.CopyFromBooleanField() ch_nonerequired = models.CopyFromBooleanField() ch_none = models.CopyFromBooleanField() ch_otherchanges = models.CopyFromCharField(max_length=200, blank=True) opproceduresreviewdate = models.CopyFromDateTime(blank=True) trainingreviewdate = models.CopyFromDateTime(blank=True) tr_classroom = models.CopyFromBooleanField() tr_onthejob = models.CopyFromBooleanField() tr_othertype = models.CopyFromCharField(max_length=200, blank=True) ct_writtentest = models.CopyFromBooleanField() ct_oraltest = models.CopyFromBooleanField() ct_demonstration = models.CopyFromBooleanField() ct_observation = models.CopyFromBooleanField() ct_othertype = models.CopyFromCharField(max_length=200, blank=True) maintenancereviewdate = models.CopyFromDateTime(blank=True) equipmentinspectiondate = models.CopyFromDateTime(blank=True) equipmenttested = models.CopyFromCharField(max_length=200, blank=True) complianceauditdate = models.CopyFromDateTime(blank=True) auditcompletiondate = models.CopyFromDateTime(blank=True) incidentinvestigationdate = models.CopyFromDateTime(blank=True) investigationchangedate = models.CopyFromDateTime(blank=True) mostrecentchangedate = models.CopyFromDateTime(blank=True) cbi_flag = models.CopyFromBooleanField() description = models.CopyFromTextField( blank=True) # TODO to rmp_prev2text with preventionprogramID source_file = 'tblS8PreventionProgram2' class Meta: db_table = 'tblS8PreventionProgram2'