コード例 #1
0
 public CtrlOPVitalsDAL(ref ConcurrentQueue <RawData> RawDataQueue, ref ConcurrentQueue <RawData> saveDataQueue, ref DAQSettingsDTO daqSettings)
 {
     _RawDataQueue      = RawDataQueue;
     _saveDataQueue     = saveDataQueue;
     _daqSettings       = daqSettings;
     fileManager        = new FileManager();
     employee           = new EmployeeDatabase();
     DaqAsync           = new AsyncDaq(_RawDataQueue, _saveDataQueue, _daqSettings);
     _bpDataSequenceDTO = new BPDataSequenceDTO();
     _saveDataInFile    = new SaveDataInFile(_daqSettings, _saveDataQueue, fileManager, _bpDataSequenceDTO);
     _clinicalDatabase  = new ClinicalDatabase(new ParameterBuilder());
     _transdusorDTO     = new TransdusorDTO();
     pathcomment        = "";
     pathoperation      = "";
 }
コード例 #2
0
        public void SaveMeasurement_InsertEmployee_AddEmployeeWasCalled()
        {
            var               parameterBuilder = new MuckParameterBuilder();
            var               uut            = new ClinicalDatabase(parameterBuilder);
            EmployeeDTO       employee       = new EmployeeDTO();
            OperationDTO      operation      = new OperationDTO();
            PatientDTO        patient        = new PatientDTO();
            DAQSettingsDTO    daq            = new DAQSettingsDTO();
            BPDataSequenceDTO bpDataSequence = new BPDataSequenceDTO();
            TransdusorDTO     transdusor     = new TransdusorDTO();

            uut.SaveMeasurement(employee, operation, patient, daq, bpDataSequence, transdusor);

            Assert.That(parameterBuilder.WasAddEmployeeCalled, Is.EqualTo(true));
        }
コード例 #3
0
 public void AddTransdusor(SqlCommand cmd, TransdusorDTO transdusor)
 {
     cmd.Parameters.AddWithValue("@Transdusor_Identification", transdusor.Transdusor_Identification_);
 }
コード例 #4
0
        public bool SaveMeasurement(EmployeeDTO employee, OperationDTO operation, PatientDTO patient, DAQSettingsDTO DAQ, BPDataSequenceDTO dataSequence, TransdusorDTO transdusor, string pathcomment, string pathoperation)
        {
            long   OperationID_;
            bool   saved = true;
            int    BPdataID_;
            string insertStringParamOperation = @"INSERT INTO Operation(OPNurseFirstName, OPNurseLastName, OPNurseIDNumber, NumberOFAlarms, Comments, DurationOperation_hour, DurationOperation_min, DurationOperation_sec, PatientCPR, Complikations)
                                        OUTPUT INSERTED.OperationID
                                        VALUES(@OPNurseFirstName, @OPNurseLastName, @OPNurseIDNumber, @NumberOFAlarms, @Comments, @DurationOperation_hour, @DurationOperation_min, @DurationOperation_sec, @PatientCPR, @Complikations)";

            using (SqlCommand cmd = new SqlCommand(insertStringParamOperation, OpenConnection))
            {
                parameterBuilder_.AddEmployee(cmd, employee);
                parameterBuilder_.AddOperation(cmd, operation);
                parameterBuilder_.AddComments(cmd, pathcomment);
                parameterBuilder_.AddPatient(cmd, patient);
                OperationID_ = (long)cmd.ExecuteScalar();
            }

            string insertStringParamBPDataSequence = @"INSERT INTO BPDataSequence( Raw_Data, Samplerate_hz, Interval_sec, NumberOfSequences, SequenceDuration_sec, Data_Format, Bin_or_Text, Measurement_Format_Type, ConversionConstant_mmhgprmV, ZeroPoint_mmHg, Transdusor_Identification, OperationID )
                                        OUTPUT INSERTED.BPdataID 
                                        VALUES(@Raw_Data,@Samplerate_hz, @Interval_sec, @NumberOfSequences, @SequenceDuration_sec, @Data_Format, @Bin_or_Text, @Measurement_Format_Type,@ConversionConstant_mmhgprmV,@ZeroPoint_mmHg,@Transdusor_Identification,@OperationID)";

            using (SqlCommand cmd = new SqlCommand(insertStringParamBPDataSequence, OpenConnection))
            {
                parameterBuilder_.AddRawData(cmd, Zipfolder(pathoperation));
                parameterBuilder_.AddDAQ(cmd, DAQ);
                parameterBuilder_.AddDataSequence(cmd, dataSequence);
                parameterBuilder_.AddTransdusor(cmd, transdusor);
                cmd.Parameters.AddWithValue("@OperationID", OperationID_);

                BPdataID_ = (int)cmd.ExecuteScalar();
            }
            return(saved);
        }
コード例 #5
0
 public void AddTransdusor(SqlCommand cmd, TransdusorDTO transdusor)
 {
     WasAddTransdusorCalled = true;
 }