feat: initial commit

This commit is contained in:
Thom Lamb
2026-06-23 11:26:55 -05:00
parent d472a6cff8
commit 1e042cc5e8
722 changed files with 278037 additions and 1 deletions
@@ -0,0 +1,44 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using NUnit.Framework;
using Strata.SnowflakeLib;
using Strata.Stratasphere.Biz.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Strata.Stratasphere.Biz.IntegrationTests.Standards.IntegrationTests
{
[SetUpFixture]
public abstract class IntegrationTestBase
{
protected readonly Guid _DatabaseGuid = new Guid("00732a12-e90f-49bd-9d9d-3ff43ec7c750"); //gm working small
protected StrataSnowflakeConnection _dbSnowflakeConnection;
protected IServiceProvider _serviceProvider; //used to grab any necessary DI objects
public IntegrationTestBase()
{
}
//When running locally sets the profile to the data wrangler profile so you have access to resources
[OneTimeSetUp]
public void SetAwsProfile()
{
#if DEBUG
Environment.SetEnvironmentVariable("AWS_Profile", "sdt-data-wrangler-Service-Role");
#endif
var services = ServiceCollectionFactory.Create();
_serviceProvider = services.BuildServiceProvider();
var sfOptions = _serviceProvider.GetService<IOptions<SnowflakeEnvironmentOptions>>();
var sfConnBuilderFactory = _serviceProvider.GetRequiredService<ISnowflakeConnectionStringBuilderFactory>();
var builder = sfConnBuilderFactory.CreateAsync($"stratareplication/snowflake/{_DatabaseGuid:N}/connectionstring", _DatabaseGuid).GetAwaiter().GetResult();
builder.Warehouse = sfOptions.Value.StandardsWarehouse;
_dbSnowflakeConnection = builder.CreateConnection();
}
}
}
@@ -0,0 +1,228 @@
using CsvHelper;
using Dapper;
using NUnit.Framework;
using Strata.Stratasphere.Biz.Standards;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using Strata.SnowflakeLib;
namespace Strata.Stratasphere.Biz.IntegrationTests.Standards.IntegrationTests
{
[TestFixture]
public class ReadmissionTests : IntegrationTestBase
{
public List<TestInput> TestInputs { get; set; }
private List<TestOutput> TestOutputs { get; set; }
private readonly string TransactionalTableName;
public ReadmissionTests() : base()
{
#if (DEBUG)
TransactionalTableName = "SPH.MEL_TEST123";
#else
TransactionalTableName = $"SPH.MEL_TEST123_{Guid.NewGuid():N}";
#endif
}
[OneTimeSetUp]
public void SetupFixture()
{
DeleteData(_dbSnowflakeConnection);
LoadInitialData(_dbSnowflakeConnection);
RunFullReadmit(_dbSnowflakeConnection);
CreateEncounterTable(_dbSnowflakeConnection);
}
[OneTimeTearDown]
public void TearDownFixture()
{
DeleteData(_dbSnowflakeConnection);
}
private void CreateEncounterTable(StrataSnowflakeConnection conn)
{
var ctable = $@"CREATE OR REPLACE TABLE {TransactionalTableName} (ENCOUNTERID BIGINT, ROWID BIGINT IDENTITY(1,1));";
conn.Execute(ctable);
}
private void LoadInitialData(StrataSnowflakeConnection conn)
{
using StreamReader reader = File.OpenText("./Standards/IntegrationTests/TestData/Readmit Test Data.csv");
using var csvReader = new CsvReader(reader, CultureInfo.InvariantCulture);
TestInputs = csvReader.GetRecords<TestInput>().ToList();
LoadData(conn, TestInputs);
}
private void LoadData(StrataSnowflakeConnection conn, List<TestInput> testInputs)
{
var encLoops = string.Join("\nUNION ALL ", testInputs.Select(a => $"SELECT {a.EncounterID} ENCOUNTERID, {a.PatientID} PATIENTID, '{a.AdmitDateTime:u}' ADMITDATETIME, '{a.DischargeDateTime:u}' DISCHARGEDATETIME,'{a.Diag1}' DIAG1"));
var ptLoops = string.Join("\nUNION ALL ", testInputs.Select(a => $"SELECT {a.EncounterID} ENCOUNTERID, '{a.IsInpatient}' ISINPATIENT, '{a.IsOutpatient}' ISOUTPATIENT"));
var diagLoops = string.Join("\nUNION ALL ", testInputs.Select(a => $"SELECT {a.EncounterID} ENCOUNTERID, '{a.Diag1}' DIAGCODE, 1 SEQUENCENUMBER\nUNION ALL SELECT {a.EncounterID} ENCOUNTERID, '{a.Diag2}' DIAGCODE, 2 SEQUENCENUMBER"));
var procLoops = string.Join("\nUNION ALL ", testInputs.Select(a => $"SELECT {a.EncounterID} ENCOUNTERID, '{a.Proc1}' PROCCODE, 1 SEQUENCENUMBER\nUNION ALL SELECT {a.EncounterID} ENCOUNTERID, '{a.Proc2}' PROCCODE, 2 SEQUENCENUMBER"));
var encInput = $@"
INSERT INTO CLIENTDSS.FACTPATIENTENCOUNTERSUMMARY (ENCOUNTERID, ENCOUNTERRECORDNUMBER, PATIENTID, ADMITDATETIME, DISCHARGEDATETIME, ICD10DXPRIMARYDIAGID, DISCHARGEDATEID, ADMITDATEID)
SELECT a.EncounterID, a.EncounterID, a.PatientID, a.AdmitDateTime, a.DischargeDateTime, DX.ICD10DXID, DISDATE.DATEID, ADDATE.DATEID FROM
(
{encLoops}
) a
INNER JOIN DSS.DIMICD10DX DX ON DX.ICD10DXCODENODECIMAL = a.Diag1
INNER JOIN FW.DIMDATE DISDATE ON DISDATE.CALENDARDATETIME = a.DISCHARGEDATETIME
INNER JOIN FW.DIMDATE ADDATE ON ADDATE.CALENDARDATETIME = a.ADMITDATETIME;";
var ptInput = $@"
INSERT INTO SPH.ENCOUNTERPATIENTTYPE (ENCOUNTERID, ISINPATIENT, ISOUTPATIENT)
SELECT ENCOUNTERID, ISINPATIENT, ISOUTPATIENT FROM
(
{ptLoops}
);
";
var diagInput = $@"
INSERT INTO DSS.FACTPATIENTICD10DIAGNOSTICDETAIL (ENCOUNTERID, ENCOUNTERRECORDNUMBER, ICD10DXID, SEQUENCENUMBERID)
SELECT ENCOUNTERID, ENCOUNTERID, DX.ICD10DXID, SEQUENCENUMBER
FROM (
{diagLoops}
) a
INNER JOIN DSS.DIMICD10DX DX ON DX.ICD10DXCODENODECIMAL = a.DIAGCODE;
";
var procInput = $@"
INSERT INTO DSS.FACTPATIENTICD10PROCEDURALDETAIL (ENCOUNTERID, ENCOUNTERRECORDNUMBER, ICD10PXID, SEQUENCENUMBERID)
SELECT ENCOUNTERID, ENCOUNTERID, PX.ICD10PXID, SEQUENCENUMBER
FROM (
{procLoops}
) a
INNER JOIN DSS.DIMICD10PX PX ON PX.ICD10PXCODENODECIMAL = a.PROCCODE;
";
conn.Execute(encInput);
conn.Execute(ptInput);
conn.Execute(diagInput);
conn.Execute(procInput);
}
private void RunFullReadmit(StrataSnowflakeConnection conn)
{
var readmitJob = _serviceProvider.GetRequiredService<ReadmissionJob>();
readmitJob.ProcessReadmissionsForAllEncounters(_DatabaseGuid, "GM Working Small", null, CancellationToken.None).GetAwaiter().GetResult();
TestOutputs = conn.Query<TestOutput>($"SELECT * FROM {StandardsConstants.READMISSION_TABLENAME} WHERE ENCOUNTERID < 0").ToList();
}
private void DeleteData(StrataSnowflakeConnection conn)
{
conn.Execute("DELETE FROM CLIENTDSS.FACTPATIENTENCOUNTERSUMMARY where EncounterID < 0;");
conn.Execute("DELETE FROM dss.FACTPATIENTICD10DIAGNOSTICDETAIL where encounterid < 0; ");
conn.Execute("DELETE FROM DSS.FACTPATIENTICD10PROCEDURALDETAIL where encounterid < 0; ");
conn.Execute("DELETE FROM SPH.ENCOUNTERPATIENTTYPE where encounterid < 0; ");
conn.Execute($"DROP TABLE IF EXISTS {TransactionalTableName};");
}
private static IEnumerable<TestCaseData> GetTestCases()
{
using StreamReader reader = File.OpenText("./Standards/IntegrationTests/TestData/Readmit Test Data.csv");
using var csvReader = new CsvReader(reader, CultureInfo.InvariantCulture);
return csvReader.GetRecords<TestResult>().Select(a => new TestCaseData(a).SetName($"Encounter: {a.EncounterID} - 30Day-90Day: {a.Is30DayReadmit}/{a.Is30DayIndex} - {a.Is90DayReadmit}/{a.Is90DayIndex}").SetDescription(a.Description)).ToList();
}
[Test, TestCaseSource("GetTestCases")]
public void Test(TestResult test)
{
var output = TestOutputs.FirstOrDefault(a => a.EncounterID == test.EncounterID);
AssertReadmit(output, test);
}
private void AssertReadmit(TestOutput output, TestResult expected)
{
if (output != null)
{
Assert.AreEqual(expected.EncounterID, output.EncounterID);
Assert.AreEqual(expected.IsEligibleIndex, output.IsEligibleIndex);
Assert.AreEqual(expected.IsEligibleReadmit, output.IsEligibleReadmit);
Assert.AreEqual(expected.Is30DayReadmit, output.Is30DayReadmit);
Assert.AreEqual(expected.Is30DayIndex, output.Is30DayReadmitIndex);
Assert.AreEqual(expected.Is90DayReadmit, output.Is90DayReadmit);
Assert.AreEqual(expected.Is90DayIndex, output.Is90DayReadmitIndex);
}
else
{
Assert.AreEqual(!expected.IsEligibleIndex && !expected.IsEligibleReadmit, output == null);
}
}
[Test]
[TestCase(-101, Description = "Test Transactional Readmission Based on Index Encounter")]
[TestCase(-102, Description = "Test Transactional Readmission Based on Readmit Encounter")]
public void TestReadmit_Transactional(int changedEncounter)
{
var input = new List<TestInput>()
{
new TestInput() { PatientID = -150, EncounterID = -101, IsInpatient = true,IsOutpatient = false, AdmitDateTime = new DateTime(2030, 1, 10), DischargeDateTime = new DateTime(2030, 1, 11), Diag1 = "E03", Diag2 = "E030", Proc1 = "0SW5X8Z", Proc2 = "04734FZ" },
new TestInput() {PatientID = -150, EncounterID = -102, IsInpatient = true,IsOutpatient = false, AdmitDateTime = new DateTime(2030, 1, 20), DischargeDateTime = new DateTime(2030, 1, 21), Diag1 = "E03", Diag2 = "E030", Proc1 = "0SW5X8Z", Proc2 = "04734FZ" }
};
var expectedIndex = new TestResult() { EncounterID = -101, Is30DayReadmit = false, Is30DayIndex = true, Is90DayReadmit = false, Is90DayIndex = true, IsEligibleIndex = true, IsEligibleReadmit = true };
var expectedReadmit = new TestResult() { EncounterID = -102, Is30DayReadmit = true, Is30DayIndex = false, Is90DayReadmit = true, Is90DayIndex = false, IsEligibleIndex = true, IsEligibleReadmit = true };
_dbSnowflakeConnection.Execute($"DELETE FROM {TransactionalTableName};");
_dbSnowflakeConnection.Execute($"INSERT INTO {TransactionalTableName} (ENCOUNTERID) VALUES ({changedEncounter});");
LoadData(_dbSnowflakeConnection, input);
var readmitJob = _serviceProvider.GetRequiredService<ReadmissionJob>();
readmitJob.ProcessReadmissions(_DatabaseGuid, TransactionalTableName, null, CancellationToken.None).GetAwaiter().GetResult();
var outputs = _dbSnowflakeConnection.Query<TestOutput>($"SELECT * FROM {StandardsConstants.READMISSION_TABLENAME} WHERE ENCOUNTERID < 0").ToList();
var index = outputs.FirstOrDefault(a => a.EncounterID == -101);
var readmit = outputs.FirstOrDefault(a => a.EncounterID == -102);
AssertReadmit(index, expectedIndex);
AssertReadmit(readmit, expectedReadmit);
}
public class TestResult
{
public long EncounterID { get; set; }
public bool IsEligibleIndex { get; set; }
public bool IsEligibleReadmit { get; set; }
public bool Is30DayReadmit { get; set; }
public bool Is30DayIndex { get; set; }
public bool Is90DayReadmit { get; set; }
public bool Is90DayIndex { get; set; }
public string Description { get; set; }
}
public class TestInput
{
public long EncounterID { get; set; }
public long PatientID { get; set; }
public bool IsInpatient { get; set; }
public bool IsOutpatient { get; set; }
public DateTime AdmitDateTime { get; set; }
public DateTime DischargeDateTime { get; set; }
public string Diag1 { get; set; }
public string Diag2 { get; set; }
public string Proc1 { get; set; }
public string Proc2 { get; set; }
}
public class TestOutput
{
public long EncounterID { get; set; }
public bool IsEligibleIndex { get; set; }
public bool IsEligibleReadmit { get; set; }
public bool Is30DayReadmit { get; set; }
public bool Is30DayReadmitIndex { get; set; }
public bool Is90DayReadmit { get; set; }
public bool Is90DayReadmitIndex { get; set; }
}
}
}
@@ -0,0 +1,39 @@
using Microsoft.Extensions.DependencyInjection;
using Strata.Configuration.Client.DependencyInjection.ConsoleApps;
using Strata.ApiLib.Core.StrataAuthentication.Bootstrappers;
using Strata.Stratasphere.Biz.Configuration;
using Hangfire;
using Hangfire.MemoryStorage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Strata.Stratasphere.Biz.Standards;
namespace Strata.Stratasphere.Biz.IntegrationTests
{
/// <summary>
/// Factory class for getting the dependencies in place for testing purposes
/// </summary>
public static class ServiceCollectionFactory
{
public static IServiceCollection Create()
{
var services = new ServiceCollection();
var configuration = StrataConfigurationFactory.GetConfiguration();
services.AddSingleton(configuration);
services.AddStrataAuthentication(configuration);
services.AddStratasphere(configuration);
services.AddLogging();
services.AddHangfire(c => c.UseMemoryStorage());
//ADD any test specific stuff
services.AddTransient<HACsJob>();
services.AddTransient<ReadmissionJob>();
return services;
}
}
}
@@ -0,0 +1,102 @@
PatientID,EncounterID,IsInpatient,IsOutpatient,AdmitDateTime,DischargeDateTime,Diag1,Diag2,Proc1,Proc2,Description,Is30DayReadmit,Is30DayIndex,Is90DayReadmit,Is90DayIndex,IsEligibleIndex,IsEligibleReadmit
-50,-1,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Readmit,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-50,-2,1,0,1/20/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,Readmit,TRUE,FALSE,TRUE,FALSE,TRUE,TRUE
-51,-3,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Not readmit because of planned procedure,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
-51,-4,1,0,1/20/2030,1/21/2030,E03,E030,30230G0,04734FZ,Not readmit because of planned procedure,FALSE,FALSE,FALSE,FALSE,TRUE,FALSE
-52,-5,1,0,1/10/2030,1/11/2030,E03,E030,00803ZZ,04734FZ,Not readmit because of excluded procedure,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE
-52,-6,1,0,1/20/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,Not readmit because of excluded procedure,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
-53,-7,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Not readmit because of planned diag,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
-53,-8,1,0,1/20/2030,1/21/2030,Z510,E030,0SW5X8Z,04734FZ,Not readmit because of planned diag,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE
-54,-9,1,0,1/10/2030,1/11/2030,C002,E030,0SW5X8Z,04734FZ,Not readmit because of excluded diag,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE
-54,-10,1,0,1/20/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,Not readmit because of excluded diag,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
-55,-11,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Not readmit because of > 30 days,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE
-55,-12,1,0,3/20/2030,3/21/2030,E03,E030,0SW5X8Z,04734FZ,Not readmit because of > 30 days,FALSE,FALSE,TRUE,FALSE,TRUE,TRUE
-56,-13,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Not readmit because planned between,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
-56,-14,1,0,1/20/2030,1/21/2030,Z510,E030,30230Y0,04734FZ,Not readmit because planned between,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE
-56,-15,1,0,1/30/2030,2/1/2030,E03,E030,0SW5X8Z,04734FZ,Not readmit because planned between,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
-57,-16,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Readmit but initial encounter not considered,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
-57,-17,1,0,1/20/2030,1/21/2030,Z510,E030,0SW5X8Z,04734FZ,Readmit but initial encounter not considered,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE
-57,-18,1,0,1/22/2030,1/23/2030,E03,E030,0SW5X8Z,04734FZ,Readmit but initial encounter not considered,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-57,-19,1,0,1/30/2030,2/1/2030,E03,E030,0SW5X8Z,04734FZ,Readmit but initial encounter not considered,TRUE,FALSE,TRUE,FALSE,TRUE,TRUE
-58,-20,0,1,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Not readmit because outpatient,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE
-58,-21,0,1,1/20/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,Not readmit because outpatient,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE
-59,-22,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Readmit,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-59,-23,1,0,1/20/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,Readmit,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-59,-24,1,0,1/25/2030,1/26/2030,E03,E030,0SW5X8Z,04734FZ,Readmit,TRUE,FALSE,TRUE,FALSE,TRUE,TRUE
-60,-25,1,0,1/20/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,"Readmit, but readmit encounter not eligible",FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-60,-26,1,0,1/25/2030,1/26/2030,E03,E030,0SW5X8Z,09R90JZ,"Readmit, but readmit encounter not eligible, is part of population should be false because the diag is excluded",TRUE,FALSE,TRUE,FALSE,FALSE,TRUE
-61,-27,1,0,1/20/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,Readmit 31 day boundary Test,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE
-61,-28,1,0,2/21/2030,2/21/2030,E03,E030,0SW5X8Z,04734FZ,Readmit 31 day boundary Test,FALSE,FALSE,TRUE,FALSE,TRUE,TRUE
-62,-29,1,0,1/20/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,Readmit 90 day boundary Test,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE
-62,-30,1,0,4/21/2030,4/21/2030,E03,E030,0SW5X8Z,04734FZ,Readmit 90 day boundary Test,FALSE,FALSE,TRUE,FALSE,TRUE,TRUE
-63,-31,1,0,1/20/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,Readmit 91 day boundary Test,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
-63,-32,1,0,4/22/2030,4/22/2030,E03,E030,0SW5X8Z,04734FZ,Readmit 91 day boundary Test,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
-64,-33,1,0,1/20/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,Readmit 30 day boundary Test,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-64,-34,1,0,2/20/2030,1/26/2030,C002,E030,0SW5X8Z,04734FZ,Readmit 30 day boundary Test,TRUE,FALSE,TRUE,FALSE,FALSE,TRUE
-65,-35,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,No Readmit due to same primary diagnosis,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE
-65,-36,1,0,1/11/2030,1/21/2030,E03,E030,0SW5X8Z,04734FZ,No Readmit due to same primary diagnosis,FALSE,FALSE,FALSE,FALSE,TRUE,FALSE
-66,-37,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Same day readmit,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-66,-38,1,0,1/11/2030,1/21/2030,E030,E03,0SW5X8Z,04734FZ,Same day readmit,TRUE,FALSE,TRUE,FALSE,TRUE,TRUE
-67,-39,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Same day readmit,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-67,-40,1,0,1/11/2030,1/11/2030,E030,E03,0SW5X8Z,04734FZ,Same day readmit,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-67,-41,1,0,1/11/2030,1/21/2030,E301,E03,0SW5X8Z,04734FZ,Same day readmit,TRUE,FALSE,TRUE,FALSE,TRUE,TRUE
-68,-42,1,0,1/11/2030,1/11/2030,E030,E03,0SW5X8Z,04734FZ,Same day readmit and discharge,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-68,-43,1,0,1/11/2030,1/21/2030,E301,E03,0SW5X8Z,04734FZ,Same Day readmit and discharge,TRUE,FALSE,TRUE,FALSE,TRUE,TRUE
-69,-3458925,1,0,1/5/2019,1/6/2019,E1010,N179,,,Client Example 1,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE
-69,-3525720,1,0,3/17/2019,3/19/2019,E1110,E871,,,Client Example 2,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-3552421,1,0,4/15/2019,4/18/2019,E1010,K5900,BW211ZZ,,Client Example 3,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-3576528,1,0,5/12/2019,5/14/2019,E1010,E871,,,Client Example 4,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE
-69,-3652662,1,0,8/7/2019,8/9/2019,E1010,E870,05HY33Z,,Client Example 5,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE
-69,-3709446,1,0,10/4/2019,10/7/2019,E1010,E872,,,Client Example 6,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-3740054,1,0,11/6/2019,11/9/2019,E1010,J069,,,Client Example 7,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE
-69,-3805926,1,0,1/22/2020,1/23/2020,E1010,N179,,,Client Example 8,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-3834689,1,0,2/19/2020,2/21/2020,E1010,E860,,,Client Example 9,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-3857183,1,0,3/14/2020,3/15/2020,E1010,E8339,,,Client Example 10,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-3861884,1,0,3/21/2020,3/23/2020,E1010,N179,,,Client Example 11,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE
-69,-3880338,1,0,4/27/2020,4/29/2020,E1010,G9340,BR20ZZZ,BW28ZZZ,Client Example 12,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE
-69,-3906214,1,0,6/1/2020,6/3/2020,E1010,E860,,,Client Example 13,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-3915939,1,0,6/13/2020,6/16/2020,E1010,N390,BW211ZZ,,Client Example 14,TRUE,FALSE,TRUE,FALSE,TRUE,TRUE
-69,-4117703,1,0,1/19/2021,1/22/2021,E1010,E876,,,Client Example 15,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-69,-4131168,1,0,1/31/2021,2/2/2021,E1010,N179,,,Client Example 16,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4136598,1,0,2/4/2021,2/6/2021,E1010,K047,,,Client Example 17,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE
-69,-4178296,1,0,3/13/2021,3/15/2021,E1110,G9341,02HV33Z,B548ZZA,Client Example 18,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4192591,1,0,3/27/2021,3/28/2021,E1010,N179,,,Client Example 19,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4200663,1,0,4/4/2021,4/6/2021,E1010,M1990,,,Client Example 20,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4228571,1,0,5/2/2021,5/4/2021,E1010,E876,06HN33Z,,Client Example 21,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4240674,1,0,5/14/2021,5/17/2021,E1010,J95811,05H533Z,0W9930Z,Client Example 22,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE
-69,-4286465,1,0,7/1/2021,7/4/2021,E1010,Z9114,,,Client Example 23,FALSE,FALSE,TRUE,FALSE,TRUE,TRUE
-69,-4392493,1,0,10/14/2021,10/17/2021,E1010,N179,,,Client Example 24,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE
-69,-4440146,1,0,12/5/2021,12/7/2021,E1010,N179,,,Client Example 25,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4467167,1,0,1/3/2022,1/5/2022,E1010,N179,,,Client Example 26,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4475791,1,0,1/12/2022,1/13/2022,E1010,K219,05H533Z,,Client Example 27,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4493555,1,0,1/30/2022,1/31/2022,E1010,K219,BW251ZZ,,Client Example 28,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4498191,1,0,2/3/2022,2/7/2022,E1010,E872,,,Client Example 29,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4525932,1,0,3/6/2022,3/8/2022,E1010,N179,,,Client Example 30,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4543519,1,0,3/27/2022,3/28/2022,E1010,N179,,,Client Example 31,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4556181,1,0,4/8/2022,4/11/2022,E1010,Z9641,,,Client Example 32,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE
-69,-4601338,1,0,5/28/2022,5/29/2022,E1010,E876,,,Client Example 33,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4627620,1,0,6/24/2022,6/25/2022,E1010,Z794,,,Client Example 34,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE
-69,-4632125,1,0,6/29/2022,7/1/2022,E1010,E1042,,,Client Example 35,TRUE,FALSE,TRUE,FALSE,TRUE,TRUE
-70,-45,1,0,1/11/2030,1/11/2030,E1010,E876,,,"Encounter -45 and -46 should be treated as the same encounter (-45 is the index, -46 is not)",FALSE,FALSE,FALSE,FALSE,FALSE,TRUE
-70,-46,1,0,1/11/2030,1/21/2030,E1010,Z794,,,Encounter -45 and -46 should be treated as the same encounter,FALSE,TRUE,FALSE,TRUE,TRUE,FALSE
-70,-47,1,0,1/22/2030,1/24/2030,E1010,E1042,,,Encounter -45 and -46 should be treated as the same encounter,TRUE,FALSE,TRUE,FALSE,TRUE,TRUE
-71,-48,1,0,1/11/2030,1/11/2030,E1010,E876,,,Encounter -49 and -50 should be treated as the same encounter,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-71,-49,1,0,1/12/2030,1/22/2030,E1010,Z794,,,Encounter -49 and -50 should be treated as the same encounter (-49 should be the readmit),TRUE,FALSE,TRUE,FALSE,FALSE,TRUE
-71,-50,1,0,1/22/2030,1/24/2030,E1010,E1042,,,Encounter -49 and -50 should be treated as the same encounter,FALSE,FALSE,FALSE,FALSE,TRUE,FALSE
-72,-51,1,0,1/11/2030,1/11/2030,E1010,E876,,,31 days after the first encounter discharge,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE
-72,-52,1,0,1/11/2030,1/21/2030,E1010,Z794,,,31 days after the first encounter discharge,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE
-72,-53,1,0,2/21/2030,1/24/2030,E1010,E1042,,,31 days after the first encounter discharge,FALSE,FALSE,TRUE,FALSE,TRUE,TRUE
-73,-54,1,0,1/11/2030,1/11/2030,E1010,E876,,,Same Day Readmit 55 days after the first encounter discharge,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE
-73,-55,1,0,3/7/2030,3/12/2030,E1010,Z794,,,Same Day Readmit 55 days after the first encounter discharge,FALSE,FALSE,TRUE,FALSE,FALSE,TRUE
-73,-56,1,0,3/12/2030,3/16/2030,E1010,E1042,,,Same Day Readmit 55 days after the first encounter discharge,FALSE,FALSE,FALSE,FALSE,TRUE,FALSE
-74,-57,1,0,1/11/2030,1/11/2030,E1010,E876,,,Same Day Index 31 days after the second encounter discharge,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE
-74,-58,1,0,1/11/2030,1/21/2030,E1010,Z794,,,Same Day Index 31 days after the second encounter discharge,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE
-74,-59,1,0,2/21/2030,2/22/2030,E1010,E1042,,,Same Day Index 31 days after the second encounter discharge,FALSE,FALSE,TRUE,FALSE,TRUE,TRUE
-75,-60,1,0,1/11/2030,1/11/2030,E1010,E876,,,Same Day Readmit 30 days before the first encounter readmit,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-75,-61,1,0,2/10/2030,2/12/2030,E1010,Z794,,,Same Day Readmit 30 days before the first encounter readmit,TRUE,FALSE,TRUE,FALSE,FALSE,TRUE
-75,-62,1,0,2/12/2030,2/25/2030,E1010,E1042,,,Same Day Readmit 30 days before the first encounter readmit,FALSE,FALSE,FALSE,FALSE,TRUE,FALSE
-76,-63,1,0,1/11/2030,1/11/2030,E1010,E876,,,Same Day Readmit 31 days before the second encounter readmit,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE
-76,-64,1,0,2/11/2030,2/20/2030,E1010,Z794,,,Same Day Readmit 31 days before the second encounter readmit,FALSE,FALSE,TRUE,FALSE,FALSE,TRUE
-76,-65,1,0,2/20/2030,2/25/2030,E1010,E1042,,,Same Day Readmit 31 days before the second encounter readmit,FALSE,FALSE,FALSE,FALSE,TRUE,FALSE
-77,-66,1,0,1/10/2030,1/11/2030,E03,E030,0SW5X8Z,04734FZ,Readmit because of potential planned procedure but acute diagnosis,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE
-77,-67,1,0,1/20/2030,1/21/2030,A150,E030,00800ZZ,04734FZ,Readmit because of potential planned procedure but acute diagnosis,TRUE,FALSE,TRUE,FALSE,FALSE,TRUE
1 PatientID EncounterID IsInpatient IsOutpatient AdmitDateTime DischargeDateTime Diag1 Diag2 Proc1 Proc2 Description Is30DayReadmit Is30DayIndex Is90DayReadmit Is90DayIndex IsEligibleIndex IsEligibleReadmit
2 -50 -1 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Readmit FALSE TRUE FALSE TRUE TRUE TRUE
3 -50 -2 1 0 1/20/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ Readmit TRUE FALSE TRUE FALSE TRUE TRUE
4 -51 -3 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Not readmit because of planned procedure FALSE FALSE FALSE FALSE TRUE TRUE
5 -51 -4 1 0 1/20/2030 1/21/2030 E03 E030 30230G0 04734FZ Not readmit because of planned procedure FALSE FALSE FALSE FALSE TRUE FALSE
6 -52 -5 1 0 1/10/2030 1/11/2030 E03 E030 00803ZZ 04734FZ Not readmit because of excluded procedure FALSE FALSE FALSE FALSE FALSE TRUE
7 -52 -6 1 0 1/20/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ Not readmit because of excluded procedure FALSE FALSE FALSE FALSE TRUE TRUE
8 -53 -7 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Not readmit because of planned diag FALSE FALSE FALSE FALSE TRUE TRUE
9 -53 -8 1 0 1/20/2030 1/21/2030 Z510 E030 0SW5X8Z 04734FZ Not readmit because of planned diag FALSE FALSE FALSE FALSE FALSE FALSE
10 -54 -9 1 0 1/10/2030 1/11/2030 C002 E030 0SW5X8Z 04734FZ Not readmit because of excluded diag FALSE FALSE FALSE FALSE FALSE TRUE
11 -54 -10 1 0 1/20/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ Not readmit because of excluded diag FALSE FALSE FALSE FALSE TRUE TRUE
12 -55 -11 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Not readmit because of > 30 days FALSE FALSE FALSE TRUE TRUE TRUE
13 -55 -12 1 0 3/20/2030 3/21/2030 E03 E030 0SW5X8Z 04734FZ Not readmit because of > 30 days FALSE FALSE TRUE FALSE TRUE TRUE
14 -56 -13 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Not readmit because planned between FALSE FALSE FALSE FALSE TRUE TRUE
15 -56 -14 1 0 1/20/2030 1/21/2030 Z510 E030 30230Y0 04734FZ Not readmit because planned between FALSE FALSE FALSE FALSE FALSE FALSE
16 -56 -15 1 0 1/30/2030 2/1/2030 E03 E030 0SW5X8Z 04734FZ Not readmit because planned between FALSE FALSE FALSE FALSE TRUE TRUE
17 -57 -16 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Readmit but initial encounter not considered FALSE FALSE FALSE FALSE TRUE TRUE
18 -57 -17 1 0 1/20/2030 1/21/2030 Z510 E030 0SW5X8Z 04734FZ Readmit but initial encounter not considered FALSE FALSE FALSE FALSE FALSE FALSE
19 -57 -18 1 0 1/22/2030 1/23/2030 E03 E030 0SW5X8Z 04734FZ Readmit but initial encounter not considered FALSE TRUE FALSE TRUE TRUE TRUE
20 -57 -19 1 0 1/30/2030 2/1/2030 E03 E030 0SW5X8Z 04734FZ Readmit but initial encounter not considered TRUE FALSE TRUE FALSE TRUE TRUE
21 -58 -20 0 1 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Not readmit because outpatient FALSE FALSE FALSE FALSE FALSE FALSE
22 -58 -21 0 1 1/20/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ Not readmit because outpatient FALSE FALSE FALSE FALSE FALSE FALSE
23 -59 -22 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Readmit FALSE TRUE FALSE TRUE TRUE TRUE
24 -59 -23 1 0 1/20/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ Readmit TRUE TRUE TRUE TRUE TRUE TRUE
25 -59 -24 1 0 1/25/2030 1/26/2030 E03 E030 0SW5X8Z 04734FZ Readmit TRUE FALSE TRUE FALSE TRUE TRUE
26 -60 -25 1 0 1/20/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ Readmit, but readmit encounter not eligible FALSE TRUE FALSE TRUE TRUE TRUE
27 -60 -26 1 0 1/25/2030 1/26/2030 E03 E030 0SW5X8Z 09R90JZ Readmit, but readmit encounter not eligible, is part of population should be false because the diag is excluded TRUE FALSE TRUE FALSE FALSE TRUE
28 -61 -27 1 0 1/20/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ Readmit 31 day boundary Test FALSE FALSE FALSE TRUE TRUE TRUE
29 -61 -28 1 0 2/21/2030 2/21/2030 E03 E030 0SW5X8Z 04734FZ Readmit 31 day boundary Test FALSE FALSE TRUE FALSE TRUE TRUE
30 -62 -29 1 0 1/20/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ Readmit 90 day boundary Test FALSE FALSE FALSE TRUE TRUE TRUE
31 -62 -30 1 0 4/21/2030 4/21/2030 E03 E030 0SW5X8Z 04734FZ Readmit 90 day boundary Test FALSE FALSE TRUE FALSE TRUE TRUE
32 -63 -31 1 0 1/20/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ Readmit 91 day boundary Test FALSE FALSE FALSE FALSE TRUE TRUE
33 -63 -32 1 0 4/22/2030 4/22/2030 E03 E030 0SW5X8Z 04734FZ Readmit 91 day boundary Test FALSE FALSE FALSE FALSE TRUE TRUE
34 -64 -33 1 0 1/20/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ Readmit 30 day boundary Test FALSE TRUE FALSE TRUE TRUE TRUE
35 -64 -34 1 0 2/20/2030 1/26/2030 C002 E030 0SW5X8Z 04734FZ Readmit 30 day boundary Test TRUE FALSE TRUE FALSE FALSE TRUE
36 -65 -35 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ No Readmit due to same primary diagnosis FALSE FALSE FALSE FALSE FALSE TRUE
37 -65 -36 1 0 1/11/2030 1/21/2030 E03 E030 0SW5X8Z 04734FZ No Readmit due to same primary diagnosis FALSE FALSE FALSE FALSE TRUE FALSE
38 -66 -37 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Same day readmit FALSE TRUE FALSE TRUE TRUE TRUE
39 -66 -38 1 0 1/11/2030 1/21/2030 E030 E03 0SW5X8Z 04734FZ Same day readmit TRUE FALSE TRUE FALSE TRUE TRUE
40 -67 -39 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Same day readmit FALSE TRUE FALSE TRUE TRUE TRUE
41 -67 -40 1 0 1/11/2030 1/11/2030 E030 E03 0SW5X8Z 04734FZ Same day readmit TRUE TRUE TRUE TRUE TRUE TRUE
42 -67 -41 1 0 1/11/2030 1/21/2030 E301 E03 0SW5X8Z 04734FZ Same day readmit TRUE FALSE TRUE FALSE TRUE TRUE
43 -68 -42 1 0 1/11/2030 1/11/2030 E030 E03 0SW5X8Z 04734FZ Same day readmit and discharge FALSE TRUE FALSE TRUE TRUE TRUE
44 -68 -43 1 0 1/11/2030 1/21/2030 E301 E03 0SW5X8Z 04734FZ Same Day readmit and discharge TRUE FALSE TRUE FALSE TRUE TRUE
45 -69 -3458925 1 0 1/5/2019 1/6/2019 E1010 N179 Client Example 1 FALSE FALSE FALSE TRUE TRUE TRUE
46 -69 -3525720 1 0 3/17/2019 3/19/2019 E1110 E871 Client Example 2 FALSE TRUE TRUE TRUE TRUE TRUE
47 -69 -3552421 1 0 4/15/2019 4/18/2019 E1010 K5900 BW211ZZ Client Example 3 TRUE TRUE TRUE TRUE TRUE TRUE
48 -69 -3576528 1 0 5/12/2019 5/14/2019 E1010 E871 Client Example 4 TRUE FALSE TRUE TRUE TRUE TRUE
49 -69 -3652662 1 0 8/7/2019 8/9/2019 E1010 E870 05HY33Z Client Example 5 FALSE FALSE TRUE TRUE TRUE TRUE
50 -69 -3709446 1 0 10/4/2019 10/7/2019 E1010 E872 Client Example 6 FALSE TRUE TRUE TRUE TRUE TRUE
51 -69 -3740054 1 0 11/6/2019 11/9/2019 E1010 J069 Client Example 7 TRUE FALSE TRUE TRUE TRUE TRUE
52 -69 -3805926 1 0 1/22/2020 1/23/2020 E1010 N179 Client Example 8 FALSE TRUE TRUE TRUE TRUE TRUE
53 -69 -3834689 1 0 2/19/2020 2/21/2020 E1010 E860 Client Example 9 TRUE TRUE TRUE TRUE TRUE TRUE
54 -69 -3857183 1 0 3/14/2020 3/15/2020 E1010 E8339 Client Example 10 TRUE TRUE TRUE TRUE TRUE TRUE
55 -69 -3861884 1 0 3/21/2020 3/23/2020 E1010 N179 Client Example 11 TRUE FALSE TRUE TRUE TRUE TRUE
56 -69 -3880338 1 0 4/27/2020 4/29/2020 E1010 G9340 BR20ZZZ BW28ZZZ Client Example 12 FALSE FALSE TRUE TRUE TRUE TRUE
57 -69 -3906214 1 0 6/1/2020 6/3/2020 E1010 E860 Client Example 13 FALSE TRUE TRUE TRUE TRUE TRUE
58 -69 -3915939 1 0 6/13/2020 6/16/2020 E1010 N390 BW211ZZ Client Example 14 TRUE FALSE TRUE FALSE TRUE TRUE
59 -69 -4117703 1 0 1/19/2021 1/22/2021 E1010 E876 Client Example 15 FALSE TRUE FALSE TRUE TRUE TRUE
60 -69 -4131168 1 0 1/31/2021 2/2/2021 E1010 N179 Client Example 16 TRUE TRUE TRUE TRUE TRUE TRUE
61 -69 -4136598 1 0 2/4/2021 2/6/2021 E1010 K047 Client Example 17 TRUE FALSE TRUE TRUE TRUE TRUE
62 -69 -4178296 1 0 3/13/2021 3/15/2021 E1110 G9341 02HV33Z B548ZZA Client Example 18 FALSE TRUE TRUE TRUE TRUE TRUE
63 -69 -4192591 1 0 3/27/2021 3/28/2021 E1010 N179 Client Example 19 TRUE TRUE TRUE TRUE TRUE TRUE
64 -69 -4200663 1 0 4/4/2021 4/6/2021 E1010 M1990 Client Example 20 TRUE TRUE TRUE TRUE TRUE TRUE
65 -69 -4228571 1 0 5/2/2021 5/4/2021 E1010 E876 06HN33Z Client Example 21 TRUE TRUE TRUE TRUE TRUE TRUE
66 -69 -4240674 1 0 5/14/2021 5/17/2021 E1010 J95811 05H533Z 0W9930Z Client Example 22 TRUE FALSE TRUE TRUE TRUE TRUE
67 -69 -4286465 1 0 7/1/2021 7/4/2021 E1010 Z9114 Client Example 23 FALSE FALSE TRUE FALSE TRUE TRUE
68 -69 -4392493 1 0 10/14/2021 10/17/2021 E1010 N179 Client Example 24 FALSE FALSE FALSE TRUE TRUE TRUE
69 -69 -4440146 1 0 12/5/2021 12/7/2021 E1010 N179 Client Example 25 FALSE TRUE TRUE TRUE TRUE TRUE
70 -69 -4467167 1 0 1/3/2022 1/5/2022 E1010 N179 Client Example 26 TRUE TRUE TRUE TRUE TRUE TRUE
71 -69 -4475791 1 0 1/12/2022 1/13/2022 E1010 K219 05H533Z Client Example 27 TRUE TRUE TRUE TRUE TRUE TRUE
72 -69 -4493555 1 0 1/30/2022 1/31/2022 E1010 K219 BW251ZZ Client Example 28 TRUE TRUE TRUE TRUE TRUE TRUE
73 -69 -4498191 1 0 2/3/2022 2/7/2022 E1010 E872 Client Example 29 TRUE TRUE TRUE TRUE TRUE TRUE
74 -69 -4525932 1 0 3/6/2022 3/8/2022 E1010 N179 Client Example 30 TRUE TRUE TRUE TRUE TRUE TRUE
75 -69 -4543519 1 0 3/27/2022 3/28/2022 E1010 N179 Client Example 31 TRUE TRUE TRUE TRUE TRUE TRUE
76 -69 -4556181 1 0 4/8/2022 4/11/2022 E1010 Z9641 Client Example 32 TRUE FALSE TRUE TRUE TRUE TRUE
77 -69 -4601338 1 0 5/28/2022 5/29/2022 E1010 E876 Client Example 33 FALSE TRUE TRUE TRUE TRUE TRUE
78 -69 -4627620 1 0 6/24/2022 6/25/2022 E1010 Z794 Client Example 34 TRUE TRUE TRUE TRUE TRUE TRUE
79 -69 -4632125 1 0 6/29/2022 7/1/2022 E1010 E1042 Client Example 35 TRUE FALSE TRUE FALSE TRUE TRUE
80 -70 -45 1 0 1/11/2030 1/11/2030 E1010 E876 Encounter -45 and -46 should be treated as the same encounter (-45 is the index, -46 is not) FALSE FALSE FALSE FALSE FALSE TRUE
81 -70 -46 1 0 1/11/2030 1/21/2030 E1010 Z794 Encounter -45 and -46 should be treated as the same encounter FALSE TRUE FALSE TRUE TRUE FALSE
82 -70 -47 1 0 1/22/2030 1/24/2030 E1010 E1042 Encounter -45 and -46 should be treated as the same encounter TRUE FALSE TRUE FALSE TRUE TRUE
83 -71 -48 1 0 1/11/2030 1/11/2030 E1010 E876 Encounter -49 and -50 should be treated as the same encounter FALSE TRUE FALSE TRUE TRUE TRUE
84 -71 -49 1 0 1/12/2030 1/22/2030 E1010 Z794 Encounter -49 and -50 should be treated as the same encounter (-49 should be the readmit) TRUE FALSE TRUE FALSE FALSE TRUE
85 -71 -50 1 0 1/22/2030 1/24/2030 E1010 E1042 Encounter -49 and -50 should be treated as the same encounter FALSE FALSE FALSE FALSE TRUE FALSE
86 -72 -51 1 0 1/11/2030 1/11/2030 E1010 E876 31 days after the first encounter discharge FALSE FALSE FALSE FALSE FALSE TRUE
87 -72 -52 1 0 1/11/2030 1/21/2030 E1010 Z794 31 days after the first encounter discharge FALSE FALSE FALSE TRUE TRUE FALSE
88 -72 -53 1 0 2/21/2030 1/24/2030 E1010 E1042 31 days after the first encounter discharge FALSE FALSE TRUE FALSE TRUE TRUE
89 -73 -54 1 0 1/11/2030 1/11/2030 E1010 E876 Same Day Readmit 55 days after the first encounter discharge FALSE FALSE FALSE TRUE TRUE TRUE
90 -73 -55 1 0 3/7/2030 3/12/2030 E1010 Z794 Same Day Readmit 55 days after the first encounter discharge FALSE FALSE TRUE FALSE FALSE TRUE
91 -73 -56 1 0 3/12/2030 3/16/2030 E1010 E1042 Same Day Readmit 55 days after the first encounter discharge FALSE FALSE FALSE FALSE TRUE FALSE
92 -74 -57 1 0 1/11/2030 1/11/2030 E1010 E876 Same Day Index 31 days after the second encounter discharge FALSE FALSE FALSE FALSE FALSE TRUE
93 -74 -58 1 0 1/11/2030 1/21/2030 E1010 Z794 Same Day Index 31 days after the second encounter discharge FALSE FALSE FALSE TRUE TRUE FALSE
94 -74 -59 1 0 2/21/2030 2/22/2030 E1010 E1042 Same Day Index 31 days after the second encounter discharge FALSE FALSE TRUE FALSE TRUE TRUE
95 -75 -60 1 0 1/11/2030 1/11/2030 E1010 E876 Same Day Readmit 30 days before the first encounter readmit FALSE TRUE FALSE TRUE TRUE TRUE
96 -75 -61 1 0 2/10/2030 2/12/2030 E1010 Z794 Same Day Readmit 30 days before the first encounter readmit TRUE FALSE TRUE FALSE FALSE TRUE
97 -75 -62 1 0 2/12/2030 2/25/2030 E1010 E1042 Same Day Readmit 30 days before the first encounter readmit FALSE FALSE FALSE FALSE TRUE FALSE
98 -76 -63 1 0 1/11/2030 1/11/2030 E1010 E876 Same Day Readmit 31 days before the second encounter readmit FALSE FALSE FALSE TRUE TRUE TRUE
99 -76 -64 1 0 2/11/2030 2/20/2030 E1010 Z794 Same Day Readmit 31 days before the second encounter readmit FALSE FALSE TRUE FALSE FALSE TRUE
100 -76 -65 1 0 2/20/2030 2/25/2030 E1010 E1042 Same Day Readmit 31 days before the second encounter readmit FALSE FALSE FALSE FALSE TRUE FALSE
101 -77 -66 1 0 1/10/2030 1/11/2030 E03 E030 0SW5X8Z 04734FZ Readmit because of potential planned procedure but acute diagnosis FALSE TRUE FALSE TRUE TRUE TRUE
102 -77 -67 1 0 1/20/2030 1/21/2030 A150 E030 00800ZZ 04734FZ Readmit because of potential planned procedure but acute diagnosis TRUE FALSE TRUE FALSE FALSE TRUE
@@ -0,0 +1,51 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Compile Remove="AutoMapperTests.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.100.21" />
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="Hangfire.MemoryStorage" Version="1.7.0" />
<PackageReference Include="Hangfire.NetCore" Version="1.7.31" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.0" />
<PackageReference Include="coverlet.msbuild" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Strata.ApiLib.Core" Version="5.2.0" />
<PackageReference Include="Strata.Configuration.Client" Version="8.17.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Strata.Stratasphere.Biz\Strata.Stratasphere.Biz.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Standards\IntegrationTests\TestData\Readmit Test Data.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
@@ -0,0 +1,38 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
},
"Snowflake": {
"Url": "https://stratadev.us-east-1.privatelink.snowflakecomputing.com",
"Account": "stratadev",
"RoleName": "DATAADMIN",
"Warehouse": "DATA_ANALYSIS_WH",
"StandardsWarehouseSize": "XSMALL",
"StandardsWarehouseMaxClusterSize": "1",
"StandardsWarehouse": "STANDARDS_WH",
"AdminRoleName": "DEVADMIN",
"SphCoreRoleName": "SPHCORE"
},
"aws": {
"masterEncounterListSQSQueueName": "sdt-masterencounterlist-queue",
"snowflakeAdminSecretName": "stratareplication/snowflake/automation/connectionstring"
},
"s3": {
"bucketName": "sdt-dev-data-wrangler"
},
"configuration": {
"basicAuthUsername": "BkQsRDdmdjkFNhKVuTI.TpujQJXuKhGDcV.F_hjADMRTaEUWMJnviaesoOrhhfnz",
"basicAuthPassword": "GWPIIWECDqh.hjDNdpxVEfeFe-bYFwPSx-oBGFD_od_SUQVk-QqTIkZY_NXMeqeo"
},
"StrataConfigServerBaseUrl": "https://configuration.dev.stratanetwork.net"
}