Changeset 1176


Ignore:
Timestamp:
May 11, 2011, 7:41:51 AM (13 years ago)
Author:
Sam Habiel
Message:

V 1.6 Beta Release

AssemblyInfo.cs: version bumped up to 1.6
CGView:

  1. Changed Popup calendar menu enable/disable code for specific menu items (simplification)
  2. Bug fixed in AddAppointmentEnabled(): Checks to see if there are any slots using the new algorithm introduced in v 1.5
  3. Resequence order of Saving/Canceling Radiology Package Call with Saving/Cancelling Appointment. Saving Cancelling appointment comes first because it may fail and thus cancel the whole transaction.
  4. BMX Events will now be raised after making/cancelling a radiology appointment.
  5. Better exception handling for making Radiology Appointments in AppointmentAddNewRadiology().

strings.ar.resx:
Fixed a mispelling.

Printing:
Improved the display of dates for Appointment Slips.

Location:
Scheduling/trunk/cs/bsdx0200GUISourceCode
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/AssemblyInfo.cs

    r1174 r1176  
    2828// by using the '*' as shown below:
    2929
    30 [assembly: AssemblyVersion("1.5.1.*")]
     30[assembly: AssemblyVersion("1.6.0.*")]
    3131
    3232//
     
    5858[assembly: AssemblyKeyFile("")]
    5959[assembly: AssemblyKeyName("")]
    60 [assembly: AssemblyFileVersionAttribute("1.5.1.0")]
     60[assembly: AssemblyFileVersionAttribute("1.6.0.0")]
    6161[assembly: ComVisibleAttribute(false)]
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs

    r1174 r1176  
    257257            this.lblResource = new System.Windows.Forms.Label();
    258258            this.panelCenter = new System.Windows.Forms.Panel();
     259            this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
    259260            this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu();
    260261            this.ctxCalGridAdd = new System.Windows.Forms.MenuItem();
     
    276277            this.splitter1 = new System.Windows.Forms.Splitter();
    277278            this.splitter2 = new System.Windows.Forms.Splitter();
    278             this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
    279279            this.panelRight.SuspendLayout();
    280280            this.panelClip.SuspendLayout();
     
    879879            this.panelCenter.Size = new System.Drawing.Size(857, 344);
    880880            this.panelCenter.TabIndex = 7;
    881             //
    882             // ctxCalendarGrid
    883             //
    884             this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    885             this.ctxCalGridAdd,
    886             this.ctxCalGridMkRadAppt,
    887             this.ctxCalGridEdit,
    888             this.ctxCalGridDelete,
    889             this.ctxCalGridCancelRadAppt,
    890             this.ctxCalGridCheckIn,
    891             this.ctxCalGridUndoCheckin,
    892             this.ctxCalGridSep1,
    893             this.ctxCalGridNoShow,
    894             this.ctxCalGridNoShowUndo,
    895             this.ctxCalGridSep2,
    896             this.ctxCalGridWalkin,
    897             this.ctxCalGridSep3,
    898             this.ctxCalGridReprintApptSlip});
    899             this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
    900             //
    901             // ctxCalGridAdd
    902             //
    903             this.ctxCalGridAdd.Index = 0;
    904             this.ctxCalGridAdd.Text = "Add Appointment";
    905             this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
    906             //
    907             // ctxCalGridMkRadAppt
    908             //
    909             this.ctxCalGridMkRadAppt.Index = 1;
    910             this.ctxCalGridMkRadAppt.Text = "Make Radiology Appointment";
    911             this.ctxCalGridMkRadAppt.Click += new System.EventHandler(this.ctxCalGridMkRadAppt_Click);
    912             //
    913             // ctxCalGridEdit
    914             //
    915             this.ctxCalGridEdit.Index = 2;
    916             this.ctxCalGridEdit.Text = "Edit Appointment";
    917             this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
    918             //
    919             // ctxCalGridDelete
    920             //
    921             this.ctxCalGridDelete.Index = 3;
    922             this.ctxCalGridDelete.Text = "Cancel Appointment";
    923             this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
    924             //
    925             // ctxCalGridCancelRadAppt
    926             //
    927             this.ctxCalGridCancelRadAppt.Index = 4;
    928             this.ctxCalGridCancelRadAppt.Text = "Cancel Radiology Appointment";
    929             this.ctxCalGridCancelRadAppt.Click += new System.EventHandler(this.ctxCalGridCancelRadAppt_Click);
    930             //
    931             // ctxCalGridCheckIn
    932             //
    933             this.ctxCalGridCheckIn.Index = 5;
    934             this.ctxCalGridCheckIn.Text = "Check In Patient";
    935             this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
    936             //
    937             // ctxCalGridUndoCheckin
    938             //
    939             this.ctxCalGridUndoCheckin.Index = 6;
    940             this.ctxCalGridUndoCheckin.Text = "&Undo Check In";
    941             this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click);
    942             //
    943             // ctxCalGridSep1
    944             //
    945             this.ctxCalGridSep1.Index = 7;
    946             this.ctxCalGridSep1.Text = "-";
    947             //
    948             // ctxCalGridNoShow
    949             //
    950             this.ctxCalGridNoShow.Index = 8;
    951             this.ctxCalGridNoShow.Text = "Mark as No Show";
    952             this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);
    953             //
    954             // ctxCalGridNoShowUndo
    955             //
    956             this.ctxCalGridNoShowUndo.Index = 9;
    957             this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
    958             this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
    959             //
    960             // ctxCalGridSep2
    961             //
    962             this.ctxCalGridSep2.Index = 10;
    963             this.ctxCalGridSep2.Text = "-";
    964             //
    965             // ctxCalGridWalkin
    966             //
    967             this.ctxCalGridWalkin.Index = 11;
    968             this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";
    969             this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);
    970             //
    971             // ctxCalGridSep3
    972             //
    973             this.ctxCalGridSep3.Index = 12;
    974             this.ctxCalGridSep3.Text = "-";
    975             //
    976             // ctxCalGridReprintApptSlip
    977             //
    978             this.ctxCalGridReprintApptSlip.Index = 13;
    979             this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip";
    980             this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click);
    981             //
    982             // panelBottom
    983             //
    984             this.panelBottom.Controls.Add(this.statusBar1);
    985             this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
    986             this.panelBottom.Location = new System.Drawing.Point(136, 368);
    987             this.panelBottom.Name = "panelBottom";
    988             this.panelBottom.Size = new System.Drawing.Size(857, 24);
    989             this.panelBottom.TabIndex = 8;
    990             //
    991             // statusBar1
    992             //
    993             this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;
    994             this.statusBar1.Location = new System.Drawing.Point(0, 0);
    995             this.statusBar1.Name = "statusBar1";
    996             this.statusBar1.Size = new System.Drawing.Size(857, 24);
    997             this.statusBar1.SizingGrip = false;
    998             this.statusBar1.TabIndex = 0;
    999             //
    1000             // splitter1
    1001             //
    1002             this.splitter1.Location = new System.Drawing.Point(128, 24);
    1003             this.splitter1.Name = "splitter1";
    1004             this.splitter1.Size = new System.Drawing.Size(8, 368);
    1005             this.splitter1.TabIndex = 9;
    1006             this.splitter1.TabStop = false;
    1007             //
    1008             // splitter2
    1009             //
    1010             this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
    1011             this.splitter2.Location = new System.Drawing.Point(993, 24);
    1012             this.splitter2.Name = "splitter2";
    1013             this.splitter2.Size = new System.Drawing.Size(3, 368);
    1014             this.splitter2.TabIndex = 10;
    1015             this.splitter2.TabStop = false;
    1016881            //
    1017882            // calendarGrid1
     
    1044909            this.calendarGrid1.MouseEnter += new System.EventHandler(this.calendarGrid1_MouseEnter);
    1045910            //
     911            // ctxCalendarGrid
     912            //
     913            this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     914            this.ctxCalGridAdd,
     915            this.ctxCalGridMkRadAppt,
     916            this.ctxCalGridEdit,
     917            this.ctxCalGridDelete,
     918            this.ctxCalGridCancelRadAppt,
     919            this.ctxCalGridCheckIn,
     920            this.ctxCalGridUndoCheckin,
     921            this.ctxCalGridSep1,
     922            this.ctxCalGridNoShow,
     923            this.ctxCalGridNoShowUndo,
     924            this.ctxCalGridSep2,
     925            this.ctxCalGridWalkin,
     926            this.ctxCalGridSep3,
     927            this.ctxCalGridReprintApptSlip});
     928            this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
     929            //
     930            // ctxCalGridAdd
     931            //
     932            this.ctxCalGridAdd.Index = 0;
     933            this.ctxCalGridAdd.Text = "Add Appointment";
     934            this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
     935            //
     936            // ctxCalGridMkRadAppt
     937            //
     938            this.ctxCalGridMkRadAppt.Index = 1;
     939            this.ctxCalGridMkRadAppt.Text = "Make Radiology Appointment";
     940            this.ctxCalGridMkRadAppt.Click += new System.EventHandler(this.ctxCalGridMkRadAppt_Click);
     941            //
     942            // ctxCalGridEdit
     943            //
     944            this.ctxCalGridEdit.Index = 2;
     945            this.ctxCalGridEdit.Text = "Edit Appointment";
     946            this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
     947            //
     948            // ctxCalGridDelete
     949            //
     950            this.ctxCalGridDelete.Index = 3;
     951            this.ctxCalGridDelete.Text = "Cancel Appointment";
     952            this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
     953            //
     954            // ctxCalGridCancelRadAppt
     955            //
     956            this.ctxCalGridCancelRadAppt.Index = 4;
     957            this.ctxCalGridCancelRadAppt.Text = "Cancel Radiology Appointment";
     958            this.ctxCalGridCancelRadAppt.Click += new System.EventHandler(this.ctxCalGridCancelRadAppt_Click);
     959            //
     960            // ctxCalGridCheckIn
     961            //
     962            this.ctxCalGridCheckIn.Index = 5;
     963            this.ctxCalGridCheckIn.Text = "Check In Patient";
     964            this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
     965            //
     966            // ctxCalGridUndoCheckin
     967            //
     968            this.ctxCalGridUndoCheckin.Index = 6;
     969            this.ctxCalGridUndoCheckin.Text = "&Undo Check In";
     970            this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click);
     971            //
     972            // ctxCalGridSep1
     973            //
     974            this.ctxCalGridSep1.Index = 7;
     975            this.ctxCalGridSep1.Text = "-";
     976            //
     977            // ctxCalGridNoShow
     978            //
     979            this.ctxCalGridNoShow.Index = 8;
     980            this.ctxCalGridNoShow.Text = "Mark as No Show";
     981            this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);
     982            //
     983            // ctxCalGridNoShowUndo
     984            //
     985            this.ctxCalGridNoShowUndo.Index = 9;
     986            this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
     987            this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
     988            //
     989            // ctxCalGridSep2
     990            //
     991            this.ctxCalGridSep2.Index = 10;
     992            this.ctxCalGridSep2.Text = "-";
     993            //
     994            // ctxCalGridWalkin
     995            //
     996            this.ctxCalGridWalkin.Index = 11;
     997            this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";
     998            this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);
     999            //
     1000            // ctxCalGridSep3
     1001            //
     1002            this.ctxCalGridSep3.Index = 12;
     1003            this.ctxCalGridSep3.Text = "-";
     1004            //
     1005            // ctxCalGridReprintApptSlip
     1006            //
     1007            this.ctxCalGridReprintApptSlip.Index = 13;
     1008            this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip";
     1009            this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click);
     1010            //
     1011            // panelBottom
     1012            //
     1013            this.panelBottom.Controls.Add(this.statusBar1);
     1014            this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
     1015            this.panelBottom.Location = new System.Drawing.Point(136, 368);
     1016            this.panelBottom.Name = "panelBottom";
     1017            this.panelBottom.Size = new System.Drawing.Size(857, 24);
     1018            this.panelBottom.TabIndex = 8;
     1019            //
     1020            // statusBar1
     1021            //
     1022            this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;
     1023            this.statusBar1.Location = new System.Drawing.Point(0, 0);
     1024            this.statusBar1.Name = "statusBar1";
     1025            this.statusBar1.Size = new System.Drawing.Size(857, 24);
     1026            this.statusBar1.SizingGrip = false;
     1027            this.statusBar1.TabIndex = 0;
     1028            //
     1029            // splitter1
     1030            //
     1031            this.splitter1.Location = new System.Drawing.Point(128, 24);
     1032            this.splitter1.Name = "splitter1";
     1033            this.splitter1.Size = new System.Drawing.Size(8, 368);
     1034            this.splitter1.TabIndex = 9;
     1035            this.splitter1.TabStop = false;
     1036            //
     1037            // splitter2
     1038            //
     1039            this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
     1040            this.splitter2.Location = new System.Drawing.Point(993, 24);
     1041            this.splitter2.Name = "splitter2";
     1042            this.splitter2.Size = new System.Drawing.Size(3, 368);
     1043            this.splitter2.TabIndex = 10;
     1044            this.splitter2.TabStop = false;
     1045            //
    10461046            // CGView
    10471047            //
     
    14021402                private void ctxCalendarGrid_Popup(object sender, System.EventArgs e)
    14031403                {
    1404             bool bEditAppointments = (EditAppointmentEnabled() && (calendarGrid1.SelectedAppointment > 0)) ;
    1405 
    1406             if (IsThisARadiologyResource())//this is a radiology resource
     1404            // our flags
     1405            bool _findApptsEnabled = (this.Document.Resources.Count > 0) ? true : false;
     1406            bool _addApptsEnabled = AddAppointmentEnabled();
     1407            bool _editApptsEnabled = EditAppointmentEnabled();
     1408            bool _isRadAppt = IsThisARadiologyResource();
     1409            bool _noShowEnabled = NoShowEnabled();
     1410            bool _undoCheckinEnabled = UndoCheckinEnabled();
     1411            //end flags
     1412
     1413            if (_isRadAppt)//this is a radiology resource
    14071414            {
    14081415                ctxCalGridAdd.Visible = false;
     
    14391446                ctxCalGridCancelRadAppt.Visible = false;
    14401447            }
    1441 
    1442                         //Toggle availability of make, edit, checkin and delete appointments
     1448           
     1449                        //Toggle availability of make, edit, checkin and delete appointments etc
    14431450                        //based on whether appropriate element is selected.
    1444                         ctxCalGridAdd.Enabled = AddAppointmentEnabled();
    1445                        
    1446                         ctxCalGridDelete.Enabled = bEditAppointments;
    1447                         ctxCalGridEdit.Enabled = bEditAppointments;
    1448                         ctxCalGridCheckIn.Enabled = bEditAppointments;
    1449                         ctxCalGridNoShow.Enabled = NoShowEnabled();
    1450             ctxCalGridNoShowUndo.Enabled = !NoShowEnabled() && calendarGrid1.SelectedAppointment > 0;
    1451                         ctxCalGridWalkin.Enabled = ctxCalGridAdd.Enabled;
    1452             ctxCalGridReprintApptSlip.Enabled = bEditAppointments;
    1453             ctxCalGridUndoCheckin.Enabled = UndoCheckinEnabled();
     1451            ctxCalGridAdd.Enabled = _addApptsEnabled && !_isRadAppt;
     1452                        ctxCalGridWalkin.Enabled = _addApptsEnabled && !_isRadAppt;
     1453            ctxCalGridEdit.Enabled = _editApptsEnabled && !_isRadAppt;;
     1454            ctxCalGridDelete.Enabled = _editApptsEnabled && !_isRadAppt;
     1455
     1456            ctxCalGridCheckIn.Enabled = _editApptsEnabled && !_isRadAppt;
     1457            ctxCalGridUndoCheckin.Enabled = _undoCheckinEnabled && !_isRadAppt;
     1458            ctxCalGridNoShow.Enabled = _noShowEnabled && _editApptsEnabled;
     1459            ctxCalGridNoShowUndo.Enabled = !_noShowEnabled && _editApptsEnabled;
     1460            ctxCalGridReprintApptSlip.Enabled = _editApptsEnabled;
    14541461
    14551462            //if the rad ones are visible, then these apply
    1456             ctxCalGridMkRadAppt.Enabled = !bEditAppointments;
    1457             ctxCalGridCancelRadAppt.Enabled = bEditAppointments;
     1463            ctxCalGridMkRadAppt.Enabled = _isRadAppt && _addApptsEnabled;
     1464            ctxCalGridCancelRadAppt.Enabled = _isRadAppt && _editApptsEnabled;
    14581465        }
    14591466
     
    16391646                if (bModAppts == false)
    16401647                    return false;
     1648
     1649                CGAvailability resultantAvail;
     1650                m_nSlots = m_Document.SlotsAvailable(dStart, dEnd, sResource, this.calendarGrid1.TimeScale, out resultantAvail);
    16411651
    16421652                bSlotsAvailable = (this.m_nSlots > 0);
     
    22092219            this.calendarGrid1.SelectedAppointment = 0;
    22102220
     2221            //Now, Cancel the appointment
     2222            this.Document.DeleteAppointment(a.AppointmentKey);
     2223
    22112224            //Cancel Radiology Exam
    22122225            CGDocumentManager.Current.DAL.CancelRadiologyExam(a.PatientID, a.RadiologyExamIEN.Value);
    22132226
    2214             //Now, Cancel the appointment
    2215             this.Document.DeleteAppointment(a.AppointmentKey);
    2216 
    22172227            //redraw the grid to display new set of appointments after this appt was removed.
    22182228            this.UpdateArrays();
     2229
     2230            RaiseRPMSEvent("BSDX SCHEDULE", a.Resource);
    22192231        }
    22202232
     
    26302642        private void AppointmentAddNewRadiology()
    26312643        {
    2632             DateTime dStart, dEnd;  //return vales for below
    2633             string sResource;       //ditto
    2634             int nAccessTypeID = 0;  //ditto
    2635 
    2636             this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource);
    2637             this.calendarGrid1.GetSelectedType(out nAccessTypeID);
    2638 
    2639             Debug.Assert(sResource != null);
    2640             Debug.Assert(dStart > DateTime.MinValue);
    2641 
    2642             //Display a dialog to collect Patient Name
    2643             DPatientLookup dPat = new DPatientLookup();
    2644             dPat.DocManager = m_DocManager;
    2645 
    2646             if (dPat.ShowDialog(this) == DialogResult.Cancel)
     2644            try
    26472645            {
     2646                DateTime dStart, dEnd;  //return vales for below
     2647                string sResource;       //ditto
     2648                int nAccessTypeID = 0;  //ditto
     2649
     2650                this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource);
     2651                this.calendarGrid1.GetSelectedType(out nAccessTypeID);
     2652
     2653                Debug.Assert(sResource != null);
     2654                Debug.Assert(dStart > DateTime.MinValue);
     2655
     2656                //Get Slots
     2657                CGAvailability resultantAvail;
     2658                m_nSlots = m_Document.SlotsAvailable(dStart, dEnd, sResource, this.calendarGrid1.TimeScale, out resultantAvail);
     2659
     2660                if (m_nSlots < 1)
     2661                {
     2662                    DialogResult dr = MessageBox.Show(this, "There are no slots available at the selected time.  Do you want to overbook this appointment?", "Clinical Scheduling", MessageBoxButtons.YesNo);
     2663                    if (dr != DialogResult.Yes)
     2664                    {
     2665                        return;
     2666                    }
     2667                }
     2668
     2669                //Display a dialog to collect Patient Name
     2670                DPatientLookup dPat = new DPatientLookup();
     2671                dPat.DocManager = m_DocManager;
     2672
     2673                if (dPat.ShowDialog(this) == DialogResult.Cancel)
     2674                {
     2675                    return;
     2676                }
     2677
     2678                int DFN = Int32.Parse(dPat.PatientIEN);
     2679                // Hospital Location IEN
     2680                int hlIEN = (from resource in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable()
     2681                             where resource.Field<string>("RESOURCE_NAME") == sResource
     2682                             select resource.Field<int>("HOSPITAL_LOCATION_ID")).FirstOrDefault();
     2683
     2684                //Get Radiology Exams from the DB
     2685                List<RadiologyExam> _radExams = CGDocumentManager.Current.DAL.GetRadiologyExamsForPatientinHL(DFN, hlIEN);
     2686
     2687                //If none found...
     2688                if (!_radExams.Any())
     2689                {
     2690                    MessageBox.Show("Patient does not have any radiology exams to register.");
     2691                    return;
     2692                }
     2693
     2694                //Display a form for the user to select radiology exams.
     2695                DRadExamsSelect _radform = new DRadExamsSelect(_radExams);
     2696
     2697                if (_radform.ShowDialog() == DialogResult.Cancel) return;
     2698
     2699                //Get some return values
     2700                int _examien = _radform.ExamIEN;
     2701                string _procedurename = _radform.ProcedureName;
     2702
     2703                //Now create and save the appointment
     2704                CGAppointment appt = new CGAppointment();
     2705                string _sNote = "Radiology Exam (" + _examien + "): " + _procedurename;
     2706                appt.CreateAppointment(dStart, dEnd, _sNote, 0, sResource);
     2707                appt.PatientID = Int32.Parse(dPat.PatientIEN);
     2708                appt.PatientName = dPat.PatientName;
     2709                appt.AccessTypeID = nAccessTypeID;
     2710                appt.RadiologyExamIEN = _examien;
     2711                appt.Patient = new Patient
     2712                {
     2713                    DFN = Convert.ToInt32(dPat.PatientIEN),
     2714                    ID = dPat.PatientPID,
     2715                    Name = dPat.PatientName,
     2716                    HRN = dPat.HealthRecordNumber,
     2717                    DOB = dPat.PatientDOB
     2718                };
     2719
     2720                this.Document.CreateAppointment(appt);
     2721
     2722                //Save Radiology Exam Schedule Info to Radiology Package
     2723                CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien, dStart);
     2724
     2725                //Print Appointment Slip if requested
     2726                if (_radform.PrintAppointmentSlip) this.PrintAppointmentSlip(appt);
     2727
     2728                //Now redraw the grid to display the new appointments
     2729                this.UpdateArrays();
     2730
     2731                //Raise event to other clients
     2732                RaiseRPMSEvent("BSDX SCHEDULE", appt.Resource);
     2733            }
     2734            catch (Exception ex)
     2735            {
     2736                string msg;
     2737                if (BMXNetLib.Piece(ex.Message, "~", 1) == "-10") // -10 means that BSDXAPI reported an error.
     2738                    msg = BMXNetLib.Piece(ex.Message, "~", 4);
     2739                else
     2740                    msg = ex.Message;
     2741
     2742                MessageBox.Show("VISTA says: \r\n" + msg, "Unable to Make Appointment");
    26482743                return;
    26492744            }
    2650 
    2651             int DFN = Int32.Parse(dPat.PatientIEN);
    2652             // Hospital Location IEN
    2653             int hlIEN = (from resource in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable()
    2654                          where resource.Field<string>("RESOURCE_NAME") == sResource
    2655                          select resource.Field<int>("HOSPITAL_LOCATION_ID")).FirstOrDefault();
    2656 
    2657             //Get Radiology Exams from the DB
    2658             List<RadiologyExam> _radExams = CGDocumentManager.Current.DAL.GetRadiologyExamsForPatientinHL(DFN, hlIEN);
    2659 
    2660             //If none found...
    2661             if (!_radExams.Any())
    2662             {
    2663                 MessageBox.Show("Patient does not have any radiology exams to register.");
    2664                 return;
    2665             }
    2666 
    2667             //Display a form for the user to select radiology exams.
    2668             DRadExamsSelect _radform = new DRadExamsSelect(_radExams);
    2669 
    2670             if (_radform.ShowDialog() == DialogResult.Cancel) return;
    2671 
    2672             //Get some return values
    2673             int _examien = _radform.ExamIEN;
    2674             string _procedurename = _radform.ProcedureName;
    2675 
    2676             //Save Radiology Exam Schedule Info to Radiology Package
    2677             CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien, dStart);
    2678 
    2679             //Now create and save the appointment
    2680             CGAppointment appt = new CGAppointment();
    2681             string _sNote = "Radiology Exam (" + _examien + "): " + _procedurename;
    2682             appt.CreateAppointment(dStart, dEnd, _sNote, 0, sResource);
    2683             appt.PatientID = Int32.Parse(dPat.PatientIEN);
    2684             appt.PatientName = dPat.PatientName;
    2685             appt.AccessTypeID = nAccessTypeID;
    2686             appt.RadiologyExamIEN = _examien;
    2687             appt.Patient = new Patient
    2688             {
    2689                 DFN = Convert.ToInt32(dPat.PatientIEN),
    2690                 ID = dPat.PatientPID,
    2691                 Name = dPat.PatientName,
    2692                 HRN = dPat.HealthRecordNumber,
    2693                 DOB = dPat.PatientDOB
    2694             };
    2695 
    2696             this.Document.CreateAppointment(appt);
    2697 
    2698             //Print Appointment Slip if requested
    2699             if (_radform.PrintAppointmentSlip) this.PrintAppointmentSlip(appt);
    2700 
    2701             //Now redraw the grid to display the new appointments
    2702             this.UpdateArrays();
    27032745        }
    27042746
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user

    r1159 r1176  
    3737    </RemoteDebugMachine>
    3838    <StartAction>Project</StartAction>
    39     <StartArguments>/s=172.16.16.108 /p=9250 /a=s.habiel /v=catdog.77</StartArguments>
     39    <StartArguments>/s=172.16.16.108 /p=9250 /a=sal,123 /v=abc.123@</StartArguments>
    4040    <StartPage>
    4141    </StartPage>
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/Printing.cs

    r1159 r1176  
    194194            sfCenter.Alignment = StringAlignment.Center; //for title & header
    195195
    196             //string s = "Appointment Reminder Slip";
    197196            s = strings.ApptReminderSlip;
    198197            g.DrawString(s, fTitle, Brushes.Black, printArea, sfCenter); //title
     
    229228            sb.AppendLine(strings.ID + ":" + "\t" + appt.Patient.ID);
    230229            sb.AppendLine();
    231             sb.AppendLine(strings.DOB + ":" + "\t" + appt.Patient.DOB.ToShortDateString());
     230            s = appt.Patient.DOB.ToString("dd") + " " + appt.Patient.DOB.ToString("MMM") + ", " + appt.Patient.DOB.Year;
     231            sb.AppendLine(strings.DOB + ":" + "\t" + s);
    232232            sb.AppendLine();
    233233            sb.AppendLine(strings.Age + ":" + "\t" + appt.Patient.UserFriendlyAge);
     
    257257            sb.AppendLine(strings.Clinic + ":" + "\t" + appt.Resource);
    258258            sb.AppendLine();
    259             sb.AppendLine(strings.Date + ":" + "\t" + appt.StartTime.ToShortDateString());
     259            s = appt.StartTime.ToString("dd") + " " + appt.StartTime.ToString("MMM") + ", " + appt.StartTime.Year;
     260            sb.AppendLine(strings.Date + ":" + "\t" + s);
    260261            sb.AppendLine();
    261262            sb.AppendLine(strings.Day + ":" + "\t" + appt.StartTime.ToString("dddd"));
     
    641642            sb.AppendLine(strings.ID + ":" + "\t" + appt.Patient.ID);
    642643            sb.AppendLine();
    643             sb.AppendLine(strings.DOB + ":" + "\t" + appt.Patient.DOB.ToShortDateString());
     644            s = appt.Patient.DOB.ToString("dd") + " " + appt.Patient.DOB.ToString("MMM") + ", " + appt.Patient.DOB.Year;
     645            sb.AppendLine(strings.DOB + ":" + "\t" + s);
    644646            sb.AppendLine();
    645647            sb.AppendLine(strings.Age + ":" + "\t" + appt.Patient.UserFriendlyAge);
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/strings.ar.resx

    r1156 r1176  
    152152  </data>
    153153  <data name="Name" xml:space="preserve">
    154     <value>اللأسم</value>
     154    <value>الأسم</value>
    155155  </data>
    156156  <data name="NoInstructionsProvided" xml:space="preserve">
Note: See TracChangeset for help on using the changeset viewer.