+ Reply to Thread
Results 1 to 17 of 17

Comparing Variants [Excel 2010/14] (VBA Only)

  1. #1
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Comparing Variants [Excel 2010/14] (VBA Only)

    So here is an example of the current code I have. It is correctly reading the variant srgBodyPart(1) into BodyPart to use for comparing the srgBodyPart(x). However, I need it to follow the following rules:

    Facilities may receive additiional payment in excess of thefee for the primary procedure listed in fields above if (1) the additional procedures are performed on a seperate and distinct body part or system AND (2) the additional procedures would not normally be considered an integral part of a larger procedure or incidental to another procedure performed during the same session.

    so basically where srgbdyPart(x) where x is 2-6, I need it to compare with all other srgbdyParts to make sure they're not of equal value to any other.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    I can't tell what you're trying to do. Maybe this:

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    srgbdyPart(1) is the primary body system for a surgical procedure. The rest of the 5 (where x=2-6) srgbdyParts are currently compared to BodyPart to see if they are payable or not. However, I neglected to take into account that if there are any matches within the remaining srgbdyPart(x) they are not payable. Ie. if srgbdyPart(1) is MUSCOSKELETAL SYSTEM then any of the remaining srgBdyParts(x) [where x is 2 to 6 at this point] is equal to BodyPart [MUSCOSKELETAL SYSTEM] then they are not payable. However, if srgbdyPart(2) is equal to NERVOUS SYSTEM and srgBdyPart(4) is equal to NERVOUS SYSTEM then srgbyPart(2) is payable at 75% and srbdyPart(4) would not be payable at all.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    Maybe ...

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    It's not calculating correctly. bdysrgPart(1) is at 75% but it's the main procedure and should never be anything less than 100%. Then srgbdyPart(2) is calculating at above 100% when it should only be 75%.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    Post a workbook, lloyd, with examples and expected results. I have no way to test.

  7. #7
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    Here you go. The EXPECTED_RESULTS tab will have the input values you need to use. Press Ctrl-e to run the macro, making sure you're on the OUTPATIENT_SURGICAL tab.

    The code in question resides in the 'Calculations' module under calcSurg() sub.
    Attached Files Attached Files

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    Where is an example of a fee that was multiplied by 75%, and an example of one that was zeroed out?

  9. #9
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    77.64 is at 75%
    59.79 (second one) is zeroed out
    78.63 is zeroed out

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    59.79 and 78.63 is zero on both sheets.



    What if there were three procedures on the same system -- would the first get multiplied by 75% twice, and both duplicates zeroed?
    Last edited by shg; 03-01-2013 at 03:36 PM.

  11. #11
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    Both should be zeroed out b/c they are part of the same body system per the rules given above. The 77.64 is different from the primary body system for procedure 59.79 so it should be paid at 75% while the initial 59.79 should be paid at 100%.

  12. #12
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    Only the first procedure of any system is payable. The primary (1st one entered) is payable at 100% any others are at 75%.

  13. #13
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    Bumping thread

  14. #14
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    threadbump

  15. #15
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    bump it up yo

  16. #16
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    yet once again I must bump this thread.

  17. #17
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Comparing Variants [Excel 2010/14] (VBA Only)

    bump bump bump...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1