Browse Source

added go to admin portal

Josh 4 years ago
parent
commit
c9795195ac
2 changed files with 100 additions and 5 deletions
  1. 84 0
      data_set.txt
  2. 16 5
      resources/views/layouts/template.blade.php

+ 84 - 0
data_set.txt

@@ -0,0 +1,84 @@
+
+$table->string('copyright_detail_code')->nullable();
+$table->string('zip_code')->nullable();
+$table->string('update_key_no')->nullable();
+$table->string('action_code')->nullable();
+$table->string('record_type_code')->nullable();
+$table->string('carrier_route_id')->nullable();
+$table->string('street_pre_drctn_abbrev')->nullable();
+$table->string('street_name')->nullable();
+$table->string('street_suffix_abbrev')->nullable();
+$table->string('street_post_drctn_abbrev')->nullable();
+$table->string('addr_primary_low_no')->nullable();
+$table->string('addr_primary_high_no')->nullable();
+$table->string('addr_prmry_odd_even_code')->nullable();
+$table->string('building_or_firm_name')->nullable();
+$table->string('addr_secondary_abbrev')->nullable();
+$table->string('addr_secondary_low_no')->nullable();
+$table->string('addr_secondary_high_no')->nullable();
+$table->string('addr_secny_odd_even_code')->nullable();
+$table->string('low_no_zip_sector_no')->nullable();
+$table->string('low_no_zip_segment_no')->nullable();
+$table->string('high_no_zip_sector_no')->nullable();
+$table->string('high_no_zip_segment_no')->nullable();
+$table->string('base_alt_code')->nullable();
+$table->string('lacs_status_ind')->nullable();
+$table->string('govt_bldg_ind')->nullable();
+$table->string('finance_no')->nullable();
+$table->string('stusps')->nullable();
+$table->string('countyfp')->nullable();
+$table->string('congressional_dist_no')->nullable();
+$table->string('muncipality_ctyst_key')->nullable();
+$table->string('urbanization_ctyst_key')->nullable();
+$table->string('prefd_last_line_ctyst_key)->nullable();
+
+
+$positions = [
+    [1,1,'copyright_detail_code'],
+    [2,5,'zip_code'],
+    [7,10,'update_key_no'],
+    [17,1,'action_code'],
+    [18,1,'record_type_code'],
+    [19,4,'carrier_route_id'],
+    [23,2,'street_pre_drctn_abbrev'],
+    [25,28,'street_name'],
+    [53,4,'street_suffix_abbrev'],
+    [57,2,'street_post_drctn_abbrev'],
+    [59,10,'addr_primary_low_no'],
+    [69,10,'addr_primary_high_no'],
+    [79,1,'addr_prmry_odd_even_code'],
+    [80,40,'building_or_firm_name'],
+    [120,4,'addr_secondary_abbrev'],
+    [124,8,'addr_secondary_low_no'],
+    [132,8,'addr_secondary_high_no'],
+    [140,1,'addr_secny_odd_even_code'],
+    [141,2,'low_no_zip_sector_no'],
+    [143,2,'low_no_zip_segment_no'],
+    [145,2,'high_no_zip_sector_no'],
+    [147,2,'high_no_zip_segment_no'],
+    [149,1,'base_alt_code'],
+    [150,1,'lacs_status_ind'],
+    [151,1,'govt_bldg_ind'],
+    [152,6,'finance_no'],
+    [158,2,'stusps'],
+    [160,3,'countyfp'],
+    [163,2,'congressional_dist_no'],
+    [165,6,'muncipality_ctyst_key'],
+    [171,6,'urbanization_ctyst_key'],
+    [177,6,'prefd_last_line_ctyst_key]'
+];
+
+$filePath = '/home/josh/output.txt';
+
+$handle = fopen($filePath, "r") or die("Couldn't get handle");
+if ($handle) {
+    while (!feof($handle)) {
+        $buffer = fgets($handle, 4096);
+        $row = new Zip4Row();
+        foreach($positions as $position){
+            $row->{$position[2]} = substr($l, $position[0], $position[1]);
+        }
+        $row->save();
+    }
+    fclose($handle);
+}

+ 16 - 5
resources/views/layouts/template.blade.php

@@ -110,6 +110,16 @@
                 </button>
             </form>
             @endif
+
+            @if($pro->pro_type == 'ADMIN')
+            <div class="ml-2 d-inline-block">|</div>
+            <div class="ml-2 ">
+                <a native target="_top" class="text-light" href="{{env('ADMIN_PORTAL_URL', 'https://scholar.securecpu.com')}}/pro_log_in_with_session_key/{{$performer->session_key}}" title="">
+                    Go to Admin Portal
+                </a>
+            </div>
+            @endif
+
         </div>
 
         <a href="#" class="stag_rhs_toggle d-none d-md-block" title="Toggle Video Pane">
@@ -243,11 +253,11 @@
         (function() {
             function init() {
                 $('input[type="text"][name="ICD"]').each(function() {
-                    var elem = this, dynID = 'icd-' + Math.ceil(Math.random() * 1000000);
+                    var elem = this,
+                        dynID = 'icd-' + Math.ceil(Math.random() * 1000000);
                     $(elem).attr('id', dynID);
                     new window.Def.Autocompleter.Search(dynID,
-                        'https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&ef=name',
-                        {
+                        'https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&ef=name', {
                             tableFormat: true,
                             valueCols: [0],
                             colHeaders: ['Code', 'Name'],
@@ -261,7 +271,8 @@
                     });
                 });
                 $('[rx-section] input[type="text"][name="contentText"]').each(function() {
-                    var elem = this, dynID = 'rx-' + Math.ceil(Math.random() * 1000000);
+                    var elem = this,
+                        dynID = 'rx-' + Math.ceil(Math.random() * 1000000);
                     $(elem).attr('id', dynID);
                     var strengthElem = $(elem).closest('form').find('[name="strength"]')[0],
                         dynStrengthsID = 'rx-' + Math.ceil(Math.random() * 1000000) + '-strengths';
@@ -284,4 +295,4 @@
 
 </body>
 
-</html>
+</html>