Exemplo n.º 1
0
        private void AggregateFlagInformation(FlagTimeModel flag, PatientLocation patientLocation)
        {
            if (infections.ContainsKey(flag.PatientID))
            {
                PatientInfectionModel patientInfections = infections[flag.PatientID];

                if (patientInfections.IsInfected && !patientInfections.HasFirstNegativeTest && !flag.HasFlag())
                {
                    patientInfections.HasFirstNegativeTest = true;
                }
                else if (patientInfections.IsInfected && patientInfections.HasFirstNegativeTest && !flag.HasFlag())
                {
                    DecrementOverallCount(patientInfections.InfectionWard);
                    DecrementOverallCount(COMPLETE_CLINIC);
                }
            }
            else
            {
                InitializeNewInfectiousPatient(flag, patientLocation);
                if (flag.HasFlag())
                {
                    IncrementCounts(patientLocation.Ward);
                    IncrementCounts(COMPLETE_CLINIC);
                }
            }
        }
Exemplo n.º 2
0
 private void InitializeNewInfectiousPatient(FlagTimeModel flag, PatientLocation loc)
 {
     infections.Add(flag.PatientID, new PatientInfectionModel
     {
         PatientID = flag.PatientID, IsInfected = flag.HasFlag(), InfectionWard = loc.Ward
     });
 }
Exemplo n.º 3
0
 private void SetBasicDailyEpiCurveEntries(FlagTimeModel flag, PatientLocation patientLocation, DateTime date)
 {
     if (!EpiCurveEntryByWard.ContainsKey(COMPLETE_CLINIC))
     {
         EpiCurveEntryByWard.Add(COMPLETE_CLINIC, InitializeNewEpiCurveModel(flag, COMPLETE_CLINIC, date));
     }
     if (!EpiCurveEntryByWard.ContainsKey(patientLocation.Ward) && flag.HasFlag())
     {
         EpiCurveEntryByWard.Add(patientLocation.Ward, InitializeNewEpiCurveModel(flag, patientLocation.Ward, date));
     }
     if (!mavg28.ContainsKey(patientLocation.Ward) && !mavg7.ContainsKey(patientLocation.Ward))
     {
         mavg7.Add(patientLocation.Ward, new List <int>());
         mavg28.Add(patientLocation.Ward, new List <int>());
     }
 }