2 include_once("../../globals.php");
3 include_once("$srcdir/patient.inc");
4 include_once("$srcdir/acl.inc");
6 // Check authorization.
7 $thisauth = acl_check('patients', 'demo');
9 if ($thisauth != 'write')
10 die("Updating demographics is not authorized.");
11 $tmp = getPatientData($pid, "squad");
12 if ($tmp['squad'] && ! acl_check('squads', $tmp['squad']))
13 die("You are not authorized to access this squad.");
15 if ($thisauth != 'write' && $thisauth != 'addonly')
16 die("Adding demographics is not authorized.");
19 foreach ($_POST as $key => $val) {
20 if ($val == "MM/DD/YYYY") {
25 if ($_POST["sex"] == "Unselected") {
28 $var_sex = $_POST["sex"];
31 if ($_POST{dob
} != "") {
37 $finrev = fixDate($_POST["financial_review"]);
48 $_POST["postal_code"],
51 $_POST["country_code"],
56 $_POST["phone_contact"],
58 $_POST["contact_relationship"],
62 strtolower($_POST["language"]),
63 $_POST["ethnoracial"],
64 $_POST["interpretter"],
65 $_POST["migrantseasonal"],
66 $_POST["family_size"],
67 $_POST["monthly_income"],
73 $_POST["genericname1"],
74 $_POST["genericval1"],
75 $_POST["genericname2"],
76 $_POST["genericval2"],
79 $_POST["hipaa_voice"],
81 $_POST["phone_pharmacy"],
82 $_POST["drivers_license"]
89 $_POST["epostal_code"],
95 $i1dob = fixDate($_POST["i1subscriber_DOB"]);
100 $_POST["i1provider"],
101 $_POST["i1policy_number"],
102 $_POST["i1group_number"],
103 $_POST["i1plan_name"],
104 $_POST["i1subscriber_lname"],
105 $_POST["i1subscriber_mname"],
106 $_POST["i1subscriber_fname"],
107 $_POST["i1subscriber_relationship"],
108 $_POST["i1subscriber_ss"],
110 $_POST["i1subscriber_street"],
111 $_POST["i1subscriber_postal_code"],
112 $_POST["i1subscriber_city"],
113 $_POST["i1subscriber_state"],
114 $_POST["i1subscriber_country"],
115 $_POST["i1subscriber_phone"],
116 $_POST["i1subscriber_employer"],
117 $_POST["i1subscriber_employer_street"],
118 $_POST["i1subscriber_employer_city"],
119 $_POST["i1subscriber_employer_postal_code"],
120 $_POST["i1subscriber_employer_state"],
121 $_POST["i1subscriber_employer_country"],
123 $_POST['i1subscriber_sex']
126 $i2dob = fixDate($_POST["i2subscriber_DOB"]);
131 $_POST["i2provider"],
132 $_POST["i2policy_number"],
133 $_POST["i2group_number"],
134 $_POST["i2plan_name"],
135 $_POST["i2subscriber_lname"],
136 $_POST["i2subscriber_mname"],
137 $_POST["i2subscriber_fname"],
138 $_POST["i2subscriber_relationship"],
139 $_POST["i2subscriber_ss"],
141 $_POST["i2subscriber_street"],
142 $_POST["i2subscriber_postal_code"],
143 $_POST["i2subscriber_city"],
144 $_POST["i2subscriber_state"],
145 $_POST["i2subscriber_country"],
146 $_POST["i2subscriber_phone"],
147 $_POST["i2subscriber_employer"],
148 $_POST["i2subscriber_employer_street"],
149 $_POST["i2subscriber_employer_city"],
150 $_POST["i2subscriber_employer_postal_code"],
151 $_POST["i2subscriber_employer_state"],
152 $_POST["i2subscriber_employer_country"],
154 $_POST['i2subscriber_sex']
157 $i3dob = fixDate($_POST["i3subscriber_DOB"]);
162 $_POST["i3provider"],
163 $_POST["i3policy_number"],
164 $_POST["i3group_number"],
165 $_POST["i3plan_name"],
166 $_POST["i3subscriber_lname"],
167 $_POST["i3subscriber_mname"],
168 $_POST["i3subscriber_fname"],
169 $_POST["i3subscriber_relationship"],
170 $_POST["i3subscriber_ss"],
172 $_POST["i3subscriber_street"],
173 $_POST["i3subscriber_postal_code"],
174 $_POST["i3subscriber_city"],
175 $_POST["i3subscriber_state"],
176 $_POST["i3subscriber_country"],
177 $_POST["i3subscriber_phone"],
178 $_POST["i3subscriber_employer"],
179 $_POST["i3subscriber_employer_street"],
180 $_POST["i3subscriber_employer_city"],
181 $_POST["i3subscriber_employer_postal_code"],
182 $_POST["i3subscriber_employer_state"],
183 $_POST["i3subscriber_employer_country"],
185 $_POST['i3subscriber_sex']
188 include_once("patient_summary.php");