Completed Referral functionality

This commit is contained in:
Ryan Prather 2024-12-08 18:37:45 -05:00
parent 6bde369bcd
commit 065b1ac403
11 changed files with 714 additions and 1 deletions

View File

@ -0,0 +1,122 @@
<?php
namespace App\Controller;
use App\Entity\MemberCase;
use App\Entity\Referral;
use App\Entity\User;
use App\Form\ReferralFormType;
use App\Libs\NavList;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Http\Attribute\CurrentUser;
class ReferralController extends AbstractController
{
public function __construct(
private EntityManagerInterface $entityManager,
private array $navLinks = []
) {
$this->navLinks = NavList::LIST;
}
#[Route('/list-referrals/{id}', name: 'app_list_referrals')]
public function listReferrals(Request $request, #[CurrentUser()] User $user, string $id): Response
{
$case = $this->entityManager->getRepository(MemberCase::class)->find($id);
$openReferrals = $this->entityManager->getRepository(Referral::class)->getActiveReferrals($case);
$closedReferrals = $this->entityManager->getRepository(Referral::class)->getClosedReferrals($case);
return $this->render(
'internal/cases/referrals/list-referrals.html.twig',
array_merge(
$this->navLinks,
[
'breadcrumbs' => [
'Case',
'Referrals'
],
'notifications' => $user->retrieveUnreadNotifications(),
'case' => $case,
'openReferrals' => $openReferrals,
'closedReferrals' => $closedReferrals,
]
)
);
}
#[Route('/add-referral/{id}', name: 'app_case_add_referral')]
public function addReferral(Request $request, #[CurrentUser()] User $user, string $id): Response
{
$case = $this->entityManager->getRepository(MemberCase::class)->find($id);
$referral = new Referral();
$form = $this->createForm(ReferralFormType::class, $referral);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$referral = $form->getData();
$referral->setMemberCase($case);
$this->entityManager->persist($referral);
$this->entityManager->flush();
return $this->redirectToRoute('app_list_referrals', ['id' => $case->getId()]);
}
return $this->render(
'internal/cases/referrals/add-referral.html.twig',
array_merge(
$this->navLinks,
[
'breadcrumbs' => [
'Case',
'Add Referral'
],
'notifications' => $user->retrieveUnreadNotifications(),
'case' => $case,
'form' => $form,
]
)
);
}
#[Route('/case/{caseId}/edit-referral/{referralId}', name: 'app_case_edit_referral')]
public function editReferral(Request $request, #[CurrentUser()] User $user, string $caseId, string $referralId): Response
{
$referral = $this->entityManager->getRepository(Referral::class)->find($referralId);
$case = $this->entityManager->getRepository(MemberCase::class)->find($caseId);
$form = $this->createForm(ReferralFormType::class, $referral);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$referral = $form->getData();
$this->entityManager->flush();
return $this->redirectToRoute('app_list_referrals', ['id' => $case->getId()]);
}
return $this->render(
'internal/cases/referrals/edit-referral.html.twig',
array_merge(
$this->navLinks,
[
'breadcrumbs' => [
'Case',
'Edit Referral'
],
'notifications' => $user->retrieveUnreadNotifications(),
'case' => $case,
'form' => $form,
'referral' => $referral,
]
)
);
}
}

View File

@ -85,9 +85,16 @@ class MemberCase
#[ORM\OneToMany(targetEntity: UserCase::class, mappedBy: 'memberCase')] #[ORM\OneToMany(targetEntity: UserCase::class, mappedBy: 'memberCase')]
private Collection $userCases; private Collection $userCases;
/**
* @var Collection<int, Referral>
*/
#[ORM\OneToMany(targetEntity: Referral::class, mappedBy: 'memberCase', orphanRemoval: true)]
private Collection $referrals;
public function __construct() public function __construct()
{ {
$this->userCases = new ArrayCollection(); $this->userCases = new ArrayCollection();
$this->referrals = new ArrayCollection();
} }
public function getId(): ?Uuid public function getId(): ?Uuid
@ -357,4 +364,34 @@ class MemberCase
return $this; return $this;
} }
/**
* @return Collection<int, Referral>
*/
public function getReferrals(): Collection
{
return $this->referrals;
}
public function addReferral(Referral $referral): static
{
if (!$this->referrals->contains($referral)) {
$this->referrals->add($referral);
$referral->setMemberCase($this);
}
return $this;
}
public function removeReferral(Referral $referral): static
{
if ($this->referrals->removeElement($referral)) {
// set the owning side to null (unless already changed)
if ($referral->getMemberCase() === $this) {
$referral->setMemberCase(null);
}
}
return $this;
}
} }

