update
This commit is contained in:
parent
09932ffe8a
commit
35be20ae4c
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@
|
||||
|
||||
{% block title %}Crossmatch Test - {{ blood_unit.unit_number }} & {{ patient.full_name }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.form-section {
|
||||
background: #f8f9fa;
|
||||
@ -578,8 +578,8 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -113,8 +113,8 @@
|
||||
{% for stat in blood_group_stats %}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="badge bg-primary">
|
||||
{{ stat.blood_group__abo_type }}{% if stat.blood_group__rh_factor == 'positive' %}+{% else %}-{% endif %}
|
||||
<span class="badge bg-primary fs-6 fw-bold">
|
||||
{{ stat.blood_group__abo_type }}{% if stat.blood_group__rh_factor == 'POS' %}+{% else %}-{% endif %}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ stat.count }}</td>
|
||||
|
||||
@ -214,7 +214,7 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{% block js %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Enable delete button only when confirmation is checked
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
|
||||
{% block title %}Donor Details - {{ donor.full_name }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@ -308,11 +308,11 @@
|
||||
<!-- END action buttons -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
{% block title %}Donor Eligibility Check - {{ donor.full_name }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% block css %}
|
||||
<style>
|
||||
.eligibility-card {
|
||||
border: 2px solid #e9ecef;
|
||||
@ -303,7 +303,7 @@
|
||||
<!-- END row -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{% block js %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Check form validity on load and when inputs change
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@ -275,10 +275,10 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/jquery-mask/dist/jquery.mask.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
{#<script src="{% static 'plugins/jquery-mask/dist/jquery.mask.min.js' %}"></script>#}
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -218,7 +218,6 @@ $(document).ready(function() {
|
||||
// Initialize DataTable for enhanced functionality
|
||||
$('#donorTable').DataTable({
|
||||
responsive: true,
|
||||
{#pageLength: 25,#}
|
||||
order: [[0, 'desc']],
|
||||
columnDefs: [
|
||||
{ orderable: false, targets: [9] } // Actions column
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
{% block title %}Blood Bank Inventory Dashboard{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/chart.js/dist/Chart.min.css' %}" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.inventory-card {
|
||||
border-radius: 10px;
|
||||
@ -367,7 +367,7 @@
|
||||
<!-- END row -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/chart.js/dist/chart.js' %}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
{% block title %}Issue Blood Unit - Request #{{ blood_request.request_number }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.form-section {
|
||||
background: #f8f9fa;
|
||||
@ -533,8 +533,8 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
var selectedUnits = [];
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
{% block title %}Delete QC Record - {{ qc_record.test_name }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% block css %}
|
||||
<style>
|
||||
.delete-warning {
|
||||
background: #f8d7da;
|
||||
@ -443,7 +443,7 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{% block js %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Form validation
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
{% block title %}Quality Control - {{ qc_record.test_name }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% block css %}
|
||||
<style>
|
||||
.info-section {
|
||||
background: #f8f9fa;
|
||||
@ -499,7 +499,7 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{% block js %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
{% block title %}{% if form.instance.pk %}Edit QC Record{% else %}New Quality Control Test{% endif %}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.form-section {
|
||||
background: #f8f9fa;
|
||||
@ -346,8 +346,8 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
|
||||
{% block title %}Quality Control Management{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.qc-passed {
|
||||
background-color: #d4edda;
|
||||
@ -427,11 +427,11 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
{% block title %}Report Adverse Reaction - {{ transfusion.transfusion_id }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.form-section {
|
||||
background: #f8f9fa;
|
||||
@ -655,8 +655,8 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
|
||||
{% block title %}Blood Bank Reports{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/chart.js/dist/Chart.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'assets/plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/chart.js/dist/Chart.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.report-card {
|
||||
border-radius: 10px;
|
||||
@ -397,9 +397,9 @@
|
||||
<!-- END analytics dashboard -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/chart.js/dist/Chart.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/chart.js/dist/chart.umd.js' %}"></script>
|
||||
<script src="{% static 'plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
{% block title %}Cancel Blood Request - {{ blood_request.request_number }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% block css %}
|
||||
<style>
|
||||
.delete-warning {
|
||||
background: #f8d7da;
|
||||
@ -379,7 +379,7 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{% block js %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Form validation
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
{% block title %}Blood Request Details - {{ blood_request.request_number }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.request-header {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
@ -227,7 +227,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fw-bold">Name:</td>
|
||||
<td>{{ blood_request.patient.full_name }}</td>
|
||||
<td>{{ blood_request.patient.get_full_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fw-bold">Age:</td>
|
||||
@ -246,7 +246,7 @@
|
||||
{% if blood_request.hemoglobin_level %}
|
||||
<tr>
|
||||
<td class="fw-bold">Hemoglobin:</td>
|
||||
<td>{{ blood_request.hemoglobin_level }} g/dL</td>
|
||||
<td>{{ blood_request.hemoglobin_level|floatformat:2 }} g/dL</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if blood_request.platelet_count %}
|
||||
@ -556,7 +556,7 @@
|
||||
<!-- END action buttons -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{% block js %}
|
||||
<script>
|
||||
function checkAvailability() {
|
||||
var bloodGroupId = {{ blood_request.patient_blood_group.id }};
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
|
||||
{% block title %}{% if form.instance.pk %}Edit Blood Request{% else %}New Blood Request{% endif %}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'assets/plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.form-section {
|
||||
background: #f8f9fa;
|
||||
@ -389,8 +389,8 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
|
||||
{% block title %}Blood Request Management{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.urgency-emergency {
|
||||
animation: pulse 2s infinite;
|
||||
@ -360,11 +360,11 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
{% block title %}Blood Test - {{ blood_unit.unit_number }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.form-section {
|
||||
background: #f8f9fa;
|
||||
@ -480,8 +480,8 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
{% block title %}Transfusion Details - {{ transfusion.transfusion_id }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/chart.js/dist/Chart.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/chart.js/dist/Chart.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.transfusion-header {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
@ -672,8 +672,8 @@
|
||||
<!-- END adverse reaction modal -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/chart.js/dist/Chart.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/chart.js/dist/chart.umd.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
{% block title %}{% if form.instance.pk %}Edit Transfusion{% else %}Start New Transfusion{% endif %}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.form-section {
|
||||
background: #f8f9fa;
|
||||
@ -502,8 +502,8 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
|
||||
{% block title %}Transfusion Management{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.transfusion-active {
|
||||
background-color: #e8f5e8;
|
||||
@ -433,11 +433,11 @@
|
||||
<!-- END vital signs modal -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
{% block title %}Delete Blood Unit - {{ blood_unit.unit_number }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% block css %}
|
||||
<style>
|
||||
.danger-zone {
|
||||
background: #f8d7da;
|
||||
@ -383,7 +383,7 @@
|
||||
<!-- END form actions -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{% block js %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Disable delete button initially
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
|
||||
{% block title %}Blood Unit Details - {{ blood_unit.unit_number }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.status-timeline {
|
||||
position: relative;
|
||||
@ -501,9 +501,9 @@
|
||||
<!-- END action buttons -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
function showCrossmatchModal() {
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
|
||||
{% block title %}Blood Unit Details - {{ blood_unit.unit_number }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.status-timeline {
|
||||
position: relative;
|
||||
@ -405,7 +406,7 @@
|
||||
<h4 class="panel-title">Crossmatch Results</h4>
|
||||
<div class="panel-heading-btn">
|
||||
{% if blood_unit.status == 'available' %}
|
||||
<button type="button" class="btn btn-info btn-sm" onclick="showCrossmatchModal()">
|
||||
<button type="button" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#crossmatchModal">
|
||||
<i class="fa fa-plus"></i> Add Crossmatch
|
||||
</button>
|
||||
{% endif %}
|
||||
@ -487,7 +488,7 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if blood_unit.status == 'available' %}
|
||||
<button type="button" class="btn btn-warning" onclick="moveUnit()">
|
||||
<button type="button" class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#moveUnitModal">
|
||||
<i class="fa fa-arrows-alt"></i> Move Location
|
||||
</button>
|
||||
{% endif %}
|
||||
@ -498,108 +499,111 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Crossmatch Modal -->
|
||||
<div class="modal fade" id="crossmatchModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Add Crossmatch Test</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="crossmatchForm">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Patient</label>
|
||||
<select class="form-select" id="patientSelect">
|
||||
<option value="">Select Patient</option>
|
||||
<!-- Load patients via AJAX if needed -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Test Type</label>
|
||||
<select class="form-select" id="testType">
|
||||
<option value="major">Major Crossmatch</option>
|
||||
<option value="minor">Minor Crossmatch</option>
|
||||
<option value="immediate_spin">Immediate Spin</option>
|
||||
<option value="antiglobulin">Antiglobulin Test</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary" onclick="submitCrossmatch()">Create Crossmatch</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Move Unit Modal -->
|
||||
<div class="modal fade" id="moveUnitModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Move Blood Unit</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="moveUnitForm">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">New Location</label>
|
||||
<select class="form-select" id="newLocation">
|
||||
<option value="">Select Location</option>
|
||||
<option value="Refrigerator A">Refrigerator A</option>
|
||||
<option value="Refrigerator B">Refrigerator B</option>
|
||||
<option value="Freezer 1">Freezer 1</option>
|
||||
<option value="Platelet Agitator">Platelet Agitator</option>
|
||||
<option value="Quarantine">Quarantine</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Reason</label>
|
||||
<textarea class="form-control" id="moveReason" rows="3"></textarea>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-warning" onclick="submitMoveUnit()">Move Unit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END action buttons -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/sweetalert/dist/sweetalert.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
function showCrossmatchModal() {
|
||||
Swal.fire({
|
||||
title: 'Add Crossmatch Test',
|
||||
html: `
|
||||
<div class="text-start">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Patient</label>
|
||||
<select class="form-select" id="patientSelect">
|
||||
<option value="">Select Patient</option>
|
||||
<!-- Patients would be loaded via AJAX -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Test Type</label>
|
||||
<select class="form-select" id="testType">
|
||||
<option value="major">Major Crossmatch</option>
|
||||
<option value="minor">Minor Crossmatch</option>
|
||||
<option value="immediate_spin">Immediate Spin</option>
|
||||
<option value="antiglobulin">Antiglobulin Test</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Create Crossmatch',
|
||||
cancelButtonText: 'Cancel',
|
||||
preConfirm: () => {
|
||||
const patient = document.getElementById('patientSelect').value;
|
||||
const testType = document.getElementById('testType').value;
|
||||
|
||||
if (!patient) {
|
||||
Swal.showValidationMessage('Please select a patient');
|
||||
return false;
|
||||
}
|
||||
|
||||
return { patient: patient, testType: testType };
|
||||
}
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
// Redirect to crossmatch creation page
|
||||
window.location.href = `/blood-bank/units/{{ blood_unit.id }}/crossmatch/${result.value.patient}/`;
|
||||
}
|
||||
});
|
||||
|
||||
function submitCrossmatch() {
|
||||
const patient = document.getElementById("patientSelect").value;
|
||||
const testType = document.getElementById("testType").value;
|
||||
|
||||
if (!patient) {
|
||||
alert("Please select a patient");
|
||||
return;
|
||||
}
|
||||
|
||||
// Redirect to your creation URL
|
||||
window.location.href = `en/blood-bank/units/{{ blood_unit.id }}/crossmatch/${patient}/?test_type=${testType}`;
|
||||
}
|
||||
|
||||
function moveUnit() {
|
||||
Swal.fire({
|
||||
title: 'Move Blood Unit',
|
||||
html: `
|
||||
<div class="text-start">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">New Location</label>
|
||||
<select class="form-select" id="newLocation">
|
||||
<option value="">Select Location</option>
|
||||
<option value="Refrigerator A">Refrigerator A</option>
|
||||
<option value="Refrigerator B">Refrigerator B</option>
|
||||
<option value="Freezer 1">Freezer 1</option>
|
||||
<option value="Platelet Agitator">Platelet Agitator</option>
|
||||
<option value="Quarantine">Quarantine</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Reason</label>
|
||||
<textarea class="form-control" id="moveReason" rows="3"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Move Unit',
|
||||
cancelButtonText: 'Cancel',
|
||||
preConfirm: () => {
|
||||
const location = document.getElementById('newLocation').value;
|
||||
const reason = document.getElementById('moveReason').value;
|
||||
|
||||
if (!location) {
|
||||
Swal.showValidationMessage('Please select a new location');
|
||||
return false;
|
||||
}
|
||||
|
||||
return { location: location, reason: reason };
|
||||
}
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
// Here you would make an AJAX call to update the location
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Unit Moved',
|
||||
text: `Blood unit moved to ${result.value.location}`,
|
||||
confirmButtonText: 'OK'
|
||||
}).then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
function submitMoveUnit() {
|
||||
const location = document.getElementById("newLocation").value;
|
||||
const reason = document.getElementById("moveReason").value;
|
||||
|
||||
if (!location) {
|
||||
alert("Please select a new location");
|
||||
return;
|
||||
}
|
||||
|
||||
// For now reload page, later replace with AJAX
|
||||
alert(`Blood unit moved to ${location} for reason: ${reason}`);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
// Auto-refresh page every 5 minutes to update status
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
|
||||
{% block title %}{% if form.instance.pk %}Edit Blood Unit{% else %}Register Blood Unit{% endif %}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'assets/plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||
<style>
|
||||
.form-section {
|
||||
background: #f8f9fa;
|
||||
@ -365,9 +365,9 @@
|
||||
<!-- END panel -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
{% block title %}Blood Unit Management{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% block css %}
|
||||
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||
@ -320,12 +320,12 @@
|
||||
<!-- END move unit modal -->
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
{% block js %}
|
||||
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user