Click here to Skip to main content
15,036,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have not had a lot of experience with DotNet Core. We have created a Portal for our users utilizing DotNet Core 3.1. I am just throwing this out there to get ideas on how to handle this if it is possible:

In the portal we have a View where faculty members submit a form auditing Health Provider Charts. This View is about 20 questions with half of them being drop-downs and half being free text entry. Here is the View:

@model ChartAuditVM

@{
    ViewData["Title"] = "New Chart Audit"; ;
}

<div class="container bg-light">
    <br />
    <hr />
    <h3 class="text-center">Chart Audit for @ViewBag.Participant</h3>
    <hr />

    @if (TempData["Message"] != null)
    {
        <div class="alert alert-info">@TempData["Message"]</div>
    }

    <div class="row">
        <div class="col-md-12">
            <form asp-action="Create">
                <div asp-validation-summary="All" class="text-danger"></div>
                <input type="hidden" asp-for="IDParticipant_2" />
                <input type="hidden" asp-for="IDActivity" />
                <input type="hidden" asp-for="BatchDate" />
                <input type="hidden" asp-for="IDAuditor_5" />
                <span id="message"></span>
                <div class="form-group col-md-6">
                    <label asp-for="DateAudit_1" class="control-label"></label>
                    <input type="datetime" asp-for="DateAudit_1" class="form-control" value="@String.Format("{0:MM/dd/yyyy}", DateTime.Now)" readonly="readonly" />
                    <span asp-validation-for="DateAudit_1" class="text-danger"></span>
                </div>
                <div class="row">
                    <div class="form-group col-md-6">
                        <label asp-for="ChartNbr_3" class="control-label"></label>
                        <input asp-for="ChartNbr_3" class="form-control" />
                        <span asp-validation-for="ChartNbr_3" class="text-danger"></span>
                    </div>
                    <div class="form-group col-md-6">
                        <label asp-for="YearChartEntry_4" class="control-label"></label>
                        <input asp-for="YearChartEntry_4" class="form-control" />
                        <span asp-validation-for="YearChartEntry_4" class="text-danger"></span>
                    </div>
                </div>
                <div class="row">
                    <div class="form-group col-md-6">
                        <label asp-for="PatientAge_6" class="control-label"></label>
                        <input asp-for="PatientAge_6" class="form-control" />
                        <span asp-validation-for="PatientAge_6" class="text-danger"></span>
                    </div>
                    <div class="form-group col-md-6">
                        <label asp-for="PatientGender_7" class="control-label"></label>
                        <select asp-for="PatientGender_7" class="form-control" asp-items="@(new SelectList(ViewBag.PatientGender, "Value", "Text"))"></select>
                        <span asp-validation-for="PatientGender_7" class="text-danger"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label asp-for="ChartLegible_8a" class="control-label"></label>
                    <select asp-for="ChartLegible_8a" class="form-control col-md-6" asp-items="@(new SelectList(ViewBag.Legibility, "Value", "Text"))"></select>
                    <span asp-validation-for="ChartLegible_8a" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="ClearEncntrReason_10" class="control-label"></label>
                    <select asp-for="ClearEncntrReason_10" class="form-control col-md-6" asp-items="@(new SelectList(ViewBag.YesNo, "Value", "Text"))"></select>
                    <span asp-validation-for="ClearEncntrReason_10" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="ChartWellOrg_11" class="control-label"></label>
                    <select asp-for="ChartWellOrg_11" class="form-control col-md-6" asp-items="@(new SelectList(ViewBag.Scale, "Value", "Text"))"></select>
                    <span asp-validation-for="ChartWellOrg_11" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="HistInfoAdequate_12" class="control-label"></label>
                    <select asp-for="HistInfoAdequate_12" class="form-control col-md-6" asp-items="@(new SelectList(ViewBag.Scale, "Value", "Text"))"></select>
                    <span asp-validation-for="HistInfoAdequate_12" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="HistInfoAdequateDescript_13" class="control-label"></label>
                    <textarea asp-for="HistInfoAdequateDescript_13" class="form-control"></textarea>
                    <span asp-validation-for="HistInfoAdequateDescript_13" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="PhysExamAdequate_14" class="control-label"></label>
                    <select asp-for="PhysExamAdequate_14" class="form-control col-md-6" asp-items="@(new SelectList(ViewBag.Scale, "Value", "Text"))"></select>
                    <span asp-validation-for="PhysExamAdequate_14" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="PhysExamAdequateDescript_15" class="control-label"></label>
                    <textarea asp-for="PhysExamAdequateDescript_15" class="form-control"></textarea>
                    <span asp-validation-for="PhysExamAdequateDescript_15" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="AssessFormulation_16" class="control-label"></label>
                    <select asp-for="AssessFormulation_16" class="form-control col-md-6" asp-items="@(new SelectList(ViewBag.Scale, "Value", "Text"))"></select>
                    <span asp-validation-for="AssessFormulation_16" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="AssessFormulationDescript_17" class="control-label"></label>
                    <textarea asp-for="AssessFormulationDescript_17" class="form-control"></textarea>
                    <span asp-validation-for="AssessFormulationDescript_17" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="PlanTreatAdequate_18" class="control-label"></label>
                    <select asp-for="PlanTreatAdequate_18" class="form-control col-md-6" asp-items="@(new SelectList(ViewBag.Scale, "Value", "Text"))"></select>
                    <span asp-validation-for="PlanTreatAdequate_18" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="PlanTreatAdequateDescript_19" class="control-label"></label>
                    <textarea asp-for="PlanTreatAdequateDescript_19" class="form-control"></textarea>
                    <span asp-validation-for="PlanTreatAdequateDescript_19" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="GlobalOverallAssess_20" class="control-label"></label>
                    <select asp-for="GlobalOverallAssess_20" class="form-control col-md-6" asp-items="@(new SelectList(ViewBag.Scale, "Value", "Text"))"></select>
                    <span asp-validation-for="GlobalOverallAssess_20" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="BestSingleRecommend_22" class="control-label"></label>
                    <textarea asp-for="BestSingleRecommend_22" class="form-control" maxlength="1000"></textarea>
                    <span asp-validation-for="BestSingleRecommend_22" class="text-danger"></span>
                </div>
                @*<div class="form-group text-center">
                        <input type="submit" value="Create" class="btn btn-primary" name="theButton" />
                    </div>*@
                <div class="form-group">
                    <button type="submit" class="btn btn-primary">
                        Add  class="fas fa-plus-square">
                    </button>
                </div>
            </form>
        </div>
    </div>

    <div class="text-center">
        <a asp-action="FacultyOpenChartAudits">Back to List</a>
    </div>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}


Users are complaining that if they walk away from the form and come back to it after 15 minutes, the portal asks them to login again (of course that is what we want it to do), any data they have entered into the form is lost. They have to retype the data. Is there a way to handle this so that once the portal logs them in and takes them back to the form, the data is still there? Or should I just tell them they should not start a form if they cannot complete it? I cannot commit this data to the database because all of the drop-down fields are required before the data can be saved to SQL Server. I have thought of several creative ways I could handle this with the database, but I would rather not do that because it would cause some extensive re-design of the portal form and how this is handled. One of the main reasons for the entire issue is we cannot allow a record to be edited once it is entered. Addendums can be added, but the record is not to be edited. This is a legal requirement.

What I have tried:

I have done a lot of research at this point. The best solutions I have found thus far, all refer to older versions of DotNet Core or reqular DotNet.
Posted
Comments
Gerry Schmitz 29-May-21 13:36pm
   
Add it to the database with a status of "in progress" (when they time out) that expires if not updated in x hours; you can retrieve it (based on id?). That's the easiest way if you don't have any other way to put things in "in suspense". And "updating" an "in progress" does not violate any legal requirements. Otherwise use an "in progress" staging db; then export / import.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900