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

📄 mdldatabase4.bas

📁 本系统可用于医院和专业体检中心的健康体检管理
💻 BAS
📖 第 1 页 / 共 5 页
字号:
                If Not IsNull(rsHZ("NormalVal")) Then
                If YIGANFile Then '配置文件存在则检验
                    Select Case strXMID
                           Case strItemId(0)
                               strYIGanNamol(0) = rsHZ("NormalVal")
                           Case strItemId(1)
                               strYIGanNamol(1) = rsHZ("NormalVal")
                           Case strItemId(2)
                               strYIGanNamol(2) = rsHZ("NormalVal")
                           Case strItemId(3)
                               strYIGanNamol(3) = rsHZ("NormalVal")
                           Case strItemId(4)
                               strYIGanNamol(4) = rsHZ("NormalVal")
                           Case Else
                           '说明型
                            If Trim(rsHZ("抽查结果")) <> rsHZ("NormalVal") Then
                                If g_blnKSXJWithXMu Then
                                    strTemp = strTemp & Trim(rsHZ("抽查结果"))
                                Else
                                    strTemp = Trim(rsHZ("抽查结果"))
                                End If
                                strTempJYi = rsHZ("抽查结果")
                            End If
                    End Select
                
            
                If strXMID = strItemId(5) Then   '在乙肝五项全部检查后进行组合判断
                    If strYIGanResult(0) <> "" And strYIGanResult(1) = "" And strYIGanResult(2) = "" And strYIGanResult(3) = "" And strYIGanResult(4) = "" Then
                       '只检验了表面抗原,正常显示检验结果
                        If strYIGanResult(0) <> strYIGanNamol(0) Then
                            If g_blnKSXJWithXMu Then
                                strTemp = strTemp & strYIGanResult(0) & ";"
                            Else
                                strTemp = strYIGanResult(0)
                            End If
                            strTempJYi = strYIGanResult(0)
                        End If
                        strYIGanResult(0) = ""
                    End If
                    
                    '乙肝病毒感染(大三阳1,3,5阳性)
                    If strYIGanResult(0) <> strYIGanNamol(0) And _
                        strYIGanResult(1) = strYIGanNamol(1) And _
                        strYIGanResult(2) <> strYIGanNamol(2) And _
                        strYIGanResult(3) = strYIGanNamol(3) And _
                        strYIGanResult(4) <> strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染(大三阳1,3,5阳性);"
                        Else
                            strTemp = "乙肝病毒感染(大三阳1,3,5阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染(大三阳1,3,5阳性);"
                        
                        strYIGanResult(0) = ""
                        strYIGanResult(1) = ""
                        strYIGanResult(2) = ""
                        strYIGanResult(3) = ""
                        strYIGanResult(4) = ""
                    
                    '乙肝病毒感染(1,5阳性)
                    ElseIf strYIGanResult(0) <> strYIGanNamol(0) And _
                        strYIGanResult(1) = strYIGanNamol(1) And _
                        strYIGanResult(2) = strYIGanNamol(2) And _
                        strYIGanResult(3) = strYIGanNamol(3) And _
                        strYIGanResult(4) <> strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染(1,5阳性);"
                        Else
                            strTemp = "乙肝病毒感染(1,5阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染(1,5阳性);"
    
                    '乙肝病毒感染(小三阳1,4,5阳性)
                    ElseIf strYIGanResult(0) <> strYIGanNamol(0) And _
                        strYIGanResult(1) = strYIGanNamol(1) And _
                        strYIGanResult(2) = strYIGanNamol(2) And _
                        strYIGanResult(3) <> strYIGanNamol(3) And _
                        strYIGanResult(4) <> strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染(小三阳1,4,5阳性);"
                        Else
                            strTemp = "乙肝病毒感染(小三阳1,4,5阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染(小三阳1,4,5阳性);"
    
                    '乙肝病毒感染(2,5阳性)
                    ElseIf strYIGanResult(0) = strYIGanNamol(0) And _
                        strYIGanResult(1) <> strYIGanNamol(1) And _
                        strYIGanResult(2) = strYIGanNamol(2) And _
                        strYIGanResult(3) = strYIGanNamol(3) And _
                        strYIGanResult(4) <> strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染(2,5阳性);"
                        Else
                            strTemp = "乙肝病毒感染(2,5阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染(2,5阳性);"
    
                   '乙肝病毒感染后(4,5阳性)
                    ElseIf strYIGanResult(0) = strYIGanNamol(0) And _
                        strYIGanResult(1) = strYIGanNamol(1) And _
                        strYIGanResult(2) = strYIGanNamol(2) And _
                        strYIGanResult(3) <> strYIGanNamol(3) And _
                        strYIGanResult(4) <> strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染后(4,5阳性);"
                        Else
                            strTemp = "乙肝病毒感染后(4,5阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染后(4,5阳性);"
                     
    
                    '乙肝病毒感染后(5阳性)
                    ElseIf strYIGanResult(0) = strYIGanNamol(0) And _
                        strYIGanResult(1) = strYIGanNamol(1) And _
                        strYIGanResult(2) = strYIGanNamol(2) And _
                        strYIGanResult(3) = strYIGanNamol(3) And _
                        strYIGanResult(4) <> strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染后(5阳性);"
                        Else
                            strTemp = "乙肝病毒感染后(5阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染后(5阳性);"
                      
                    '乙肝表面抗体阳性(2阳性)
                    ElseIf strYIGanResult(0) = strYIGanNamol(0) And _
                        strYIGanResult(1) <> strYIGanNamol(1) And _
                        strYIGanResult(2) = strYIGanNamol(2) And _
                        strYIGanResult(3) = strYIGanNamol(3) And _
                        strYIGanResult(4) = strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝表面抗体阳性(2阳性);"
                        Else
                            strTemp = "乙肝表面抗体阳性(2阳性);"
                        End If
                        strTempJYi = "乙肝表面抗体阳性(2阳性);"
                     
                    '乙肝病毒感染后(2,4,5阳性)
                    ElseIf strYIGanResult(0) = strYIGanNamol(0) And _
                        strYIGanResult(1) <> strYIGanNamol(1) And _
                        strYIGanResult(2) = strYIGanNamol(2) And _
                        strYIGanResult(3) <> strYIGanNamol(3) And _
                        strYIGanResult(4) <> strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染后(2,4,5阳性);"
                        Else
                            strTemp = "乙肝病毒感染后(2,4,5阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染后(2,4,5阳性);"
                     
                    '乙肝病毒感染(1阳性)
                    ElseIf strYIGanResult(0) <> strYIGanNamol(0) And _
                        strYIGanResult(1) = strYIGanNamol(1) And _
                        strYIGanResult(2) = strYIGanNamol(2) And _
                        strYIGanResult(3) = strYIGanNamol(3) And _
                        strYIGanResult(4) = strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染(1阳性);"
                        Else
                            strTemp = "乙肝病毒感染(1阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染(1阳性);"
                     
                    '乙肝病毒感染(1,4阳性)
                    ElseIf strYIGanResult(0) <> strYIGanNamol(0) And _
                        strYIGanResult(1) = strYIGanNamol(1) And _
                        strYIGanResult(2) = strYIGanNamol(2) And _
                        strYIGanResult(3) <> strYIGanNamol(3) And _
                        strYIGanResult(4) = strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染(1,4阳性);"
                        Else
                            strTemp = "乙肝病毒感染(1,4阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染(1,4阳性);"
                     
                    '乙肝病毒感染(1,3阳性)
                    ElseIf strYIGanResult(0) <> strYIGanNamol(0) And _
                        strYIGanResult(1) = strYIGanNamol(1) And _
                        strYIGanResult(2) <> strYIGanNamol(2) And _
                        strYIGanResult(3) = strYIGanNamol(3) And _
                        strYIGanResult(4) = strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染(1,3阳性);"
                        Else
                            strTemp = "乙肝病毒感染(1,3阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染(1,3阳性);"
                     
                    '乙肝病毒感染(1,3,4,5阳性)
                    ElseIf strYIGanResult(0) <> strYIGanNamol(0) And _
                        strYIGanResult(1) = strYIGanNamol(1) And _
                        strYIGanResult(2) <> strYIGanNamol(2) And _
                        strYIGanResult(3) <> strYIGanNamol(3) And _
                        strYIGanResult(4) <> strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝病毒感染(1,3,4,5阳性);"
                        Else
                            strTemp = "乙肝病毒感染(1,3,4,5阳性);"
                        End If
                        strTempJYi = "乙肝病毒感染(1,3,4,5阳性);"
    
                    '乙肝两对半全部阴性
                    ElseIf strYIGanResult(0) = strYIGanNamol(0) And _
                        strYIGanResult(1) = strYIGanNamol(1) And _
                        strYIGanResult(2) = strYIGanNamol(2) And _
                        strYIGanResult(3) = strYIGanNamol(3) And _
                        strYIGanResult(4) = strYIGanNamol(4) Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & "乙肝两对半全部阴性;"
                        Else
                            strTemp = "乙肝两对半全部阴性;"
                        End If
                        strTempJYi = "乙肝两对半全部阴性;"
                    Else
    ''                    If g_blnKSXJWithXMu Then
    ''                        strTemp = strTemp & "未见异常;"
    ''                    Else
    ''                        strTemp = "未见异常;"
    ''                    End If
    ''                    strTempJYi = "未见异常;"
    
                    End If 'If strXMID = strItemId(5) Then
                    
                    End If 'If YIGANFile Then '配置文件存在则检验
                Else
                    If Trim(rsHZ("抽查结果")) <> rsHZ("NormalVal") Then
                        If g_blnKSXJWithXMu Then
                            strTemp = strTemp & Trim(rsHZ("抽查结果"))
                        Else
                            strTemp = Trim(rsHZ("抽查结果"))
                        End If
                        strTempJYi = rsHZ("抽查结果")
                    End If
                End If   ' If Not IsNull(rsHZ("NormalVal")) Then
            End If        'If intType = 1 Or intType = 3 Then
        End If    'If Trim(rsHZ("抽查结果")) <> "" Then
            
            If strTemp <> "" Then
                '数值型与非数值型都采用该语句,否则出现重复,像“杂音放弃放弃”这样的情况
                strResult = strResult & strTemp & ";" '放入科室结论变量
            End If
        Else        '取回结果为空,说明还未进行该项目的录入
            blXMValueisNull = True
        End If
        
        rsHZ.Close
    Else
        blXMValueisNull = True
    End If
    
    Return
    
