add case viewer for case workers
This commit is contained in:
parent
55b1ef4f3d
commit
b87e970164
@ -96,6 +96,37 @@ class CaseController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route('/case/{caseId}', name: 'app_view_case')]
|
||||
public function showCase(Request $request, string $caseId): Response
|
||||
{
|
||||
if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) {
|
||||
return $this->redirectToRoute('app_login');
|
||||
}
|
||||
|
||||
$case = $this->entityManager->getRepository(MemberCase::class)->find($caseId);
|
||||
$sources = $this->entityManager->getRepository(ReferralSource::class)->findAll();
|
||||
|
||||
$this->msgs = $this->entityManager->getRepository(Messages::class)->getUnreadMessages($this->getUser());
|
||||
$this->notificationCount = $this->entityManager->getRepository(Messages::class)->getUnreadMessageCount($this->getUser());
|
||||
|
||||
return $this->render(
|
||||
'internal/cases/view-case.html.twig',
|
||||
array_merge(
|
||||
$this->navLinks,
|
||||
[
|
||||
'case' => $case,
|
||||
'sources' => $sources,
|
||||
'breadcrumbs' => [
|
||||
new Breadcrumb($this->generateUrl('app_list_cases'), 'List Cases'),
|
||||
new Breadcrumb($this->generateUrl('app_view_case', ['caseId' => $case->getId()]), 'View Case')
|
||||
],
|
||||
'notifications' => $this->msgs,
|
||||
'notificationCount' => $this->notificationCount,
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
#[Route('/add-case', name: 'app_add_case')]
|
||||
public function addCase(Request $request, #[CurrentUser()] User $admin): Response
|
||||
{
|
||||
|
@ -60,13 +60,16 @@
|
||||
<p class='text-center text-xs font-weight-bold mb-0'>{{ c.referrals|length }}</p>
|
||||
</td>
|
||||
<td class='align-right'>
|
||||
<a href='{{ path('app_list_referrals', {id: c.id}) }}' class='' title='List Referrals' data-toggle='tooltip'>
|
||||
<a href='{{ path('app_view_case', {caseId: c.id}) }}' title='View Case'>
|
||||
<i class='material-symbols-rounded opacity-5'>visibility</i>
|
||||
</a>
|
||||
<a href='{{ path('app_list_referrals', {id: c.id}) }}' title='List Referrals'>
|
||||
<i class='material-symbols-rounded opacity-5'>create_new_folder</i>
|
||||
</a>
|
||||
<a href='{{ path('app_case_members', {id: c.id}) }}' class='' title='List Members' data-toggle='tooltip'>
|
||||
<a href='{{ path('app_case_members', {id: c.id}) }}' title='List Members'>
|
||||
<i class='material-symbols-rounded opacity-5'>group_add</i>
|
||||
</a>
|
||||
<a href='{{ path('app_case_notes', {id: c.id}) }}' class='' title='Show Notes' data-toggle='tooltip'>
|
||||
<a href='{{ path('app_case_notes', {id: c.id}) }}' title='Show Notes'>
|
||||
<i class='material-symbols-rounded opacity-5'>clinical_notes</i>
|
||||
</a>
|
||||
</td>
|
||||
|
148
templates/internal/cases/view-case.html.twig
Normal file
148
templates/internal/cases/view-case.html.twig
Normal file
@ -0,0 +1,148 @@
|
||||
{% 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">Case Info</h4>
|
||||
<p class="mb-0"></p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class='col'>
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='case_form_caseNumber' class='form-label'>Case #</label>
|
||||
<input type='text' name='caseNumber' id='case_form_caseNumber' value='{{ case.caseNumber }}' class='form-control' required='required'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='case_form_dcsCaseId' class='form-label'>DCS Case ID</label>
|
||||
<input type='text' name='dcsCaseId' id='case_form_dcsCaseId' value='{{ case.dcsCaseId }}' class='form-control' required='required'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='case_form_admitDate' class='form-label'>Admit Date</label>
|
||||
<input type='date' name='admitDate' id='case_form_admitDate' value='{{ case.admitDate|date('Y-m-d') }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3{% if case.closeDate %} is-filled{% endif %}'>
|
||||
<label for='case_form_closeDate' class='form-label'></label>
|
||||
<input type='date' name='closeDate' id='case_form_closeDate' value='{% if case.closeDate %}{{ case.closeDate|date('Y-m-d') }}{% endif %}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='case_form_caseEmail' class='form-label'>Case Email</label>
|
||||
<input type='text' name='caseEmail' id='case_form_caseEmail' value='{{ case.caseEmail }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='case_form_referralType' class='form-label'>Referral Type</label>
|
||||
<input type='text' name='referralType' id='case_form_referralType' value='{{ case.referralType }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='case_form_level' class='form-label'>Level</label>
|
||||
<select name='level' id='case_form_level' class='form-control'>
|
||||
<option value=''></option>
|
||||
{% for l in enum('App\\Enums\\CaseLevel').cases() %}
|
||||
<option value='{{ l.value }}' {% if case.level.value == l.value %} selected='selected' {% endif %}>{{ l.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='case_form_referralSource' class='form-label'>Referral Source</label>
|
||||
<select name='referralSource' id='case_form_referralSource' class='form-control'>
|
||||
<option value=''></option>
|
||||
|
||||
{% for src in sources %}
|
||||
<option value='{{ src.id }}' {% if case.referralSource.id == src.id %} selected='selected' {% endif %}>{{ src.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 {% if case.referralSource2 %}is-filled{% endif %}'>
|
||||
<label for='case_form_referralSources2' class='form-label'>2nd Referral Source</label>
|
||||
<select name='referralSource2' id='case_form_referralSources2' class='form-control'>
|
||||
<option value=''></option>
|
||||
|
||||
{% for src in sources %}
|
||||
<option value='{{ src.id }}' {% if case.referralSource2 and case.referralSource2.id == src.id %} selected='selected' {% endif %}>{{ src.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col'>
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='case_form_firstName' class='form-label'>First Name</label>
|
||||
<input type='text' name='firstName' id='case_form_firstName' value='{{ case.firstName }}' class='form-control' required='required'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='case_form_lastName' class='form-label'>Last Name</label>
|
||||
<input type='text' name='lastName' id='case_form_lastName' value='{{ case.lastName }}' class='form-control' required='required'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3{% if case.address %} is-filled{% endif %}'>
|
||||
<label for='case_form_address' class='form-label'>Address</label>
|
||||
<input type='text' name='address' id='case_form_address' value='{{ case.address }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3{% if case.address2 %} is-filled{% endif %}'>
|
||||
<label for='case_form_address2' class='form-label'>Address 2</label>
|
||||
<input type='text' name='address2' id='case_form_address2' value='{{ case.address2 }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3{% if case.city %} is-filled{% endif %}'>
|
||||
<label for='case_form_city' class='form-label'>City</label>
|
||||
<input type='text' name='city' id='case_form_city' value='{{ case.city }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3{% if case.state %} is-filled{% endif %}'>
|
||||
<label for='case_form_state' class='form-label'>State</label>
|
||||
<input type='text' name='state' id='case_form_state' value='{{ case.state }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3{% if case.zip %} is-filled{% endif %}'>
|
||||
<label for='case_form_zip' class='form-label'>Zip</label>
|
||||
<input type='text' name='zip' id='case_form_zip' value='{{ case.zip }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='case_form_county' class='form-label'>County</label>
|
||||
<select name='county' id='case_form_county' class='form-control'>
|
||||
<option value=''></option>
|
||||
{% for c in enum('App\\Enums\\County').cases() %}
|
||||
<option value='{{ c.value }}' {% if case.county.value == c.value %} selected='selected' {% endif %}>{{ c.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3{% if case.insurance %} is-filled{% endif %}'>
|
||||
<label for='case_form_insurance' class='form-label'>Insurance</label>
|
||||
<input type='text' name='insurance' id='case_form_insurance' value='{{ case.insurance }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3{% if case.medicaid %} is-filled{% endif %}'>
|
||||
<label for='case_form_medicaid' class='form-label'>Medicaid</label>
|
||||
<input type='text' name='medicaid' id='case_form_medicaid' value='{{ case.medicaid }}' class='form-control'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="text-center">
|
||||
<button type="button" class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0" onclick='history.go(-1)'>Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user