-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
309 lines (261 loc) · 11 KB
/
index.html
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="author" content="colorlib.com">
<link href="https://fonts.googleapis.com/css?family=Poppins" rel="stylesheet" />
<link href="https://amplify-mmis-dev-133051-deployment.s3.amazonaws.com/css/main.css" rel="stylesheet" />
<link href="https://amplify-mmis-dev-133051-deployment.s3.amazonaws.com/css/contactcss.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.22/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.5/css/buttons.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/select/1.3.1/css/select.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://editor-datatables.s3-us-west-2.amazonaws.com/public/css/editor.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://editor-datatables.s3-us-west-2.amazonaws.com/examples/resources/syntax/shCore.css">
<link rel="stylesheet" type="text/css" href="https://editor-datatables.s3-us-west-2.amazonaws.com/examples/resources/demo.css">
<style type="text/css" class="init"></style>
<script type="text/javascript" language="javascript" src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/1.6.5/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/select/1.3.1/js/dataTables.select.min.js"></script>
<script type="text/javascript" language="javascript" src="https://editor-datatables.s3-us-west-2.amazonaws.com/public/js/dataTables.editor.min.js"></script>
<script type="text/javascript" language="javascript" src="https://editor-datatables.s3-us-west-2.amazonaws.com/examples/resources/syntax/shCore.js"></script>
<script type="text/javascript" language="javascript" src="https://editor-datatables.s3-us-west-2.amazonaws.com/examples/resources/demo.js"></script>
<script type="text/javascript" language="javascript" src="https://editor-datatables.s3-us-west-2.amazonaws.com/examples/resources/editor-demo.js"></script>
<script type="text/javascript" language="javascript" class="init"></script>
</head>
<body>
<div class="s01">
<form>
<fieldset>
<legend>Find Medicaid Providers in Texas</legend>
</fieldset>
<div class="inner-form">
<div class="input-field first-wrap">
<input id="fname" type="text" placeholder="First Name" />
</div>
<div class="input-field first-wrap">
<input id="lname" type="text" placeholder="Last Name" />
</div>
<div class="input-field second-wrap">
<input id="city" type="text" placeholder="city" />
</div>
<div class="input-field first-wrap">
<input id="zip" type="text" placeholder="zip code" />
</div>
<div class="input-field second-wrap">
<input id="desc" type="text" placeholder="description" />
</div>
<div class="input-field third-wrap">
<button id="btnSubmit" class="btn-search" type="button">Search</button>
</div>
</div>
<div class="demo-html">
<table id="example" class="display" style="width:100%">
<thead>
<tr>
<th>NPI</th>
<th>First Name</th>
<th>Last Name</th>
<th>description</th>
<th>Phone</th>
<th>Primary Address</th>
</tr>
</thead>
<tfoot>
<tr>
<th>NPI</th>
<th>First Name</th>
<th>Last Name</th>
<th>description</th>
<th>Phone</th>
<th>Primary Address</th>
</tr>
</tfoot>
</table>
</div>
</form>
</div>
<div class="contact2" style="background-image:url(https://www.wrappixel.com/demos/ui-kit/wrapkit/assets/images/contact/map.jpg)" id="contact">
<div class="container">
<div class="row contact-container">
<div class="col-lg-12">
<div class="card card-shadow border-0 mb-4">
<div class="row">
<div class="col-lg-8">
<div class="contact-box p-4">
<h4 class="title">Contact Us</h4>
</div>
</div>
<div class="col-lg-4 bg-image" style="background-image:url(https://www.wrappixel.com/demos/ui-kit/wrapkit/assets/images/contact/1.jpg)">
<div class="detail-box p-4">
<h5 class="text-white font-weight-light mb-3">NAME</h5>
<p id="dname" class="text-white op-7">601 Sherwood Ave.
<h5 class="text-white font-weight-light mb-3">ADDRESS</h5>
<p id="dstr" class="text-white op-7">601 Sherwood Ave.</p>
<p id="dcity" class="text-white op-7">601 Sherwood Ave.</p>
<h5 class="text-white font-weight-light mb-3 mt-4">CALL US</h5>
<p id="dph" class="text-white op-7">251 546 9442
<br> 630 446 8851</p>
<button type="button" id="back">New Search</button>
<div class="round-social light">
<a href="#" class="ml-0 text-decoration-none text-white border border-white rounded-circle"><i class="icon-social-facebook"></i></a>
<a href="#" class="text-decoration-none text-white border border-white rounded-circle"><i class="icon-social-twitter"></i></a>
<a href="#" class="text-decoration-none text-white border border-white rounded-circle"><i class="icon-social-youtube"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body><!-- This templates was made by Colorlib (https://colorlib.com) -->
<script>
var editor; // use a global for the submit and return data rendering in the examples
function myFunction(x,y,ph,fl,sl,ci,st,z){
$(".s01").hide();
$(".contact2").show();
$(".text-white").css("color", "yellow");
console.log(x,y,ci,st,z);
$("#dname").text(x + " " + y);
$("#dstr").text("123 Sherman Way");
$("#dcity").text(ci + " " + st + " " + z);
$("#dph").text(ph);
};
$(document).ready(function () {
var loc = "";
$(".demo-html").hide();
$(".contact2").hide();
var fname = "";
var lname = "";
var city = "";
var state = "";
var zip = "";
var desc = "";
const rar = [];
editor = new $.fn.dataTable.Editor( {
ajax: "https://13utdvffef.execute-api.us-east-1.amazonaws.com/dev/items?fname=" +fname + "?lname=" + lname + "?city="+ city + "?state="+ state + "?zip="+ zip + "?desc="+ desc,
table: "#example",
fields: [ {
label: "NPI:",
name: "npi"
}
]
} );
var table = $('#example').DataTable( {
dom: "Bfrtip",
/*ajax:{
url: "https://13utdvffef.execute-api.us-east-1.amazonaws.com/dev/items",
type: 'GET',
data: { 'location': $("#location").val() }
} ,*/
columns: [
{ data: "npi" },
{ data: null, render: function ( data, type, row ) {
// Combine the first and last names into a single table field
var u = "";
var hol = "";
u = JSON.stringify(data.fname) + "," + JSON.stringify(data.last_name) + "," + JSON.stringify(data.fphone) + "," + JSON.stringify(hol)+ "," + JSON.stringify(data.sline) + "," + JSON.stringify(data.fcity) + "," + JSON.stringify(data.fstate) + "," + JSON.stringify(data.fzip) ;
return '<BUTTON onclick=myFunction(' + u + ') type="button" >' + data.fname + '</a>';
} }
,
{ data: "last_name" },
{ data: "classification" },
{ data: "fphone" },
// { data: "provider business practice location address city name" },
{ data: null, render: function ( data, type, row ) {
// Combine the first and last names into a single table field
return data.fline+' '+data.sline+' '+data.fcity+' '+data.fstate+' '+data.fzip;
} }
// { data: "salary", render: $.fn.dataTable.render.number( ',', '.', 0, '$' ) }
],
select: true,
buttons: [
{ extend: "create", editor: editor },
{ extend: "edit", editor: editor },
{ extend: "remove", editor: editor }
]
} );
$("#back").click(function(){
$(".s01").show();
$(".contact2").hide();
$(".demo-html").hide();
$(".inner-form").show();
table.clear();
table.draw();
});
$('#btnSubmit').click(function () {
fname = $("#fname").val();
lname = $("#lname").val();
city = $("#city").val();
zip = $("#zip").val();
desc = $("#desc").val();
if (city==""){
city = "DALLAS";
//return;
};
// city = "houston";
city = city.toUpperCase();
fname = fname.toUpperCase();
lname = lname.toUpperCase();
zip = zip.toUpperCase();
desc = desc.toUpperCase();
state = "TX";
table.ajax.url("https://13utdvffef.execute-api.us-east-1.amazonaws.com/dev/items?fname=" +fname + "&lname=" + lname + "&city="+ city + "&state="+ state + "&zip="+ zip + "&desc="+ desc ).load();
$(".demo-html").show();
$(".inner-form").hide();
})
/*
$('#example').DataTable( {
dom: "Bfrtip",
ajax:{
url: "https://k6e5ozz9yl.execute-api.us-west-2.amazonaws.com/dev/items",
type: 'GET',
data: {
'location':'Houston'
}
} ,
columns: [
{ data: null, render: function ( data, type, row ) {
// Combine the first and last names into a single table field
return data.first_name+' '+data.last_name;
} },
{ data: "npi" }//,
// { data: "salary", render: $.fn.dataTable.render.number( ',', '.', 0, '$' ) }
],
select: true,
buttons: [
{ extend: "create", editor: editor },
{ extend: "edit", editor: editor },
{ extend: "remove", editor: editor }
]
} );
*/
/*
var i,result;
$('#btnSubmit').click(function () {
var dispalyResults="";
var loc="";
loc = "Houston";
//loc = $('#location').val();
$.ajax({
url: "https://13utdvffef.execute-api.us-east-1.amazonaws.com/dev/items?location=" +loc ,
// url: "https://13utdvffef.execute-api.us-east-1.amazonaws.com/dev/items",
method: "GET",
headers: { "Accept": "application/json;odata=verbose" },
success: function (data) {
var jsondata = JSON.stringify(data);
result = JSON.parse(jsondata).items;
$('#location').val(result[0]);
},
fail: function () {
alert("Response fails");
}
})
})
*/
})
</script>
</html>