You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/elm/clinical.ts
+43-12Lines changed: 43 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,58 @@ import { Expression } from './expression';
2
2
import*asdtfrom'../datatypes/datatypes';
3
3
import{Context}from'../runtime/context';
4
4
import{build}from'./builder';
5
+
import{resolveValueSet}from'../util/util';
5
6
6
7
exportclassValueSetDefextendsExpression{
7
8
name: string;
8
9
id: string;
9
10
version?: string;
11
+
codesystems?: CodeSystemRef[];
10
12
11
13
constructor(json: any){
12
14
super(json);
13
15
this.name=json.name;
14
16
this.id=json.id;
15
17
this.version=json.version;
18
+
this.codesystems=json.codesystems;// TODO: fix this as needed. See what the elm json passes through to populate this. Will be a CodeSystemRef (name, libraryname)
// ctx.rootContext().set(this.name, valueset); Note (2025): this seems to be unneccesary, remove completely in future if not needed
25
31
returnvalueset;
26
32
}
33
+
34
+
// Recommendations:
35
+
// Resolve when we need it -> if not resolved, throw error
36
+
37
+
// TODO: ?? other places that a valueset could be created in patient data (in the middle of execution)
38
+
// ^ talk to Chris Moesel about valueset that's defined on the fly
39
+
// ... resources could have contained valuesets -> that would be a FHIR valueset (we wouldn't have any automatic conversion of that)
40
+
// probably not a problem we need to solve at this juncture
41
+
// this could influence how we define the terminology or data provider interfaces, but that's a future issue
42
+
43
+
// Update: initially store ValueSet to context... then, when we need the expansion, call the code service to expand and (also?) store the expansion to the context
44
+
// This rootContext call is kind of hinky ... why are we doing this since the getValueSet function pulls from the root library vs list?
45
+
// Recommendations:
46
+
// Cache both valueset references and valueset resolutions? (could also be responsibility of the terminology provider? implementation class can choose how to cache or not cache)
47
+
// For simplicity, push expanded caching to terminology provider
0 commit comments