132
src/Entity/Referral.php Normal file
View File

@ -0,0 +1,132 @@
<?php
namespace App\Entity;
use App\Enums\DischargeReason;
use App\Enums\ReferralServiceType;
use App\Repository\ReferralRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Types\UuidType;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: ReferralRepository::class)]
class Referral
{
#[ORM\Id]
#[ORM\Column(type: UuidType::NAME, unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
private ?Uuid $id = null;
#[ORM\ManyToOne(inversedBy: 'referrals')]
#[ORM\JoinColumn(nullable: false)]
private ?MemberCase $memberCase = null;
#[ORM\Column(length: 20)]
private ?string $referralId = null;
#[ORM\Column(enumType: ReferralServiceType::class)]
private ?ReferralServiceType $serviceCode = null;
#[ORM\Column]
private ?int $hours = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $endDate = null;
#[ORM\Column(nullable: true, enumType: DischargeReason::class)]
private ?DischargeReason $dischargeReason = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dischargeDate = null;
public function getId(): ?Uuid
{
return $this->id;
}
public function getMemberCase(): ?MemberCase
{
return $this->memberCase;
}
public function setMemberCase(?MemberCase $memberCase): static
{
$this->memberCase = $memberCase;
return $this;
}
public function getReferralId(): ?string
{
return $this->referralId;
}
public function setReferralId(string $referralId): static
{
$this->referralId = $referralId;
return $this;
}
public function getServiceCode(): ?ReferralServiceType
{
return $this->serviceCode;
}
public function setServiceCode(ReferralServiceType $serviceCode): static
{
$this->serviceCode = $serviceCode;
return $this;
}
public function getHours(): ?int
{
return $this->hours;
}
public function setHours(int $hours): static
{
$this->hours = $hours;
return $this;
}
public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
public function setEndDate(\DateTimeInterface $endDate): static
{
$this->endDate = $endDate;
return $this;
}
public function getDischargeReason(): ?DischargeReason
{
return $this->dischargeReason;
}
public function setDischargeReason(?DischargeReason $dischargeReason): static
{
$this->dischargeReason = $dischargeReason;
return $this;
}
public function getDischargeDate(): ?\DateTimeInterface
{
return $this->dischargeDate;
}
public function setDischargeDate(?\DateTimeInterface $dischargeDate): static
{
$this->dischargeDate = $dischargeDate;
return $this;
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace App\Enums;
enum DischargeReason: string
{
case AGENCY_WITHDREW = 'Agency withdrew family';
case COMPLETED_PLANNED_SERVICES = 'Completed planned services';
case DCS_OR_PROBATION_WITHDREW = 'DCS or Probation withdrew services';
case CLIENT_MOVED = 'Client Moved';
case CLIENT_WITHDREW = 'Client/youth/family withdrew from service';
case FAMILY_REFUSED = 'Family refused services';
case OTHER = 'Other, Please Specify';
case CLIENT_REFUSED = 'Client refused to initiate services';
case CLIENT_REFERRED = 'Client referred to another service';
case ADMINISTRATIVE_TERMINATION = 'Administrative termination';
case REFERRAL_EXPIRED = 'Referral expired';
case SERVICE_ON_HOLD = 'Service on hold/intermittant';
case UNKNOWN = 'Unknown';
case TRANSFER_COUNTY = 'Transfer to another county';
case ASSIGNED_TO_DIFFERENT_IC = 'Assigned to different IC';
case SERVICES_NOT_NEEDED = 'Services not needed at this time, per FCM';
case CHANGE_IN_OBJECTIVE = 'Change in objective/referred person added';
case DCS_PROBATION_CASE_CLOSED = 'DCS/Probation case closed';
case TEMP_COVERAGE = 'Temporary coverage only for another IC';
case UPDATED_REFERRAL = 'Updated referral received';
}

View File

@ -0,0 +1,10 @@
<?php
namespace App\Enums;
enum ReferralServiceType: string
{
case FE_FF = 'FE-FF';
case VS_THBB = 'VS-THBB';
case VS_THBBT = 'VS-THBBT';
}

View File

@ -0,0 +1,44 @@
<?php
namespace App\Form;
use App\Entity\MemberCase;
use App\Entity\Referral;
use App\Enums\DischargeReason;
use App\Enums\ReferralServiceType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EnumType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class ReferralFormType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('referralId')
->add('serviceCode', EnumType::class, [
'class' => ReferralServiceType::class,
'label' => 'Service Type'
])
->add('hours')
->add('endDate', null, [
'widget' => 'single_text',
])
->add('dischargeReason', EnumType::class, [
'class' => DischargeReason::class
])
->add('dischargeDate', null, [
'widget' => 'single_text',
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Referral::class,
]);
}
}

