feature: Digitization Workstation UI

This commit is contained in:
voltsrage
2026-06-27 12:15:43 +08:00
parent 88e70b3dbe
commit e22d33b654
55 changed files with 6411 additions and 143 deletions
@@ -1,9 +1,8 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
/// <summary>
/// Patient-scoped endpoints for digitization history and audit trail.
/// Patient registry search and digitization history.
/// </summary>
[ApiController]
[Route("api/v1/patients")]
@@ -12,9 +11,27 @@ using Microsoft.AspNetCore.Mvc;
public class PatientsController : ControllerBase
{
private readonly IDigitizationHistoryService _history;
private readonly IPatientRegistryService _patients;
public PatientsController(IDigitizationHistoryService history) =>
public PatientsController(
IDigitizationHistoryService history,
IPatientRegistryService patients)
{
_history = history;
_patients = patients;
}
/// <summary>
/// Searches live patients by MRN or full name (minimum 2 characters).
/// </summary>
[HttpGet("search")]
[Authorize(Roles = "INTAKE_CLERK,ADMINISTRATOR")]
[ProducesResponseType(typeof(ApiResponse<IReadOnlyList<PatientSearchResult>>), StatusCodes.Status200OK)]
public async Task<IActionResult> Search([FromQuery] string q)
{
var results = await _patients.SearchAsync(q ?? string.Empty);
return Ok(ApiResponse<IReadOnlyList<PatientSearchResult>>.Ok(results));
}
/// <summary>
/// Returns the complete digitization history for a patient, including all
@@ -29,4 +46,4 @@ public class PatientsController : ControllerBase
var history = await _history.GetPatientHistoryAsync(patientId);
return Ok(ApiResponse<PatientDigitizationHistoryResponse>.Ok(history));
}
}
}