|
@@ -1038,6 +1038,17 @@ WHERE measurement.label NOT IN ('SBP', 'DBP')
|
|
|
}
|
|
|
|
|
|
public function genericBill(Request $request, $entityType, $entityUid) {
|
|
|
- return view('app.generic-bills.inline', ['class' => 'p-3 border-top mt-3', 'entityType' => $entityType, 'entityUid' => $entityUid]);
|
|
|
+ $patient = null;
|
|
|
+ if ($entityType && $entityUid) {
|
|
|
+ try {
|
|
|
+ $entityClass = "\\App\\Models\\" . $entityType;
|
|
|
+ $entity = $entityClass::where('uid', $entityUid)->first();
|
|
|
+ if ($entity->client) {
|
|
|
+ $patient = $entity->client;
|
|
|
+ }
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return view('app.generic-bills.inline', ['class' => 'p-3 border-top mt-3', 'entityType' => $entityType, 'entityUid' => $entityUid, 'patient' => $patient]);
|
|
|
}
|
|
|
}
|