护士收费记录
This commit is contained in:
parent
39b4542f70
commit
bd904aa9ff
@ -1199,6 +1199,9 @@
|
||||
<None Include="Template\手术排程模板.xlt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Template\护士收费单.xlt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Template\排班按月.xlt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@ -93,13 +93,13 @@ namespace AIMS.PublicUI.UI
|
||||
private void SetPageText(DataTable table)
|
||||
{
|
||||
total = table.Rows.Count;
|
||||
if (total % 10 == 0)
|
||||
if (total % 18 == 0)
|
||||
{
|
||||
pages = total / 10;
|
||||
pages = total / 18;
|
||||
}
|
||||
else
|
||||
{
|
||||
pages = total / 10 + 1;
|
||||
pages = total / 18 + 1;
|
||||
}
|
||||
lblPage.Text = currentPage + 1 + "/" + pages + ",共" + total + "条";
|
||||
}
|
||||
@ -112,8 +112,8 @@ namespace AIMS.PublicUI.UI
|
||||
private DataTable GetTableByCurrentPage(int currPage, DataTable dt)
|
||||
{
|
||||
DataTable pdt = dt.Clone();
|
||||
int index = currPage * 10;
|
||||
for (int i = index; i < index + 10; i++)
|
||||
int index = currPage * 18;
|
||||
for (int i = index; i < index + 18; i++)
|
||||
{
|
||||
if (i == total)
|
||||
{
|
||||
@ -217,15 +217,16 @@ namespace AIMS.PublicUI.UI
|
||||
}
|
||||
foreach (int id in list)
|
||||
{
|
||||
foreach (DataGridViewRow row in dgvY.Rows)
|
||||
foreach (DataRow row in ydt.Rows)
|
||||
{
|
||||
if (Convert.ToInt32(row.Cells["yId"].Value) == id)
|
||||
if (Convert.ToInt32(row["Id"]) == id)
|
||||
{
|
||||
dgvY.Rows.Remove(row);
|
||||
ydt.Rows.Remove(row);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
BindDgvY(ydt);
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
|
||||
@ -164,7 +164,7 @@
|
||||
this.panel2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.panel2.Location = new System.Drawing.Point(0, 53);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(968, 469);
|
||||
this.panel2.Size = new System.Drawing.Size(968, 509);
|
||||
this.panel2.TabIndex = 14;
|
||||
//
|
||||
// lblPage
|
||||
@ -225,7 +225,7 @@
|
||||
this.groupBox2.Controls.Add(this.dgvY);
|
||||
this.groupBox2.Location = new System.Drawing.Point(531, 24);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(424, 429);
|
||||
this.groupBox2.Size = new System.Drawing.Size(424, 472);
|
||||
this.groupBox2.TabIndex = 0;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "已选";
|
||||
@ -256,7 +256,7 @@
|
||||
this.dgvY.RowHeadersVisible = false;
|
||||
this.dgvY.RowTemplate.Height = 23;
|
||||
this.dgvY.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvY.Size = new System.Drawing.Size(418, 404);
|
||||
this.dgvY.Size = new System.Drawing.Size(418, 447);
|
||||
this.dgvY.TabIndex = 0;
|
||||
this.dgvY.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dgvY_EditingControlShowing);
|
||||
//
|
||||
@ -286,7 +286,7 @@
|
||||
this.groupBox1.Controls.Add(this.dgvD);
|
||||
this.groupBox1.Location = new System.Drawing.Point(15, 24);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(471, 432);
|
||||
this.groupBox1.Size = new System.Drawing.Size(471, 475);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "待选";
|
||||
@ -318,7 +318,7 @@
|
||||
this.dgvD.RowHeadersVisible = false;
|
||||
this.dgvD.RowTemplate.Height = 23;
|
||||
this.dgvD.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvD.Size = new System.Drawing.Size(465, 407);
|
||||
this.dgvD.Size = new System.Drawing.Size(465, 450);
|
||||
this.dgvD.TabIndex = 0;
|
||||
this.dgvD.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvD_CellDoubleClick);
|
||||
//
|
||||
@ -354,7 +354,7 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(968, 522);
|
||||
this.ClientSize = new System.Drawing.Size(968, 562);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||
|
||||
@ -58,7 +58,7 @@ namespace AIMS.PublicUI.UI
|
||||
dgvD.AutoGenerateColumns = false;
|
||||
dgvY.AutoGenerateColumns = false;
|
||||
BindCharsDICT();
|
||||
ydt = BCharges.GetChargsByCodes(chargsTemplate.ConnectId,chargsTemplate.DefaultValue);
|
||||
ydt = BCharges.GetChargsByCodes(chargsTemplate.ConnectId, chargsTemplate.DefaultValue);
|
||||
BindDgvY(ydt);
|
||||
}
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
@ -228,9 +228,9 @@ namespace AIMS.PublicUI.UI
|
||||
{
|
||||
ydr["Id"] = dr["Id"].ToString();
|
||||
ydr["Name"] = dr["Name"].ToString();
|
||||
ydr["Code"] = dr["Code"].ToString();
|
||||
ydr["Code"] = dr["Code"].ToString();
|
||||
ydr["Price"] = dr["Price"].ToString();
|
||||
ydr["Number"] = "0";
|
||||
ydr["Number"] = "1";
|
||||
ydt.Rows.Add(ydr);
|
||||
break;
|
||||
}
|
||||
@ -243,18 +243,18 @@ namespace AIMS.PublicUI.UI
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
list.Add(dgvY.CurrentRow.Cells["yId"].Value.ToString());
|
||||
|
||||
for (int id = 0; id < list.Count; id++)
|
||||
foreach (string id in list)
|
||||
{
|
||||
for (int i = ydt.Rows.Count - 1; i >= 0; i--)
|
||||
foreach (DataRow dr in ydt.Rows)
|
||||
{
|
||||
if (ydt.Rows[i]["Code"].ToString() == list[id])
|
||||
if (dr["Id"].ToString() == id)
|
||||
{
|
||||
ydt.Rows.Remove(ydt.Rows[i]);
|
||||
ydt.Rows.Remove(dr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dgvY.Rows.Remove(dgvY.CurrentRow);
|
||||
BindDgvY(ydt);
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
@ -268,7 +268,7 @@ namespace AIMS.PublicUI.UI
|
||||
}
|
||||
string applianceId = string.Join("','", list.ToArray());
|
||||
applianceId = "'" + applianceId + "'";
|
||||
string _Number = string.Join(",", number.ToArray());
|
||||
string _Number = string.Join(",", number.ToArray());
|
||||
chargsTemplate.ConnectId = applianceId;
|
||||
chargsTemplate.DefaultValue = _Number;
|
||||
chargsTemplate.OperatorId = PublicMethod.OperatorId;
|
||||
@ -301,9 +301,9 @@ namespace AIMS.PublicUI.UI
|
||||
{
|
||||
ydr["Id"] = row["Id"];
|
||||
ydr["Name"] = row["Name"].ToString();
|
||||
ydr["Code"] = row["Code"].ToString();
|
||||
ydr["Code"] = row["Code"].ToString();
|
||||
ydr["Price"] = row["Price"].ToString();
|
||||
ydr["Number"] = "0";
|
||||
ydr["Number"] = "1";
|
||||
}
|
||||
ydt.Rows.Add(ydr);
|
||||
break;
|
||||
|
||||
@ -84,6 +84,7 @@ namespace AIMS.PublicUI.UI
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增收费
|
||||
/// </summary>
|
||||
|
||||
@ -393,16 +393,25 @@ namespace AIMS.PublicUI.UI
|
||||
}
|
||||
if (chargCount > 0)
|
||||
{
|
||||
lblDrugs.Text = string.Format(" 药品:{0}元 其他:{1}元 ", chargValue, chargValue2);
|
||||
if (_record.InRoomTime != null && _record.OutRoomTime != null)
|
||||
{
|
||||
lblDrugs.Text += "在室时长:" + Math.Round(((TimeSpan)(_record.OutRoomTime - _record.InRoomTime)).TotalHours, 2) + " h ";
|
||||
}
|
||||
if (FeeType != "护士")
|
||||
{
|
||||
lblDrugs.Text = string.Format(" 药品:{0}元 其他:{1}元 ", chargValue, chargValue2);
|
||||
if (_record.InRoomTime != null && _record.OutRoomTime != null)
|
||||
{
|
||||
lblDrugs.Text += "在室时长:" + Math.Round(((TimeSpan)(_record.OutRoomTime - _record.InRoomTime)).TotalHours, 2) + " h ";
|
||||
}
|
||||
if (_record.AnesthesiaBeginTime != null && _record.AnesthesiaEndTime != null)
|
||||
{
|
||||
lblDrugs.Text += "麻醉时长:" + Math.Round(((TimeSpan)(_record.AnesthesiaEndTime - _record.AnesthesiaBeginTime)).TotalHours, 2) + " h";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (chargValue > 0)
|
||||
lblDrugs.Text = string.Format(" 药品:{0}元 手术耗材:{1}元 ", chargValue, chargValue2);
|
||||
else
|
||||
lblDrugs.Text = string.Format(" 手术耗材:{0}元 ", chargValue2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -487,13 +496,17 @@ namespace AIMS.PublicUI.UI
|
||||
if (row + i >= drugdt.Rows.Count) break;
|
||||
int usedose = 0;
|
||||
ButtonX lb = new ButtonX();
|
||||
lb.Text = drugdt.Rows[row + i]["Name"].ToString().Trim() + " " + drugdt.Rows[row + i]["Stand"].ToString().Trim() + " " + drugdt.Rows[row + i]["Price"].ToString().Trim();
|
||||
string name = drugdt.Rows[row + i]["Name"].ToString().Trim() + " " + drugdt.Rows[row + i]["Stand"].ToString().Trim();
|
||||
//if (name.Length > 30) name = name.Substring(0, 30);
|
||||
if (name.Contains("\r\n"))
|
||||
name = name.Replace("\r\n", "");
|
||||
lb.Text = name + " " + drugdt.Rows[row + i]["Price"].ToString().Trim();
|
||||
lb.Tag = drugdt.Rows[row + i]["Id"].ToString();
|
||||
lb.Font = new System.Drawing.Font("微软雅黑", 9.5f, FontStyle.Bold);
|
||||
|
||||
lb.Size = new System.Drawing.Size(panelleftsel.Width - (usedose * 43) - 8, 30);
|
||||
lb.Font = new System.Drawing.Font("微软雅黑", 9f, FontStyle.Bold);
|
||||
lb.Tooltip = drugdt.Rows[row + i]["Name"].ToString().Trim() + " " + drugdt.Rows[row + i]["Stand"].ToString().Trim() + " " + drugdt.Rows[row + i]["Price"].ToString().Trim();
|
||||
lb.Size = new System.Drawing.Size(panelleftsel.Width - (usedose * 43) - 8, 31);
|
||||
lb.Cursor = Cursors.Hand;
|
||||
lb.ColorTable = eButtonColor.Orange;// Flat;
|
||||
lb.ColorTable = eButtonColor.Orange; ;
|
||||
lb.BackColor = Color.SkyBlue;
|
||||
lb.TextAlignment = eButtonTextAlignment.Left;
|
||||
lb.Parent = panelleftsel;
|
||||
@ -574,6 +587,7 @@ namespace AIMS.PublicUI.UI
|
||||
btnSave.Focus();
|
||||
Save(dgvDrugs, 1);
|
||||
Save(dgvChargsRecord, 2);
|
||||
SetChargDrugPrice();
|
||||
|
||||
new frmMessageBox().Show();
|
||||
}
|
||||
@ -635,6 +649,7 @@ namespace AIMS.PublicUI.UI
|
||||
feesR.FeeSerial = dr.Cells[2].EditedFormattedValue.ToString();
|
||||
feesR.ChargName = dr.Cells[3].EditedFormattedValue.ToString();
|
||||
feesR.ChargSpec = dr.Cells[4].EditedFormattedValue.ToString();
|
||||
if (feesR.ChargSpec.Contains("\r\n")) feesR.ChargSpec = feesR.ChargSpec.Replace("\r\n", "");
|
||||
feesR.Unit = dr.Cells[6].EditedFormattedValue.ToString();
|
||||
feesR.FeeNum = dr.Cells[7].EditedFormattedValue.ToString();
|
||||
feesR.FeeClass = dr.Cells[1].EditedFormattedValue.ToString();
|
||||
@ -981,14 +996,15 @@ namespace AIMS.PublicUI.UI
|
||||
private void btnTypeManager_Click(object sender, EventArgs e)
|
||||
{
|
||||
frmAnaesthesiaEvents fae = new frmAnaesthesiaEvents();
|
||||
fae.Type = 4;
|
||||
fae.Type = (FeeType == "护士") ? 5 : 4;
|
||||
fae.ShowDialog();
|
||||
BindAnaesthesiaEvents();
|
||||
}
|
||||
private void btnTemp_Click(object sender, EventArgs e)
|
||||
{
|
||||
_dataGridView.ClearSelection();
|
||||
frmChargsTemplateNew frmChargSelect = new frmChargsTemplateNew();
|
||||
frmChargSelect.TemplateType = "麻醉";
|
||||
frmChargSelect.TemplateType = FeeType;
|
||||
frmChargSelect.FormClosed += (s, er) =>
|
||||
{
|
||||
if (frmChargSelect.Tag == null) return;
|
||||
@ -999,7 +1015,7 @@ namespace AIMS.PublicUI.UI
|
||||
}
|
||||
AddNewNullRows();
|
||||
dgvChargsRecord.ClearSelection();
|
||||
SetChargDrugPrice();
|
||||
SetChargDrugPrice();
|
||||
};
|
||||
frmChargSelect.ShowDialog();
|
||||
}
|
||||
@ -1140,8 +1156,8 @@ namespace AIMS.PublicUI.UI
|
||||
AddNewNullRows();
|
||||
SetChargDrugPrice();
|
||||
|
||||
_dataGridView.CurrentCell = _dataGridView.Rows[_dataGridView.Rows.Count - 1].Cells[3];
|
||||
_dataGridView.BeginEdit(true);
|
||||
//_dataGridView.CurrentCell = _dataGridView.Rows[_dataGridView.Rows.Count - 1].Cells[3];
|
||||
//_dataGridView.BeginEdit(true);
|
||||
|
||||
if (dgvYP.Visible == true)
|
||||
{
|
||||
@ -1420,7 +1436,7 @@ namespace AIMS.PublicUI.UI
|
||||
private void TxtOperatorName_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
frmOperationDoctor = new PublicUI.UI.frmSelectPerson();
|
||||
frmOperationDoctor.PersonType = "麻醉医生";
|
||||
frmOperationDoctor.PersonType = (FeeType == "护士") ? "医生" : "麻醉医生";
|
||||
frmOperationDoctor.SelectDepartmentName = _record.ApplyDepartmentName;
|
||||
frmOperationDoctor.SelectPersonData = SelectOperationDoctorData;
|
||||
frmOperationDoctor.FormClosed += new FormClosedEventHandler(frmOperationDoctor_FormClosed);
|
||||
@ -1445,6 +1461,7 @@ namespace AIMS.PublicUI.UI
|
||||
|
||||
GoldPrinter.ExcelAccess excel = new GoldPrinter.ExcelAccess();
|
||||
string strFileName = "麻醉收费单.xlt"; //模板文件名
|
||||
if (FeeType == "护士") strFileName = "护士收费单.xlt";
|
||||
string strExcelTemplateFile = Application.StartupPath;
|
||||
strExcelTemplateFile += @"\Template\" + strFileName;
|
||||
excel.Open(strExcelTemplateFile); //用模板文件
|
||||
@ -1455,22 +1472,28 @@ namespace AIMS.PublicUI.UI
|
||||
excel.SetCellText(4, "H", _record.InHospitalNo);
|
||||
excel.SetCellText(5, "B", _record.Name + " (" + _record.Sex + " " + _record.Age + ")");
|
||||
excel.SetCellText(5, "H", _record.Identity);
|
||||
excel.SetCellText(5, "E", DBManage.GetDictionaryValuesById(_record.Applydiagnose, "诊断"));
|
||||
excel.SetCellText(38, "B", lblDrugs.Text);
|
||||
excel.SetCellText(39, "B", _worker.Name);
|
||||
if (_record.OperationDoctor != null && _record.OperationDoctor.Trim() != "")
|
||||
|
||||
PatientRecord Patient = PatientRecord.GetPatientRecord(_record.PatientId.Value);
|
||||
if (FeeType == "麻醉")
|
||||
{
|
||||
string AnesthesiaDoctor = _record.OperationDoctor;
|
||||
if (AnesthesiaDoctor.Contains(',')) AnesthesiaDoctor = AnesthesiaDoctor.Split(',')[0];
|
||||
Person son = BPerson.SelectSingle(" id in (" + AnesthesiaDoctor + ")", null, RecursiveType.Parent, 1);
|
||||
if (son != null)
|
||||
excel.SetCellText(39, "D", son.Name);
|
||||
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"));
|
||||
}
|
||||
excel.SetCellText(39, "G", DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
|
||||
int rowNum = 6;
|
||||
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, "I", Patient.AnesthesiaDoctor);
|
||||
excel.SetCellText(28, "B", lblDrugs.Text);
|
||||
}
|
||||
|
||||
int rowNum = 7;
|
||||
for (int i = 0; i < dgvDrugs.Rows.Count; i++)
|
||||
{
|
||||
rowNum++;
|
||||
DataGridViewRow dr = dgvDrugs.Rows[i];
|
||||
if (dr.Tag == null) continue;
|
||||
FeesRecord temp = dr.Tag as FeesRecord;
|
||||
@ -1482,11 +1505,11 @@ namespace AIMS.PublicUI.UI
|
||||
dr.Cells[7].EditedFormattedValue.ToString(),
|
||||
( dr.Cells[6].EditedFormattedValue.ToString() ) ,
|
||||
(dr.Cells[8].EditedFormattedValue.ToString() ) };
|
||||
rowNum++;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < dgvChargsRecord.Rows.Count; i++)
|
||||
{
|
||||
rowNum++;
|
||||
DataGridViewRow dr = dgvChargsRecord.Rows[i];
|
||||
if (dr.Tag == null) continue;
|
||||
FeesRecord temp = dr.Tag as FeesRecord;
|
||||
@ -1494,11 +1517,12 @@ namespace AIMS.PublicUI.UI
|
||||
{
|
||||
excel.GetRange(rowNum, "A", rowNum, "I").Value = new string[]{
|
||||
( dr.Cells[3].EditedFormattedValue.ToString()),"","","","",
|
||||
( dr.Cells[4].EditedFormattedValue.ToString()),
|
||||
( temp.ChargSpec ),
|
||||
dr.Cells[7].EditedFormattedValue.ToString(),
|
||||
( dr.Cells[6].EditedFormattedValue.ToString() ) ,
|
||||
(dr.Cells[8].EditedFormattedValue.ToString() )
|
||||
};
|
||||
rowNum++;
|
||||
}
|
||||
}
|
||||
excel.Print();
|
||||
|
||||
BIN
AIMS/Template/护士收费单.xlt
Normal file
BIN
AIMS/Template/护士收费单.xlt
Normal file
Binary file not shown.
@ -956,7 +956,7 @@ namespace DocumentManagement
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append("insert into [PrintDocument](");
|
||||
strSql.Append("[PatientId],TemplateId,[XmlFileName],[XmlFile],[XmlStatic],");
|
||||
strSql.Append(" [IsValid],[OperatorNo],[OperatorDate],[RecordId],[Remark]");
|
||||
strSql.Append(" [IsValid],[OperatorNo],[OperatorDate],[RecordId],[Remark],[OrderNo]");
|
||||
strSql.Append(")");
|
||||
strSql.Append(" values (");
|
||||
strSql.Append("" + model.PatientId + ",");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user