Client for study-field corrections and multi-column extract

This commit is contained in:
Roberto Treviño
2026-11-27 01:45:16 -06:00
parent 0e4d838d44
commit 07212a2083
4 changed files with 40 additions and 13 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ test('conectar: open the hospital pipeline, preview a source, run it to success'
expect(problems).toEqual([]);
});
test('revision: what the messy site holds, and a decision through the page', async ({ page }) => {
test('revision: what the hospital source holds, and a decision through the page', async ({ page }) => {
const problems = watch(page);
await page.goto('/revision');
await page.getByRole('tab', { name: 'Personas' }).click();
+31 -10
View File
@@ -116,16 +116,27 @@
"type": "object"
},
"Correction": {
"description": "One field of one record as a reviewer read it in the source document: an identity\nfield (a mistyped record number) or a study's (a stage the scan made unreadable).",
"properties": {
"field": {
"entity": {
"default": "identity",
"enum": [
"record_number",
"full_name",
"curp",
"nss",
"birth_date",
"sex"
"identity",
"cervical_cytology",
"cervical_biopsy",
"mammography",
"breast_biopsy",
"breast_treatment",
"clinical_note",
"death",
"mchat",
"ados2",
"eeg"
],
"title": "Entity",
"type": "string"
},
"field": {
"title": "Field",
"type": "string"
},
@@ -160,8 +171,18 @@
"description": "Platform fields read from text, each kept with the text it was read from.\n\n`auto` asks the LLM when one is configured and answering, else applies `patterns`;\nwith neither, the row is held. Patterns are regexes with one group, per field (the\nLLM can propose them from sample documents); their values go through the ConceptMap\nand `formats` as in `map`.",
"properties": {
"column": {
"title": "Column",
"type": "string"
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"title": "Column"
},
"concept_map": {
"anyOf": [
@@ -2442,7 +2463,7 @@
},
"/review/corrections": {
"post": {
"description": "A corrected identity field of one record (e.g. a mistyped record number); linking\nuses it on the next run. Fixing the source too is still worth it.",
"description": "A corrected field of one record; the next run uses it (linking for identity fields,\nthe study's target for the others). Fixing the source too is still worth it.",
"operationId": "correct",
"requestBody": {
"content": {
+7 -1
View File
@@ -1,8 +1,14 @@
/* eslint-disable */
/* Code generated by ng-openapi-gen DO NOT EDIT. */
/**
* One field of one record as a reviewer read it in the source document: an identity
* field (a mistyped record number) or a study's (a stage the scan made unreadable).
*/
export interface Correction {
field: 'record_number' | 'full_name' | 'curp' | 'nss' | 'birth_date' | 'sex';
entity?: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
field: string;
record: string;
value: string;
}
+1 -1
View File
@@ -12,7 +12,7 @@ import { Position } from '../models/position';
* and `formats` as in `map`.
*/
export interface Extract {
column: string;
column: (string | Array<string>);
concept_map?: (string | null);
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
formats?: {