96 lines
3.1 KiB
C#
96 lines
3.1 KiB
C#
<Query Kind="Program">
|
|
<Namespace>Newtonsoft.Json</Namespace>
|
|
</Query>
|
|
|
|
|
|
void Main()
|
|
{
|
|
var CaseTypConfigJSON = @"{""SOIROMInclusions"":[{""SOI"":""1"",""ROM"":""1""},{""SOI"":""1"",""ROM"":""2""},{""SOI"":""1"",""ROM"":""3""},{""SOI"":""1"",""ROM"":""4""},{""SOI"":""2"",""ROM"":""1""},{""SOI"":""2"",""ROM"":""2""},{""SOI"":""2"",""ROM"":""3""},{""SOI"":""2"",""ROM"":""4""},{""SOI"":""3"",""ROM"":""1""},{""SOI"":""3"",""ROM"":""2""},{""SOI"":""3"",""ROM"":""3""},{""SOI"":""3"",""ROM"":""4""},{""SOI"":""4"",""ROM"":""1""},{""SOI"":""4"",""ROM"":""2""},{""SOI"":""4"",""ROM"":""3""},{""SOI"":""4"",""ROM"":""4""}],""AgeCohortIDInclusions"":[5,6,7,8,9,10,3,4],""PhysicianIDExclusions"":[],""StandardDeviationExcludedTypeEnum"":0,""LengthOfStayThreshold"":0,""CPTCodes"":[],""PatientTypeRollupIDInclusions"":[3,2,1],""PhysicianMinVolume"":0}";
|
|
JsonConvert.DeserializeObject<APRDRGCaseTypeConfiguration>(CaseTypConfigJSON).Dump();
|
|
}
|
|
|
|
// Define other methods and classes here
|
|
|
|
public enum StandardDeviationExclusions
|
|
{
|
|
None = 0,
|
|
TwoStdDev = 1,
|
|
ThreeStdDev = 2,
|
|
CustomLOSOutlier = 3
|
|
}
|
|
|
|
[Serializable]
|
|
public class CaseTypeConfiguration //: ICaseTypeConfiguration
|
|
{
|
|
public int PhysicianMinVolume { get; set; } = 0;
|
|
}
|
|
|
|
public class DRGCaseTypeConfiguration : CaseTypeConfiguration//, IDRGCaseTypeConfiguration
|
|
{
|
|
// ReSharper disable once InconsistentNaming
|
|
public List<int> AgeCohortIDInclusions { get; set; } = new List<int>();
|
|
public List<int> PhysicianIDExclusions { get; set; } = new List<int>();
|
|
public StandardDeviationExclusions StandardDeviationExcludedTypeEnum { get; set; } = StandardDeviationExclusions.None;
|
|
public int LengthOfStayThreshold { get; set; } = 0;
|
|
public HashSet<string> CPTCodes { get; set; } = new HashSet<string>();
|
|
public List<int> PatientTypeRollupIDInclusions { get; set; } = new List<int>();
|
|
}
|
|
|
|
[Serializable]
|
|
public class SOIROMInclusion : IEquatable<SOIROMInclusion>
|
|
{
|
|
|
|
public string SOI { get; set; }
|
|
public string ROM { get; set; }
|
|
|
|
public SOIROMInclusion()
|
|
{
|
|
|
|
}
|
|
|
|
public SOIROMInclusion(string soi, string rom)
|
|
{
|
|
SOI = soi;
|
|
ROM = rom;
|
|
}
|
|
|
|
public SOIROMInclusion(int soi, int rom)
|
|
{
|
|
SOI = soi.ToString();
|
|
ROM = rom.ToString();
|
|
}
|
|
|
|
public bool Equals(SOIROMInclusion other)
|
|
{
|
|
if (ReferenceEquals(null, other)) return false;
|
|
if (ReferenceEquals(this, other)) return true;
|
|
return string.Equals(ROM, other.ROM, StringComparison.OrdinalIgnoreCase) &&
|
|
string.Equals(SOI, other.SOI, StringComparison.OrdinalIgnoreCase);
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (ReferenceEquals(null, obj)) return false;
|
|
if (ReferenceEquals(this, obj)) return true;
|
|
if (obj.GetType() != this.GetType()) return false;
|
|
return Equals((SOIROMInclusion)obj);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
unchecked
|
|
{
|
|
return ((ROM != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(ROM) : 0) * 397) ^
|
|
(SOI != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(SOI) : 0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public class APRDRGCaseTypeConfiguration : DRGCaseTypeConfiguration
|
|
{
|
|
// ReSharper disable once InconsistentNaming
|
|
public List<SOIROMInclusion> SOIROMInclusions { get; set; } = new List<SOIROMInclusion>();
|
|
|
|
}
|