예제 #1
0
 public static AQLQuery LaborEpiCurve(DateTime date, EpiCurveParameter parameter)
 {
     return(new AQLQuery("LaborEpiCurve", $@"SELECT e/ehr_id/value as PatientID,
                            i/items[at0001]/value/value as FallID,
                            d/items[at0001]/value/defining_code/code_string as Flag,
                            d/items[at0024]/value/defining_code/code_string as VirusCode,
                            d/items[at0024]/value/value as Virus,
                            m/items[at0015]/value/value as Datum
                     FROM EHR e
                     CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.report-result.v1]
                         CONTAINS (CLUSTER i[openEHR-EHR-CLUSTER.case_identification.v0] 
                         and OBSERVATION v[openEHR-EHR-OBSERVATION.laboratory_test_result.v1] 
                             CONTAINS (CLUSTER m[openEHR-EHR-CLUSTER.specimen.v1] 
                             and CLUSTER s[openEHR-EHR-CLUSTER.laboratory_test_panel.v0] 
                                 CONTAINS (CLUSTER d[openEHR-EHR-CLUSTER.laboratory_test_analyte.v1])))
                     WHERE c/name/value='Virologischer Befund' 
                     and d/items[at0001]/name/value='Nachweis' 
                     and d/items[at0024]/value/defining_code/code_string MATCHES { parameter.PathogenCodesToAqlMatchString() }
                     and m/items[at0015]/value/value>='{ date.ToString("yyyy-MM-dd") }' and m/items[at0015]/value/value<'{ date.AddDays(1).ToString("yyyy-MM-dd") }'"));
 }
예제 #2
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));
            }
        }
예제 #3
0
        public void ProcessorTest()
        {
            RestDataAccess _data = TestConnection.Initialize();

            EpiCurveParameter parameter = new EpiCurveParameter
            {
                Starttime     = new DateTime(2021, 1, 1),
                Endtime       = new DateTime(2021, 1, 10),
                PathogenCodes = new List <string>()
                {
                    "94500-6", "94745-7", "94558-4"
                }
            };

            EpiCurveFactory      epiCurveFactory = new EpiCurveFactory(_data, NullLogger <EpiCurveFactory> .Instance);
            List <EpiCurveModel> actual          = epiCurveFactory.Process(parameter);
            List <EpiCurveModel> expected        = GetExpectedEpiCurveModels();

            Assert.Equal(expected.Count, actual.Count);

            for (int i = 0; i < actual.Count; i++)
            {
                Assert.Equal(expected[i].Anzahl, actual[i].Anzahl);
                Assert.Equal(expected[i].Anzahl_cs, actual[i].Anzahl_cs);
                Assert.Equal(expected[i].anzahl_gesamt, actual[i].anzahl_gesamt);
                Assert.Equal(expected[i].anzahl_gesamt_av28, actual[i].anzahl_gesamt_av28);
                Assert.Equal(expected[i].anzahl_gesamt_av7, actual[i].anzahl_gesamt_av7);
                Assert.Equal(expected[i].Datum, actual[i].Datum);
                Assert.Equal(expected[i].ErregerBEZL, actual[i].ErregerBEZL);
                Assert.Equal(expected[i].ErregerBEZL, actual[i].ErregerBEZL);
                Assert.Equal(expected[i].ErregerID, actual[i].ErregerID);
                Assert.Equal(expected[i].MAVG28, actual[i].MAVG28);
                Assert.Equal(expected[i].MAVG28_cs, actual[i].MAVG28_cs);
                Assert.Equal(expected[i].MAVG7, actual[i].MAVG7);
                Assert.Equal(expected[i].MAVG7_cs, actual[i].MAVG7_cs);
                Assert.Equal(expected[i].StationID, actual[i].StationID);
            }
        }
예제 #4
0
 public List <EpiCurveModel> Labor_Epikurve(EpiCurveParameter parameter)
 {
     return(_epiCurveFac.Process(parameter));
 }