示例#1
0
        protected override void OnExecuteTask(object state)
        {
            Dictionary <string, object> paramList = new Dictionary <string, object>();
            //Get PatientType
            var patientType = His_v2.GetPatientTypeLab(settings.BenhVien_Id);

            paramList.Add("PatientType", patientType);
            //Get Employee
            var employee = His_v2.GetEmployeeLab(settings.BenhVien_Id);

            paramList.Add("Employee", employee);
            //Get Department
            var department = His_v2.GetDepartmenteLab(settings.BenhVien_Id);

            paramList.Add("Department", department);
            //Get Danh mục dịch vụ
            var dichvu = His_v2.GetDichVu();

            paramList.Add("Services", dichvu);
            //Get chỉ định dịch vụ
            var chiDinh = His_v2.GetPatientHasNotSID(settings.BenhVien_Id);

            paramList.Add("ChiDinhDichVu", chiDinh);
            InsertDataeLab_v2 dataELab = new InsertDataeLab_v2(settings, _conneLab, paramList, logger);

            taskQueue.QueueBackgroundWorkItem(token => dataELab.InsertData(token));
        }
示例#2
0
        protected override void OnExecuteTask(object state)
        {
            Dictionary <string, object> _paramList = new Dictionary <string, object>();

            using (var _conn = connHis.CreateConnection())
            {
                //Get PatientType
                IEnumerable <PatientTypeInfo> patientTypes = _conn.ExecuteQueryAsync <PatientTypeInfo>("GetPatientTypes").Result;
                _paramList.Add("PatientTypes", patientTypes);

                //GetDepartment
                IEnumerable <EmployeeInfo> employees = _conn.ExecuteQueryAsync <EmployeeInfo>("GetEmployees").Result;
                _paramList.Add("Employees", employees);

                //Get Employees
                IEnumerable <DepartmentInfo> departments = _conn.ExecuteQueryAsync <DepartmentInfo>("GetDepartments").Result;
                _paramList.Add("Departments", departments);

                //Get Services
                IEnumerable <MappingServices> mappingServices = _conn.ExecuteQueryAsync <MappingServices>("GetServices").Result;
                _paramList.Add("MappingServices", mappingServices);

                //Get Infomation services of patient
                IEnumerable <PatientHasNotSID> patientHasNots = _conn.ExecuteQueryAsync <PatientHasNotSID>("GetPatientHasNotSID").Result;
                _paramList.Add("PatientHasNotSID", patientHasNots);

                InsertDataeLab_v1 dataELab = new InsertDataeLab_v1(settings, conneLab, _paramList, _logger);
                taskQueue.QueueBackgroundWorkItem(token => dataELab.InsertData(token));
            }
        }