View File

@ -0,0 +1,68 @@
<?php
namespace App\Repository;
use App\Entity\MemberCase;
use App\Entity\Referral;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Referral>
*/
class ReferralRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Referral::class);
}
public function getActiveReferrals(MemberCase $case): array
{
return $this->createQueryBuilder('r')
->andWhere('r.dischargeDate IS NULL')
->andWhere('r.memberCase = :case')
->setParameter('case', $case->getId()->toBinary())
->orderBy('r.hours', 'ASC')
->getQuery()
->getResult()
;
}
public function getClosedReferrals(MemberCase $case): array
{
return $this->createQueryBuilder('r')
->andWhere('r.dischargeDate IS NOT NULL')
->andWhere('r.memberCase = :case')
->setParameter('case', $case->getId()->toBinary())
->orderBy('r.dischargeDate', 'DESC')
->getQuery()
->getResult()
;
}
// /**
// * @return Referral[] Returns an array of Referral objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('r')
// ->andWhere('r.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('r.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Referral
// {
// return $this->createQueryBuilder('r')
// ->andWhere('r.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -40,6 +40,7 @@
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">DCS Case ID</th> <th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">DCS Case ID</th>
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Type/Source</th> <th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Type/Source</th>
<th class='text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7'>County</th> <th class='text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7'>County</th>
<th class='text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7'>Referral Count</th>
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Case Worker</th> <th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Case Worker</th>
<th class="text-secondary opacity-7"></th> <th class="text-secondary opacity-7"></th>
</tr> </tr>
@ -69,6 +70,9 @@
<td> <td>
<p class='text-xs font-weight-bold mb-0'>{{ c.county.value }}</p> <p class='text-xs font-weight-bold mb-0'>{{ c.county.value }}</p>
</td> </td>
<td>
<p class='text-center text-xs font-weight-bold mb-0'>{{ c.referrals|length }}</p>
</td>
<td class='align-middle text-center text-xs'> <td class='align-middle text-center text-xs'>
<p class='text-xs font-weight-bold mb-0'> <p class='text-xs font-weight-bold mb-0'>
{% if c.userCases|length > 0 %} {% if c.userCases|length > 0 %}
@ -83,7 +87,7 @@
<a href='/index.php/assign-case/{{ c.id }}' class='' title='Assign Case Worker' data-toggle='tooltip' data-original-title='Assign Worker'> <a href='/index.php/assign-case/{{ c.id }}' class='' title='Assign Case Worker' data-toggle='tooltip' data-original-title='Assign Worker'>
<i class='material-symbols-rounded opacity-5'>badge</i> <i class='material-symbols-rounded opacity-5'>badge</i>
</a> </a>
<a href='/index.php/add-referral/{{ c.id }}' class='' title='List Referrals' data-toggle='tooltip' data-original-title='Add Referral'> <a href='/index.php/list-referrals/{{ c.id }}' class='' title='List Referrals' data-toggle='tooltip' data-original-title='Add Referral'>
<i class='material-symbols-rounded opacity-5'>create_new_folder</i> <i class='material-symbols-rounded opacity-5'>create_new_folder</i>
</a> </a>
<a href='/index.php/list-members/{{ c.id }}' class='' title='List Members' data-toggle='tooltip' data-original-title='Add Member'> <a href='/index.php/list-members/{{ c.id }}' class='' title='List Members' data-toggle='tooltip' data-original-title='Add Member'>

