forked from docusign/code-examples-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforms.py
More file actions
121 lines (90 loc) · 4.88 KB
/
forms.py
File metadata and controls
121 lines (90 loc) · 4.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
from flask_wtf import Form
from wtforms import TextField, IntegerField, BooleanField, TextAreaField, SubmitField, RadioField, SelectField, SelectMultipleField
from wtforms import validators, ValidationError
from os import listdir
class ClientForm(Form):
print("FORM")
folders = listdir("app/static/demo_documents")
print(folders)
PDFS = {
"aaatest":
[
],
"aarp":
[
],
"aetna":
[
],
"alignment":
[
],
"anthem":
[
],
"other": []
}
for folder in folders:
files = listdir("app/static/demo_documents/" + folder)
for file in files:
path = "app/static/demo_documents/" + folder + "/" + file
file_name = folder + "/" + file + "/" + listdir(path)[0]
PDFS[folder.lower()].append( (file_name, file) )
providers = []
for key, value in PDFS.items():
print(key)
providers.append( (key, key) )
pdf_providers = SelectField('PDF Provider', [validators.Required("Please choose a PDF file.")], choices = providers, render_kw={'onchange': "choosePDF()"})
pdf_aaatest = SelectField('PDF Name', choices = PDFS["aaatest"])
pdf_aarp = SelectField('PDF Name', choices = PDFS["aarp"])
pdf_aetna = SelectField('PDF Name', choices = PDFS["aetna"])
pdf_alignment = SelectField('PDF Name', choices = PDFS["alignment"])
pdf_anthem = SelectField('PDF Name', choices = PDFS["anthem"])
include_SOA = BooleanField('Include Scope of Appointment PDF')
title = RadioField('Title', choices = [('Mr','Mr'),('Ms','Ms'),('Mrs','Mrs')])
first_name = TextField("First Name ",[validators.Required("Please enter your first name.")])
middle_initial = TextField("Middle Initial ")
last_name = TextField("Last Name ",[validators.Required("Please enter your last name.")])
home_address = TextField("Home Address")
city = TextField("City")
state = TextField("State")
zip = TextField("Zip Code")
diff_mail_addr = BooleanField('Different mailing address?')
mailing_address = TextField("Mailing Address")
mailing_city = TextField("City")
mailing_state = TextField("State")
mailing_zip = TextField("Zip Code")
home_tel = TextField("Phone Number")
email = TextField("Email",[validators.Required("Please enter your email address."),
validators.Email("Please enter your email address.")])
dob = TextField("Date of Birth ")
aarp = TextField("AARP Membership # (Only required if you are enrolling in a AARP Medicare Supplement plan)")
add_coverage = SelectMultipleField("Would you like to add additional coverage if not already included in your plan?", choices = [('Dental', 'Dental Coverage'), ('Vision', 'Vision Coverage'), ('More', "I'd like to learn more")] )
claim_num = TextField("Medicare Claim Number")
MONTHS = [('Jan','January'),('Feb','February'),('Mar','March'),
('Apr','April'),('May','May'),('Jun','June'),
('Jul','July'),('Aug','August'),('Sep','September'),
('Oct','October'),('Nov','November'),('Dec','December'), ]
YEARS = [('2020','2020'),('2019','2019'),('2018','2018'),
('2017','2017'),('2016','2016'),('2015','2015'),
('2014','2014'),('2013','2013'),('2012','2012'),
('2011','2011'),('2010','2010'),('2009','2009'),
('2008','2008'),('2007','2007'),('2006','2006'),
('2005','2005') ]
hospital_month = SelectField("Month", choices = MONTHS )
hospital_year = SelectField("Year", choices = YEARS )
medical_month = SelectField("Month", choices = MONTHS )
medical_year = SelectField("Year", choices = YEARS )
plan_type = SelectField("Type of plan", choices = [('None','None'),('Emp','Employer Group Plan'),('Ind','Individual Plan'),
('Uni','Union Plan'),('Oth','Other') ] )
ins_company = TextField("Health insurance company")
policy_id = TextField("Health insurance policy ID #")
ins_start_date = TextField("Health insurance start date (Best estimation if you can't find it)")
ins_end_date = TextField("Health insurance end date (leave blank if your health insurance is still active)")
pref_payment = SelectField("How would you prefer to pay?", choices = [('Mon','Monthly billing by the health insurance company'),
('Soc','Social Security check deduction (Not for Medicare Supplement Plans)'),
('Dir','Direct Debit') ] )
bank_name = TextField("Bank Name")
account_number = TextField("Account Number")
routing_number = TextField("Routing Number")
submit = SubmitField("Submit")