Skip to content

Commit

Permalink
Renamed methods in Patient for AB#16872.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMaki committed Jan 7, 2025
1 parent 70eccda commit 1855630
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Apps/Patient/src/Controllers/PatientDataController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public PatientDataController(IPatientDataService patientDataService)
[ProducesResponseType(StatusCodes.Status502BadGateway, Type = typeof(ProblemDetails))]
public async Task<ActionResult<PatientDataResponse>> Get(string hdid, [FromQuery] PatientDataType[] patientDataTypes, CancellationToken ct)
{
ValidateGetRequest(hdid, patientDataTypes);
ValidateRequest(hdid, patientDataTypes);
PatientDataQuery query = new(hdid, patientDataTypes);
return await this.patientDataService.QueryAsync(query, ct);
}
Expand All @@ -86,13 +86,13 @@ public async Task<ActionResult<PatientDataResponse>> Get(string hdid, [FromQuery
[ProducesResponseType(StatusCodes.Status502BadGateway, Type = typeof(ProblemDetails))]
public async Task<ActionResult<PatientFileResponse>> GetFile(string hdid, string fileId, CancellationToken ct)
{
ValidateGetFileRequest(hdid, fileId);
ValidateFileRequest(hdid, fileId);
PatientFileQuery query = new(hdid, fileId);
return await this.patientDataService.QueryAsync(query, ct) ??
throw new NotFoundException($"file {fileId} not found");
}

private static void ValidateGetRequest(string hdid, PatientDataType[] patientDataTypes)
private static void ValidateRequest(string hdid, PatientDataType[] patientDataTypes)
{
if (string.IsNullOrEmpty(hdid))
{
Expand All @@ -105,7 +105,7 @@ private static void ValidateGetRequest(string hdid, PatientDataType[] patientDat
}
}

private static void ValidateGetFileRequest(string hdid, string fileId)
private static void ValidateFileRequest(string hdid, string fileId)
{
if (string.IsNullOrEmpty(hdid))
{
Expand Down

0 comments on commit 1855630

Please sign in to comment.