Attribute VB_Name = "modStoredProcs" Option Explicit Public Sub AddBill_Discounts(strIdNum As String, strHospNum As String, _ strRevenueID As String, strItemId As String, strRefNum As String, _ dblAmount As Double, strUserID As String) Dim strSQL As String strSQL = "Lab_AppendBillingCharge_Discount '" & strIdNum & "', '" & strHospNum & "'," _ + "'" & strRevenueID & "', '" & strItemId & "'," _ + "'" & strRefNum & "', '" & dblAmount & "', '" & strUserID & "'" conLaboratory.Execute strSQL End Sub Public Function GetDiscountDescription(strRevenueID As String) As String Dim strSQL As String Dim recSQL As New ADODB.Recordset GetDiscountDescription = "" strSQL = "Select ItemName From Build_File..tbCorevenuecode Where RevenueID = '" & strRevenueID & "'" With recSQL If .State > 0 Then .Close .CursorLocation = adUseClient .Open strSQL, conLaboratory, adOpenDynamic, adLockOptimistic If .RecordCount > 0 Then GetDiscountDescription = !ItemName & "" End If If .State > 0 Then .Close End With End Function Public Function Check_IfHMO(strIdNum As String) As String Dim recOpen As New ADODB.Recordset Dim strSQL As String Dim strClass As String strSQL = "LABORATORY..Lab_CheckIfHMO_New '" & Trim$(strIdNum) & "'" With recOpen If .State > 0 Then .Close .CursorLocation = adUseClient .Open strSQL, conLaboratory, adOpenDynamic, adLockOptimistic If .RecordCount > 0 Then strClass = !Class & "" End If End With Check_IfHMO = strClass End Function Public Sub Get_HospitalBill(strHospNum As String) Dim recOpen As New ADODB.Recordset With recOpen If .State > 0 Then .Close .Open "PATIENT_DATA..sp_Adm_ComputePatientsOldAccounts '" & strHospNum & "'", CurrentUser.SQLConnection, adOpenDynamic, adLockReadOnly If Not .EOF Then MsgBox "The patient has unpaid bill of " + CStr(!Amount) & "", vbInformation, "Message" End If .Close Set recOpen = Nothing End With End Sub Public Function ValiText(KeyIn As Integer, ValidateString As String, _ Editable As Boolean) As Integer Dim ValidateList As String Dim KeyOut As Integer If Editable = True Then ValidateList = UCase(ValidateString) & Chr(8) Else ValidateList = UCase(ValidateString) End If If InStr(1, ValidateList, UCase(Chr(KeyIn)), 1) > 0 Then KeyOut = KeyIn Else KeyOut = 0 End If ValiText = KeyOut End Function Public Function Check_IfERPatient(strHospNum As String) As Boolean Dim recOpen As New ADODB.Recordset Dim strSQL As String Dim strClass As String Check_IfERPatient = False ' strSQL = "Select * from Patient_Data..tboutPatient where IDNum = '" & strHospNum & "' " ' ' ' With recOpen ' If .State > 0 Then .Close ' .CursorLocation = adUseClient ' .Open strSQL, conLaboratory, adOpenDynamic, adLockOptimistic ' ' If .RecordCount > 0 Then ' If IsNull(recOpen("ERNum").Value) Then ' Check_IfERPatient = False ' ' Else ' ' Check_IfERPatient = True ' End If ' End If ' .Close ' Set recOpen = Nothing 'End With End Function Public Function Check_IfICURoom(strRoomId As String) As Boolean Dim recOpen As New ADODB.Recordset Dim strSQL As String Dim strClass As String Check_IfICURoom = False ' strSQL = "Select isnull(A.StationID,'') as StationID, a.* From Build_File..tbCoRoom A " + _ ' " Left Outer Join Build_File..tbCoStation B " + _ ' " On A.StationId = B.StationID Where A.Roomid = '" & strRoomId & "'" ' ' ' With recOpen ' If .State > 0 Then .Close ' .CursorLocation = adUseClient ' .Open strSQL, conLaboratory, adOpenDynamic, adLockOptimistic ' ' If .RecordCount > 0 Then ' If !StationID = "ICU" Or !StationID = "PICU" Then ' Check_IfICURoom = True ' ElseIf !StationID = "NUR" Then ' If !RoomID Like "%NICU%" Then ' Check_IfICURoom = True ' End If ' Else ' Check_IfICURoom = False ' End If ' End If ' .Close ' Set recOpen = Nothing ' ' End With End Function Public Function Get_ICURates(strItemId As String, strRevenueID As String) As Double Dim recOpen As New ADODB.Recordset Dim strSQL As String Dim strRate As Double Get_ICURates = 0 strSQL = "Select Isnull(ICURate,0)Rate from Billing..tbBillExamListing where RevenueID = '" & strRevenueID & "' and ItemId = '" & strItemId & "'" With recOpen If .State > 0 Then .Close .CursorLocation = adUseClient .Open strSQL, conLaboratory, adOpenDynamic, adLockOptimistic If .RecordCount > 0 Then Get_ICURates = !Rate & "" End If End With Get_ICURates = Get_ICURates End Function Public Function Get_ErRates(strItemId As String, strRevenueID As String) As Double Dim recOpen As New ADODB.Recordset Dim strSQL As String Dim strRate As Double Get_ErRates = 0 strSQL = "Select Isnull(ERRate,0)Rate from Billing..tbBillExamListing where RevenueID = '" & strRevenueID & "' and ItemId = '" & strItemId & "'" With recOpen If .State > 0 Then .Close .CursorLocation = adUseClient .Open strSQL, conLaboratory, adOpenDynamic, adLockOptimistic If .RecordCount > 0 Then Get_ErRates = !Rate & "" End If End With Get_ErRates = Get_ErRates End Function