View File

@ -0,0 +1,73 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ block('nav', 'internal/libs/nav.html.twig') }}
<main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
{{ block('topnav', 'internal/libs/top-nav.html.twig') }}
<section>
<div class="card card-plain">
<div class="card-header">
<h4 class="font-weight-bolder">Add Referral</h4>
<p class="mb-0">{{ case.caseName }}</p>
</div>
<div class="card-body">
<div class="container">
{{ form_errors(form) }}
{{ form_start(form) }}
<div class='input-group input-group-outline mb-3'>
<label for='referral_form_referralId' class='form-label'>Referral ID</label>
<input type='text' name='{{ field_name(form.referralId) }}' id='referral_form_referralId' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<select name='{{ field_name(form.serviceCode) }}' id='referral_form_serviceCode' class='form-control'>
<option value=''>-- Select Service Code --</option>
{% for sc in enum('App\\Enums\\ReferralServiceType').cases() %}
<option value='{{ sc.value }}'>{{ sc.name }}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='referral_form_hours' class='form-label'>Hours</label>
<input type='number' name='{{ field_name(form.hours) }}' id='referral_form_hours' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='referral_form_endDate' class='form-label'></label>
<input type='date' name='{{ field_name(form.endDate) }}' id='referral_form_endDate' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<select name='{{ field_name(form.dischargeReason) }}' id='referral_form_dischargeReason' class='form-control'>
<option value=''>-- Select Discharge Reason --</option>
{% for dr in enum('App\\Enums\\DischargeReason').cases() %}
<option value='{{ dr.value }}'>{{ dr.name }}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='referral_form_dischargeDate' class='form-label'></label>
<input type='date' name='{{ field_name(form.dischargeDate) }}' id='referral_form_dischargeDate' class='form-control'/>
</div>
<div class='row'>
<div class="text-center">
<button type="submit" class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0">Save Referral</button>
</div>
</div>
{{ form_end(form) }}
</div>
</div>
</div>
</section>
</main>
{% endblock %}

View File

@ -0,0 +1,73 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ block('nav', 'internal/libs/nav.html.twig') }}
<main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
{{ block('topnav', 'internal/libs/top-nav.html.twig') }}
<section>
<div class="card card-plain">
<div class="card-header">
<h4 class="font-weight-bolder">Add Referral</h4>
<p class="mb-0">{{ case.caseName }}</p>
</div>
<div class="card-body">
<div class="container">
{{ form_errors(form) }}
{{ form_start(form) }}
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='referral_form_referralId' class='form-label'>Referral ID</label>
<input type='text' name='{{ field_name(form.referralId) }}' id='referral_form_referralId' value='{{ referral.referralId }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<select name='{{ field_name(form.serviceCode) }}' id='referral_form_serviceCode' class='form-control'>
<option value=''>-- Select Service Code --</option>
{% for sc in enum('App\\Enums\\ReferralServiceType').cases() %}
<option value='{{ sc.value }}' {% if referral.serviceCode.value == sc.value %} selected='selected' {% endif %}>{{ sc.name }}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='referral_form_hours' class='form-label'>Hours</label>
<input type='number' name='{{ field_name(form.hours) }}' id='referral_form_hours' value='{{ referral.hours }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='referral_form_endDate' class='form-label'></label>
<input type='date' name='{{ field_name(form.endDate) }}' id='referral_form_endDate' value='{{ referral.endDate|date("Y-m-d") }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<select name='{{ field_name(form.dischargeReason) }}' id='referral_form_dischargeReason' class='form-control'>
<option value=''>-- Select Discharge Reason --</option>
{% for dr in enum('App\\Enums\\DischargeReason').cases() %}
<option value='{{ dr.value }}'>{{ dr.name }}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='referral_form_dischargeDate' class='form-label'></label>
<input type='date' name='{{ field_name(form.dischargeDate) }}' id='referral_form_dischargeDate' class='form-control'/>
</div>
<div class='row'>
<div class="text-center">
<button type="submit" class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0">Save Referral</button>
</div>
</div>
{{ form_end(form) }}
</div>
</div>
</div>
</section>
</main>
{% endblock %}

