public SampleViewModel(Sample obj)
 {
     this.sampleObj= new Sample();
      SampleID = obj.sampleID;
      PatientID = obj.patientID;
      DoctorID = obj.doctorID;
      CreationDate = obj.creationDate;
      Tested = obj.tested;
      Result = obj.result;
 }
 public void AddCase()
 {
     Sample sampleObj = new Sample(_patient.PatientID, _selectedDoctorID, _sampleDate, _result);
     _labWorker.registerNewSample(sampleObj);
 }
Example #3
0
 public void saveTestResult(Sample sampleObj, String result)
 {
     sampleObj.setResult(this.labWorkerID, result);
 }
Example #4
0
        public void saveTestResultToDb(Sample sampleObj)
        {
            String query = String.Format("UPDATE Samples SET tested='TRUE', tested_by_lab_worker_id={0}, result='{1}' WHERE sample_id={2}", this.labWorkerID, sampleObj.result, sampleObj.getSampleIDFromDb());

            this._database.executeQuery(query);
        }
Example #5
0
        public void registerNewSample(Sample sampleObj)
        {
            String query = String.Format("INSERT INTO Samples (patient_id, doctor_id, creation_date, result) VALUES('{0}', '{1}', '{2}', '{3}')", sampleObj.patientID, sampleObj.doctorID, sampleObj.creationDate.ToString("yyyy-MM-dd"), sampleObj.result);

            this._database.executeQuery(query);
        }