Beispiel #1
0
        public List <NECCombinedDataModel> NEC_DatasetOverTimeSpan(TimespanParameter timespan)
        {
            List <NECCombinedDataModel> data = new List <NECCombinedDataModel>();

            for (DateTime date = timespan.Starttime.Date; date <= timespan.Endtime.Date; date.AddDays(1))
            {
                data.Add(_necDataFac.Process(date));
            }
            return(data);
        }
Beispiel #2
0
 public List <NECResultDataModel> NECAlgorithmResult(TimespanParameter timespan)
 {
     if (timespan.Starttime == timespan.Endtime)
     {
         return(_necResultDataFac.Process(timespan.Starttime));
     }
     else
     {
         return(_necResultDataFac.Process(timespan));
     }
 }
        public List <NECResultDataModel> Process(TimespanParameter timespan)
        {
            List <NECResultDataModel> concatList = new List <NECResultDataModel>();

            for (DateTime date = timespan.Starttime.Date; date <= timespan.Endtime.Date; date.AddDays(1))
            {
                List <NECResultDataModel> lst = Process(date);
                concatList.AddRange(lst);
            }
            return(concatList);
        }
Beispiel #4
0
        private void AddMissingValues(TimespanParameter parameter)
        {
            ICollection <string> wards = dataAggregationStorage[parameter.Endtime.Date].Keys;
            DateTime             date  = parameter.Starttime.Date;

            while (dataAggregationStorage[date].Keys.Count != wards.Count)
            {
                foreach (string ward in wards)
                {
                    if (!dataAggregationStorage[date].ContainsKey(ward))
                    {
                        dataAggregationStorage[date].Add(ward, InitializeEmptyEpiCurveModel(dataAggregationStorage[parameter.Endtime.Date][ward], date, Purpose.FOR_PAST));
                    }
                }

                date = date.AddDays(1);
            }
        }
Beispiel #5
0
        public ActionResult <List <EpiCurveModel> > Labor_ErregerProTag_TTEsKSs([FromBody] TimespanParameter parameter)
        {
            _logger.LogInformation("CALLED Labor_ErregerProTag_TTEsKSs with parameters: \n\r Starttime: {start} \n\r Endtime: {end} \n\r internal PathogenList: 94500-6, 94745-7, 94558-4", parameter.Starttime, parameter.Endtime);

            try
            {
                EpiCurveParameter epiParams = new EpiCurveParameter()
                {
                    Endtime = parameter.Endtime, Starttime = parameter.Starttime, PathogenCodes = new List <string>()
                    {
                        "94500-6", "94745-7", "94558-4"
                    }
                };
                return(_labData.Labor_Epikurve(epiParams));
            }
            catch (Exception e)
            {
                _logger.LogWarning("CALLED Labor_ErregerProTag_TTEsKSs:" + e.Message);
                return(ErrorHandling(e));
            }
        }
Beispiel #6
0
 public static AQLQuery NECPatientLaborData(string PatientID, TimespanParameter timespan)
 {
     //TODO: AQL musst zu eine MIBI AQL umgewandelt werden.
     return(new AQLQuery("NECPatientLaborData", $"SELECT e/ehr_id/value as PatientID, z/items[at0015]/value/value as ZeitpunktProbenentnahme, z/items[at0029]/value/defining_code/code_string/value as MaterialID, g/items[at0001]/value/value as Befund, g/items[at0024]/value/defining_code/code_string as KeimID, c/context/start_time/value as Befunddatum FROM EHR e CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.report-result.v1] CONTAINS (CLUSTER f[openEHR-EHR-CLUSTER.case_identification.v0] and CLUSTER z[openEHR-EHR-CLUSTER.specimen.v1] and CLUSTER j[openEHR-EHR-CLUSTER.laboratory_test_panel.v0] CONTAINS CLUSTER g[openEHR-EHR-CLUSTER.laboratory_test_analyte.v1]) WHERE c/name/value = 'Virologischer Befund' and g/items[at0001]/name = 'Nachweis' and g/items[at0024]/name = 'Virus' and e/ehr_id/value = '{PatientID}' and z/items[at0015]/value/value >= '{timespan.Starttime}' and z/items[at0015]/value/value <= '{timespan.Endtime}'"));
 }
 public EpiCurveParameter(TimespanParameter timespanParameter, List <string> pathogenCodes)
 {
     Starttime     = timespanParameter.Starttime;
     Endtime       = timespanParameter.Endtime;
     PathogenCodes = pathogenCodes;
 }