Sub AddNewFimItems(ByVal dummy As String) Dim blnUpdated As Boolean Dim sError As String Dim sFim As String Dim sDesc As String Connect HBOWEMSession, stStream D.Open_ DSDataFile, ftExcel, "X:\BWS\SimFimMisc\SIM Additions.bds" blnUpdated = False Do If D("Status") = "" Then 'strip out double blanks in the description, because that will cause an error in STAR sDesc = Replace(D("DESCRIPTION"), " ", " ") 'set the FIM code sFim = Trim(D("REV CODE")) & Trim(D("SIM")) 'get the Facility number mstrFac = SelectFacility(D("FAC")) Note = "Record " & D.Record DoEvents Do DoEvents Stable 0.5 At "" If At("Enter option number@23,1") Then PauseLoop "Initial STAR Patient Care Menu Input Options@3,1", "3~" PauseLoop "Service Item Maintenance Input Options@3,1", "1~" End If If blnUpdated = False Then 'it hasn't been updated yet If At("Add this code@23,1") Then Enter "Y" Wait 1 End If PauseLoop "Field 20 is required!@23,1", "~" PauseLoop "Enter Mammography Certification Number@23,1", ".~" If At("Enter financial/insurance description@23,1") Then Enter sDesc Wait 0.5 sError = Trim(View(Row:=24, Col:=1, Length:=80)) If sError <> "" Then D("Status") = sError Pause "Enter financial/insurance description@23,1" Enter "." Pause "Enter field number or '/' starting field number@23,1" Enter "." Pause "Continue editing?@23,23" Enter "." Pause "Enter first characters of FIM`-`, code or (D)efault@23,1" Enter "." Pause "Enter charge/order department (`-` to list)@23,1" Enter "." Pause "Enter choice@23,1" GoTo NextRecord End If End If PauseLoop "Enter first characters of FIM@23,1", sFim & "~" PauseLoop "Enter first characters of revenue`-` or revenue@23,1", D("REV CODE") & "~" PauseLoop "Enter effective date@23,1", "~" PauseLoop "Enter field number or '/' starting field number@23,1", "~" PauseLoop "Enter charge/order department@23,1", D("SIM DEPT") & "~" PauseLoop "Enter code for HCPCS@23,1", D("HCPC") & "~" PauseLoop "Enter NY HCPCS code@23,1", ".~" PauseLoop "Enter choice@23,1", mstrFac & "~" PauseLoop "Enter UB92 Revenue Code or `-` to list@23,1", D("UBC") & "~" If At("Enter option #@23,1") Then D("Status") = "Already in system" Enter "." blnUpdated = True End If If At("Enter table code@23,1") Then Enter "." Pause "Enter field number or '/' starting field number@23,1" Enter "5" Pause "Enter table code@23,1" Enter D("UBC") Wait 0.5 Pause "Enter field number or '/' starting field number@23,1" If D("HCPC") = "" Then Enter "20" Else Enter "17" End If End If If At("Accept this screen?@23,1") Then D("Status") = "Done" blnUpdated = True Enter "" Wait 1.5 End If Else 'it's been updated, now on the way out PauseLoop "Enter charge/order department (`-` to list)@23,1", ".~" PauseLoop "Enter first characters of FIM`-`, code or (D)efault@23,1", ".~" PauseLoop "Press NL@23,1", "~" End If Loop Until At("Enter choice@23,1") And blnUpdated = True End If NextRecord: blnUpdated = False D.Next_ Loop Until D.EOF D.Report D.Close_ End Sub Sub AddNewSimItems(ByVal dummy As String) Dim blnUpdated As Boolean Dim sError As String Dim sDesc As String Connect HBOWEMSession, stStream D.Open_ DSDataFile, ftExcel, "X:\BWS\SimFimMisc\SIM Additions.bds" blnUpdated = False Do If D("Status") = "" Then If Len(D("SIM")) > 5 Then D("STATUS") = "Error: SIM code too long!" GoTo NextRecord End If 'strip out double blanks in the description, because that will cause an error in STAR sDesc = Replace(D("DESCRIPTION"), " ", " ") 'get the Facility number mstrFac = SelectFacility(D("FAC")) Note = "Record " & D.Record Do DoEvents Stable 0.3 At "" If At("Enter option number@23,1") Then PauseLoop "Initial STAR Patient Care Menu Input Options@3,1", "3~" PauseLoop "Service Item Maintenance Input Options@3,1", "2~" End If If At("Accept this screen?@23,1") Then Enter "Y" Wait 2 End If If At("Enter option #@23,1") Then D("Status") = "Done; Item already in system." Enter "." GoTo NextRecord End If PauseLoop "Enter table code@23,1", "~" PauseLoop "Enter field number or '/' starting field number@23,1", "~" If At("Enter first characters of FIM description`-` or code@23,1") Then Enter D("REV CODE") & D("SIM") Wait 0.3 sError = Trim(View(Row:=24, Col:=1, Length:=80)) If sError <> "" Then D("Status") = "Error: FIM item doesn't exist" Enter "." Pause "Enter field number or '/' starting field number@23,1" Enter "." Pause "Accept this screen?@23,1" Enter "." Pause "Enter first characters of service`-` or code@23,1" Enter "." GoTo NextRecord Else 'Pause "Enter choice@23,1" 'Enter "1" Pause "Accept (Y/N) [Y]@23,1" Enter "Y" End If End If If At("Enter service description@23,1") Then Enter sDesc Wait 0.3 sError = Trim(View(Row:=24, Col:=1, Length:=80)) If sError <> "" Then D("Status") = "Error: " & sError Enter "." Pause "Enter field number or '/' starting field number@23,1" Enter "." Pause "Field 2 is required! Continue editing? [Y]@23,1" Enter "." Enter "." Pause "Enter charge/order department (`-` to list)@23,1" GoTo NextRecord End If End If PauseLoop "Enter effective date@23,1", "~" PauseLoop "Enter first characters of service`-` or code@23,1", D("SIM") & "~" PauseLoop "Add this code@23,1", "Y~" PauseLoop "Enter charge/order department@23,1", D("SIM DEPT") & "~" PauseLoop "Enter choice@23,1", mstrFac & "~" Loop Until At("Display for all users(A), suppress from nursing(S), or nonorderable(N) [A]@23,1") Do DoEvents Stable 0.3 At "" PauseLoop "Enter field number or '/' starting field number@23,1", "~" PauseLoop "Confirm this item when ordering? (Y/N) [N]@23,1", "~" PauseLoop "Enter first characters of prompt`-` or prompt number@23,1", "~" PauseLoop "Enter first letter(s)`-` or code@23,1", "~" PauseLoop "Enter choices@23,1", ".~" PauseLoop "Is this an order(O) panel master or a charge(C) panel master?@23,1", "~" If At("Accept this screen?@23,1") Then Enter "Y" Wait 2 End If PauseLoop "Print requisition for occurrence?@23,1", "~" PauseLoop "Enter report name or leading chars '-' for a list@23,1", "~" PauseLoop "Enter number of requisitions@23,1", "~" PauseLoop "Separate requisition required?@23,1", "~" PauseLoop "Enter charge type (A)uto Daily or (T)ime of [Time of Charge]@23,1", "~" PauseLoop "Generate charge on order?@23,1", "~" PauseLoop "Display for all users(A), suppress from nursing(S), or nonorderable(N) [A]@23,1", "~" Loop Until At("Is this a room and bed item?@23,1") Do DoEvents Stable 0.3 At "" PauseLoop "Enter option #@23,1", "~" PauseLoop "Enter table code@23,1", ".~" PauseLoop "Enter field number or '/' starting field number@23,1", "~" PauseLoop "Enter fixed price@23,1", ".~" PauseLoop "Enter first characters of service`-` or code@23,1", ".~" PauseLoop "Enter variable price@23,1", D("PRICE") & "~" PauseLoop "Enter charge/order department@23,1", ".~" If At("Accept this screen?@23,1") Then Enter "Y" D("Status") = "Done" Wait 2 End If PauseLoop "Enter new pricing algorthm@23,1", D("PRICE TYPE") & "~" PauseLoop "Enter professional fee indicator (Y/N) [N]@23,1", "~" PauseLoop "Is this a room and bed item?@23,1", "N~" Loop Until At("Enter choice@23,1") End If NextRecord: blnUpdated = False D.Next_ Loop Until D.EOF D.Report D.Close_ End Sub