Peter Muturi 3 vuotta sitten
vanhempi
commit
df69b7861a

+ 91 - 0
resources/views/app/patient/prescriptions/pdf/DRUG-old.blade.php

@@ -0,0 +1,91 @@
+<section style="padding-top: 0.1rem;">
+
+    <div style="margin: 0 0 1rem; font-weight: bold; "><span style="font-size: 16px">Specimen/Physician Information</span></div>
+
+    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; font-size: 14px; margin-bottom: 1rem;">
+        <tr>
+            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Order Date:</td>
+            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{date('Y-m-d h:i a')}}</td>
+            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">NPI:</td>
+            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$prescription->hcpPro->hcp_npi}}</td>
+        </tr>
+        <tr>
+            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Test Date:</td>
+            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">-</td>
+            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Practice Phone:</td>
+            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">202-935-1033</td>
+        </tr>
+        <tr>
+            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Ordering Physician:</td>
+            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$prescription->hcpPro->displayName()}}</td>
+            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Practice Fax:</td>
+            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">202-935-1033</td>
+        </tr>
+    </table>
+
+    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
+        <tr>
+            <td style="width: 70%">
+                <b>Patient Information</b>
+            </td>
+            <td style="">
+
+            </td>
+        </tr>
+    </table>
+
+    <div style="font-size: 14px; margin-top: 0.6rem; line-height: 1.4; opacity: 0.6">
+        <span>{{ $patient->displayName() }}, {{$patient->sex}}, {{$patient->age_in_years}} years old</span><br>
+        <?php
+        $addressParts = [];
+        if (!!$patient->mailing_address_line1) $addressParts[] = $patient->mailing_address_line1;
+        if (!!$patient->mailing_address_line2) $addressParts[] = $patient->mailing_address_line2;
+        $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);
+        ?>
+        <span>{!! $addressParts !!}</span>
+    </div>
+</section>
+
+<?php $clinical = json_decode($prescription->clinical_detail_json); ?>
+<?php if($clinical && @$clinical->items): ?>
+    <div style="margin: 1.5rem 0 1rem; font-weight: bold; opacity: 0.5"><span style="font-size: 24px">R</span><span style="font-size: 16px">x</span></div>
+    <section style="font-size: 15px;">
+        <?php $count = 0; ?>
+        <?php foreach ($clinical->items as $item): ?>
+        <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; margin-bottom: 5pt">
+            <tr>
+                <td style="width: 20px; vertical-align: top; opacity: 0.75; font-size: 14px">
+                    <span>{{ ++$count }}. </span>
+                </td>
+                <td style="vertical-align: top">
+                    <div>
+                        <p style="margin: 0">
+                            <b>{{ $item->medication }}</b>
+                        </p>
+                        <div style="">
+                            @if(@$item->frequency)
+                                <p style="margin: 0.5rem 0;">Frequency: {{ $item->frequency }}</p>
+                            @endif
+                            @if(@$item->instructions)
+                                <p style="margin: 0.5rem 0;">Instructions: {{ $item->instructions }}</p>
+                            @endif
+                            @if(@$item->dispense)
+                                <p style="margin: 0.5rem 0;">Dispense: {{ $item->dispense }}</p>
+                            @endif
+                            @if(@$item->refills)
+                                <p style="margin: 0.5rem 0;">Refills: {{ $item->refills }}</p>
+                            @endif
+                        </div>
+                    </div>
+                </td>
+            </tr>
+        </table>
+        <?php endforeach; ?>
+    </section>
+<?php endif; ?>
+
+

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

@@ -1,58 +1,60 @@
-<section style="padding-top: 0.1rem;">
-
-    <div style="margin: 0 0 1rem; font-weight: bold; "><span style="font-size: 16px">Specimen/Physician Information</span></div>
-
-    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; font-size: 14px; margin-bottom: 1rem;">
-        <tr>
-            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Order Date:</td>
-            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{date('Y-m-d h:i a')}}</td>
-            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">NPI:</td>
-            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$prescription->hcpPro->hcp_npi}}</td>
-        </tr>
-        <tr>
-            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Test Date:</td>
-            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">-</td>
-            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Practice Phone:</td>
-            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">202-935-1033</td>
-        </tr>
-        <tr>
-            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Ordering Physician:</td>
-            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$prescription->hcpPro->displayName()}}</td>
-            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Practice Fax:</td>
-            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">202-935-1033</td>
-        </tr>
-    </table>
-
-    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
-        <tr>
-            <td style="width: 70%">
-                <b>Patient Information</b>
-            </td>
-            <td style="">
+<?php
+$addressParts = [];
+if (!!$patient->mailing_address_line1) $addressParts[] = $patient->mailing_address_line1;
+if (!!$patient->mailing_address_line2) $addressParts[] = $patient->mailing_address_line2;
+$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);
 
