Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Partial Public Class Manage837
- Inherits System.Web.UI.Page
- Dim lst2 As New List(Of Claim)
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- SetPermissions()
- If Not IsPostBack() Then
- If Request.QueryString("sd") <> "" Then
- If Request.QueryString("b") = "True" Then
- btnMarkBilled.Enabled = False
- Else
- btnMarkBilled.Enabled = True
- End If
- chkEligible.Checked = Request.QueryString("est")
- chkIneligible.Checked = Request.QueryString("ist")
- chkCS.Checked = Request.QueryString("csbt")
- chkRes.Checked = Request.QueryString("rbt")
- txtStartDate.Text = IIf(Request.QueryString("sd") <> "", Request.QueryString("sd"), txtStartDate.Text)
- txtEndDate.Text = IIf(Request.QueryString("ed") <> "", Request.QueryString("ed"), txtEndDate.Text)
- If hdnTest.Value.Equals("") Then
- ProcessPerDayPatientAmt()
- ElseIf (hdnTest.Value.Equals("complete")) Then
- RunReport(, , , False)
- End If
- End If
- End If
- End Sub
- Protected Sub ProcessPerDayPatientAmt(list As [lst2type] = New [lst2type])
- Dim c As New Claim
- Dim bm As New BillingMonths
- Dim bid As Integer
- bid = bm.SelectBID(Convert.ToDateTime(txtEndDate.Text).Month, Convert.ToDateTime(txtEndDate.Text).Year)
- If list.Count = 0 Then
- list = hdnTest.Value 'Maybe put a function for serializing here?
- End If
- For i As Claim = 0 To i < 50 Or i < list.Count()
- c.UpdatePerDayPatientPayAmt(list(i).IndID, BID)
- Next
- list.RemoveRange(0, i)
- If (list.Count > 0) Then
- hdnTest.Value = list
- Else
- hdnTest.Value = "complete"
- End If
- End Sub
- Private Sub RunReport(Optional ByVal isExport As Boolean = False, Optional ByVal isDLFile As Boolean = False, Optional ByVal isDLPFile As Boolean = False, Optional ByVal isUpdate As Boolean = True)
- If ValidateForm() Then
- Dim c As New Claim
- Dim lst As New List(Of Claim)
- If (isExport Or isDLFile Or isDLPFile) And btnMarkBilled.Enabled = False Then
- c.Billed = True
- Else
- c.Billed = False
- End If
- If chkCS.Checked And Not chkRes.Checked Then
- c.BillingTypeID = 2
- ElseIf Not chkCS.Checked And chkRes.Checked Then
- c.BillingTypeID = 1
- End If
- If chkEligible.Checked And Not chkIneligible.Checked Then
- c.Eligible = True
- ElseIf Not chkEligible.Checked And chkIneligible.Checked Then
- c.Eligible = False
- End If
- c.RecDate = txtStartDate.Text
- c.RecDateEnd = txtEndDate.Text
- c.Paid = False
- c.Approved = True
- If isUpdate Then
- If chkIneligible.Checked And chkRes.Checked Then
- lst2 = c.SelectInfoForRoomAndBoard()
- ProcessPerDayPatientAmt(lst2)
- End If
- End If
- lst = c.ChangeFor837Export(c.SelectClaims(, , , "Export837"))
Advertisement
Add Comment
Please, Sign In to add comment