View File

@ -0,0 +1,123 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ block('nav', 'internal/libs/nav.html.twig') }}
<main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
{{ block('topnav', 'internal/libs/top-nav.html.twig') }}
<div class="container-fluid py-2">
<div class="row">
<div class="col-12">
<div class="card my-4">
<div class="card-header p-0 position-relative mt-n4 mx-3 z-index-2">
<div class="d-flex justify-content-between bg-gradient-dark shadow-dark border-radius-lg pt-4 pb-3 ps-3 p-2">
<div>
<h6 class="text-white text-capitalize ps-3">Referral List</h6>
</div>
<div>
<button type="button" class="btn btn-block btn-light mb-3" onclick="window.open('/index.php/add-referral/{{ case.id }}', '_self')">Add Referral</button>
</div>
</div>
</div>
<div class="card-body px-0 pb-2">
<div>
Filter:
</div>
<div class="table-responsive p-0">
<table class="table align-items-center mb-0">
<thead>
<tr>
<th class="text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Referral ID</th>
<th class="text-uppercase text-secondary text-xxs font-weight-bolder opacity-7 ps-2">Service</th>
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Hours Rem</th>
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">End Date</th>
<th class="text-secondary opacity-7"></th>
</tr>
</thead>
<tbody>
{% for r in openReferrals %}
<tr>
<td>
<h6 class='mb-0 text-small'>{{ r.referralId }}</h6>
</td>
<td>
<p class='text-xs font-weight-bold mb-0'>{{ r.serviceCode.value }}</p>
</td>
<td>
<p class='text-xs font-weight-bold mb-0'>{{ r.hours }}</p>
</td>
<td>
<p class='text-xs font-weight-bold mb-0'>{{ r.endDate|date("F j, Y") }}</p>
</td>
<td class='align-right'>
<a href='/index.php/case/{{ case.id }}/edit-referral/{{ r.id }}' class='' title='Edit Referral' data-toggle='tooltip'>
<i class="material-symbols-rounded opacity-5">edit</i>
</a>
<a href='/index.php/list-notes/{{ r.id }}' class='' title='List Notes' data-toggle='tooltip'>
<i class='material-symbols-rounded opacity-5'>edit_note</i>
</a>
<a href='#' class='' title='Close Referral' data-toggle='tooltip'>
<i class='material-symbols-rounded opacity-5'>close</i>
</a>
</td>
</tr>
</td>
</tbody>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card my-4">
<div class="card-header p-0 position-relative mt-n4 mx-3 z-index-2">
<div class="d-flex justify-content-between bg-gradient-dark shadow-dark border-radius-lg pt-4 pb-3 ps-3 p-2">
<div>
<h6 class="text-white text-capitalize ps-3">Closed Referrals</h6>
</div>
</div>
</div>
<div class="card-body px-0 pb-2">
<div class="table-responsive p-0">
<table class="table align-items-center mb-0">
<thead>
<tr>
<th class="text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Referral ID</th>
<th class="text-uppercase text-secondary text-xxs font-weight-bolder opacity-7 ps-2">Service</th>
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Discharge Reason</th>
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Discharge Date</th>
<th class="text-secondary opacity-7"></th>
</tr>
</thead>
<tbody>
{% for r in closedReferrals %}
<tr>
<td>
<h6 class='mb-0 text-small'>{{ r.referralId }}</h6>
</td>
<td>
<p class='text-xs font-weight-bold mb-0'>{{ r.serviceCode.value }}</p>
</td>
<td>
<p class='text-xs font-weight-bold mb-0'>{{ r.dischargeReason.value }}</p>
</td>
<td>
<p class='text-xs font-weight-bold mb-0'>{{ r.dischargeDate|date("F j, Y") }}</p>
</td>
<td class='align-right'></td>
</tr>
</td>
</tbody>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</main>
{% endblock %}