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([]); 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); const problems = watch(page);
await page.goto('/revision'); await page.goto('/revision');
await page.getByRole('tab', { name: 'Personas' }).click(); await page.getByRole('tab', { name: 'Personas' }).click();
+30 -9
View File
@@ -116,16 +116,27 @@
"type": "object" "type": "object"
}, },
"Correction": { "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": { "properties": {
"field": { "entity": {
"default": "identity",
"enum": [ "enum": [
"record_number", "identity",
"full_name", "cervical_cytology",
"curp", "cervical_biopsy",
"nss", "mammography",
"birth_date", "breast_biopsy",
"sex" "breast_treatment",
"clinical_note",
"death",
"mchat",
"ados2",
"eeg"
], ],
"title": "Entity",
"type": "string"
},
"field": {
"title": "Field", "title": "Field",
"type": "string" "type": "string"
}, },
@@ -160,9 +171,19 @@
"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`.", "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": { "properties": {
"column": { "column": {
"title": "Column", "anyOf": [
{
"type": "string" "type": "string"
}, },
{
"items": {
"type": "string"
},
"type": "array"
}
],
"title": "Column"
},
"concept_map": { "concept_map": {
"anyOf": [ "anyOf": [
{ {
@@ -2442,7 +2463,7 @@
}, },
"/review/corrections": { "/review/corrections": {
"post": { "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", "operationId": "correct",
"requestBody": { "requestBody": {
"content": { "content": {
+7 -1
View File
@@ -1,8 +1,14 @@
/* eslint-disable */ /* eslint-disable */
/* Code generated by ng-openapi-gen DO NOT EDIT. */ /* 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 { 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; record: string;
value: string; value: string;
} }
+1 -1
View File
@@ -12,7 +12,7 @@ import { Position } from '../models/position';
* and `formats` as in `map`. * and `formats` as in `map`.
*/ */
export interface Extract { export interface Extract {
column: string; column: (string | Array<string>);
concept_map?: (string | null); concept_map?: (string | null);
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg'; entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
formats?: { formats?: {