Template
chore: deploy initial code base
This commit is contained in:
+71
@@ -0,0 +1,71 @@
|
||||
using Riok.Mapperly.Abstractions;
|
||||
using Strata.ContinuousImprovement.Biz.ChargeCode.Opportunities;
|
||||
using Strata.ContinuousImprovement.Biz.Configuration;
|
||||
using Strata.ContinuousImprovement.Biz.Shared;
|
||||
using Strata.Schema.Client.Dtos;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub.Generics
|
||||
{
|
||||
|
||||
[Mapper(UseDeepCloning = true, EnumMappingStrategy = EnumMappingStrategy.ByName, EnumMappingIgnoreCase = true)]
|
||||
public static partial class CCOpportunityMapper
|
||||
{
|
||||
public static CCOpportunityDataModel MapToDataModel(this CCOpportunity src, Configuration configuration)
|
||||
{
|
||||
var mapped = src.MapToDataModel();
|
||||
mapped.Configuration = configuration;
|
||||
return mapped;
|
||||
}
|
||||
|
||||
public static CCOpportunityDataModel MapToDataModel(this CCOpportunity src)
|
||||
{
|
||||
var mapped = Mapped(src);
|
||||
if (mapped == null) { return default; }
|
||||
mapped.EncounterGroup = (int)EncounterGroup.CaseType;
|
||||
mapped.CaseTypeJson = JsonSerializer.Serialize(new HierarchyPathsAndMembers
|
||||
{
|
||||
HierarchyPaths = new List<string>(),
|
||||
Members = new List<MemberDto>()
|
||||
});
|
||||
mapped.ClinicalIndicatorJson = JsonSerializer.Serialize(new HierarchyPathsAndMembers
|
||||
{
|
||||
HierarchyPaths = new List<string>(),
|
||||
Members = new List<MemberDto>()
|
||||
});
|
||||
mapped.ChargeCodeJson = JsonSerializer.Serialize(new HierarchyPathsAndMembers
|
||||
{
|
||||
HierarchyPaths = new List<string>(),
|
||||
Members = new List<MemberDto>()
|
||||
});
|
||||
mapped.OpportunityLevelJson = JsonSerializer.Serialize(new HierarchyPathsAndMembers
|
||||
{
|
||||
HierarchyPaths = new List<string>(),
|
||||
Members = new List<MemberDto>()
|
||||
});
|
||||
return mapped;
|
||||
}
|
||||
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.CaseTypeJson))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.CaseTypes))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.ChargeCodeJson))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.ChargeCodes))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.ClinicalIndicatorJson))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.Configuration))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.DateCreated))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.Details))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.EncounterGroup))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.LevelCases))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.OpportunityLevelJson))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.OpportunityLevels))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.OpportunityId))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.OpportunityLevelJson))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.OpportunityId))]
|
||||
[MapperIgnoreTarget(nameof(CCOpportunityDataModel.PatientPopulations))]
|
||||
[MapperIgnoreSource(nameof(CCOpportunity.ChargeCodeGroup))]
|
||||
[MapperIgnoreSource(nameof(CCOpportunity.ChargeCodeGroupValue))]
|
||||
private static partial CCOpportunityDataModel Mapped(CCOpportunity src);
|
||||
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
using Riok.Mapperly.Abstractions;
|
||||
using Strata.ContinuousImprovement.Biz.FreeForm.Opportunities;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub.Generics
|
||||
{
|
||||
[Mapper(UseDeepCloning = true, EnumMappingStrategy = EnumMappingStrategy.ByName, EnumMappingIgnoreCase = true)]
|
||||
public static partial class FFOpportunityMapper
|
||||
{
|
||||
public static partial FFOpportunityDetailModel MapToDataModel(FFOpportunity src);
|
||||
}
|
||||
}
|
||||
+520
@@ -0,0 +1,520 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Diagnostics;
|
||||
using Moq;
|
||||
using MoreLinq;
|
||||
using MoreLinq.Extensions;
|
||||
using NUnit.Framework;
|
||||
using Strata.ContinuousImprovement.Biz.All;
|
||||
using Strata.ContinuousImprovement.Biz.All.Opportunities;
|
||||
using Strata.ContinuousImprovement.Biz.ChargeCode.Opportunities;
|
||||
using Strata.ContinuousImprovement.Biz.DbContexts;
|
||||
using Strata.ContinuousImprovement.Biz.FiscalMonths;
|
||||
using Strata.ContinuousImprovement.Biz.Generics;
|
||||
using Strata.ContinuousImprovement.Biz.OpportunityComments;
|
||||
using Strata.ContinuousImprovement.Biz.PeerGroups;
|
||||
using Strata.ContinuousImprovement.Biz.PeerGroups.Enums;
|
||||
using Strata.ContinuousImprovement.Biz.QualityVariation.Breakdowns;
|
||||
using Strata.ContinuousImprovement.Biz.Shared;
|
||||
using Strata.ContinuousImprovement.Biz.Utilities;
|
||||
using Strata.ContinuousImprovement.Biz.UtilizationVariation;
|
||||
using Strata.ContinuousImprovement.JazzEntityFrameworkStub.Generics;
|
||||
using Strata.SqlTools.Configuration.Common.AsyncFactory;
|
||||
using Strata.StrataSphereCompare.Client.Models.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory : IAsyncDbContextFactory<JazzDbContext>
|
||||
{
|
||||
public static List<Guid> OpportunityGuids = new List<Guid>
|
||||
{
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid()
|
||||
};
|
||||
|
||||
public static Guid CurrentConfigurationGuid = new Guid("e96abe3e-1526-43ca-815e-ee30c5b34345");
|
||||
public static Guid CaseTypeGuid = new Guid("c7838982-b2c6-4e93-a571-c1fd5cedc961");
|
||||
public static Guid DatabaseGuid = new Guid("21E97CAF-F37D-4F22-9777-0C6A36210FF9");
|
||||
|
||||
public string TestName { get; set; } = TestContext.CurrentContext?.Test.FullName ??
|
||||
throw new InvalidOperationException("TestContext.CurrentContext cannot be null");
|
||||
|
||||
public JazzDbContext JazzDbContext;
|
||||
public CentralDbContext CentralDbContext;
|
||||
|
||||
public IFiscalMonthResolver FiscalMonthResolver = Mock.Of<IFiscalMonthResolver>();
|
||||
public IDatabaseFunctionService DbFunctionService = Mock.Of<IDatabaseFunctionService>();
|
||||
|
||||
public async Task<JazzDbContext> CreateDbContextAsync(CancellationToken cancellationToken)
|
||||
=> await CreateDbContextAsync(TestName, cancellationToken);
|
||||
|
||||
public async Task<JazzDbContext> CreateDbContextAsync(string dbName, CancellationToken cancellationToken)
|
||||
{
|
||||
if (string.IsNullOrEmpty(dbName))
|
||||
{
|
||||
return await Task.FromResult((JazzDbContext)null);
|
||||
}
|
||||
|
||||
var options = new DbContextOptionsBuilder<JazzDbContext>()
|
||||
.UseInMemoryDatabase(dbName)
|
||||
// don't raise the error warning us that the in memory db doesn't support transactions
|
||||
.ConfigureWarnings(x => x.Ignore(InMemoryEventId.TransactionIgnoredWarning))
|
||||
.Options;
|
||||
|
||||
JazzDbContext = new JazzDbContext(options);
|
||||
|
||||
Mock.Get(DbFunctionService)
|
||||
.Setup(x => x.SplitString(It.IsAny<IEnumerable<string>>()))
|
||||
.Returns<IEnumerable<string>>(x => (y => y.EntityId.Split(',', StringSplitOptions.TrimEntries).Intersect(x).Count() > 0));
|
||||
|
||||
await JazzDbContext.Database.EnsureCreatedAsync(cancellationToken);
|
||||
|
||||
JazzDbContext.DatabaseFunctionService = DbFunctionService;
|
||||
|
||||
if (FiscalMonthResolver != null)
|
||||
{
|
||||
Mock.Get(FiscalMonthResolver)
|
||||
.Setup(s => s.AllFiscalMonths)
|
||||
.Returns(new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }
|
||||
.Select(m => new FiscalMonth
|
||||
{
|
||||
MemberGuid = Guid.NewGuid(),
|
||||
FiscalMonthId = (byte)m,
|
||||
FiscalMonthCode = $"{m}",
|
||||
SortOrder = (byte)m,
|
||||
DaysInMonth = m switch
|
||||
{
|
||||
2 => 28,
|
||||
4 => 30,
|
||||
6 => 30,
|
||||
9 => 30,
|
||||
11 => 30,
|
||||
_ => 31
|
||||
},
|
||||
MonthColumnName = $"Month{m:00}",
|
||||
Abbreviation = new DateTime(2024, m, 1).ToString("MMM"),
|
||||
IsReal = true
|
||||
}).ToList().AsReadOnly());
|
||||
Mock.Get(FiscalMonthResolver)
|
||||
.Setup(s => s.FirstFiscalMonth())
|
||||
.Returns(new FiscalMonth
|
||||
{
|
||||
MemberGuid = Guid.NewGuid(),
|
||||
FiscalMonthId = 1,
|
||||
FiscalMonthCode = "1",
|
||||
SortOrder = 1,
|
||||
DaysInMonth = 31,
|
||||
MonthColumnName = "Month01",
|
||||
Abbreviation = "Jan",
|
||||
IsReal = true,
|
||||
});
|
||||
Mock.Get(FiscalMonthResolver)
|
||||
.Setup(s => s.LastFiscalMonth())
|
||||
.Returns(new FiscalMonth
|
||||
{
|
||||
MemberGuid = Guid.NewGuid(),
|
||||
FiscalMonthId = 12,
|
||||
FiscalMonthCode = "12",
|
||||
SortOrder = 12,
|
||||
DaysInMonth = 31,
|
||||
MonthColumnName = "Month12",
|
||||
Abbreviation = "Dec",
|
||||
IsReal = true,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (!JazzDbContext.SystemSettings.Any())
|
||||
{
|
||||
await JazzDbContext.SystemSettings.AddRangeAsync(SystemSettings, cancellationToken);
|
||||
}
|
||||
if (!JazzDbContext.Configurations.Any())
|
||||
{
|
||||
Configurations.ForEach(c =>
|
||||
{
|
||||
c.FiscalMonthResolver = FiscalMonthResolver;
|
||||
});
|
||||
await JazzDbContext.Configurations.AddRangeAsync(Configurations, cancellationToken);
|
||||
}
|
||||
if (!JazzDbContext.UserSettings.Any())
|
||||
{
|
||||
await JazzDbContext.UserSettings.AddRangeAsync(UserSettings, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.CaseTypeFamilies.Any())
|
||||
{
|
||||
await JazzDbContext.CaseTypeFamilies.AddRangeAsync(CaseTypeFamilies, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.FFOpportunities.Any())
|
||||
{
|
||||
FFOpportunities.First().ConfigurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.FFOpportunities.AddRangeAsync(FFOpportunities, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.FreeFormOpportunities.Any())
|
||||
{
|
||||
var configuration = Configurations[0];
|
||||
configuration.FiscalMonthResolver = FiscalMonthResolver;
|
||||
FFOpportunitiesDataModel.ForEach(ff =>
|
||||
{
|
||||
ff.ConfigurationGuid = configuration.ConfigurationGuid;
|
||||
ff.Configuration = configuration;
|
||||
});
|
||||
await JazzDbContext.FreeFormOpportunities.AddRangeAsync(FFOpportunitiesDataModel, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.GeneralLedgerOpportunities.Any())
|
||||
{
|
||||
GLOpportunities.First().ConfigurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.GeneralLedgerOpportunities.AddRangeAsync(GLOpportunities, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.PayrollOpportunities.Any())
|
||||
{
|
||||
PROpportunities.First().ConfigurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.PayrollOpportunities.AddRangeAsync(PROpportunities, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.VariationOpportunities.Any())
|
||||
{
|
||||
UVOpportunities.First().ConfigurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.VariationOpportunities.AddRangeAsync(UVOpportunities, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.UtilizationVariationOpportunitiesData.Any())
|
||||
{
|
||||
UtilizationVariationOpportunities.First().ConfigurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.UtilizationVariationOpportunitiesData.AddRangeAsync(UtilizationVariationOpportunities, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.ExplorationVariationOpportunitiesData.Any())
|
||||
{
|
||||
ExplorationVariationOpportunities.First().ConfigurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.ExplorationVariationOpportunitiesData.AddRangeAsync(ExplorationVariationOpportunities, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.ChargeCodeOpportunities.Any())
|
||||
{
|
||||
CCOpportunities.First().ConfigurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.ChargeCodeOpps.AddRangeAsync(CCOpportunities, cancellationToken);
|
||||
|
||||
var ccDataModels = CCOpportunities.Select(cc => cc.MapToDataModel()).ToList();
|
||||
foreach (var cc in ccDataModels)
|
||||
{
|
||||
if (cc.ConfigurationGuid == Configurations.First().ConfigurationGuid)
|
||||
{
|
||||
cc.Configuration = Configurations.First();
|
||||
}
|
||||
cc.EncounterGroup = (int)EncounterGroup.CaseType;
|
||||
cc.CaseTypes = new List<string>
|
||||
{
|
||||
"CaseType 1",
|
||||
"CaseType 2",
|
||||
"CaseType 3"
|
||||
};
|
||||
cc.ChargeCodes = new List<string>
|
||||
{
|
||||
"CC 1",
|
||||
"CC 2",
|
||||
"CC 3",
|
||||
};
|
||||
var details = new List<ChargeCodeOpportunityDetail>();
|
||||
details.AddRange(
|
||||
Enumerable.Range(1, 12).Select(month => new ChargeCodeOpportunityDetail
|
||||
{
|
||||
OpportunityGUID = cc.OpportunityGuid,
|
||||
OpportunityLevelId = 0,
|
||||
OpportunityLevelName = "Organization",
|
||||
ChargeCodeId = 0,
|
||||
ChargeCodeName = "",
|
||||
ChargeCodeRollupName = "CC 1",
|
||||
TotalCases = 10,
|
||||
TotalCost = 10,
|
||||
TotalUnitsOfService = 10,
|
||||
GoalTotalUnitsOfService = 10,
|
||||
IsBaseline = true,
|
||||
Month = month,
|
||||
GoalCostPerUnit = 10
|
||||
}));
|
||||
cc.Details = details;
|
||||
}
|
||||
ChargeCodeOpportunities.AddRange(ccDataModels);
|
||||
ChargeCodeDetails.AddRange(ccDataModels.SelectMany(dm => dm.Details));
|
||||
await JazzDbContext.ChargeCodeOpportunities.AddRangeAsync(ccDataModels, cancellationToken);
|
||||
await JazzDbContext.ChargeCodeDetails.AddRangeAsync(ccDataModels.SelectMany(dm => dm.Details), cancellationToken);
|
||||
}
|
||||
if (!JazzDbContext.EncounterOpportunities.Any())
|
||||
{
|
||||
FFOpportunities.First().ConfigurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.EncounterOpportunities.AddRangeAsync(ENOpportunities, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.DimEntities.Any())
|
||||
{
|
||||
await JazzDbContext.DimEntities.AddRangeAsync(DimEntities, cancellationToken);
|
||||
}
|
||||
|
||||
if (!JazzDbContext.VariationCaseTypes.Any())
|
||||
{
|
||||
await JazzDbContext.VariationCaseTypes.AddRangeAsync(UVCaseTypes, cancellationToken);
|
||||
}
|
||||
if (!JazzDbContext.QualityVariationItemOpportunities.Any())
|
||||
{
|
||||
QVIOpportunities.First().ConfigurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.QualityVariationItemOpportunities.AddRangeAsync(QVIOpportunities, cancellationToken);
|
||||
}
|
||||
if (!JazzDbContext.QualityVariationItemEvents.Any())
|
||||
{
|
||||
QVIEvents.First().ConfigurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.QualityVariationItemEvents.AddRangeAsync(QVIEvents, cancellationToken);
|
||||
}
|
||||
if (!JazzDbContext.QualityVariationItemBreakdowns.Any())
|
||||
{
|
||||
qviBreakdowns.AddRange(
|
||||
QVIOpportunities.GroupBy(
|
||||
opp => new { opp.ConfigurationGuid, opp.BreakdownId },
|
||||
(g, d) => new QVIBreakdown
|
||||
{
|
||||
BreakdownId = g.BreakdownId,
|
||||
BreakdownName = d.First().BreakdownName,
|
||||
IdentifiedSavingsTotal = d.Sum(b => b.IdentifiedSavings),
|
||||
QVICasesTotal = d.Sum(b => b.QVICases),
|
||||
CasesTotal = d.Sum(b => b.Cases),
|
||||
OpportunitiesCount = d.Count(),
|
||||
QVIRate = (decimal)d.Sum(b => b.QVICases).DivideBy(d.Sum(b => b.Cases)),
|
||||
ConfigurationGuid = g.ConfigurationGuid
|
||||
}));
|
||||
await JazzDbContext.QualityVariationItemBreakdowns.AddRangeAsync(qviBreakdowns, cancellationToken);
|
||||
}
|
||||
if (!JazzDbContext.AllOpportunities.Any())
|
||||
{
|
||||
var configurationGuid = Configurations.First().ConfigurationGuid;
|
||||
await JazzDbContext.AllOpportunities.AddRangeAsync(UVOpportunities
|
||||
.ConvertAll(uv => new AllOpportunity
|
||||
{
|
||||
ConfigurationGuid = configurationGuid,
|
||||
OpportunityGuid = uv.OpportunityGuid,
|
||||
OpportunityKey = uv.OpportunityKey,
|
||||
OpportunityType = (int)OpportunityTypes.Variation,
|
||||
OpportunityTypeName = OpportunityTypes.Variation.OpportunityTypeName(),
|
||||
Name = $"{uv.CaseTypeName} - {uv.EntityName}",
|
||||
IdentifiedSavings = uv.IdentifiedSavings,
|
||||
Initiative = uv.Initiative,
|
||||
InitiativeGuid = uv.InitiativeGuid,
|
||||
IsHidden = uv.IsHidden,
|
||||
CostDriver = uv.CostDriver,
|
||||
Note = uv.Note
|
||||
}), cancellationToken);
|
||||
|
||||
await JazzDbContext.AllOpportunities.AddRangeAsync(CCOpportunities
|
||||
.ConvertAll(opp => new AllOpportunity
|
||||
{
|
||||
ConfigurationGuid = configurationGuid,
|
||||
OpportunityGuid = opp.OpportunityGuid,
|
||||
OpportunityKey = opp.OpportunityKey,
|
||||
OpportunityType = (int)OpportunityTypes.Encounter,
|
||||
OpportunityTypeName = OpportunityTypes.Encounter.OpportunityTypeName(),
|
||||
Name = opp.Name,
|
||||
IdentifiedSavings = opp.IdentifiedSavings,
|
||||
Initiative = opp.Initiative,
|
||||
InitiativeGuid = opp.InitiativeGuid,
|
||||
IsHidden = opp.IsHidden,
|
||||
CostDriver = "Encounter",
|
||||
Note = opp.Note
|
||||
}), cancellationToken);
|
||||
|
||||
await JazzDbContext.AllOpportunities.AddRangeAsync(ENOpportunities
|
||||
.ConvertAll(en => new AllOpportunity
|
||||
{
|
||||
ConfigurationGuid = configurationGuid,
|
||||
OpportunityGuid = en.OpportunityGuid,
|
||||
OpportunityKey = en.OpportunityKey,
|
||||
OpportunityType = (int)OpportunityTypes.Encounter,
|
||||
OpportunityTypeName = OpportunityTypes.Encounter.OpportunityTypeName(),
|
||||
Name = en.Name,
|
||||
IdentifiedSavings = en.IdentifiedSavings,
|
||||
Initiative = en.Initiative,
|
||||
InitiativeGuid = en.InitiativeGuid,
|
||||
IsHidden = en.IsHidden,
|
||||
CostDriver = "Encounter",
|
||||
Note = en.Note
|
||||
}), cancellationToken);
|
||||
|
||||
await JazzDbContext.AllOpportunities.AddRangeAsync(GLOpportunities
|
||||
.ConvertAll(gl => new AllOpportunity
|
||||
{
|
||||
ConfigurationGuid = configurationGuid,
|
||||
OpportunityGuid = gl.OpportunityGuid,
|
||||
OpportunityKey = gl.OpportunityKey,
|
||||
OpportunityType = (int)OpportunityTypes.FreeForm,
|
||||
OpportunityTypeName = OpportunityTypes.FreeForm.OpportunityTypeName(),
|
||||
Name = gl.Name,
|
||||
IdentifiedSavings = gl.IdentifiedSavings,
|
||||
Initiative = gl.Initiative,
|
||||
InitiativeGuid = gl.InitiativeGuid,
|
||||
IsHidden = gl.IsHidden,
|
||||
CostDriver = "",
|
||||
Note = gl.Note
|
||||
}), cancellationToken);
|
||||
|
||||
await JazzDbContext.AllOpportunities.AddRangeAsync(PROpportunities
|
||||
.ConvertAll(pr => new AllOpportunity
|
||||
{
|
||||
ConfigurationGuid = configurationGuid,
|
||||
OpportunityGuid = pr.OpportunityGuid,
|
||||
OpportunityKey = pr.OpportunityKey,
|
||||
OpportunityType = (int)OpportunityTypes.Payroll,
|
||||
OpportunityTypeName = OpportunityTypes.Payroll.OpportunityTypeName(),
|
||||
Name = pr.Name,
|
||||
IdentifiedSavings = pr.IdentifiedSavings,
|
||||
Initiative = pr.Initiative,
|
||||
InitiativeGuid = pr.InitiativeGuid,
|
||||
IsHidden = pr.IsHidden,
|
||||
CostDriver = "",
|
||||
Note = pr.Note
|
||||
}), cancellationToken);
|
||||
|
||||
await JazzDbContext.AllOpportunities.AddRangeAsync(QVIOpportunities
|
||||
.ConvertAll(qv => new AllOpportunity
|
||||
{
|
||||
ConfigurationGuid = configurationGuid,
|
||||
OpportunityGuid = qv.OpportunityGuid,
|
||||
OpportunityKey = qv.OpportunityKey,
|
||||
OpportunityType = (int)OpportunityTypes.QualityVariation,
|
||||
OpportunityTypeName = OpportunityTypes.QualityVariation.OpportunityTypeName(),
|
||||
Name = qv.BreakdownName,
|
||||
IdentifiedSavings = qv.IdentifiedSavings,
|
||||
Initiative = qv.Initiative,
|
||||
InitiativeGuid = qv.InitiativeGuid,
|
||||
IsHidden = qv.IsHidden,
|
||||
CostDriver = "",
|
||||
Note = qv.Note
|
||||
}), cancellationToken);
|
||||
|
||||
await JazzDbContext.AllOpportunities.AddRangeAsync(FFOpportunities
|
||||
.ConvertAll(ff => new AllOpportunity
|
||||
{
|
||||
ConfigurationGuid = configurationGuid,
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = ff.OpportunityKey,
|
||||
OpportunityType = (int)OpportunityTypes.FreeForm,
|
||||
OpportunityTypeName = OpportunityTypes.FreeForm.OpportunityTypeName(),
|
||||
Name = ff.Name,
|
||||
IdentifiedSavings = ff.IdentifiedSavings,
|
||||
Initiative = ff.Initiative,
|
||||
InitiativeGuid = ff.InitiativeGuid,
|
||||
IsHidden = ff.IsHidden,
|
||||
CostDriver = ff.MetricType == ContinuousImprovement.Biz.FreeForm.Opportunities.MetricType.Financial
|
||||
? "Financial Free Form" : "Free Form",
|
||||
Note = ff.Note
|
||||
}), cancellationToken);
|
||||
if (!JazzDbContext.PeerGroups.Any())
|
||||
{
|
||||
await JazzDbContext.PeerGroups.AddAsync(new PeerGroup() { PeerGroupId = 1, Name = "Test Name" }, cancellationToken);
|
||||
}
|
||||
if (!JazzDbContext.PeerGroupCriteriaMappings.Any())
|
||||
{
|
||||
var mappings = new List<PeerGroupCriteriaMapping>()
|
||||
{
|
||||
new PeerGroupCriteriaMapping() { RowId = 1, PeerGroupId = 1, MappingType = (byte)PeerGroupCritetiaType.EntityTypes, MappingValue = (byte)HospitalType.RehabLTACOther },
|
||||
new PeerGroupCriteriaMapping() { RowId = 2, PeerGroupId = 1, MappingType = (byte)PeerGroupCritetiaType.UrbanRural, MappingValue = (byte)UrbanRural.Urban },
|
||||
new PeerGroupCriteriaMapping() { RowId = 3, PeerGroupId = 1, MappingType = (byte)PeerGroupCritetiaType.AMCTypes, MappingValue = (byte)IsAmc.AcademicMedicalCenters },
|
||||
new PeerGroupCriteriaMapping() { RowId = 4, PeerGroupId = 1, MappingType = (byte)PeerGroupCritetiaType.CensusRegions, MappingValue = (byte)CensusRegion.Midwest },
|
||||
new PeerGroupCriteriaMapping() { RowId = 5, PeerGroupId = 1, MappingType = (byte)PeerGroupCritetiaType.BedSize, MappingValue = (byte)BedSize._0_250 },
|
||||
new PeerGroupCriteriaMapping() { RowId = 6, PeerGroupId = 1, MappingType = (byte)PeerGroupCritetiaType.OperatingExpenses, MappingValue = (byte)OperatingExpense._250MTo500M },
|
||||
};
|
||||
|
||||
await JazzDbContext.PeerGroupCriteriaMappings.AddRangeAsync(mappings, cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
await JazzDbContext.SaveChangesAsync(cancellationToken);
|
||||
return await Task.FromResult(JazzDbContext);
|
||||
}
|
||||
|
||||
public Task<JazzDbContext> CreateDbContextAsync(Guid databaseGuid, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<CentralDbContext> CreateCentralDbContextAsync(CancellationToken cancellationToken)
|
||||
=> await CreateCentralDbContextAsync(TestName, cancellationToken);
|
||||
|
||||
public async Task<CentralDbContext> CreateCentralDbContextAsync(string dbName, CancellationToken cancellationToken)
|
||||
{
|
||||
if (string.IsNullOrEmpty(dbName))
|
||||
{
|
||||
return await Task.FromResult((CentralDbContext)null);
|
||||
}
|
||||
var centralOptions = new DbContextOptionsBuilder<CentralDbContext>()
|
||||
.UseInMemoryDatabase(dbName)
|
||||
.Options;
|
||||
|
||||
CentralDbContext = new CentralDbContext(centralOptions);
|
||||
await EnsureCreatedAsync(CentralDbContext, JazzDbContext, cancellationToken);
|
||||
return await Task.FromResult(CentralDbContext);
|
||||
}
|
||||
|
||||
public async Task EnsureCreatedAsync(ICentralDbContext dbContext, CancellationToken cancellationToken)
|
||||
{
|
||||
var centralDbContext = (CentralDbContext)dbContext;
|
||||
await centralDbContext.Database.EnsureCreatedAsync(cancellationToken);
|
||||
|
||||
if (!(await centralDbContext.NetworkOpportunities.AnyAsync(cancellationToken)))
|
||||
{
|
||||
await centralDbContext.NetworkOpportunities.AddRangeAsync(NetworkOpportunities, cancellationToken);
|
||||
}
|
||||
|
||||
if (!(await centralDbContext.ClientNetworkOpportunities.AnyAsync(cancellationToken)))
|
||||
{
|
||||
await centralDbContext.ClientNetworkOpportunities.AddRangeAsync(ClientNetworkOpportunities, cancellationToken);
|
||||
}
|
||||
|
||||
await centralDbContext.SaveChangesAsync(cancellationToken);
|
||||
|
||||
}
|
||||
|
||||
public async Task EnsureCreatedAsync(ICentralDbContext dbContext, IJazzDbContext jazzDbContext, CancellationToken cancellationToken)
|
||||
{
|
||||
await EnsureCreatedAsync(dbContext, cancellationToken);
|
||||
var centralDbContext = (CentralDbContext)dbContext;
|
||||
if (await centralDbContext.Comments.AnyAsync(cancellationToken)) { return; }
|
||||
|
||||
await centralDbContext.Comments.AddRangeAsync(Comments, cancellationToken);
|
||||
if (jazzDbContext != null)
|
||||
{
|
||||
var allOpportunities = await jazzDbContext.AllOpportunities.ToListAsync(cancellationToken);
|
||||
if (!allOpportunities.Any()) { return; }
|
||||
var dateTime = new DateTimeOffset(DateTime.UtcNow, TimeSpan.Zero).UtcDateTime;
|
||||
var comments = allOpportunities
|
||||
.Select((opp, idx) => new Comment
|
||||
{
|
||||
CommentDate = dateTime.AddHours(idx),
|
||||
CommentId = idx + 2,
|
||||
CommentText = $"Comment on {opp.Name}",
|
||||
Author = "Name, Author",
|
||||
SourceOfSavingsId = (int)opp.OpportunityType,
|
||||
StrataId = 9,
|
||||
OpportunityId = opp.OpportunityId
|
||||
}).ToList();
|
||||
await centralDbContext.Comments.AddRangeAsync(comments, cancellationToken);
|
||||
}
|
||||
try
|
||||
{
|
||||
await centralDbContext.SaveChangesAsync(cancellationToken);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// ILB
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using Strata.ContinuousImprovement.Biz.ChargeCode.Opportunities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region Opportunities
|
||||
|
||||
public List<CCOpportunityDataModel> ChargeCodeOpportunities = new List<CCOpportunityDataModel>();
|
||||
public List<ChargeCodeOpportunityDetail> ChargeCodeDetails = new List<ChargeCodeOpportunityDetail>();
|
||||
|
||||
public List<CCOpportunity> CCOpportunities =
|
||||
new List<CCOpportunity>
|
||||
{
|
||||
new CCOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "CC - 101",
|
||||
Name = "ChargeCode Name 1",
|
||||
IdentifiedSavings = 1000d,
|
||||
Cases = 99,
|
||||
OpportunityLevel = "Organization",
|
||||
IsSeasonal = true,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid,
|
||||
},
|
||||
new CCOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "CC - 102",
|
||||
Name = "ChargeCode Name 2",
|
||||
IdentifiedSavings = 2000d,
|
||||
Cases = 199,
|
||||
OpportunityLevel = "Entity",
|
||||
IsSeasonal = false,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new CCOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "CC - 103",
|
||||
Name = "ChargeCode Name 3",
|
||||
IdentifiedSavings = 1000d,
|
||||
Cases = 99,
|
||||
OpportunityLevel = "Specialty",
|
||||
IsSeasonal = true,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new CCOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "CC - 104",
|
||||
Name = "ChargeCode Name 4",
|
||||
IdentifiedSavings = 2000d,
|
||||
Cases = 299,
|
||||
OpportunityLevel = "Service Line",
|
||||
IsSeasonal = false,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new CCOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "CC - 105",
|
||||
Name = "ChargeCode Name 5",
|
||||
IdentifiedSavings = 3000d,
|
||||
Cases = 399,
|
||||
OpportunityLevel = "Provider",
|
||||
IsSeasonal = true,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
};
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Strata.ContinuousImprovement.Biz.Exploration.CaseTypeFamilies;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
public List<CaseTypeFamily> CaseTypeFamilies = new List<CaseTypeFamily>
|
||||
{
|
||||
new CaseTypeFamily
|
||||
{
|
||||
CaseTypeFamilyId = 1,
|
||||
CaseTypeFamilyGlobalId = "A-1",
|
||||
Name = "Sample CTF"
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
using Strata.ContinuousImprovement.Biz.Network;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
public List<ClientNetworkOpportunity> ClientNetworkOpportunities =
|
||||
new List<ClientNetworkOpportunity> {
|
||||
new ClientNetworkOpportunity {
|
||||
StrataId = 9,
|
||||
IdentifiedSavings = 1000,
|
||||
IdentifiedSavingsDescription = "IdentifiedSavingsDescription",
|
||||
AnalyticsWorkbookId = 0,
|
||||
NetworkOpportunityId = 1,
|
||||
IsPublished = true
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using Strata.ContinuousImprovement.Biz.Generics;
|
||||
using Strata.ContinuousImprovement.Biz.OpportunityComments;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
public List<Comment> Comments =
|
||||
new List<Comment> {
|
||||
new Comment
|
||||
{
|
||||
CommentDate = new DateTimeOffset(DateTime.UtcNow, TimeSpan.Zero).UtcDateTime,
|
||||
CommentId = 1,
|
||||
CommentText = "This is a comment",
|
||||
Author ="Author Name",
|
||||
OpportunityId = 1,
|
||||
SourceOfSavingsId = (int) OpportunityTypes.ChargeCode,
|
||||
StrataId = 9
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Config = Strata.ContinuousImprovement.Biz.Configuration;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
|
||||
#region Configurations
|
||||
|
||||
public List<Config.Configuration> Configurations =
|
||||
new List<Config.Configuration> {
|
||||
new Config.Configuration
|
||||
{
|
||||
ConfigurationGuid = CurrentConfigurationGuid,
|
||||
DisplayOrder = 0,
|
||||
Name = "Test1",
|
||||
CustomEntityIdsCSV = ",,0,1,2,2,2,2,3,5,a,b,c",
|
||||
EntityIdsCSV = ",,0,1,2,2,2,2,3,a,b,c",
|
||||
DepartmentRollupGlobalId = "Entity",
|
||||
ServiceLineDimensionGuid = Guid.NewGuid(),
|
||||
QVIOpportunityBreakdown = Config.Configuration.QVIOpportunityBreakdowns.ServiceLine,
|
||||
OrgDefinedEndDate = DateTime.Now.AddMonths(1 - DateTime.Now.Month),
|
||||
FiscalYearID = (short)DateTime.Now.Year
|
||||
},
|
||||
new Config.Configuration
|
||||
{
|
||||
ConfigurationGuid = Guid.NewGuid(),
|
||||
DisplayOrder = 1,
|
||||
Name = "Test3",
|
||||
CustomEntityIdsCSV = ",,0,1,2,2,2,2,3,a,b,c",
|
||||
EntityIdsCSV = ",,0,1,2,2,2,2,3,4,a,b,c",
|
||||
DepartmentRollupGlobalId = string.Empty,
|
||||
ServiceLineDimensionGuid = Guid.Empty,
|
||||
QVIOpportunityBreakdown = Config.Configuration.QVIOpportunityBreakdowns.PhysicianSpecialty,
|
||||
OrgDefinedEndDate = DateTime.Now.AddYears(-1).AddMonths(1 - DateTime.Now.Month),
|
||||
FiscalYearID = (short)DateTime.Now.AddYears(-1).Year
|
||||
},
|
||||
new Config.Configuration
|
||||
{
|
||||
ConfigurationGuid = Guid.NewGuid(),
|
||||
DisplayOrder = 2,
|
||||
Name = "Test2",
|
||||
CustomEntityIdsCSV = ",,0,1,2,2,2,2,3,a,b,c",
|
||||
EntityIdsCSV = ",,0,1,2,2,2,2,3,4,a,b,c",
|
||||
DepartmentRollupGlobalId = string.Empty,
|
||||
ServiceLineDimensionGuid = Guid.Empty,
|
||||
QVIOpportunityBreakdown = Config.Configuration.QVIOpportunityBreakdowns.Entity,
|
||||
OrgDefinedEndDate = DateTime.Now.AddYears(-2).AddMonths(1 - DateTime.Now.Month),
|
||||
FiscalYearID = (short)DateTime.Now.AddYears(-2).Year
|
||||
},
|
||||
new Config.Configuration
|
||||
{
|
||||
ConfigurationGuid = Guid.NewGuid(),
|
||||
DisplayOrder = 3,
|
||||
Name = "Test4",
|
||||
CustomEntityIdsCSV = ",,0,1,2,2,2,2,3,a,b,c",
|
||||
EntityIdsCSV = ",,0,1,2,2,2,2,3,4,a,b,c",
|
||||
DepartmentRollupGlobalId = string.Empty,
|
||||
ServiceLineDimensionGuid = Guid.Empty,
|
||||
QVIOpportunityBreakdown = Config.Configuration.QVIOpportunityBreakdowns.Entity,
|
||||
OrgDefinedEndDate = DateTime.Now.AddYears(-3).AddMonths(1 - DateTime.Now.Month),
|
||||
FiscalYearID = (short)DateTime.Now.AddYears(-3).Year
|
||||
}
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using Strata.ContinuousImprovement.Biz.UtilizationVariation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region Opportunities
|
||||
|
||||
public List<DimEntity> DimEntities =
|
||||
new List<DimEntity>
|
||||
{
|
||||
new DimEntity
|
||||
{
|
||||
EntityID = 1,
|
||||
MemberGUID = Guid.NewGuid(),
|
||||
Code = "1",
|
||||
Description = "Description",
|
||||
SortOrder = 1,
|
||||
EntityType = 0,
|
||||
IsActive = true,
|
||||
Name = "Name"
|
||||
},
|
||||
new DimEntity
|
||||
{
|
||||
EntityID = 2,
|
||||
MemberGUID = Guid.NewGuid(),
|
||||
Code = "1",
|
||||
Description = "Description",
|
||||
SortOrder = 1,
|
||||
EntityType = 0,
|
||||
IsActive = true,
|
||||
Name = "Name"
|
||||
}
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using Strata.ContinuousImprovement.Biz.Encounter.Opportunities;
|
||||
using Strata.ContinuousImprovement.Biz.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region Opportunities
|
||||
|
||||
public List<ENOpportunity> ENOpportunities =
|
||||
new List<ENOpportunity>
|
||||
{
|
||||
new ENOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "EN - 101",
|
||||
Name = "Encounter Name 1",
|
||||
IdentifiedSavings = 1000d,
|
||||
Cases = 99,
|
||||
EncounterGroup = EncounterGroup.CaseType,
|
||||
EncounterGroupValue = "Case Type",
|
||||
OpportunityLevel = "Organization",
|
||||
IsSeasonal = true,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new ENOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "EN - 102",
|
||||
Name = "Encounter Name 2",
|
||||
IdentifiedSavings = 2000d,
|
||||
Cases = 199,
|
||||
EncounterGroup = EncounterGroup.CaseType,
|
||||
EncounterGroupValue = "Case Type",
|
||||
OpportunityLevel = "Entity",
|
||||
IsSeasonal = false,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new ENOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "EN - 103",
|
||||
Name = "Encounter Name 3",
|
||||
IdentifiedSavings = 1000d,
|
||||
Cases = 99,
|
||||
EncounterGroup = EncounterGroup.PatientPopulation,
|
||||
EncounterGroupValue = "Patient Population",
|
||||
OpportunityLevel = "Specialty",
|
||||
IsSeasonal = true,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new ENOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "EN - 104",
|
||||
Name = "Encounter Name 4",
|
||||
IdentifiedSavings = 2000d,
|
||||
Cases = 299,
|
||||
EncounterGroup = EncounterGroup.PatientPopulation,
|
||||
EncounterGroupValue = "Patient Population",
|
||||
OpportunityLevel = "Service Line",
|
||||
IsSeasonal = false,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new ENOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "EN - 105",
|
||||
Name = "Encounter Name 5",
|
||||
IdentifiedSavings = 3000d,
|
||||
Cases = 399,
|
||||
EncounterGroup = EncounterGroup.CaseType,
|
||||
EncounterGroupValue = "Case Type",
|
||||
OpportunityLevel = "Provider",
|
||||
IsSeasonal = true,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
};
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region Opportunities
|
||||
|
||||
public List<Biz.Population.ExplorationVariationOpportunityDataModel> ExplorationVariationOpportunities =
|
||||
new List<Biz.Population.ExplorationVariationOpportunityDataModel>
|
||||
{
|
||||
new Biz.Population.ExplorationVariationOpportunityDataModel
|
||||
{
|
||||
OpportunityGuid = Guid.Parse("ecc29e51-e92b-467a-bae4-7f69e36af069"),
|
||||
InitiativeGuid = Guid.Empty,
|
||||
YearConsidered = 0,
|
||||
CostDriver = "Cost Driver",
|
||||
SavingsLevel = 0,
|
||||
Savings = 0d,
|
||||
SavingsMedian = 0d,
|
||||
SavingsTarget = 0d,
|
||||
TotalCases = 0,
|
||||
TotalCost = 0d,
|
||||
TotalVariableCost = 0d,
|
||||
CostMedian = 0d,
|
||||
CostMedicare = 0d,
|
||||
VariableCostMedian = 0d,
|
||||
VariableCostMedicare = 0d,
|
||||
Note = string.Empty,
|
||||
DateModified = new DateTime(),
|
||||
DateCreated = new DateTime(),
|
||||
ConfigurationGuid = CurrentConfigurationGuid,
|
||||
IsHidden = false,
|
||||
}
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using Strata.ContinuousImprovement.Biz.FreeForm.Opportunities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region Opportunities
|
||||
|
||||
public List<FFOpportunity> FFOpportunities =
|
||||
new List<FFOpportunity>
|
||||
{
|
||||
new FFOpportunity
|
||||
{
|
||||
OpportunityGuid = OpportunityGuids.First(),
|
||||
OpportunityKey = "FF - 123",
|
||||
IdentifiedSavings = 1000d,
|
||||
ImprovementType = FinancialImprovementType.Revenue,
|
||||
MetricTypeValue = "Financial per Unit",
|
||||
MetricType = MetricType.FinancialPerUnit,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new FFOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "FF - 122",
|
||||
IdentifiedSavings = 2000d,
|
||||
ImprovementType = FinancialImprovementType.Cost,
|
||||
MetricTypeValue = "Financial",
|
||||
MetricType = MetricType.Financial,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new FFOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "FF - 125",
|
||||
IdentifiedSavings = 1000d,
|
||||
ImprovementType = FinancialImprovementType.Cost,
|
||||
MetricTypeValue = "Operational",
|
||||
MetricType = MetricType.Operational,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = true,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new FFOpportunity
|
||||
{
|
||||
OpportunityGuid = OpportunityGuids.Last(),
|
||||
OpportunityKey = "FF - 124",
|
||||
IdentifiedSavings = 2000d,
|
||||
ImprovementType = FinancialImprovementType.Cost,
|
||||
MetricTypeValue = "Financial",
|
||||
MetricType = MetricType.Financial,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = true,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new FFOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "FF - 126",
|
||||
IdentifiedSavings = 2000d,
|
||||
ImprovementType = FinancialImprovementType.Revenue,
|
||||
MetricTypeValue = "Financial per Unit",
|
||||
MetricType = MetricType.FinancialPerUnit,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = true,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
}
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
using Strata.ContinuousImprovement.Biz.FreeForm.Opportunities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region Opportunities
|
||||
|
||||
public List<FFOpportunityDataModel> FFOpportunitiesDataModel =
|
||||
new List<FFOpportunityDataModel>
|
||||
{
|
||||
new FFOpportunityDataModel
|
||||
{
|
||||
OpportunityId = 1,
|
||||
OpportunityGuid = OpportunityGuids.First(),
|
||||
ConfigurationGuid = CurrentConfigurationGuid,
|
||||
Name = "Free Form Opportunity 1",
|
||||
Numerator = "Imaging Procedures",
|
||||
Denominator = "PatientDays",
|
||||
FinancialImprovementType = FinancialImprovementType.Cost,
|
||||
AuthorGuid = Guid.NewGuid(),
|
||||
AuthorName = "",
|
||||
MetricType = MetricType.Financial
|
||||
|
||||
},
|
||||
new FFOpportunityDataModel
|
||||
{
|
||||
OpportunityId = 2,
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
ConfigurationGuid = CurrentConfigurationGuid,
|
||||
Name = "Free Form Opportunity 2",
|
||||
FinancialImprovementType = FinancialImprovementType.Cost,
|
||||
AuthorGuid = Guid.NewGuid(),
|
||||
AuthorName = "",
|
||||
MetricType = MetricType.Financial
|
||||
}
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using Strata.ContinuousImprovement.Biz.GeneralLedger.Opportunities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region Opportunities
|
||||
|
||||
public List<GLOpportunity> GLOpportunities =
|
||||
new List<GLOpportunity>()
|
||||
{
|
||||
new GLOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "GL - 101",
|
||||
Name = "GL Name 1",
|
||||
IdentifiedSavings = 1000d,
|
||||
Type = "Revenue",
|
||||
Level = "Overall",
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new GLOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "GL - 102",
|
||||
Name = "GL Name 2",
|
||||
IdentifiedSavings = 199,
|
||||
Type = "Expense",
|
||||
Level = "Department",
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new GLOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "GL - 103",
|
||||
Name = "GL Name 3",
|
||||
IdentifiedSavings = 2000d,
|
||||
Type = "Margin",
|
||||
Level = "Overall",
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
};
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
using Strata.ContinuousImprovement.Biz.Network;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
public List<NetworkOpportunity> NetworkOpportunities =
|
||||
new List<NetworkOpportunity>
|
||||
{
|
||||
new NetworkOpportunity
|
||||
{
|
||||
NetworkOpportunityId =1,
|
||||
Name = "Network Opportunity",
|
||||
Description = "Network Opportunity",
|
||||
WorkbookTemplateId = 0
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using Strata.ContinuousImprovement.Biz.Payroll.Opportunities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region Opportunities
|
||||
|
||||
public List<PROpportunity> PROpportunities =
|
||||
new List<PROpportunity>()
|
||||
{
|
||||
new PROpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "PR - 101",
|
||||
Name = "PR Name 1",
|
||||
IdentifiedSavings = 1000d,
|
||||
PayrollGoal = "Both",
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new PROpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "PR - 102",
|
||||
Name = "PR Name 2",
|
||||
IdentifiedSavings = 199,
|
||||
PayrollGoal = "Fixed",
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new PROpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "PR - 103",
|
||||
Name = "PR Name 3",
|
||||
IdentifiedSavings = 2000d,
|
||||
PayrollGoal = "Variable",
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
};
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Strata.ContinuousImprovement.Biz.QualityVariation.Breakdowns;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region QVIBreakdowns
|
||||
|
||||
public List<QVIBreakdown> qviBreakdowns = new List<QVIBreakdown>();
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using Strata.ContinuousImprovement.Biz.QualityVariation.Events;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
|
||||
public List<QVIEvent> QVIEvents =
|
||||
new List<QVIEvent>
|
||||
{
|
||||
new QVIEvent
|
||||
{
|
||||
QualityVariationEventId = 1,
|
||||
QualityVariationEventName = "Event 1 - Everything is 1 in this event.",
|
||||
IdentifiedSavingsTotal = 1,
|
||||
CasesTotal = 1,
|
||||
QVICasesTotal = 1,
|
||||
QVIPatientDaysTotal = 1,
|
||||
QVICostToal = 1,
|
||||
QVINetRevenueTotal = 1,
|
||||
Opportunities = 1,
|
||||
ConfigurationGuid = CurrentConfigurationGuid,
|
||||
QVIRate = 1
|
||||
},
|
||||
new QVIEvent
|
||||
{
|
||||
QualityVariationEventId = 2,
|
||||
QualityVariationEventName = "Event 2",
|
||||
IdentifiedSavingsTotal = 2,
|
||||
CasesTotal = 2,
|
||||
QVICasesTotal = 2,
|
||||
QVIPatientDaysTotal = 2,
|
||||
QVICostToal = 2,
|
||||
QVINetRevenueTotal = 2,
|
||||
Opportunities = 2,
|
||||
ConfigurationGuid = CurrentConfigurationGuid,
|
||||
QVIRate = 0.02m
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using Strata.ContinuousImprovement.Biz.QualityVariation.Opportunities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region QVIOpportunities
|
||||
|
||||
public List<QVIOpportunity> QVIOpportunities =
|
||||
new List<QVIOpportunity>
|
||||
{
|
||||
new QVIOpportunity
|
||||
{
|
||||
OpportunityGuid = OpportunityGuids.Skip(1).First(),
|
||||
OpportunityKey = "QV - 123",
|
||||
IdentifiedSavings = 1000d,
|
||||
QVICases = 99,
|
||||
Cases = 100,
|
||||
BreakdownName= "Service Line",
|
||||
BreakdownId = 1,
|
||||
QualityVariationEventName= "Quality Variation Event",
|
||||
QualityVariationEventId = 1,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new QVIOpportunity
|
||||
{
|
||||
OpportunityGuid = OpportunityGuids.Skip(2).First(),
|
||||
OpportunityKey = "QV - 122",
|
||||
IdentifiedSavings = 2000d,
|
||||
QVICases = 199,
|
||||
Cases = 200,
|
||||
BreakdownName= "Service Line",
|
||||
BreakdownId = 2,
|
||||
QualityVariationEventName= "Quality Variation Event",
|
||||
QualityVariationEventId = 1,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new QVIOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "QV - 125",
|
||||
IdentifiedSavings = 1000d,
|
||||
QVICases = 99,
|
||||
Cases = 100,
|
||||
BreakdownName= "Service Line",
|
||||
BreakdownId = 1,
|
||||
QualityVariationEventName= "Quality Variation Event",
|
||||
QualityVariationEventId = 1,
|
||||
InitiativeGuid = Guid.NewGuid(),
|
||||
Note = string.Empty,
|
||||
IsHidden = true,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new QVIOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "QV - 126",
|
||||
IdentifiedSavings = 2000d,
|
||||
QVICases = 299,
|
||||
Cases = 100,
|
||||
BreakdownName= "Service Line",
|
||||
BreakdownId = 1,
|
||||
QualityVariationEventName= "Quality Variation Event",
|
||||
QualityVariationEventId = 1,
|
||||
InitiativeGuid = Guid.NewGuid(),
|
||||
Note = string.Empty,
|
||||
IsHidden = true,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
}
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using Strata.ContinuousImprovement.Biz.Shared;
|
||||
using Strata.ContinuousImprovement.Biz.UserSetting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
public List<SystemSetting> SystemSettings =
|
||||
new List<SystemSetting>
|
||||
{
|
||||
new SystemSetting
|
||||
{
|
||||
Name = "Flexible Exploration Inpatient Case Type Family",
|
||||
Value = "1"
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using NUnit.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region TestCaseData
|
||||
|
||||
public static IEnumerable<TestCaseData> GetFrameworks()
|
||||
{
|
||||
yield return new TestCaseData(new JazzEntityFrameworkFactory())
|
||||
.SetName("{m} With FrameworkFactory");
|
||||
|
||||
yield return new TestCaseData(new JazzEntityFrameworkFactory { TestName = string.Empty })
|
||||
.SetName("{m} Without Context");
|
||||
}
|
||||
|
||||
public static IEnumerable<TestCaseData> GetFrameworksWithCancellation()
|
||||
{
|
||||
yield return new TestCaseData(new JazzEntityFrameworkFactory(), CancellationToken.None)
|
||||
.SetName("{m} With FrameworkFactory")
|
||||
.Ignore("Under investigation");
|
||||
|
||||
yield return new TestCaseData(new JazzEntityFrameworkFactory { TestName = string.Empty }, CancellationToken.None)
|
||||
.SetName("{m} Without Context");
|
||||
|
||||
yield return new TestCaseData(new JazzEntityFrameworkFactory(), new CancellationToken(true))
|
||||
.SetName("{m} With FrameworkFactory Canceled");
|
||||
|
||||
yield return new TestCaseData(new JazzEntityFrameworkFactory { TestName = string.Empty }, new CancellationToken(true))
|
||||
.SetName("{m} Without Context Canceled");
|
||||
|
||||
yield return new TestCaseData(new JazzEntityFrameworkFactory(), new CancellationToken(false))
|
||||
.SetName("{m} With FrameworkFactory not Canceled");
|
||||
|
||||
yield return new TestCaseData(new JazzEntityFrameworkFactory { TestName = string.Empty }, new CancellationToken(false))
|
||||
.SetName("{m} Without Context not Canceled");
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using Strata.ContinuousImprovement.Biz.UserSetting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
public List<CciUserSetting> UserSettings =
|
||||
new List<CciUserSetting>
|
||||
{
|
||||
new CciUserSetting
|
||||
{
|
||||
ConfigurationGuid = CurrentConfigurationGuid,
|
||||
UserGuid = Guid.NewGuid()
|
||||
},
|
||||
new CciUserSetting
|
||||
{
|
||||
ConfigurationGuid = CurrentConfigurationGuid,
|
||||
UserGuid = Guid.NewGuid()
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region Opportunities
|
||||
|
||||
public List<Biz.UtilizationVariation.Opportunities.VariationOpportunityDataModel> UtilizationVariationOpportunities =
|
||||
new List<Biz.UtilizationVariation.Opportunities.VariationOpportunityDataModel>
|
||||
{
|
||||
new Biz.UtilizationVariation.Opportunities.VariationOpportunityDataModel
|
||||
{
|
||||
OpportunityGuid = OpportunityGuids.First(),
|
||||
InitiativeGuid = Guid.Empty,
|
||||
YearConsidered = 0,
|
||||
CostDriver = "Cost Driver",
|
||||
SavingsLevel = 0,
|
||||
Savings = 0d,
|
||||
SavingsMedian = 0d,
|
||||
SavingsTarget = 0d,
|
||||
TotalCases = 0,
|
||||
TotalCost = 0d,
|
||||
TotalVariableCost = 0d,
|
||||
CostMedian = 0d,
|
||||
CostMedicare = 0d,
|
||||
VariableCostMedian = 0d,
|
||||
VariableCostMedicare = 0d,
|
||||
Note = string.Empty,
|
||||
DateModified = new DateTime(),
|
||||
DateCreated = new DateTime(),
|
||||
ConfigurationGuid = CurrentConfigurationGuid,
|
||||
IsHidden = false,
|
||||
}
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using Strata.ContinuousImprovement.Biz.UtilizationVariation.VariationCaseTypes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region UVCaseTypes
|
||||
|
||||
public List<UVCaseType> UVCaseTypes =
|
||||
new List<UVCaseType>
|
||||
{
|
||||
new UVCaseType
|
||||
{
|
||||
CaseTypeId = 1,
|
||||
CaseTypeGuid = new Guid("c7838982-b2c6-4e93-a571-c1fd5cedc961"),
|
||||
CaseTypeName = "Case Type Name",
|
||||
ServiceLineId = 1,
|
||||
ServiceLineName = "Service Line",
|
||||
IdentifiedSavingsTotal = 5000,
|
||||
OpportunitiesCount = 1,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new UVCaseType
|
||||
{
|
||||
CaseTypeId = 2,
|
||||
CaseTypeGuid = Guid.NewGuid(),
|
||||
CaseTypeName = "Case Type 2 Name",
|
||||
ServiceLineId = 2,
|
||||
ServiceLineName = "Service Line 2",
|
||||
IdentifiedSavingsTotal = 2000,
|
||||
OpportunitiesCount = 2,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Strata.ContinuousImprovement.JazzEntityFrameworkStub
|
||||
{
|
||||
public partial class JazzEntityFrameworkFactory
|
||||
{
|
||||
#region Opportunities
|
||||
|
||||
public List<Biz.UtilizationVariation.Opportunities.UVOpportunity> UVOpportunities =
|
||||
new List<Biz.UtilizationVariation.Opportunities.UVOpportunity>
|
||||
{
|
||||
new Biz.UtilizationVariation.Opportunities.UVOpportunity
|
||||
{
|
||||
OpportunityGuid = OpportunityGuids.First(),
|
||||
OpportunityKey = "UV - 123",
|
||||
IdentifiedSavings = 1000d,
|
||||
Cases = 99,
|
||||
CaseTypeGuid = CaseTypeGuid,
|
||||
CaseTypeName = "Case Type Name",
|
||||
CostDriver = "Cost Driver",
|
||||
EntityId = "1",
|
||||
EntityName = "Entity Name",
|
||||
ServiceLineName = "Service Line",
|
||||
ServiceLineId = 1,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new Biz.UtilizationVariation.Opportunities.UVOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "UV - 122",
|
||||
IdentifiedSavings = 2000d,
|
||||
Cases = 199,
|
||||
CaseTypeGuid = CaseTypeGuid,
|
||||
CaseTypeName = "Case Type Name",
|
||||
CostDriver = "Cost Driver",
|
||||
EntityId = "1,2",
|
||||
EntityName = "Entity Name",
|
||||
ServiceLineName = "Service Line",
|
||||
ServiceLineId = 2,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new Biz.UtilizationVariation.Opportunities.UVOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "UV - 125",
|
||||
IdentifiedSavings = 1000d,
|
||||
Cases = 99,
|
||||
CaseTypeGuid = CaseTypeGuid,
|
||||
CaseTypeName = "Case Type Name",
|
||||
CostDriver = "Cost Driver",
|
||||
EntityId = "1",
|
||||
EntityName = "Entity Name",
|
||||
ServiceLineName = "Service Line",
|
||||
ServiceLineId = 2,
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = true,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new Biz.UtilizationVariation.Opportunities.UVOpportunity
|
||||
{
|
||||
OpportunityGuid = OpportunityGuids.Last(),
|
||||
OpportunityKey = "UV - 124",
|
||||
IdentifiedSavings = 2000d,
|
||||
Cases = 199,
|
||||
CaseTypeGuid = CaseTypeGuid,
|
||||
CaseTypeName = "Case Type Name",
|
||||
CostDriver = "Cost Driver",
|
||||
EntityId = "1",
|
||||
EntityName = "Entity Name",
|
||||
ServiceLineName = "Service Line",
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = true,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new Biz.UtilizationVariation.Opportunities.UVOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.NewGuid(),
|
||||
OpportunityKey = "UV - 126",
|
||||
IdentifiedSavings = 2000d,
|
||||
Cases = 199,
|
||||
CaseTypeGuid = Guid.NewGuid(),
|
||||
CaseTypeName = "Case Type Name",
|
||||
CostDriver = "Cost Driver 2",
|
||||
EntityId = "1",
|
||||
EntityName = "Entity Name",
|
||||
ServiceLineName = "Service Line",
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = true,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
},
|
||||
new Biz.UtilizationVariation.Opportunities.UVOpportunity
|
||||
{
|
||||
OpportunityGuid = Guid.Parse("ecc29e51-e92b-467a-bae4-7f69e36af069"),
|
||||
OpportunityKey = "FE - 100",
|
||||
IdentifiedSavings = 2000d,
|
||||
Cases = 199,
|
||||
CaseTypeGuid = Guid.NewGuid(),
|
||||
CaseTypeName = "Case Type Name",
|
||||
CostDriver = "Cost Driver",
|
||||
EntityId = "1,3",
|
||||
EntityName = "Entity Name",
|
||||
ServiceLineName = "Service Line",
|
||||
InitiativeGuid = Guid.Empty,
|
||||
Note = string.Empty,
|
||||
IsHidden = false,
|
||||
ConfigurationGuid = CurrentConfigurationGuid
|
||||
}
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="JeffDbContext.cs" />
|
||||
<Compile Remove="Jeff_SDOpportunities.cs" />
|
||||
<Compile Remove="Jeff_StaffingToDemand.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FluentAssertions" Version="6.12.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.10" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
|
||||
<PackageReference Include="Moq" Version="4.20.72" />
|
||||
<PackageReference Include="NUnit" Version="4.2.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Strata.ContinuousImprovement.Biz\Strata.ContinuousImprovement.Biz.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
|
||||
<_Parameter1>Strata.ContinuousImprovement.Api.Test.Integration</_Parameter1>
|
||||
</AssemblyAttribute>
|
||||
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
|
||||
<_Parameter1>Strata.ContinuousImprovement.Api.Test.Unit</_Parameter1>
|
||||
</AssemblyAttribute>
|
||||
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
|
||||
<_Parameter1>Strata.ContinuousImprovement.Biz.Test.Unit</_Parameter1>
|
||||
</AssemblyAttribute>
|
||||
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
|
||||
<_Parameter1>Strata.ContinuousImprovement.Client.Test.Integration</_Parameter1>
|
||||
</AssemblyAttribute>
|
||||
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
|
||||
<_Parameter1>Strata.ContinuousImprovement.Client.Test.Unit</_Parameter1>
|
||||
</AssemblyAttribute>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user