Peter Muturi 3 years ago
parent
commit
05f8199d0d

+ 12 - 10
resources/views/app/patient/prescriptions/pdf/DRUG.blade.php

@@ -6,7 +6,7 @@ $addressParts = implode(", ", $addressParts) . ", ";
 $addressPart2 = [];
 if (!!$patient->mailing_address_city) $addressPart2[] = $patient->mailing_address_city;
 if (!!$patient->mailing_address_state) $addressPart2[] = $patient->mailing_address_state;
-$addressParts .= implode(", ", $addressPart2);
+$addressPart2 = implode(", ", $addressPart2);
 
 $coverage = $patient->effectiveClientPrimaryCoverage;
 $payerName = null;
@@ -27,22 +27,22 @@ if($coverage) {
 }
 ?>
 <section style="padding-top: 0.1rem;">
-    <table style="width:100%;font-size:14px; margin-bottom:1rem;border:1px solid #333;border-collapse: collapse;table-layout:fixed;">
+    <table style="width:100%;font-size:14px; margin-bottom:1rem;border-collapse: collapse;table-layout:fixed;">
       <tr>
-        <td style="vertical-align:top;border:1px solid #333;padding: 5px;">
-          <h3 style="line-height:20px;margin:0;text-transform:uppercase;">{{ $patient->displayName() }}</h3>
-          <span style="font-size:13px;line-height:20px;display:block">{{$patient->mailing_address_line1}}</span>
-          <span style="font-size:13px;line-height:20px;display:block">{{$patient->mailing_address_line2}}</span>
+        <td style="vertical-align:top;padding: 5px;">
+          <h4 style="line-height:20px;margin:0;text-transform:uppercase;">{{ $patient->displayName() }}</h4>
+          <span style="font-size:13px;line-height:20px;display:block">{{$addressParts ?: ''}}</span>
+          <span style="font-size:13px;line-height:20px;display:block">{{$addressPart2 ?: ''}}</span>
           <span style="font-size:13px;line-height:20px;display:block">Phone: {{$patient->cell_number}}</span>
         </td>
-        <td style="vertical-align:top;border:1px solid #333;padding: 5px;">
-          <h3 style="line-height:20px;margin:0;">PATIENT INFORMATION</h3>
+        <td style="vertical-align:top;padding: 5px;">
+          <h4 style="line-height:20px;margin:0;">PATIENT INFORMATION</h4>
           <span style="font-size:13px;line-height:20px;display:block">DOB: {{friendlier_date($patient->dob)}}</span>
           <span style="font-size:13px;line-height:20px;display:block">Age: {{$patient->age_in_years}} years old</span>
           <span style="font-size:13px;line-height:20px;display:block">Gender: {{$patient->sex}}</span>
         </td>
-        <td style="vertical-align:top;border:1px solid #333;padding: 5px;">
-          <h3 style="line-height:20px;margin:0;">INSURANCE</h3>
+        <td style="vertical-align:top;padding: 5px;">
+          <h4 style="line-height:20px;margin:0;">INSURANCE</h4>
           <span style="font-size:13px;line-height:20px;display:block">{{$payerName}}</span>
           <span style="font-size:13px;line-height:20px;display:block">Member ID: {{$memberID}}</span>
           <span style="font-size:13px;line-height:20px;display:block">Insurance Contact:</span>
@@ -51,6 +51,8 @@ if($coverage) {
     </table>
 </section>
 
+<hr style="margin: 0.5rem 0; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">
+
 <?php $clinical = json_decode($prescription->clinical_detail_json); ?>
 <?php if($clinical && @$clinical->items): ?>
     <div style="margin: 1rem 0; font-weight: bold;"><span style="font-size: 28px">R</span><span style="font-size: 20px">x</span></div>

+ 11 - 10
resources/views/app/patient/prescriptions/pdf/pdf-preview.blade.php

@@ -16,26 +16,28 @@
         $hcpCompanyProPayer = $note->hcpCompanyProPayer;
         $hcpCompanyLocation = $note->hcpCompanyLocation;
     }
+    $companyName = $hcpCompany ? $hcpCompany->name : 'Scholar Medical Group MD LLC';
+    $addressLine1 = $hcpCompanyLocation ? $hcpCompanyLocation->line1 : '133 Rollins Ave';
+    $addressLine2 = $hcpCompanyLocation ? $hcpCompanyLocation->line2 : 'Ste 3';
+    $city = $hcpCompanyLocation ? $hcpCompanyLocation->city : 'Rockville';
+    $state = $hcpCompanyLocation ? $hcpCompanyLocation->state : 'MD';
+    $zip = $hcpCompanyLocation ? $hcpCompanyLocation->zip : '20852';
     ?>
     <?php
     use App\Models\Erx;
     /** @var Erx $prescription */
     $patient = $prescription->patient;
     ?>
-    <title>{{$hcpCompany ? $hcpCompany->name : 'Prescription'}}</title>
+    <title>{{$companyName}}</title>
 </head>
 <body>
 <div style="margin: 0; padding: 1rem; font-family: sans-serif">
     <header style="padding: 0; border: 0; margin: 0">
         <div style="text-align: center">
             <h3 style="margin-bottom:1px;line-height:5px;">{{ $prescription->hcpPro->displayName() }}</h3>
-            @if(!$hcpCompanyLocation)
-            <h4 style="margin-bottom:1.5rem;line-height:5px;">{{$hcpCompany ? $hcpCompany->name : 'Prescription'}}</h4>
-            @else
-            <h4 style="margin-bottom:1px;line-height:5px;">{{$hcpCompany ? $hcpCompany->name : 'Prescription'}}</h4>
-            <h5 style="margin-bottom:1px;line-height:3px;">{{$hcpCompanyLocation->line1}} {{$hcpCompanyLocation->line2}}</h5>
-            <h5 style="margin-bottom: 1.5rem;line-height:3px;">{{$hcpCompanyLocation->city}} {{$hcpCompanyLocation->state}} {{$hcpCompanyLocation->zip}}</h5>
-            @endif
+            <h4 style="margin-bottom:1px;line-height:5px;">{{$companyName}}</h4>
+            <h5 style="margin-bottom:1px;line-height:3px;">{{$addressLine1}}, {{$addressLine2}}</h5>
+            <h5 style="margin-bottom: 2rem;line-height:3px;">{{$city}}, {{$state}} {{$zip}}</h5>
         </div>
         <div style="text-align:center;">
           <span style="width:33.33%; display:inline-block;">Phone: 202-935-1033</span>
@@ -44,14 +46,13 @@
         </div>
     </header>
 
-
+    <hr style="border-top: 2px solid #5ca4e8; border-bottom: 0; margin-top:0; margin-bottom: .5rem;">
 
     @include('app.patient.prescriptions.pdf.' . $prescription->erx_category)
 
     <?php if($prescription->logistics_detail_json): ?>
         <?php $logistics = json_decode($prescription->logistics_detail_json); ?>
         <hr style="margin: 0.5rem 0; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">
-        <p><b>Logistics Information</b>:</p>
         <div style="font-size: 14px; opacity: 0.75; ">
             <p style="margin: 0.5rem 0;"><b>{{ $logistics->facilityName }}</b></p>
             <p style="margin: 0.5rem 0;">{{$logistics->facilityCity}} {{$logistics->facilityState}} {{$logistics->facilityZip}}</p>