diff --git a/cs/bsdx0200GUISourceCode/CGView.cs b/cs/bsdx0200GUISourceCode/CGView.cs
index 2784993..c916d0d 100644
--- a/cs/bsdx0200GUISourceCode/CGView.cs
+++ b/cs/bsdx0200GUISourceCode/CGView.cs
@@ -2215,7 +2215,16 @@ namespace IndianHealthService.ClinicalScheduling
Debug.Assert(a.RadiologyExamIEN.HasValue);
- //Prior to making expensive db calls, tell the grid nothing is selected anymore so nobody would try to pick it up
+ //Can we cancel the appointment?
+ bool _canCancel = CGDocumentManager.Current.DAL.CanCancelRadExam(a.RadiologyExamIEN.Value);
+
+ if (!_canCancel)
+ {
+ MessageBox.Show(this,"You cannot cancel this request. It has either been discontinued, or registered for an examination");
+ return;
+ }
+
+ //Prior to making expensive db calls, tell the grid nothing is selected anymore so nobody would try to pick it up later
this.calendarGrid1.SelectedAppointment = 0;
//Now, Cancel the appointment
@@ -2227,6 +2236,7 @@ namespace IndianHealthService.ClinicalScheduling
//redraw the grid to display new set of appointments after this appt was removed.
this.UpdateArrays();
+ //Tell other instances that this schedule has been updated
RaiseRPMSEvent("BSDX SCHEDULE", a.Resource);
}
@@ -3469,6 +3479,13 @@ namespace IndianHealthService.ClinicalScheduling
{
return;
}
+
+ if (a.RadiologyExamIEN.HasValue)
+ {
+ MessageBox.Show("Cannot move a radiology appointment to the clipboard");
+ return;
+ }
+
m_ClipList.AddAppointment(a);
lstClip.Items.Add(a);
}
diff --git a/cs/bsdx0200GUISourceCode/DAL.cs b/cs/bsdx0200GUISourceCode/DAL.cs
index ed3794c..fce1631 100644
--- a/cs/bsdx0200GUISourceCode/DAL.cs
+++ b/cs/bsdx0200GUISourceCode/DAL.cs
@@ -232,6 +232,17 @@ namespace IndianHealthService.ClinicalScheduling
string result = _thisConnection.bmxNetLib.TransmitRPC("BSDX HOLD RAD EXAM", string.Format("{0}^{1}", DFN, examIEN));
return result == "1" ? true : false;
}
+
+ ///
+ /// Can we Cancel an Exam appointment? Exams that are discontinued, Active or Complete cannot be discontinued
+ ///
+ /// IEN of exam in 75.1 (RAD/NUC MED ORDERS) file
+ /// true or false
+ public bool CanCancelRadExam(int examIEN)
+ {
+ string result = _thisConnection.bmxNetLib.TransmitRPC("BSDX CAN HOLD RAD EXAM", examIEN.ToString());
+ return result == "1" ? true : false;
+ }
///
/// Save User Preference in DB For Printing Routing Slip
diff --git a/cs/bsdx0200GUISourceCode/bin/Release/BMXNet23.dll b/cs/bsdx0200GUISourceCode/bin/Release/BMXNet23.dll
index 2bce03d..6373f3b 100644
Binary files a/cs/bsdx0200GUISourceCode/bin/Release/BMXNet23.dll and b/cs/bsdx0200GUISourceCode/bin/Release/BMXNet23.dll differ
diff --git a/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.exe b/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.exe
index e4f94de..23e5605 100644
Binary files a/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.exe and b/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.exe differ
diff --git a/cs/bsdx0200GUISourceCode/bin/Release/ar/ClinicalScheduling.resources.dll b/cs/bsdx0200GUISourceCode/bin/Release/ar/ClinicalScheduling.resources.dll
index 83d739a..fee97cd 100644
Binary files a/cs/bsdx0200GUISourceCode/bin/Release/ar/ClinicalScheduling.resources.dll and b/cs/bsdx0200GUISourceCode/bin/Release/ar/ClinicalScheduling.resources.dll differ