Skip to content

Commit 1ffd5dc

Browse files
committed
Refactor LoadValueSets and clean up ResourceHelper
- Removed the `valueSetIds` parameter from `LoadValueSets` in `ResourceHelper`, simplifying its signature and internal logic. - Deleted the commented-out method `CreateRuntimeScopeFromFhirLibraryFile` from `ResourceHelper`. - Updated the call to `LoadValueSets` in `LibraryRunner` to match the new method signature, ensuring continued functionality.
1 parent 5cfe052 commit 1ffd5dc

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

Demo/CLI/Helpers/ResourceHelper.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,8 @@ public static Bundle LoadBundle(string bundleFile)
4343
}
4444

4545
public static IValueSetDictionary LoadValueSets(
46-
DirectoryInfo directory,
47-
IEnumerable<string> valueSetIds)
46+
DirectoryInfo directory)
4847
{
49-
// TODO: Should this be used to validate the valuesets?
50-
var valueSetIdSet = valueSetIds.ToHashSet();
51-
5248
var valueSets = new List<ValueSet>();
5349
foreach (var file in directory.GetFiles("*.json", SearchOption.AllDirectories))
5450
{
@@ -64,19 +60,6 @@ public static IValueSetDictionary LoadValueSets(
6460
return vsd;
6561
}
6662

67-
// public static LibrarySetInvoker CreateRuntimeScopeFromFhirLibraryFile(
68-
// DirectoryInfo dir,
69-
// string lib,
70-
// string version)
71-
// {
72-
// var libFile = new FileInfo(Path.Combine(dir.FullName, $"Library-{lib}-{version}.json"));
73-
// using var fs = libFile.OpenRead();
74-
// var library = fs.DeserializeJsonToFhir<Library>();
75-
// var deps = library.GetDependenciesAndSelf(dir);
76-
// return deps.ToLibrarySetInvoker();
77-
// }
78-
79-
8063
public static Bundle CreateBundle(string[] files)
8164
{
8265
var bundle = new Bundle();

Demo/CLI/LibraryRunner.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ private void RunShared(CommandLineOptions opt, LibrarySetInvoker librarySetInvok
6868
Console.WriteLine("Loading value sets");
6969
var valueSetIds = GetValueSetIds(librarySetInvoker, opt.Library);
7070
IValueSetDictionary valueSets = ResourceHelper.LoadValueSets(
71-
new DirectoryInfo(opt.ValueSetsDirectory),
72-
valueSetIds);
71+
new DirectoryInfo(opt.ValueSetsDirectory));
7372

7473
Console.WriteLine("Loading test case files");
7574
var testDataDir = Path.Join(opt.DataDirectory, (string)opt.LibraryIdentifier.Identifier);

0 commit comments

Comments
 (0)