-            </td>
-        </tr>
+$coverage = $patient->effectiveClientPrimaryCoverage;
+$payerName = null;
+$memberID = null;
+if($coverage) {
+  if ($coverage->plan_type == 'Medicare') {
+      $payerName = 'Medicare';
+      $memberID = $coverage->mcr_number;
+  };
+  if ($coverage->plan_type == 'Medicaid') {
+      $payerName = $coverage->mcd_payer_name;
+      $memberID = $coverage->mcd_number;
+  };
+  if ($coverage->plan_type == 'COMMERCIAL') {
+      $payerName = $coverage->commercial_payer_name;
+      $memberID = $coverage->commercial_member_identifier;
+  }
+}
+?>
+<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;">
+      <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>
+          <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>
+          <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>
+          <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>
+        </td>
+      </tr>
     </table>
-
-    <div style="font-size: 14px; margin-top: 0.6rem; line-height: 1.4; opacity: 0.6">
-        <span>{{ $patient->displayName() }}, {{$patient->sex}}, {{$patient->age_in_years}} years old</span><br>
-        <?php
-        $addressParts = [];
-        if (!!$patient->mailing_address_line1) $addressParts[] = $patient->mailing_address_line1;
-        if (!!$patient->mailing_address_line2) $addressParts[] = $patient->mailing_address_line2;
-        $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);
-        ?>
-        <span>{!! $addressParts !!}</span>
-    </div>
 </section>
 
 <?php $clinical = json_decode($prescription->clinical_detail_json); ?>
 <?php if($clinical && @$clinical->items): ?>
-    <div style="margin: 1.5rem 0 1rem; font-weight: bold; opacity: 0.5"><span style="font-size: 24px">R</span><span style="font-size: 16px">x</span></div>
+    <div style="margin: 1rem 0; font-weight: bold;"><span style="font-size: 28px">R</span><span style="font-size: 20px">x</span></div>
+    <div style="margin: 1rem 0; font-size:14px;">Date: {{friendlier_date(date('Y-m-d'))}}</div>
     <section style="font-size: 15px;">
         <?php $count = 0; ?>
         <?php foreach ($clinical->items as $item): ?>
@@ -87,5 +89,3 @@
         <?php endforeach; ?>
     </section>
 <?php endif; ?>
-
-

+ 85 - 0
resources/views/app/patient/prescriptions/pdf/pdf-preview-old.blade.php

@@ -0,0 +1,85 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <?php
+    $note = null;
+    $hcpCompany = null;
+    $hcpCompanyProPayer = null;
+    $hcpCompanyLocation = null;
+    if(@$prescription->note) {
+        $note = $prescription->note;
+        $hcpCompany = $note->hcpCompany;
+        $hcpCompanyProPayer = $note->hcpCompanyProPayer;
+        $hcpCompanyLocation = $note->hcpCompanyLocation;
+    }
+    ?>
+    <title>{{$hcpCompany ? $hcpCompany->name : 'Prescription'}}</title>
+</head>
+<body>
+<div style="margin: 0; padding: 1rem; font-family: sans-serif">
+    <header style="padding: 0; border: 0; margin: 0 0 1rem;">
+        <div style="text-align: center">
+            <h3 style="margin-bottom: 1rem;">{{$hcpCompany ? $hcpCompany->name : 'Prescription'}}</h3>
+        </div>
+        <div style="margin-top: 1.5rem; font-size: 19px">{{ $prescription->hcpPro->name_prefix }} {{ $prescription->hcpPro->name_first }} {{ $prescription->hcpPro->name_last }} <span style="font-size: 13px; opacity: 0.75">{{ $prescription->hcpPro->name_suffix }}</span></div>
+        <div style="display: block;">
+            <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
+                <tr>
+                    <td style="width: 70%">
+                        @if($hcpCompanyLocation)
+                            <div style="font-size: 14px; margin-top: 0.6rem; line-height: 1.4; opacity: 0.6">
+                                {{$hcpCompanyLocation->line1}} {{$hcpCompanyLocation->line2}}<br>
+                                {{$hcpCompanyLocation->city}} {{$hcpCompanyLocation->state}} {{$hcpCompanyLocation->zip}}
+                            </div>
+                        @endif
+                    </td>
+                    <td style="">
+                        <div style="text-align: right; font-size: 14px; margin-top: 0.6rem; line-height: 1.4; opacity: 0.6">PH: 202-935-1033<br>FAX: 202-935-1033</div>
+                    </td>
+                </tr>
+            </table>
+        </div>
+    </header>
+    <hr style="border-top: 2px solid #5ca4e8; border-bottom: 0; margin: 1rem 0;">
+
+    <?php
+    use App\Models\Erx;
+    /** @var Erx $prescription */
+    $patient = $prescription->patient;
+    ?>
+
+    @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>
+            <p style="margin: 0.5rem 0;">Phone: {{$logistics->facilityPhone}}</p>
+            <p style="margin: 0.5rem 0;">Fax: {{$logistics->facilityFax}}</p>
+        </div>
+    <?php endif; ?>
+
+    <hr style="margin: 1rem 0 0.5rem; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">
+    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
+        <tr>
+            <td style="vertical-align: middle; white-space: nowrap; width: 100px;">
+                Authorizing Signature: Digital Signature Capture at <?= friendlier_date_time($prescription->created_at) ?>
+            </td>
+            <td style="vertical-align: middle;">
+                @if($prescription->hcpPro->signature_base_64)
+                    <img src="{{$prescription->hcpPro->signature_base_64}}" style="max-width: 180px;">
+                @endif
+            </td>
+        </tr>
+    </table>
+</div>
+</body>
+</html>
+

