[0eda78]: / frontend / src / app / services / analyzer.service.ts

Download this file

26 lines (22 with data), 589 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs';
import {environment} from '../../environments/environment';
const baseUri = environment.backendUrl;
@Injectable({
providedIn: 'root'
})
export class AnalyzerService {
constructor(
private http: HttpClient,
) { }
/**
* Analyze an admission note.
*
* @param note to analyze
* @return observable list of diseases
*/
analyzeNote(note: string): Observable<any> {
return this.http.post<any>(baseUri + '/extract_entities', note);
}
}