forked from cqframework/cql-execution
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcql-code-service.interfaces.ts
More file actions
41 lines (37 loc) · 1.03 KB
/
Copy pathcql-code-service.interfaces.ts
File metadata and controls
41 lines (37 loc) · 1.03 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { ValueSet } from '../datatypes/datatypes';
/*
* Lookup of all codes used based on their ValueSet
*/
export interface ValueSetDictionary {
[oid: string]: {
[version: string]: {
code: string;
system: string;
version?: string;
display?: string;
}[];
};
}
/*
* Lookup of ValueSet objects
*/
export interface ValueSetObject {
[oid: string]: {
[version: string]: ValueSet;
};
}
/*
* Structure of an implementation to look up ValueSets based on oid and version
*/
export interface TerminologyProvider {
findValueSetsByOid: (oid: string) => ValueSet[] | Promise<ValueSet[]>;
findValueSet: (oid: string, version?: string) => ValueSet | Promise<ValueSet> | null;
}
/*
* Structure of a service that can check an assertion using the LLM
*/
export interface LlmService {
checkAssertion: (expression: string, context: string) => Promise<boolean>;
checkMention: (expression: string, context: string) => Promise<boolean>;
checkNegation: (expression: string, context: string) => Promise<boolean>;
}