📄 blsy.frm
字号:
V1 = " │ │ │性│年│ │住院│治疗│手│ │"
V2 = " 病案号 │ 住院号 │ 姓 名 │ │ │ 出院日期 │ │ │术│出院科室│经治医师 "
V3 = " │ │ │别│龄│ │天数│结果│否│ │"
U2 = "─────┼────┼────┼─┼─┼─────┼──┼──┼─┼────┼─────"
U3 = "─────┴────┴────┴─┴─┴─────┴──┴──┴─┴────┴─────"
Printer.ScaleMode = 6
Printer.PaperSize = 39
Printer.FontName = "宋体"
Printer.FontSize = 11
Data1.Recordset.MoveFirst
XXXX = Data1.Recordset!ICD9
Printer.Print "疾病编码:" + CStr(XXXX) + " 疾病名称:" + CStr(Data1.Recordset!疾病诊断) + " " + DATE1 + " 至 " + DATE2
Printer.Print U1
Printer.Print V1
Printer.Print V2
Printer.Print V3
Do While Not Data1.Recordset.EOF
If XXXX <> Data1.Recordset!ICD9 Then
Printer.Print U3
Printer.Print " 制表: " + Form3.sbar.Panels(2) + " " + CStr(Date) + " " + CStr(Time)
Printer.Print
Printer.Print
XXXX = Data1.Recordset!ICD9
Printer.Print "疾病编码:" + CStr(XXXX) + " 疾病名称:" + CStr(Data1.Recordset!疾病诊断) + " " + DATE1 + " 至 " + DATE2
Printer.Print U1
Printer.Print V1
Printer.Print V2
Printer.Print V3
End If
Printer.Print U2
U = ""
NL = CStr(Year(Data1.Recordset!入院日期) - Year(Data1.Recordset!出生日期))
U = U + Space(10 - DxLen(Data1.Recordset!病案号)) + Data1.Recordset!病案号 + "│"
U = U + Space(8 - DxLen(Data1.Recordset!住院号)) + Data1.Recordset!住院号 + "│"
U = U + Space(8 - DxLen(Data1.Recordset!患者姓名)) + Data1.Recordset!患者姓名 + "│"
U = U + Space(2 - DxLen(Data1.Recordset!性别)) + Data1.Recordset!性别 + "│"
U = U + Space(2 - DxLen(CStr(NL))) + CStr(NL) + "│"
U = U + Space(10 - DxLen(CStr(Data1.Recordset!出院日期))) + CStr(Data1.Recordset!出院日期) + "│"
TS = Data1.Recordset!出院日期 - Data1.Recordset!入院日期
U = U + Space(4 - DxLen(CStr(TS))) + CStr(TS) + "│"
U = U + Space(4 - DxLen(Data1.Recordset!治疗结果)) + Data1.Recordset!治疗结果 + "│"
If Data1.Recordset!手术 <> " " Then
sss = "是"
Else
sss = "否"
End If
U = U + Space(2 - DxLen(CStr(sss))) + CStr(sss) + "│"
U = U + Space(8 - DxLen(Data1.Recordset!科室名称)) + Data1.Recordset!科室名称 + "│"
U = U + Data1.Recordset!经治医师
Printer.Print U
Data1.Recordset.MoveNext
Loop
Printer.Print U3
Printer.Print " 制表: " + Form3.sbar.Panels(2) + " " + CStr(Date) + " " + CStr(Time)
Printer.EndDoc
End Sub
Sub PRINT_2() '病理诊断索引
U1 = "─────┬────┬────┬─┬─┬─────┬──┬─┬────┬─────"
V1 = " │ │ │性│年│ │住院│手│ │"
V2 = " 病案号 │ 住院号 │ 姓 名 │ │ │ 出院日期 │ │术│出院科室│经治医师 "
V3 = " │ │ │别│龄│ │天数│否│ │"
U2 = "─────┼────┼────┼─┼─┼─────┼──┼─┼────┼─────"
U3 = "─────┴────┴────┴─┴─┴─────┴──┴─┴────┴─────"
Printer.ScaleMode = 6
Printer.PaperSize = 39
Printer.FontName = "宋体"
Printer.FontSize = 11
Data1.Recordset.MoveFirst
XXXX = Data1.Recordset!ICD9
Printer.Print "病理编码:" + CStr(XXXX) + " 病理名称:" + CStr(Data1.Recordset!病理诊断) + " " + DATE1 + " 至 " + DATE2
Printer.Print U1
Printer.Print V1
Printer.Print V2
Printer.Print V3
Do While Not Data1.Recordset.EOF
If XXXX <> Data1.Recordset!ICD9 Then
Printer.Print U3
Printer.Print " 制表: " + Form3.sbar.Panels(2) + " " + CStr(Date) + " " + CStr(Time)
Printer.Print
Printer.Print
XXXX = Data1.Recordset!ICD9
Printer.Print "病理编码:" + CStr(XXXX) + " 病理名称:" + CStr(Data1.Recordset!病理诊断) + " " + DATE1 + " 至 " + DATE2
Printer.Print U1
Printer.Print V1
Printer.Print V2
Printer.Print V3
End If
Printer.Print U2
U = ""
NL = CStr(Year(Data1.Recordset!入院日期) - Year(Data1.Recordset!出生日期))
U = U + Space(10 - DxLen(Data1.Recordset!病案号)) + Data1.Recordset!病案号 + "│"
U = U + Space(8 - DxLen(Data1.Recordset!住院号)) + Data1.Recordset!住院号 + "│"
U = U + Space(8 - DxLen(Data1.Recordset!患者姓名)) + Data1.Recordset!患者姓名 + "│"
U = U + Space(2 - DxLen(Data1.Recordset!性别)) + Data1.Recordset!性别 + "│"
U = U + Space(2 - DxLen(CStr(NL))) + CStr(NL) + "│"
U = U + Space(10 - DxLen(CStr(Data1.Recordset!出院日期))) + CStr(Data1.Recordset!出院日期) + "│"
TS = Data1.Recordset!出院日期 - Data1.Recordset!入院日期
U = U + Space(4 - DxLen(CStr(TS))) + CStr(TS) + "│"
If Data1.Recordset!手术 <> " " Then
sss = "是"
Else
sss = "否"
End If
U = U + Space(2 - DxLen(CStr(sss))) + CStr(sss) + "│"
U = U + Space(8 - DxLen(Data1.Recordset!科室名称)) + Data1.Recordset!科室名称 + "│"
U = U + Data1.Recordset!经治医师
Printer.Print U
Data1.Recordset.MoveNext
Loop
Printer.Print U3
Printer.Print " 制表: " + Form3.sbar.Panels(2) + " " + CStr(Date) + " " + CStr(Time)
Printer.EndDoc
End Sub
Sub PRINT_3() '手术索引
U1 = "─────┬────┬────┬────┬─────┬─────┬─────┬─────"
'V1 = " │ │ │ │ │ │ │"
V2 = " 病案号 │ 住院号 │ 姓 名 │愈合等级│ 麻醉方法 │ 手术日期 │ 出院日期 │手术医师 "
'V3 = " │ │ │ │ │ │ │"
U2 = "─────┼────┼────┼────┼─────┼─────┼─────┼─────"
U3 = "─────┴────┴────┴────┴─────┴─────┴─────┴─────"
Printer.ScaleMode = 6
Printer.PaperSize = 39
Printer.FontName = "宋体"
Printer.FontSize = 11
Data1.Recordset.MoveFirst
XXXX = Data1.Recordset!ICD9
Printer.Print "手术编码:" + CStr(XXXX) + " 手术名称:" + CStr(Data1.Recordset!手术名称) + " " + DATE1 + " 至 " + DATE2
Printer.Print U1
Printer.Print V2
Do While Not Data1.Recordset.EOF
If XXXX <> Data1.Recordset!ICD9 Then
Printer.Print U3
Printer.Print " 制表: " + Form3.sbar.Panels(2) + " " + CStr(Date) + " " + CStr(Time)
Printer.Print
Printer.Print
XXXX = Data1.Recordset!ICD9
Printer.Print "手术编码:" + CStr(XXXX) + " 手术名称:" + CStr(Data1.Recordset!手术名称) + " " + DATE1 + " 至 " + DATE2
Printer.Print U1
Printer.Print V2
End If
Printer.Print U2
U = ""
U = U + Space(10 - DxLen(Data1.Recordset!病案号)) + Data1.Recordset!病案号 + "│"
U = U + Space(8 - DxLen(Data1.Recordset!住院号)) + Data1.Recordset!住院号 + "│"
U = U + Space(8 - DxLen(Data1.Recordset!患者姓名)) + Data1.Recordset!患者姓名 + "│"
U = U + Space(8 - DxLen(Data1.Recordset!愈合等级)) + Data1.Recordset!愈合等级 + "│"
U = U + Space(10 - DxLen(CStr(Data1.Recordset!麻醉方法))) + CStr(Data1.Recordset!麻醉方法) + "│"
U = U + Space(10 - DxLen(CStr(Data1.Recordset!手术日期))) + CStr(Data1.Recordset!手术日期) + "│"
U = U + Space(10 - DxLen(CStr(Data1.Recordset!出院日期))) + CStr(Data1.Recordset!出院日期) + "│"
U = U + Data1.Recordset!手术医师
Printer.Print U
Data1.Recordset.MoveNext
Loop
Printer.Print U3
Printer.Print " 制表: " + Form3.sbar.Panels(2) + " " + CStr(Date) + " " + CStr(Time)
Printer.EndDoc
End Sub
Private Sub Command3_Click()
Data1.Refresh
If Data1.Recordset.EOF Then
Exit Sub
End If
If Me.Tag = "0" Then
PRINT_1
End If
If Me.Tag = "1" Then
PRINT_2
End If
If Me.Tag = "2" Then
PRINT_3
End If
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
If IsDate(DATE1) And IsDate(DATE2) Then
DDS = "BA_JBFLSY '" + Me.Tag + "','" + TEXT1 + "','" + CStr(DATE1) + "','" + CStr(DATE2) + "'"
Data1.RecordSource = DDS
Data1.Refresh
End If
End Sub
Private Sub date1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And IsDate(DATE1) Then
DATE2.SetFocus
End If
End Sub
Private Sub date2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And IsDate(DATE2) And IsDate(DATE1) Then
Command2_Click
End If
End Sub
Private Sub date2_GotFocus()
DATE2.SelStart = 0
DATE2.SelLength = Len(DATE2)
End Sub
Private Sub Form_Activate()
Call Command2_Click
'DATE1.SetFocus
End Sub
Private Sub Form_Load()
Data1.Connect = DxPassWord
Data1.DatabaseName = "207his"
Me.Top = 0
Me.Left = 0
Me.Width = Screen.Width
Me.Height = Screen.Height
DATE1 = DateAdd("M", -1, Date)
DATE2 = Date
End Sub
Private Sub Form_Resize()
On Error GoTo dde
Me.Top = 0
Me.Left = 0
Me.Width = Screen.Width
Me.Height = Screen.Height
dde:
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form3.Enabled = True
End Sub
Private Sub date1_GotFocus()
DATE1.SelStart = 0
DATE1.SelLength = Len(DATE1)
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Command2_Click
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -