Skip to content

Commit

Permalink
Merge pull request #32 from FirelyTeam/feature/R5_2020Sep_Version
Browse files Browse the repository at this point in the history
Added version 4.5.0
  • Loading branch information
GinoCanessa authored Aug 25, 2020
2 parents ef1b00f + 1e72b94 commit 09ad929
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/Microsoft.Health.Fhir.SpecManager/Manager/FhirManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;

namespace Microsoft.Health.Fhir.SpecManager.Manager
{
Expand Down Expand Up @@ -47,7 +45,7 @@ private FhirManager(string npmDirectory)
{ 2, new SortedSet<string>() { "1.0.2" } },
{ 3, new SortedSet<string>() { "3.0.2" } },
{ 4, new SortedSet<string>() { "4.0.1" } },
{ 5, new SortedSet<string>() { "4.4.0" } },
{ 5, new SortedSet<string>() { "4.4.0", "4.5.0" } },
};

// build the dictionary of published versions*
Expand Down Expand Up @@ -109,6 +107,20 @@ private FhirManager(string npmDirectory)
IsOnDisk = false,
}
},
{
"4.5.0",
new FhirVersionInfo(5)
{
ReleaseName = "2020Sep",
PackageName = "hl7.fhir.r5.core",
ExamplesPackageName = string.Empty, // "hl7.fhir.r5.examples",
ExpansionsPackageName = "hl7.fhir.r5.expansions",
VersionString = "4.5.0",
IsDevBuild = false,
IsLocalBuild = false,
IsOnDisk = false,
}
},
};

// create a dictionary for dev builds
Expand Down Expand Up @@ -201,7 +213,7 @@ public FhirVersionInfo LoadPublished(
// figure out which version(s) we are loading
if (string.IsNullOrEmpty(versions) || (versions == "latest"))
{
versionsToLoad.Add(_knownVersions[majorRelease].ElementAt(0));
versionsToLoad.Add(_knownVersions[majorRelease].Max);
}
else
{
Expand All @@ -212,9 +224,9 @@ public FhirVersionInfo LoadPublished(
{
if (version == "latest")
{
if (!versionsToLoad.Contains(_knownVersions[majorRelease].ElementAt(0)))
if (!versionsToLoad.Contains(_knownVersions[majorRelease].Max))
{
versionsToLoad.Add(_knownVersions[majorRelease].ElementAt(0));
versionsToLoad.Add(_knownVersions[majorRelease].Max);
}

continue;
Expand Down

0 comments on commit 09ad929

Please sign in to comment.