Пример #1
0
        private async Task LoadAllSampleTypesAsync()
        {
            try
            {
                var sampleTypes = await _sampleTypeDataAccess.GetAllDSampleTypesAsync();

                var mapped = _mapper.Map <List <SampleTypeModel> >(sampleTypes);
                SampleTypesList.AddRange(mapped);
            }
            catch (Exception ex)
            {
                PushingMessages?.Invoke(this, ex.Message);
                PushingLogs?.Invoke(this, $"{ex.Message}\n{ex.StackTrace}");
            }
        }
Пример #2
0
        private void InitializeDemoData()
        {
            var egene = new TestModel()
            {
                Id = 1, Discipline = "Molecular Biology", Description = "E Gene", SampleType = "SWAB", ResultDataType = "Numeric", Mask = "###.00", Unit = "%", IsReportable = true, Code = "", DefaultCommented = false
            };
            var rdrpgene = new TestModel()
            {
                Id = 2, Discipline = "Molecular Biology", Description = "RdRP Gene", SampleType = "SWAB", ResultDataType = "Numeric", Mask = "###.00", Unit = " ", IsReportable = false, Code = "P", DefaultCommented = false
            };

            DisciplineList.Add(new DisciplineModel()
            {
                Id = 1, Discipline = "Haematology", Code = "H"
            });
            DisciplineList.Add(new DisciplineModel()
            {
                Id = 2, Discipline = "Molecular Biology", Code = "M"
            });
            DisciplineList.Add(new DisciplineModel()
            {
                Id = 3, Discipline = "Biochemistry", Code = "B"
            });

            SampleTypesList.Add(new SampleTypeModel()
            {
                Id = 1, Description = "SERUM"
            });
            SampleTypesList.Add(new SampleTypeModel()
            {
                Id = 2, Description = "EDTA WHOLE BLOOD"
            });
            SampleTypesList.Add(new SampleTypeModel()
            {
                Id = 3, Description = "SWAB"
            });

            UnitList.Add(new UnitModel()
            {
                Id = 1, Unit = "NA"
            });
            UnitList.Add(new UnitModel()
            {
                Id = 2, Unit = "%"
            });
            UnitList.Add(new UnitModel()
            {
                Id = 3, Unit = "mg/dL"
            });

            this.TestList.Add(egene);
            this.TestList.Add(rdrpgene);

            var numeric = new ResultDataTypeModel()
            {
                Id = 1, DataType = "Numeric"
            };
            var codified = new ResultDataTypeModel()
            {
                Id = 2, DataType = "Codified"
            };
            var Textual = new ResultDataTypeModel()
            {
                Id = 3, DataType = "Textual"
            };

            this.ResultDataTypes.Add(numeric);
            this.ResultDataTypes.Add(Textual);
            this.ResultDataTypes.Add(codified);
        }