Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions api-dto/coding/expected-combination.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* DTO for expected combinations of responses to be validated
*/
export class ExpectedCombinationDto {
/**
* The alias of the unit (unit_key)
*/
unit_key!: string;

/**
* The login name of the person
*/
login_name!: string;

/**
* The login code of the person
*/
login_code!: string;

/**
* The name of the booklet (booklet_id)
*/
booklet_id!: string;

/**
* The ID of the variable
*/
variable_id!: string;
}
9 changes: 9 additions & 0 deletions api-dto/coding/export-validation-results-request.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* DTO for exporting validation results using cache key
*/
export class ExportValidationResultsRequestDto {
/**
* Cache key from validation results to export complete data
*/
cacheKey!: string;
}
21 changes: 21 additions & 0 deletions api-dto/coding/validate-coding-completeness-request.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ExpectedCombinationDto } from './expected-combination.dto';

/**
* DTO for validation request with pagination support
*/
export class ValidateCodingCompletenessRequestDto {
/**
* The expected combinations to validate
*/
expectedCombinations!: ExpectedCombinationDto[];

/**
* Page number (1-based). Defaults to 1 if not provided.
*/
page?: number;

/**
* Number of items per page. Defaults to 50 if not provided.
*/
pageSize?: number;
}
51 changes: 51 additions & 0 deletions api-dto/coding/validate-coding-completeness-response.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { ValidationResultDto } from './validation-result.dto';

/**
* DTO for validation response with pagination support
*/
export class ValidateCodingCompletenessResponseDto {
/**
* The validation results for the current page
*/
results!: ValidationResultDto[];

/**
* The total number of expected combinations
*/
total!: number;

/**
* The number of missing responses (across all pages)
*/
missing!: number;

/**
* Current page number (1-based)
*/
currentPage!: number;

/**
* Number of items per page
*/
pageSize!: number;

/**
* Total number of pages
*/
totalPages!: number;

/**
* Whether there is a next page
*/
hasNextPage!: boolean;

/**
* Whether there is a previous page
*/
hasPreviousPage!: boolean;

/**
* Cache key for subsequent pagination requests and Excel downloads
*/
cacheKey?: string;
}
18 changes: 18 additions & 0 deletions api-dto/coding/validation-result.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { ExpectedCombinationDto } from './expected-combination.dto';

/**
* DTO for validation result
*/
export class ValidationResultDto {
/**
* The expected combination
*/
combination!: ExpectedCombinationDto;

/**
* The status of the validation
* MISSING: The response is missing
* EXISTS: The response exists
*/
status!: 'MISSING' | 'EXISTS';
}
Loading