116 lines
5.2 KiB
Plaintext
116 lines
5.2 KiB
Plaintext
@model IEnumerable<SimpleLIS.Models.Message>
|
|
@{
|
|
ViewData["Title"] = "HL7 Messages";
|
|
}
|
|
|
|
<div class="container-fluid">
|
|
<div class="row mb-4">
|
|
<div class="col-12">
|
|
<h1 class="display-4 mb-0">HL7 Messages</h1>
|
|
<p class="text-muted">All received HL7 messages from Mirth Connect</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header bg-white d-flex justify-content-between align-items-center">
|
|
<h5 class="mb-0">Message Log</h5>
|
|
<span class="badge bg-success">@Model.Count() Total</span>
|
|
</div>
|
|
<div class="card-body">
|
|
@if (Model.Any())
|
|
{
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-hover" id="messagesTable">
|
|
<thead>
|
|
<tr>
|
|
<th>Message ID</th>
|
|
<th>Control ID</th>
|
|
<th>Type</th>
|
|
<th>Patient</th>
|
|
<th>Sending</th>
|
|
<th>Receiving</th>
|
|
<th>Timestamp</th>
|
|
<th>Version</th>
|
|
<th>Tests</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var message in Model)
|
|
{
|
|
<tr>
|
|
<td><code>@message.MessageId</code></td>
|
|
<td><code>@message.ControlId</code></td>
|
|
<td><span class="badge bg-primary">@message.MessageType</span></td>
|
|
<td>
|
|
<strong>@message.Patient.LastName, @message.Patient.FirstName</strong>
|
|
<br />
|
|
<small class="text-muted">ID: @message.Patient.HL7PatientId</small>
|
|
</td>
|
|
<td>
|
|
<strong>@message.SendingApp</strong>
|
|
<br />
|
|
<small class="text-muted">@message.SendingFacility</small>
|
|
</td>
|
|
<td>
|
|
<strong>@message.ReceivingApp</strong>
|
|
<br />
|
|
<small class="text-muted">@message.ReceivingFacility</small>
|
|
</td>
|
|
<td>
|
|
@message.Timestamp.ToString("yyyy-MM-dd")
|
|
<br />
|
|
<small class="text-muted">@message.Timestamp.ToString("HH:mm:ss")</small>
|
|
</td>
|
|
<td><span class="badge bg-secondary">@message.Version</span></td>
|
|
<td>
|
|
<span class="badge bg-info">@message.Observations.Count</span>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="alert alert-info mb-0">
|
|
<strong>No messages received yet.</strong>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mt-3">
|
|
<div class="col-12">
|
|
<a asp-controller="Home" asp-action="Index" class="btn btn-secondary">
|
|
<i class="bi bi-arrow-left"></i> Back to Dashboard
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@section Scripts {
|
|
<script>
|
|
@if (Model.Any())
|
|
{
|
|
<text>
|
|
$(document).ready(function() {
|
|
// Add search functionality
|
|
$('#messagesTable').before('<div class="mb-3"><input type="text" id="searchInput" class="form-control" placeholder="Search messages..."></div>');
|
|
|
|
$('#searchInput').on('keyup', function() {
|
|
var value = $(this).val().toLowerCase();
|
|
$('#messagesTable tbody tr').filter(function() {
|
|
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
|
|
});
|
|
});
|
|
});
|
|
</text>
|
|
}
|
|
</script>
|
|
}
|