Guest User

Untitled

a guest
May 8th, 2012
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports System.IO
  2. Partial Public Class Manage837
  3.     Inherits System.Web.UI.Page
  4.  
  5.     Dim lst2 As New List(Of Claim)
  6.  
  7.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  8.         SetPermissions()
  9.         If Not IsPostBack() Then
  10.             If Request.QueryString("sd") <> "" Then
  11.                 If Request.QueryString("b") = "True" Then
  12.                     btnMarkBilled.Enabled = False
  13.                 Else
  14.                     btnMarkBilled.Enabled = True
  15.                 End If
  16.            
  17.                 chkEligible.Checked = Request.QueryString("est")
  18.                 chkIneligible.Checked = Request.QueryString("ist")
  19.                 chkCS.Checked = Request.QueryString("csbt")
  20.                 chkRes.Checked = Request.QueryString("rbt")
  21.  
  22.                 txtStartDate.Text = IIf(Request.QueryString("sd") <> "", Request.QueryString("sd"), txtStartDate.Text)
  23.                 txtEndDate.Text = IIf(Request.QueryString("ed") <> "", Request.QueryString("ed"), txtEndDate.Text)
  24.  
  25.    
  26.  
  27.  
  28.                 If hdnTest.Value.Equals("") Then
  29.                     ProcessPerDayPatientAmt()
  30.                 ElseIf (hdnTest.Value.Equals("complete")) Then
  31.                     RunReport(, , , False)
  32.                 End If
  33.            End If
  34.         End If
  35.     End Sub
  36.  
  37.     Protected Sub ProcessPerDayPatientAmt(list As [lst2type] = New [lst2type])
  38.         Dim c As New Claim
  39.         Dim bm As New BillingMonths
  40.         Dim bid As Integer
  41.  
  42.     bid = bm.SelectBID(Convert.ToDateTime(txtEndDate.Text).Month, Convert.ToDateTime(txtEndDate.Text).Year)
  43.  
  44.         If list.Count = 0 Then
  45.             list = hdnTest.Value  'Maybe put a function for serializing here?
  46.         End If
  47.  
  48.         For i As Claim = 0 To i < 50 Or i < list.Count()
  49.             c.UpdatePerDayPatientPayAmt(list(i).IndID, BID)
  50.         Next
  51.  
  52.            
  53.         list.RemoveRange(0, i)
  54.         If (list.Count > 0) Then
  55.             hdnTest.Value = list
  56.         Else
  57.             hdnTest.Value = "complete"
  58.         End If
  59.  
  60.     End Sub
  61.  
  62.  
  63.  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)
  64.         If ValidateForm() Then
  65.             Dim c As New Claim
  66.             Dim lst As New List(Of Claim)
  67.  
  68.  
  69.             If (isExport Or isDLFile Or isDLPFile) And btnMarkBilled.Enabled = False Then
  70.                 c.Billed = True
  71.             Else
  72.                 c.Billed = False
  73.             End If
  74.  
  75.             If chkCS.Checked And Not chkRes.Checked Then
  76.                 c.BillingTypeID = 2
  77.             ElseIf Not chkCS.Checked And chkRes.Checked Then
  78.                 c.BillingTypeID = 1
  79.             End If
  80.  
  81.             If chkEligible.Checked And Not chkIneligible.Checked Then
  82.                 c.Eligible = True
  83.             ElseIf Not chkEligible.Checked And chkIneligible.Checked Then
  84.                 c.Eligible = False
  85.             End If
  86.  
  87.             c.RecDate = txtStartDate.Text
  88.             c.RecDateEnd = txtEndDate.Text
  89.             c.Paid = False
  90.             c.Approved = True
  91.  
  92.             If isUpdate Then
  93.  
  94.                 If chkIneligible.Checked And chkRes.Checked Then
  95.  
  96.                     lst2 = c.SelectInfoForRoomAndBoard()
  97.                     ProcessPerDayPatientAmt(lst2)      
  98.              
  99.                 End If
  100.  
  101.  
  102.             End If
  103.  
  104.             lst = c.ChangeFor837Export(c.SelectClaims(, , , "Export837"))
Advertisement
Add Comment
Please, Sign In to add comment