⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vb4.tmp

📁 小型医院管理
💻 TMP
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form v_dengji 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "齐英天肛肠医院综合信息管理系统"
   ClientHeight    =   3525
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   11310
   Icon            =   "v_dengji.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3525
   ScaleWidth      =   11310
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox v_tiaoma 
      Height          =   375
      Left            =   7800
      TabIndex        =   6
      Top             =   4440
      Visible         =   0   'False
      Width           =   2295
   End
   Begin VB.CommandButton Command2 
      Caption         =   "关  闭"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   10200
      TabIndex        =   11
      Top             =   2880
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "登   记"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   9120
      TabIndex        =   10
      Top             =   2880
      Width           =   975
   End
   Begin VB.TextBox v_car 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1320
      TabIndex        =   8
      Top             =   1920
      Width           =   2655
   End
   Begin MSComCtl2.DTPicker v_sj 
      Height          =   375
      Left            =   5760
      TabIndex        =   9
      Top             =   1920
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Format          =   64421889
      CurrentDate     =   39632
   End
   Begin VB.TextBox v_zz 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1335
      Left            =   7800
      TabIndex        =   7
      Top             =   4920
      Visible         =   0   'False
      Width           =   3975
   End
   Begin VB.TextBox v_bs 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1695
      Left            =   2160
      TabIndex        =   5
      Text            =   "无"
      Top             =   4440
      Visible         =   0   'False
      Width           =   3975
   End
   Begin VB.TextBox v_address 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1320
      TabIndex        =   4
      Top             =   1080
      Width           =   6495
   End
   Begin VB.TextBox v_tel 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   8880
      TabIndex        =   3
      Top             =   240
      Width           =   2055
   End
   Begin VB.ComboBox v_sex 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      ItemData        =   "v_dengji.frx":0BC2
      Left            =   4440
      List            =   "v_dengji.frx":0BCC
      TabIndex        =   1
      Text            =   "男"
      Top             =   240
      Width           =   975
   End
   Begin VB.TextBox v_old 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   6600
      TabIndex        =   2
      Top             =   240
      Width           =   975
   End
   Begin VB.TextBox v_name 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1320
      TabIndex        =   0
      Top             =   240
      Width           =   2055
   End
   Begin VB.Label Label10 
      AutoSize        =   -1  'True
      Caption         =   "症状条码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   6720
      TabIndex        =   21
      Top             =   4560
      Visible         =   0   'False
      Width           =   840
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      Caption         =   "卡   号"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   360
      TabIndex        =   20
      Top             =   2040
      Width           =   735
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "就诊时间"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   4680
      TabIndex        =   19
      Top             =   2040
      Width           =   840
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "主要症状"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   6720
      TabIndex        =   18
      Top             =   5400
      Visible         =   0   'False
      Width           =   840
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "主要病史"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   1200
      TabIndex        =   17
      Top             =   5280
      Visible         =   0   'False
      Width           =   840
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "地址"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   360
      TabIndex        =   16
      Top             =   1200
      Width           =   420
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "联系电话"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   7920
      TabIndex        =   15
      Top             =   360
      Width           =   840
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "年龄"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   6000
      TabIndex        =   14
      Top             =   360
      Width           =   420
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "性别"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   3840
      TabIndex        =   13
      Top             =   360
      Width           =   420
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "患者姓名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   360
      TabIndex        =   12
      Top             =   360
      Width           =   840
   End
End
Attribute VB_Name = "v_dengji"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()




If v_name.Text = "" Then
b1 = MsgBox("警告,患者姓名不能为空!", vbQuestion, "系统提示!")
v_name.SetFocus
Exit Sub
End If



If v_sex.Text = "" Then
b1 = MsgBox("警告,性别不能为空!", vbQuestion, "系统提示!")
v_sex.SetFocus
Exit Sub
End If




If Not IsNumeric(v_old.Text) Then
b1 = MsgBox("警告,年龄不能为空或非数字!", vbQuestion, "系统提示!")
v_old.SetFocus
Exit Sub
End If




'If v_zz.Text = "" Then
'b1 = MsgBox("警告,症状不能为空!", vbQuestion, "系统提示!")
'v_zz.SetFocus
'Exit Sub
'End If






If Not IsNumeric(v_car.Text) Then
b1 = MsgBox("警告,卡号不能为空或非数字!", vbQuestion, "系统提示!")
v_car.SetFocus
Exit Sub
End If


b1 = MsgBox("您确实继续吗?", vbOKCancel, "系统提示!")
If b1 = 1 Then
 



Dim sql As String
sql = "select * from 患者信息 where 卡号='" & Trim(v_car.Text) & "'"
Dim rs As New ADODB.Recordset
rs.Open sql, db

If Not rs.EOF Then

b1 = MsgBox("卡号已经存在,请更换卡号!", vbCritical, "系统提示!")
Exit Sub
Else

Dim sql1 As String
sql1 = "insert into 患者信息 (姓名,性别,年龄,电话,地址,卡号,时间) values ('" & Trim(v_name.Text) & "','" & Trim(v_sex.Text) & "','" & Trim(v_old.Text) & "','" & Trim(v_tel.Text) & "','" & Trim(v_address.Text) & "','" & Trim(v_car.Text) & "','" & Trim(Now) & "')"
Dim rs1 As New ADODB.Recordset
rs1.Open sql1, db
Set rs1 = Nothing




Dim sql2 As String
sql2 = "insert into 检查结果 (卡号,姓名,日期) values ('" & Trim(v_car.Text) & "','" & Trim(v_name.Text) & "','" & Trim(Now) & "')"
Dim rs2 As New ADODB.Recordset
rs2.Open sql2, db
Set rs2 = Nothing





b1 = MsgBox("提示,患者登记成功!", vbQuestion, "系统提示!")

End If


Set rs = Nothing

End If


End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
v_sj.Value = Date
End Sub

Private Sub v_tiaoma_Change()

Dim sql As String
sql = "select * from 条码 where 条码='" & Trim(v_tiaoma.Text) & "'"
Dim rs As New ADODB.Recordset
rs.Open sql, db
If Not rs.EOF Then
v_zz.Text = v_zz.Text & "  " & rs("名称")

End If


End Sub

⌨️ 快捷键说明

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