94a82e0d-b8c1-4789-96cc-f34a75ba3c45
true
P2980-SQL-03.sdt.local
jazz prd Mercy Health 20160308.1
true
<ProgramFilesX64>\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Newtonsoft.Json.dll
Amazon.Lambda.S3Events
AWSSDK.Core
AWSSDK.S3
Amazon
Amazon.Auth.AccessControlPolicy
Amazon.Auth.AccessControlPolicy.ActionIdentifiers
Amazon.Internal
Amazon.Lambda.S3Events
Amazon.MissingTypes
Amazon.Runtime
Amazon.Runtime.CredentialManagement
Amazon.Runtime.CredentialManagement.Internal
Amazon.Runtime.EventStreams
Amazon.Runtime.EventStreams.Internal
Amazon.Runtime.Internal
Amazon.Runtime.Internal.Auth
Amazon.Runtime.Internal.Settings
Amazon.Runtime.Internal.Transform
Amazon.Runtime.Internal.Util
Amazon.Runtime.SharedInterfaces
Amazon.Runtime.SharedInterfaces.Internal
Amazon.S3
Amazon.S3.Encryption
Amazon.S3.Encryption.Internal
Amazon.S3.Internal
Amazon.S3.IO
Amazon.S3.Model
Amazon.S3.Model.Internal.MarshallTransformations
Amazon.S3.Transfer
Amazon.S3.Util
Amazon.Util
Amazon.Util.Internal
Amazon.Util.Internal.PlatformServices
Newtonsoft.Json
Newtonsoft.Json.Converters
Newtonsoft.Json.Linq
Newtonsoft.Json.Schema
Newtonsoft.Json.Serialization
System
System.Diagnostics
System.Diagnostics.Tracing
System.IO.Compression
ThirdParty.BouncyCastle.Asn1
ThirdParty.BouncyCastle.Asn1.Utilities
ThirdParty.BouncyCastle.Math
ThirdParty.BouncyCastle.OpenSsl
ThirdParty.BouncyCastle.Utilities.IO.Pem
ThirdParty.Ionic.Zlib
ThirdParty.Json.LitJson
ThirdParty.MD5
private IEnumerable correct_versions;
private IEnumerable correct_migrations;
private IEnumerable correct_families;
private IEnumerable correct_mappings;
void Main()
{
Step1();
correct_migrations.Dump();
correct_versions.Dump();
correct_families.Count().Dump();
correct_mappings.Count().Dump();
var documentFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
File.WriteAllText(Path.Combine(documentFolder, $"{nameof(correct_migrations)}.json"), JsonConvert.SerializeObject(correct_migrations, Newtonsoft.Json.Formatting.Indented));
File.WriteAllText(Path.Combine(documentFolder, $"{nameof(correct_versions)}.json"), JsonConvert.SerializeObject(correct_versions, Newtonsoft.Json.Formatting.Indented));
File.WriteAllText(Path.Combine(documentFolder, $"{nameof(correct_families)}.json"), JsonConvert.SerializeObject(correct_families, Newtonsoft.Json.Formatting.Indented));
File.WriteAllText(Path.Combine(documentFolder, $"{nameof(correct_mappings)}.json"), JsonConvert.SerializeObject(correct_mappings, Newtonsoft.Json.Formatting.Indented));
}
// Define other methods and classes here
private void Step1()
{
correct_migrations = from ml in MigrationLogs
where ml.Name.Replace(" ", "").Contains("CaseType") //&& ml.DateTimeStamp > new DateTime(2018, 11, 16)
orderby ml.DateTimeStamp descending
select ml.Name;
correct_versions = from ctfv in CaseTypeFamilyVersions select new VersionInfo(ctfv.CaseTypeFamilyVersionID, ctfv.Name, ctfv.StartDate, ctfv.EndDate);
correct_families = from ctf in CaseTypeFamilies select new FamilyInfo(ctf.CaseTypeFamilyGlobalID, ctf.Name, ctf.CaseTypeFamilyID);
correct_mappings = (from ctfm in CaseTypeFamilyMappingICD10s
join family in CaseTypeFamilies on ctfm.CaseTypeFamilyID equals family.CaseTypeFamilyID
where ctfm.CaseTypeFamilyVersionID == 1
select new MappingInfo(family.CaseTypeFamilyGlobalID, ctfm.SkipICD, ctfm.ICD10Code, ctfm.MSDRGCode)).Distinct();
}
public class VersionInfo
{
public int CaseTypeFamilyVersionId { get; set; }
public string Name { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public VersionInfo(int id, string name, DateTime start, DateTime end)
{
CaseTypeFamilyVersionId = id;
Name = name;
StartDate = start;
EndDate = end;
}
}
public class FamilyInfo
{
public int CaseTypeFamilyID { get; set; }
public string CaseTypeFamilyGlobalID { get; set; }
public string Name { get; set; }
public FamilyInfo(string caseTypeFamilyGlobalID, string name, int caseTypeFamilyID)
{
CaseTypeFamilyID = caseTypeFamilyID;
CaseTypeFamilyGlobalID = caseTypeFamilyGlobalID;
Name = name;
}
}
public class MappingInfo
{
public string CaseTypeFamilyGlobalID { get; set; }
public bool SkipICD { get; set; }
public string ICD10Code { get; set; }
public string MSDRGCode { get; set; }
public MappingInfo(string caseTypeFamilyGlobalID, bool skipICD, string icd10Code, string msdrgCode)
{
CaseTypeFamilyGlobalID = caseTypeFamilyGlobalID;
SkipICD = skipICD;
ICD10Code = icd10Code;
MSDRGCode = msdrgCode;
}
}