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;
     }
 }
コード例 #2
0
        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;
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public void RemoveProcedure(MedicalRecord medicalrecord, Procedure procedure)
 {
     medicalrecord.RemoveProcedure(procedure);
     AppManager.ApplicationDb.SaveChanges();
 }
コード例 #5
0
 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();
 }
コード例 #6
0
        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;
        }
コード例 #7
0
 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;
 }
コード例 #8
0
        public void UpdateMedicalRecord(MedicalRecord medicalRecordFromUI, MedicalRecord medicalRecordToDB)
        {
            if (medicalRecordFromUI != null && medicalRecordToDB != null)
            {
                medicalRecordToDB.UpdateMedicalRecord(medicalRecordFromUI);
            }

            AppManager.ApplicationDb.SaveChanges();
        }
コード例 #9
0
 public void RemoveProcedure(MedicalRecord medicalrecord, Procedure procedure)
 {
     medicalrecord.RemoveProcedure(procedure);
     AppManager.ApplicationDb.SaveChanges();
 }
コード例 #10
0
 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();
 }
コード例 #11
0
 public Procedure NewProcedure(MedicalRecord medicalrecord, Procedure procedure)
 {
     medicalrecord.Procedures.Add(procedure);
     AppManager.ApplicationDb.SaveChanges();
     return procedure;
 }
コード例 #12
0
        public MedicalRecord NewMedicalRecord(Patient patient, MedicalRecord medicalRecord)
        {
            patient.MedicalHistory.Add(medicalRecord);
            AppManager.ApplicationDb.SaveChanges();

            return medicalRecord;
        }