ErrMsg:
    Status = SetError(Err.Number, Err.Description, Err.Source)
    ErrMsg Status
ExitLab:
    Screen.MousePointer = vbDefault
End Function

'**********************************************************************
'把科室小结写入科室结论表
'参数1:GUID编号
'参数2:科室编号
'参数3:体检日期
'参数4:操作人员编号
'参数4:要写入的科室结论
'返回值:是否成功
'**********************************************************************
Public Function WriteKSXJ(ByVal lngGUID As Long, ByVal strKSID As String, _
        ByVal datTJRQ As Date, ByVal intDoctorID As Integer, _
        ByVal strKSXJ As String) As Boolean
    Dim strSQL As String
    Dim rstemp As ADODB.Recordset
    Dim strInsert As String
    Dim strCheck As String
    
    strSQL = "Update Data_KSXJ" _
            & " set XJValue='" & strKSXJ & "'" _
            & ",EmployeeID=" & intDoctorID _
            & " where GUID=" & lngGUID _
            & " and KSID='" & strKSID & "'"
    strInsert = "Insert into Data_KSXJ(GUID,KSID,EmployeeID,TJRQ,XJValue,Tijiao)" _
            & " values(" _
            & lngGUID _
            & ",'" & strKSID & "'," & intDoctorID _
            & ",'" & datTJRQ & "','" & strKSXJ & "',0)"
    strCheck = "select count(*) from Data_KSXJ" _
            & " where GUID=" & lngGUID _
            & " and KSID='" & strKSID & "'"
            
    Set rstemp = New ADODB.Recordset
    rstemp.Open strCheck, GCon, adOpenStatic, adLockReadOnly
    If rstemp(0) >= 1 Then
        '更新
        GCon.Execute strSQL
    Else
        '添加
        GCon.Execute strInsert
    End If
    rstemp.Close
    Set rstemp = Nothing
    WriteKSXJ = True
    
    GoTo ExitLab
ExitLab:
    '

⌨️ 快捷键说明

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