+ 32 - 35
resources/views/app/patient/prescriptions/pdf/pdf-preview.blade.php

@@ -17,40 +17,34 @@
         $hcpCompanyLocation = $note->hcpCompanyLocation;
     }
     ?>
+    <?php
+    use App\Models\Erx;
+    /** @var Erx $prescription */
+    $patient = $prescription->patient;
+    ?>
     <title>{{$hcpCompany ? $hcpCompany->name : 'Prescription'}}</title>
 </head>
 <body>
 <div style="margin: 0; padding: 1rem; font-family: sans-serif">
-    <header style="padding: 0; border: 0; margin: 0 0 1rem;">
+    <header style="padding: 0; border: 0; margin: 0">
         <div style="text-align: center">
-            <h3 style="margin-bottom: 1rem;">{{$hcpCompany ? $hcpCompany->name : 'Prescription'}}</h3>
+            <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
         </div>
-        <div style="margin-top: 1.5rem; font-size: 19px">{{ $prescription->hcpPro->name_prefix }} {{ $prescription->hcpPro->name_first }} {{ $prescription->hcpPro->name_last }} <span style="font-size: 13px; opacity: 0.75">{{ $prescription->hcpPro->name_suffix }}</span></div>
-        <div style="display: block;">
-            <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
-                <tr>
-                    <td style="width: 70%">
-                        @if($hcpCompanyLocation)
-                            <div style="font-size: 14px; margin-top: 0.6rem; line-height: 1.4; opacity: 0.6">
-                                {{$hcpCompanyLocation->line1}} {{$hcpCompanyLocation->line2}}<br>
-                                {{$hcpCompanyLocation->city}} {{$hcpCompanyLocation->state}} {{$hcpCompanyLocation->zip}}
-                            </div>
-                        @endif
-                    </td>
-                    <td style="">
-                        <div style="text-align: right; font-size: 14px; margin-top: 0.6rem; line-height: 1.4; opacity: 0.6">PH: 202-935-1033<br>FAX: 202-935-1033</div>
-                    </td>
-                </tr>
-            </table>
+        <div style="text-align:center;">
+          <span style="width:33.33%; display:inline-block;">Phone: 202-935-1033</span>
+          <span style="width:33.33%; display:inline-block;">Fax: 202-935-1033</span>
+          <span style="width:33.33%; display:inline-block;">NPI: {{$prescription->hcpPro->hcp_npi}}</span>
         </div>
     </header>
-    <hr style="border-top: 2px solid #5ca4e8; border-bottom: 0; margin: 1rem 0;">
 
-    <?php
-    use App\Models\Erx;
-    /** @var Erx $prescription */
-    $patient = $prescription->patient;
-    ?>
+
 
     @include('app.patient.prescriptions.pdf.' . $prescription->erx_category)
 
@@ -66,20 +60,23 @@
         </div>
     <?php endif; ?>
 
-    <hr style="margin: 1rem 0 0.5rem; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">
-    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
+    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%;padding-left:20%;margin-top:1rem;">
         <tr>
-            <td style="vertical-align: middle; white-space: nowrap; width: 100px;">
-                Authorizing Signature: Digital Signature Capture at <?= friendlier_date_time($prescription->created_at) ?>
-            </td>
-            <td style="vertical-align: middle;">
-                @if($prescription->hcpPro->signature_base_64)
-                    <img src="{{$prescription->hcpPro->signature_base_64}}" style="max-width: 180px;">
-                @endif
+          <td style="vertical-align: bottom;padding-right:.2rem;">Signature:</td>
+          <td style="vertical-align: middle;border-bottom:1px solid #aaa;width:100%;padding-bottom:.2rem;padding-left:.5rem;">
+              @if($prescription->hcpPro->signature_base_64)
+                  <img src="{{$prescription->hcpPro->signature_base_64}}" style="max-width: 180px;">
+              @endif
+          </td>
+        </tr>
+        <tr>
+          <td></td>
+            <td style="vertical-align: middle; white-space: nowrap;padding-top:.5rem;padding-left:.5rem;">
+                Digital Signature Capture at <?= friendlier_date_time($prescription->created_at) ?>
             </td>
         </tr>
     </table>
 </div>
+<div style="font-family: sans-serif;position:absolute; bottom:0;margin:0;width:100%;text-align:center;padding-bottom:10px;">EndoChart®</div>
 </body>
 </html>
-