Esempio n. 1
0
def html_table(row_inp,iter):
    chemical_name.append(str(row_inp[0]))
    trade_name.append(str(row_inp[1]))
    atuse_conc.append(float(row_inp[2]))
    residue.append(float(row_inp[3]))
    worst_case_est.append(float(row_inp[4]))
    vol.append(float(row_inp[5]))
    d.append(float(row_inp[6]))
    h.append(float(row_inp[7]))
    intake_avg.append(float(row_inp[9]))
    intake_90th.append(float(row_inp[10]))


    # Setting the model to run Tank Residue (Volumetric) model
    run_use='1'
    sa=0

    fdadiet_obj = fdadiet_model.fdadiet(True,True,chemical_name[iter],trade_name[iter],run_use,atuse_conc[iter],residue[iter],worst_case_est[iter],vol[iter],d[iter],h[iter],sa,intake_avg[iter],intake_90th[iter])

    sa_cylinder.append(fdadiet_obj.sa_cylinder)
    conc_unit_conv.append(fdadiet_obj.conc_unit_conv)
    edi.append(fdadiet_obj.edi)
    edi_avg_vol.append(fdadiet_obj.edi_avg_vol)
    edi_90th_vol.append(fdadiet_obj.edi_90th_vol)

    batch_header = """
        <div class="out_">
            <br><H3>Batch Calculation of Iteration %s:</H3>
        </div>
        """%(iter + 1)

    html = batch_header + fdadiet_tables.table_all(fdadiet_obj)
    return html
Esempio n. 2
0
    def post(self):
        form = cgi.FieldStorage()

        chemical_name = form.getvalue('chemical_name')
        trade_name = form.getvalue('trade_name')
        run_use = form.getvalue('run_use')
        atuse_conc = float(form.getvalue('atuse_conc'))
        residue = float(form.getvalue('residue'))
        worst_case_est = float(form.getvalue('worst_case_est'))
        vol = float(form.getvalue('vol'))
        d = form.getvalue('d')
        h = form.getvalue('h')
        sa = form.getvalue('sa')
        intake_avg = float(form.getvalue('intake_avg'))
        intake_90th = float(form.getvalue('intake_90th'))

        fdadiet_obj = fdadiet_model.fdadiet(True,True,chemical_name,trade_name,run_use,atuse_conc,residue,worst_case_est,vol,d,h,sa,intake_avg,intake_90th)

        templatepath = os.path.dirname(__file__) + '/../templates/'
        html = template.render(templatepath + '01hh_uberheader.html', {'title':'Ubertool'})        
        html = html + template.render(templatepath + '02hh_uberintroblock_wmodellinks.html',  {'model':'fdadiet','page':'output'})
        html = html + template.render (templatepath + '03hh_ubertext_links_left.html', {})                               
        html = html + template.render(templatepath + '04uberoutput_start.html', {
                'model':'fdadiet', 
                'model_attributes':'FDA Dietary Exposure Model Output'})
        html = html + fdadiet_tables.timestamp()
        html = html + fdadiet_tables.table_all(fdadiet_obj)
        html = html + template.render(templatepath + 'export.html', {})
        html = html + template.render(templatepath + '04uberoutput_end.html', {})
        html = html + template.render(templatepath + '06hh_uberfooter.html', {'links': ''})
        self.response.out.write(html)
Esempio n. 3
0
    conc_unit_conv.append(float(row[12]))
    edi.append(float(row[13]))
    edi_avg_vol.append(float(row[14]))
    edi_90th_vol.append(float(row[15]))


# Setting the model to run Tank Residue (Volumetric) model
run_use='1'
sa=0

# if run_use == '0':     / Logic used if user is given option of which model type to run on the QAQC page
#     run_use = '0'
# else:
#     run_use = '1'

fdadiet_obj = fdadiet_model.fdadiet(True,True,chemical_name[0],trade_name[0],run_use,atuse_conc[0],residue[0],worst_case_est[0],vol[0],d[0],h[0],sa,intake_avg[0],intake_90th[0])

fdadiet_obj.sa_cylinder_exp=sa_cylinder[0]
fdadiet_obj.conc_unit_conv_exp=conc_unit_conv[0]
fdadiet_obj.edi_exp=edi[0]
fdadiet_obj.edi_avg_vol_exp=edi_avg_vol[0]
fdadiet_obj.edi_90th_vol_exp=edi_90th_vol[0]

                
class fdadietQaqcPageOut(webapp.RequestHandler):
    def get(self):
        templatepath = os.path.dirname(__file__) + '/../templates/'
        html = template.render(templatepath + '01hh_uberheader.html', 'title')
        html = html + template.render(templatepath + '02hh_uberintroblock_wmodellinks.html', {'model':'fdadiet','page':'qaqc'})
        html = html + template.render (templatepath + '03hh_ubertext_links_left.html', {})                
        html = html + template.render(templatepath + '04uberoutput_start.html', {