diff --git a/AIMS/AIMS.csproj b/AIMS/AIMS.csproj
index d49bc71..76e97aa 100644
--- a/AIMS/AIMS.csproj
+++ b/AIMS/AIMS.csproj
@@ -1280,22 +1280,16 @@
True
-
+
+
+
+
PreserveNewest
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
+
+
+
+
PreserveNewest
diff --git a/AIMS/AIMS.xml b/AIMS/AIMS.xml
index 8fe8536..093bb06 100644
--- a/AIMS/AIMS.xml
+++ b/AIMS/AIMS.xml
@@ -1,6 +1,6 @@
- Data Source=.;Initial Catalog=AIMSDB_FJZPTFYY;User ID=sa;Password=Test2020;
+ Data Source=.;Initial Catalog=AIMSDB_QHDSGRYY;User ID=sa;Password=Test2020;
Data Source=.;Initial Catalog=AIMSDB_DATA;User ID=sa;Password=Test2020;
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.7)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2))));Persist Security Info=True;User ID=smview;Password=i39;
diff --git a/AIMS/OperationAanesthesia/frmFeesRecord.cs b/AIMS/OperationAanesthesia/frmFeesRecord.cs
index 4360a2d..5de39fb 100644
--- a/AIMS/OperationAanesthesia/frmFeesRecord.cs
+++ b/AIMS/OperationAanesthesia/frmFeesRecord.cs
@@ -1482,7 +1482,18 @@ namespace AIMS.PublicUI.UI
private void bynPrint_Click(object sender, EventArgs e)
{
btnSave_Click(null, null);
+ if (PublicMethod.HospitalName.Contains("秦皇岛"))
+ {
+ PrintExcel2();
+ }
+ else
+ {
+ PrintExcel();
+ }
+ }
+ private void PrintExcel()
+ {
GoldPrinter.ExcelAccess excel = new GoldPrinter.ExcelAccess();
string strFileName = "麻醉收费单.xlt"; //模板文件名
if (FeeType == "护士") strFileName = "护士收费单.xlt";
@@ -1554,6 +1565,77 @@ namespace AIMS.PublicUI.UI
excel.Close();
}
+ private void PrintExcel2()
+ {
+ GoldPrinter.ExcelAccess excel = new GoldPrinter.ExcelAccess();
+ string strFileName = "麻醉收费单QHD.xlt"; //模板文件名
+ if (FeeType == "护士") strFileName = "护士收费单QHD.xlt";
+ string strExcelTemplateFile = Application.StartupPath;
+ strExcelTemplateFile += @"\Template\" + strFileName;
+ excel.Open(strExcelTemplateFile); //用模板文件
+
+ excel.SetCellText(2, "A", PublicMethod.HospitalName);
+ excel.SetCellText(4, "B", _record.InRoomTime.Value.ToString("yyyy-MM-dd"));
+ excel.SetCellText(4, "E", _record.ApplyDepartmentName.ToString());
+ excel.SetCellText(4, "H", _record.InHospitalNo);
+ excel.SetCellText(5, "B", _record.Name + " (" + _record.Sex + " " + _record.Age + ")");
+ excel.SetCellText(5, "H", _record.Identity);
+
+ PatientRecord Patient = PatientRecord.GetPatientRecord(_record.PatientId.Value);
+ if (FeeType == "麻醉")
+ {
+ excel.SetCellText(5, "E", DBManage.GetDictionaryValuesById(_record.Applydiagnose, "诊断"));
+ excel.SetCellText(38, "B", lblDrugs.Text);
+ excel.SetCellText(39, "B", _worker.Name);
+ excel.SetCellText(39, "D", Patient.AnesthesiaDoctor);
+ excel.SetCellText(39, "G", DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
+ }
+ else
+ {
+ excel.SetCellText(5, "E", DBManage.GetDictionaryValuesById(_record.Operation, "手术"));
+ excel.SetCellText(27, "B", Patient.OperationDoctor);
+ excel.SetCellText(27, "F", Patient.InstrumentNurse + " " + Patient.TourNurse);
+ excel.SetCellText(27, "H", Patient.AnesthesiaDoctor);
+ excel.SetCellText(28, "B", lblDrugs.Text);
+ }
+
+ int rowNum = 7;
+ for (int i = 0; i < dgvDrugs.Rows.Count; i++)
+ {
+ DataGridViewRow dr = dgvDrugs.Rows[i];
+ if (dr.Tag == null) continue;
+ FeesRecord temp = dr.Tag as FeesRecord;
+ if (temp != null)
+ {
+ excel.GetRange(rowNum, "A", rowNum, "H").Value = new string[]{
+ ( dr.Cells[3].EditedFormattedValue.ToString()),"","","","",
+ ( dr.Cells[4].EditedFormattedValue.ToString()),
+ dr.Cells[7].EditedFormattedValue.ToString(),
+ ( dr.Cells[6].EditedFormattedValue.ToString() ) };
+ rowNum++;
+ }
+ }
+ for (int i = 0; i < dgvChargsRecord.Rows.Count; i++)
+ {
+ DataGridViewRow dr = dgvChargsRecord.Rows[i];
+ if (dr.Tag == null) continue;
+ FeesRecord temp = dr.Tag as FeesRecord;
+ if (temp != null)
+ {
+ excel.GetRange(rowNum, "A", rowNum, "H").Value = new string[]{
+ ( dr.Cells[3].EditedFormattedValue.ToString()),"","","","",
+ ( temp.ChargSpec ),
+ dr.Cells[7].EditedFormattedValue.ToString(),
+ ( dr.Cells[6].EditedFormattedValue.ToString() )
+ };
+ rowNum++;
+ }
+ }
+ excel.Print();
+ this.Focus();
+ excel.Close();
+ }
+
private void buttonX1_Click(object sender, EventArgs e)
{
FeesRecordList = BFeesRecord.Select(" FeeIsDrug =1 and FeeType='" + FeeType + "' and OperationRecordId=" + _record.Id, null, RecursiveType.None, 0);
diff --git a/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs b/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs
index 012506e..26fea0c 100644
--- a/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs
+++ b/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs
@@ -32,7 +32,7 @@ namespace AIMS.OperationAanesthesia
private void frmSelectPatientNew2_Load(object sender, EventArgs e)
{
- ControlExtension.GetOperationSiteRoom(labelSite, CboOperationSite, cboRoom,"手术室");
+ ControlExtension.GetOperationSiteRoom(labelSite, CboOperationSite, cboRoom, "手术室");
FillDgv();
this.cboRoom.SelectedIndexChanged += new System.EventHandler(this.cboRoom_SelectedIndexChanged);
@@ -58,21 +58,25 @@ namespace AIMS.OperationAanesthesia
panel3.Controls.Clear();
panel2.Visible = false;
+ string cboRoomStr = "";
+ if (cboRoom.SelectedValue != null)
+ cboRoomStr = cboRoom.SelectedValue.ToString();
+
DataTable dt = new DataTable();
if (txtquery.Text.Trim() != "")
dt = SelectPatient.GetSelectPatientDataTable(txtquery.Text);
else
- dt = SelectPatient.GetSelectPatientDataTable(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoom.SelectedValue.ToString());
+ dt = SelectPatient.GetSelectPatientDataTable(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoomStr);
DataTable dt2 = new DataTable();
if (txtquery.Text.Trim() != "")
dt2 = SelectPatient.GetRelieveLockingPatientDataTable(txtquery.Text);
else
- dt2 = SelectPatient.GetRelieveLockingPatientDataTable(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoom.SelectedValue.ToString());
-
+ dt2 = SelectPatient.GetRelieveLockingPatientDataTable(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoomStr);
+
if (CboOperationSite.Visible == true && CboOperationSite.SelectedIndex > 0)
{
- dt = AIMSExtension.PublicMethod.GetNewDataTable(dt, " OperationSite ='" + CboOperationSite.SelectedValue + "' ", "");
+ dt = AIMSExtension.PublicMethod.GetNewDataTable(dt, " OperationSite ='" + CboOperationSite.SelectedValue + "' ", "");
dt2 = AIMSExtension.PublicMethod.GetNewDataTable(dt2, " OperationSite ='" + CboOperationSite.SelectedValue + "' ", "");
}
diff --git a/AIMS/Template/护士收费单QHD.xlt b/AIMS/Template/护士收费单QHD.xlt
new file mode 100644
index 0000000..1fa25d2
Binary files /dev/null and b/AIMS/Template/护士收费单QHD.xlt differ
diff --git a/AIMS/Template/麻醉收费单QHD.xlt b/AIMS/Template/麻醉收费单QHD.xlt
new file mode 100644
index 0000000..22daf28
Binary files /dev/null and b/AIMS/Template/麻醉收费单QHD.xlt differ
diff --git a/AIMSExtension/AIMSExtension.csproj b/AIMSExtension/AIMSExtension.csproj
index d1e1ba9..b99908e 100644
--- a/AIMSExtension/AIMSExtension.csproj
+++ b/AIMSExtension/AIMSExtension.csproj
@@ -44,6 +44,7 @@
+
@@ -72,6 +73,7 @@
+
diff --git a/DrawGraphManagement/PdfFilePrinter.cs b/AIMSExtension/PdfFilePrinter.cs
similarity index 99%
rename from DrawGraphManagement/PdfFilePrinter.cs
rename to AIMSExtension/PdfFilePrinter.cs
index 997a436..b69c723 100644
--- a/DrawGraphManagement/PdfFilePrinter.cs
+++ b/AIMSExtension/PdfFilePrinter.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Printing;
using System.Runtime.InteropServices;
-namespace DrawGraphManagement
+namespace AIMSExtension
{
public class PdfFilePrinter
{
diff --git a/DrawGraphManagement/DrawGraphManagement.csproj b/DrawGraphManagement/DrawGraphManagement.csproj
index 869fb5a..464b850 100644
--- a/DrawGraphManagement/DrawGraphManagement.csproj
+++ b/DrawGraphManagement/DrawGraphManagement.csproj
@@ -139,7 +139,6 @@
-
diff --git a/DrawGraphManagement/MainUp.cs b/DrawGraphManagement/MainUp.cs
index 59e5ccd..9d9080e 100644
--- a/DrawGraphManagement/MainUp.cs
+++ b/DrawGraphManagement/MainUp.cs
@@ -13,6 +13,7 @@ using System.IO;
using System.IO.Packaging;
using System.Linq;
using System.Reflection;
+using System.Threading;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Xps;
@@ -638,6 +639,8 @@ namespace DrawGraphManagement
pDoc.DefaultPageSettings.PrinterSettings.PrinterName = "Microsoft XPS Document Writer";
pDoc.Print();
+ Thread.Sleep(1000);
+
byte[] bytes = File.ReadAllBytes(Application.StartupPath + "\\" + DocumentName + ".xps");
// Print to PDF
var outputFilePath = @"E:\PatientDocuments\" + DocumentName + ".pdf";