bajs.frm

来自「这是一个医院管理系统中的院长查询模块」· FRM 代码 · 共 876 行 · 第 1/4 页

FRM
876 行
字号
Printer.Print "       制表: " + Form3.sbar.Panels(2) + "       " + CStr(Date) + " " + CStr(Time)
Printer.EndDoc
End Sub
Sub PRINT_3() '临床诊断与病理诊断不符登记
U1 = "─────┬────┬────┬──┬──┬─────┬───────────────────┬────┬───────────────────┬────┬─────"
V1 = "          │        │        │    │    │          │        入  院  初  步  诊  断        │        │          病    理    诊    断        │        │          "
V2 = "   病案号 │ 住院号 │ 姓  名 │性别│年龄│ 入院日期 ├─────┬─────────────┤经治医师├─────┬─────────────┤科室名称│出院日期  "
V3 = "          │        │        │    │    │          │  ICD-9   │      疾  病  名  称      │        │  ICD-9   │      疾  病  名  称      │        │          "
U2 = "─────┼────┼────┼──┼──┼─────┼─────┼─────────────┼────┼─────┼─────────────┼────┼─────"
U3 = "─────┴────┴────┴──┴──┴─────┴─────┴─────────────┴────┴─────┴─────────────┴────┴─────"
Printer.ScaleMode = 6
Printer.PaperSize = 39
Printer.FontName = "隶书"
Printer.FontSize = 26
Printer.FontUnderline = True
Printer.CurrentX = 100
Printer.Print "  临床诊断与病理诊断不符登记  "
Printer.FontName = "宋体"
Printer.FontSize = 11
Printer.FontUnderline = False
Printer.Print
Printer.CurrentX = 240
Printer.Print "统计日期: " + DATE1 + " 至 " + DATE2
Printer.Print U1
Printer.Print V1
Printer.Print V2
Printer.Print V3
Do While Not Data1.Recordset.EOF
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(3 - DxLen(Data1.Recordset!性别)) + Data1.Recordset!性别 + " │"
U = U + Space(4 - DxLen(CStr(NL))) + CStr(NL) + "│"
U = U + Space(10 - DxLen(CStr(Data1.Recordset!入院日期))) + CStr(Data1.Recordset!入院日期) + "│"
U = U + Space(10 - DxLen(Data1.Recordset!入院诊断ICD)) + Data1.Recordset!入院诊断ICD + "│"
U = U + Space(26 - DxLen(Data1.Recordset!入院诊断)) + Data1.Recordset!入院诊断 + "│"
U = U + Space(8 - DxLen(Data1.Recordset!经治医师)) + Data1.Recordset!经治医师 + "│"
U = U + Space(10 - DxLen(Data1.Recordset!病理诊断ICD)) + Data1.Recordset!病理诊断ICD + "│"
U = U + Space(26 - 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!出院日期)
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_4() '手术前后诊断不符登记
U1 = "────┬────┬────┬──┬──┬─────┬───────────────────┬────┬─────┬───────────────────┬────┬─────"
V1 = "        │        │        │    │    │          │        入  院  初  步  诊  断        │        │          │          病    理    诊    断        │        │          "
V2 = "  病案号│ 住院号 │ 姓  名 │性别│年龄│ 入院日期 ├─────┬─────────────┤手术医师│ 手术日期 ├─────┬─────────────┤科室名称│出院日期  "
V3 = "        │        │        │    │    │          │  ICD-9   │      疾  病  名  称      │        │          │  ICD-9   │      疾  病  名  称      │        │          "
U2 = "────┼────┼────┼──┼──┼─────┼─────┼─────────────┼────┼─────┼─────┼─────────────┼────┼─────"
U3 = "────┴────┴────┴──┴──┴─────┴─────┴─────────────┴────┴─────┴─────┴─────────────┴────┴─────"
Printer.ScaleMode = 6
Printer.PaperSize = 39
Printer.FontName = "隶书"
Printer.FontSize = 26
Printer.FontUnderline = True
Printer.CurrentX = 100
Printer.Print "  手术前后诊断不符登记  "
Printer.FontName = "宋体"
Printer.FontSize = 10.5
Printer.FontUnderline = False
Printer.Print
Printer.CurrentX = 240
Printer.Print "统计日期: " + DATE1 + " 至 " + DATE2
Printer.Print U1
Printer.Print V1
Printer.Print V2
Printer.Print V3
Do While Not Data1.Recordset.EOF
Printer.Print U2
U = ""
NL = CStr(Year(Data1.Recordset!入院日期) - Year(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(3 - DxLen(Data1.Recordset!性别)) + Data1.Recordset!性别 + " │"
U = U + Space(4 - DxLen(CStr(NL))) + CStr(NL) + "│"
U = U + Space(10 - DxLen(CStr(Data1.Recordset!入院日期))) + CStr(Data1.Recordset!入院日期) + "│"
U = U + Space(10 - DxLen(Data1.Recordset!入院诊断ICD)) + Data1.Recordset!入院诊断ICD + "│"
U = U + Space(26 - DxLen(Data1.Recordset!入院诊断)) + Data1.Recordset!入院诊断 + "│"
U = U + Space(8 - DxLen(Data1.Recordset!手术医师)) + Data1.Recordset!手术医师 + "│"
U = U + Space(10 - DxLen(CStr(DxLL(Data1.Recordset!手术日期)))) + CStr(DxLL(Data1.Recordset!手术日期)) + "│"
U = U + Space(10 - DxLen(Data1.Recordset!出院诊断ICD)) + Data1.Recordset!出院诊断ICD + "│"
U = U + Space(26 - 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!出院日期)
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 = "1" Then
PRINT_1
End If
If Me.Tag = "2" Then
PRINT_2
End If
If Me.Tag = "3" Then
PRINT_3
End If
If Me.Tag = "4" Then
PRINT_4
End If
If Me.Tag = "5" Then
PRINT_5
End If
If Me.Tag = "6" Then
PRINT_6
End If
If Me.Tag = "7" Then
PRINT_7
End If
If Me.Tag = "8" Then
PRINT_8
End If
If Me.Tag = "9" Then
PRINT_9
End If
If Me.Tag = "A" Then
PRINT_10
End If
If Me.Tag = "B" Then
PRINT_11
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_ZDCX '" + Form8.Tag + "','" + CStr(DATE1) + "','" + CStr(DATE2) + "'"
Data1.RecordSource = DDS
Data1.Refresh
If Me.Tag = "B" Then
If Not Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Dim d1 As Recordset
Set d1 = db.OpenRecordset("SELECT COUNT(*) AS SSE FROM BA_HZFY WHERE CYRQ>=CDATE('" + CStr(CDate(DATE1)) + "') AND CYRQ<=CDATE('" + CStr(DATE2) + "') and cyrq>(zyrq+1)")
Data1.Caption = "总出院人数:" + CStr(d1!SSE) + "  未录病历人数:" + CStr(Data1.Recordset.RecordCount)
d1.Close
End If
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 And TEXT1 <> "" Then
Command2_Click
End If
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?