Skip to content

Commit

Permalink
Updated translations and minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-lperezra committed Jul 24, 2024
1 parent af89586 commit 423a444
Show file tree
Hide file tree
Showing 13 changed files with 112 additions and 54 deletions.
Binary file added assets/dIAgnosis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 11 additions & 11 deletions encoder-ui/src/app/analysis/analysis.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="row history">
<div class="col">
<div class="p-4 pb-0 h-100">
<label class="font-weight-bold">Textos analizados:</label>
<label class="font-weight-bold">{{ 'ANALYZED-TEXTS' | transloco }}:</label>
<div class="h-100 w-100 border text-section overflow-hidden">
@if (loadingMain){
<div class="d-flex justify-content-center h-100 align-items-center">
Expand All @@ -14,9 +14,9 @@
<table class="table table-striped table-hover ">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Texto analizado</th>
<th scope="col">Fecha de análisis</th>
<th scope="col">{{ 'ID' | transloco }}</th>
<th scope="col">{{ 'ANALYZED-TEXTS' | transloco }}</th>
<th scope="col">{{ 'ANALYSIS-DATE' | transloco }}</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -46,7 +46,7 @@
<div class="row h-50">
<div class="col-6">
<div class="p-4 h-100">
<label class="font-weight-bold">Hallazgos:</label>
<label class="font-weight-bold">{{'FINDINGS' | transloco}}:</label>
@if (loading && !error) {
<div class="h-100 w-100 text-section border d-flex align-items-center justify-content-center">
<div class="d-flex justify-content-center h-100 align-items-center">
Expand All @@ -62,14 +62,14 @@
}
@if (error) {
<div class="h-100 w-100 border d-flex align-items-center justify-content-center">
<ngb-progressbar class="m-3 w-100" [showValue]="false" type="danger" [value]="100">Error, please, try again!</ngb-progressbar>
<ngb-progressbar class="m-3 w-100" [showValue]="false" type="danger" [value]="100">{{'ERROR-MESSAGE' | transloco}}:</ngb-progressbar>
</div>
}
</div>
</div>
<div class="col-6">
<div class="p-4 h-100">
<label class="font-weight-bold">Posibles diagnósticos:</label>
<label class="font-weight-bold">{{'POSSIBLE-DIAGNOSES' | transloco}}:</label>
<div class="h-100 w-100 border text-section">
@if (loading){
<div class="d-flex justify-content-center h-100 align-items-center">
Expand All @@ -81,10 +81,10 @@
<table class="table table-striped table-hover">
<thead>
<tr>
<th scope="col">Texto</th>
<th scope="col">Código</th>
<th scope="col">Descripción</th>
<th scope="col">Similitud</th>
<th scope="col">{{'TEXT' | transloco}}</th>
<th scope="col">{{'CODE' | transloco}}</th>
<th scope="col">{{'DESCRIPTION' | transloco}}</th>
<th scope="col">{{'SIMILARITY' | transloco}}</th>
</tr>
</thead>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion encoder-ui/src/app/analysis/analysis.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class AnalysisComponent implements OnInit{
}
}
else if (diagnostic.RawText.split(" ").length == 2){
const matchValue = this.textOriginal.match(new RegExp(diagnostic.RawText.split(" ")[0] + " (.{0,100}) " +diagnostic.RawText.split(" ")[1],"ig"));
const matchValue = textSelected.match(new RegExp(diagnostic.RawText.split(" ")[0] + " (.{0,100}) " +diagnostic.RawText.split(" ")[1],"ig"));
if (matchValue) {
phrase = matchValue[0];
}
Expand Down
18 changes: 9 additions & 9 deletions encoder-ui/src/app/analyzer/analyzer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<div class="col">
<form class="p-4" (ngSubmit)="onSubmit()" [formGroup]="textForm">
<div class="form-group">
<label for="textToAnalyze" class="font-weight-bold">Texto a analizar:</label>
<label for="textToAnalyze" class="font-weight-bold">{{'TEXT-ANALYZE' | transloco}}:</label>
<textarea class="form-control" formControlName="TextToAnalyze" rows="8"></textarea>
</div>
<div class="form-group pt-4 text-center">
<button type="submit" class="btn btn-primary" [ngClass]="{'disabled': loading}">
<span class="margin-label">Analizar texto</span>
<span class="margin-label">{{'ANALYZE-TEXT' | transloco}}</span>
</button>
</div>
</form>
Expand All @@ -17,7 +17,7 @@
<div class="row h-50">
<div class="col-6">
<div class="p-4 h-100">
<label class="font-weight-bold">Hallazgos:</label>
<label class="font-weight-bold">{{'FINDINGS' | transloco}}:</label>
@if (loading && !error) {
<div class="h-100 w-100 text-section border d-flex align-items-center justify-content-center">
<ngb-progressbar class="m-3 w-100" [showValue]="true" type="success" [value]="totalReceived" />
Expand All @@ -30,14 +30,14 @@
}
@if (error) {
<div class="h-100 w-100 border d-flex align-items-center justify-content-center">
<ngb-progressbar class="m-3 w-100" [showValue]="false" type="danger" [value]="100">Error, please, try again!</ngb-progressbar>
<ngb-progressbar class="m-3 w-100" [showValue]="false" type="danger" [value]="100">{{'ERROR-MESSAGE' | transloco}}</ngb-progressbar>
</div>
}
</div>
</div>
<div class="col-6">
<div class="p-4 h-100">
<label class="font-weight-bold">Posibles diagnósticos:</label>
<label class="font-weight-bold">{{'POSSIBLE-DIAGNOSES' | transloco}}:</label>
<div class="h-100 w-100 border text-section">
@if (loading){
<div class="d-flex justify-content-center h-100 align-items-center">
Expand All @@ -49,10 +49,10 @@
<table class="table table-striped table-hover">
<thead>
<tr>
<th scope="col">Texto</th>
<th scope="col">Código</th>
<th scope="col">Descripción</th>
<th scope="col">Similitud</th>
<th scope="col">{{'TEXT' | transloco}}</th>
<th scope="col">{{'CODE' | transloco}}</th>
<th scope="col">{{'DESCRIPTION' | transloco}}</th>
<th scope="col">{{'SIMILARITY' | transloco}}</th>
</tr>
</thead>
<tbody>
Expand Down
12 changes: 6 additions & 6 deletions encoder-ui/src/app/codelist/codelist.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Código CIE-10</th>
<th scope="col">Descripción</th>
<th scope="col">Similitud</th>
<th scope="col">{{'ICD-CODE' | transloco}}</th>
<th scope="col">{{'DESCRIPTION' | transloco}}</th>
<th scope="col">{{'SIMILARITY' | transloco}}</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -45,9 +45,9 @@
</ngb-pagination>

<select class="form-select" style="width: auto" [(ngModel)]="pageSize" (ngModelChange)="refreshOptions()">
<option [ngValue]="6">6 códigos por página</option>
<option [ngValue]="8">8 códigos por página</option>
<option [ngValue]="10" selected>10 códigos por página</option>
<option [ngValue]="6">6 {{'CODES-PAGE' | transloco}}</option>
<option [ngValue]="8">8 {{'CODES-PAGE' | transloco}}</option>
<option [ngValue]="10" selected>10 {{'CODES-PAGE' | transloco}}</option>
</select>
</div>
}
14 changes: 7 additions & 7 deletions encoder-ui/src/app/diagnosis/diagnosis.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Diagnóstico</th>
<th scope="col">Código CIE-10</th>
<th scope="col">Descripción CIE-10</th>
<th scope="col">Acción</th>
<th scope="col">{{'DIAGNOSIS' | transloco}}</th>
<th scope="col">{{'ICD-CODE' | transloco}}</th>
<th scope="col">{{'ICD-DESCRIPTION' | transloco}}</th>
<th scope="col">{{'ACTION' | transloco}}</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -54,9 +54,9 @@
</ngb-pagination>

<select class="form-select" style="width: auto" [(ngModel)]="pageSize" (ngModelChange)="refreshRequests()">
<option [ngValue]="10" selected>10 códigos por página</option>
<option [ngValue]="15">15 códigos por página</option>
<option [ngValue]="20">20 códigos por página</option>
<option [ngValue]="10" selected>10 {{'CODES-PAGE' | transloco}}</option>
<option [ngValue]="15">15 {{'CODES-PAGE' | transloco}}</option>
<option [ngValue]="20">20 {{'CODES-PAGE' | transloco}}</option>
</select>
</div>
<ng-template #content let-modal>
Expand Down
26 changes: 13 additions & 13 deletions encoder-ui/src/app/loader/loader.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@
<div class="row loader-section">
<div class="col">
<div class="p-4 pb-0 h-100">
<label class="font-weight-bold">Importar códigos CSV:</label>
<label class="font-weight-bold">{{'CSV-IMPORT' | transloco}}:</label>
<div class="h-100 w-100 border text-section overflow-hidden p-2">
<label>El formato de fichero csv deberá seguír las siguientes condiciones:</label>
<label>{{'CSV-FORMAT' | transloco}}:</label>
<ol>
<li>
Sin cabecera.
{{'NO-HEADERS' | transloco}}
</li>
<li>
Campos separados por el carácter <b>;</b>
{{'SEPARATION-CHARACTER' | transloco}} <b>;</b>
</li>
<li>
Primera columna: código CIE
{{'COLUMN-ICD' | transloco}}
</li>
<li>
Segunda columna: descripción
{{'COLUMN-DESCRIPTION' | transloco}}
</li>
</ol>
<p class="terminal w-50">
A00.0;Cólera debido a Vibrio cholerae 01, biotipo cholerae;<br/>
A00.1;Cólera debido a Vibrio cholerae 01, biotipo El Tor;<br/>
A00.9;Cólera, no especificado;<br/>
A01.00;Fiebre tifoidea, no especificada;<br/>
A01.01;Meningitis tifoidea;
A00.0;{{'DIAG-1' | transloco}};<br/>
A00.1;{{'DIAG-2' | transloco}};<br/>
A00.9;{{'DIAG-3' | transloco}};<br/>
A01.00;{{'DIAG-4' | transloco}};<br/>
A01.01;{{'DIAG-5' | transloco}};
</p>
<p>
<input type="file" (change)="onFileChange($event)" accept="csv/*" [ngClass]="{'disabled': loading}">
</p>
<p>
Registros importados: {{recordsSaved}}
{{'IMPORTED-RECORDS' | transloco}}: {{recordsSaved}}
</p>
<p>
Registros vectorizados: {{recordsVectorized}}
{{'VECTORIZED-RECORDS' | transloco}}: {{recordsVectorized}}
</p>
<p>
<ngb-progressbar class="w-100" [showValue]="true" type="success" [value]="percentageVectorized" />
Expand Down
33 changes: 32 additions & 1 deletion encoder-ui/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,36 @@
"ANALYSIS-HISTORY": "Analysis history",
"LANGUAGE-EN": "English",
"LANGUAGE-ES": "Español",
"DIAGNOSIS-MENU": "d[IA]gnosis Menu"
"DIAGNOSIS-MENU": "d[IA]gnosis Menu",
"ANALYZED-TEXTS": "Analyzed texts",
"ANALYZED-TEXT": "Analyzed text",
"ID": "ID",
"ANALYSIS-DATE": "Analysis date",
"FINDINGS": "Findings",
"ERROR-MESSAGE": "Error, please try again!",
"POSSIBLE-DIAGNOSES": "Possible diagnoses",
"TEXT": "Text",
"CODE": "Code",
"DESCRIPTION": "Description",
"SIMILARITY": "Similarity",
"TEXT-ANALYZE": "Text to analyze",
"ANALYZE-TEXT": "Analyze text",
"ICD-CODE": "ICD-10 Code",
"CODES-PAGE": "codes per page",
"DIAGNOSIS": "Diagnosis",
"ICD-DESCRIPTION": "ICD-10 Description",
"ACTION": "Action",
"CSV-IMPORT": "Import codes from CSV",
"CSV-FORMAT": "The csv file format must follow the following conditions",
"NO-HEADERS": "No headers",
"SEPARATION-CHARACTER": "Fields separated by character",
"COLUMN-ICD": "First column: ICD-10 code",
"COLUMN-DESCRIPTION": "Second column: Description",
"DIAG-1": "Cholera due to Vibrio cholerae 01, biovar cholerae",
"DIAG-2": "Cholera due to Vibrio cholerae 01, biovar eltor",
"DIAG-3": "Cholera, unspecified",
"DIAG-4": "Typhoid fever",
"DIAG-5": "Typhoid meningitis",
"IMPORTED-RECORDS": "Imported records",
"VECTORIZED-RECORDS": "Vectorized records"
}
33 changes: 32 additions & 1 deletion encoder-ui/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,36 @@
"ANALYSIS-HISTORY": "Histórico de análisis",
"LANGUAGE-EN": "English",
"LANGUAGE-ES": "Español",
"DIAGNOSIS-MENU": "Menú de d[IA]gnosis"
"DIAGNOSIS-MENU": "Menú de d[IA]gnosis",
"ANALYZED-TEXTS": "Textos analizados",
"ANALYZED-TEXT": "Texto analizado",
"ID": "ID",
"ANALYSIS-DATE": "Fecha de análisis",
"FINDINGS": "Hallazgos",
"ERROR-MESSAGE": "¡Error, por favor inténtalo de nuevo!",
"POSSIBLE-DIAGNOSES": "Posibles diagnósticos",
"TEXT": "Texto",
"CODE": "Código",
"DESCRIPTION": "Descripción",
"SIMILARITY": "Similitud",
"TEXT-ANALYZE": "Texto a analizar",
"ANALYZE-TEXT": "Analizar texto",
"ICD-CODE": "Código CIE-10",
"CODES-PAGE": "códigos por página",
"DIAGNOSIS": "Diagnóstico",
"ICD-DESCRIPTION": "Descripción CIE-10",
"ACTION": "Acción",
"CSV-IMPORT": "Importar códigos desde CSV",
"CSV-FORMAT": "El formato de fichero csv deberá seguír las siguientes condiciones",
"NO-HEADERS": "Sin cabeceras",
"SEPARATION-CHARACTER": "Campos separados por el carácter",
"COLUMN-ICD": "Primera columna: Código CIE-10",
"COLUMN-DESCRIPTION": "Segunda columna: Descripción",
"DIAG-1": "Cólera debido a Vibrio cholerae 01, biotipo cholerae",
"DIAG-2": "Cólera debido a Vibrio cholerae 01, biotipo El Tor",
"DIAG-3": "Cólera, no especificado",
"DIAG-4": "Fiebre tifoidea, no especificada",
"DIAG-5": "Meningitis tifoidea",
"IMPORTED-RECORDS": "Registros importados",
"VECTORIZED-RECORDS": "Registros vectorizados"
}
Empty file removed shared/HL7In/.gitkeep
Empty file.
Empty file removed shared/in/.gitkeep
Empty file.
4 changes: 0 additions & 4 deletions src/ENCODER/BP/AnalyzeTextProcess.cls
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ Method AnalyzeText(text As %String, analysisId As %String) As %String [ Language
while i + 3 <= totalWords :
texts.append(words[i]+" "+words[i+1]+" "+words[i+2])
i = i + 1
i = 0
while i + 4 <= totalWords :
texts.append(words[i]+" "+words[i+1]+" "+words[i+2]+" "+words[i+3])
i = i + 1

if len(texts) == 0 :
texts.append(phrase)
Expand Down
2 changes: 1 addition & 1 deletion src/ENCODER/WS/Service.cls
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ ClassMethod GetAnalyzedText(idAnalysis As %String) As %Status
set ret = $$$OK
try {
set sql =
"SELECT CodeId, RawText, Description, max(Similarity) as Similarity FROM ENCODER_Object.TextMatches WHERE AnalysisId = ? GROUP BY CodeId"
"SELECT CodeId, RawText, Description, max(Similarity) as Similarity FROM ENCODER_Object.TextMatches WHERE AnalysisId = ? GROUP BY CodeId ORDER BY Similarity DESC"

set statement = ##class(%SQL.Statement).%New()
$$$ThrowOnError(statement.%Prepare(sql))
Expand Down

0 comments on commit 423a444

Please sign in to comment.