예제 #1
0
        public PatientInfo(Middleware.MedicalRecord record)
        {
            InitializeComponent();
            Loaded       += Patient_Loaded;
            Name.Text     = record.getLastName() + ", " + record.getFirstName() + ", " + record.getMiddleInitial();
            ssn.Text      = record.getPatient().getSSN();
            gender.Text   = "" + record.getPatient().getGender();
            birthday.Text = record.getPatient().getBirthDate().ToShortDateString();
            string addressLineOne = record.getPatient().getAddress().getAddressLineOne();
            string addressLineTwo = record.getPatient().getAddress().getAddressLineTwo();
            string addressCity    = record.getPatient().getAddress().getCity();
            string addressState   = record.getPatient().getAddress().getState();
            string addressZip     = record.getPatient().getAddress().getZip();

            address.Text   = addressLineOne + " " + addressLineTwo + " " + addressCity + ", " + addressState + " " + addressZip;
            entryDate.Text = record.getEntryDate().ToShortDateString();
            exitDate.Text  = record.getExitDate().ToShortDateString();
            diagnosis.Text = record.getDiagnosis().getName();
            note.Text      = record.getNotes();
            insurer.Text   = record.getInsurer();
            dnr.Text       = record.getPatient().getDnrStatus().ToString();
            organ.Text     = record.getPatient().getOrganDonor().ToString();
            roomNum.Text   = record.getRoom().getRoomNumber();
            foreach (string symptom in record.getDiagnosis().getSymptoms())
            {
                symptoms.Text += symptom + ", ";
            }
            symptoms.Text = symptoms.Text.Substring(0, symptoms.Text.Length - ", ".Length);
            // attending phys
        }
예제 #2
0
        private void openRecord(object sender, RoutedEventArgs e)
        {
            string   ssn  = (M1.SelectedItem as DataRowView).Row[2].ToString();          // NEED TO FIX MAGIC NUMBER
            DateTime date = (DateTime)(M1.SelectedItem as DataRowView).Row[3];           // NEED TO FIX MAGIC NUMBER

            Middleware.MedicalRecord record = new Middleware.MedicalRecord(ssn, date);
            PatientInfo login = new PatientInfo(record);

            login.Show();
            this.Close();
        }