private void btnSave_Click(object sender, RoutedEventArgs e) { if (TxtBox_ShortDescription.Text.Equals("")) MessageBox.Show("Adja meg a kezelés rövid leírását!", "Hiányzó adat", MessageBoxButton.OK, MessageBoxImage.Warning); else { MedicalRecord = new MedicalRecord(TxtBox_ShortDescription.Text); DialogResult = true; } }
public Object Clone() { List<Procedure> proxxx = new List<Procedure>(); foreach (Procedure proc in Procedures) { proxxx.Add((Procedure)proc.Clone()); } Object clone = new MedicalRecord( this.CreatedTimestamp, this.State, this.ShortDescription, proxxx, //this.Procedures, this.LastModifiedTimestamp); return clone; }
public void DownloadAttachment(Attachment attachment, string localPath) { Procedure procedure = (from p in appManager.ApplicationDb.Procedures from a in p.Attachments where a.Id == attachment.Id select p).FirstOrDefault(); MedicalRecord medicalRecord = (from m in appManager.ApplicationDb.MedicalRecords from p in m.Procedures where p.Id == procedure.Id select m).FirstOrDefault(); Patient patient = (from p in appManager.ApplicationDb.Patients from m in p.MedicalHistory where m.Id == medicalRecord.Id select p).FirstOrDefault(); string medicalRecordPath = String.Format("{0}/{1}", patient.Ssn, medicalRecord.Id); string ftpFileName = String.Format("{0}/{1}_{2}_{3}", medicalRecordPath, procedure.Id, attachment.Id, attachment.File); FTPConnection ftp = new FTPConnection("193.224.69.39", "balu", "szoftech", "hubasky/attachments"); ftp.DownloadFile(ftpFileName, localPath); }
public void RemoveProcedure(MedicalRecord medicalrecord, Procedure procedure) { medicalrecord.RemoveProcedure(procedure); AppManager.ApplicationDb.SaveChanges(); }
public void RemoveMedicalRecord(Patient patient, MedicalRecord medicalRecord) { //ha benne van, akkor szedjük ki! if (patient.MedicalHistory.Contains(medicalRecord)) patient.MedicalHistory.Remove(medicalRecord); AppManager.ApplicationDb.SaveChanges(); }
public void UpdateMedicalRecord(MedicalRecord newMedicalRecord) { this.CreatedTimestamp = newMedicalRecord.CreatedTimestamp; this.State = newMedicalRecord.State; this.ShortDescription = newMedicalRecord.ShortDescription; this.Procedures = newMedicalRecord.Procedures; this.LastModifiedTimestamp = newMedicalRecord.LastModifiedTimestamp; }
public void UpdateMedicalRecord(MedicalRecord medicalRecordFromUI, MedicalRecord medicalRecordToDB) { if (medicalRecordFromUI != null && medicalRecordToDB != null) { medicalRecordToDB.UpdateMedicalRecord(medicalRecordFromUI); } AppManager.ApplicationDb.SaveChanges(); }
public Procedure NewProcedure(MedicalRecord medicalrecord, Procedure procedure) { medicalrecord.Procedures.Add(procedure); AppManager.ApplicationDb.SaveChanges(); return procedure; }
public MedicalRecord NewMedicalRecord(Patient patient, MedicalRecord medicalRecord) { patient.MedicalHistory.Add(medicalRecord); AppManager.ApplicationDb.SaveChanges(); return medicalRecord; }