Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Two dimensional lookup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Two dimensional lookup

    I would like to develop a lookup based on a 2 dimensional table. The rows of the table would be procedures; the columns fees. This would allow the posted fee to reflect both the procedure and the insurance company (some companies pay different fees) or discount plan. Does anyone have an idea on how to accomplish this?

  • #2
    RE: Two dimensional lookup

    Code:
    Hi Ohlen,
    
    I am not sure that I have a clear picture of what you mean by 2D lookup.
    If you are billing several insurances, & there is a field for the type of 
    insurance the patient has..... then I would thing you could use a conditional lookup based on the value in the INS_TYPE field to get the proper fee schedule.
    
    The graphic below is how I would set up the lookup table.  You will have to have enough fields in the table for the number of insurance companys you bill. Each procedure would have it's own record with a matching fee schedule for each insurance that you bill.  Depending on the practice you may have several hundred procedures or even several thousand.... but maybe only 5 to 15 insurance companies that you bill. 
    
    
    
    The only other thing that I can think of would be to have the lookup built around a set (if that is possable)that would have a one to many link between the procedure & fee schedule? This sounds like a good question for Peter Wayne....I believe he has developed an application for his practice...

    Comment


    • #3
      RE: Two dimensional lookup

      Code:
      Hi Ohlen,
      
      I am not sure that I have a clear picture of what you mean by 2D lookup.
      If you are billing several insurances, & there is a field for the type of 
      insurance the patient has..... then I would thing you could use a conditional 
      lookup based on the value in the INS_TYPE field to get the proper fee schedule.
      
      The graphic below is how I would set up the lookup table.  You will have to have
      enough fields in the table for the number of insurance companys you bill. Each 
      procedure would have it's own record with a matching fee schedule for each 
      insurance that you bill.  Depending on the practice you may have several hundred 
      procedures or even several thousand.... but maybe only 5 to 15 insurance companies
       that you bill. 
      
      
      
      
      The only other thing that I can think of would be to have the lookup built around 
      a set (if that is possable)that would have a one to many link between the 
      procedure & fee schedule? This sounds like a good question for Peter Wayne....I 
      believe he has developed an application for his practice...

      Comment


      • #4
        RE: Two dimensional lookup

        Ohlen, two dimensional arrays can be simulated using arrays of pointers. If I recall correctly Selwyn posted sample script showing the technique. Try searching the message board for multi-dimensional arrays (you may have to try variations in the key word search string).

        Comment


        • #5
          RE: Two dimensional lookup

          Ohlen,
          Additionally Peter Wayne has an excellent article on Dot variables in the Alpha Learning Forum. My question is what are you trying to achieve in the lookup? Are you entering a transaction for a patient for a particular procedure code and trying to find that patient's insurance carrier's reimbursement rate for that procedure? Or is it something else?

          John

          Comment


          • #6
            RE: Two dimensional lookup

            Ohlen,

            Let me play devil's advocate on this. You are in effect proposing to denormalize the way you store your data on ins. co. and procedure.

            What would be wrong with creating a separate record for each procedure-company combination (with a fee field) and indexing on the combination (probably proced_id+comp_id)?

            That way you do a simple lookup on the combination to find the fee.

            I'd supply a graphic but I ain't Doug yet!

            Bill
            Bill Hanigsberg

            Comment


            • #7
              RE: Two dimensional lookup

              Thanks for the replies. I thought about a conditional lookup in the field rules first, but it would require a table for each insurance company and there are a lot of them. Doug's lookup table is what I had in mind. But how do I lookup the fee for procedure 99203 for insurance company 1?

              Comment


              • #8
                RE: Two dimensional lookup

                I agree with Bill's suggested table structure. I may be missing something but if you have already entered the procedure code (you can have a lookup for that), and the insurance carrier which is probably attached to the patient, why do you need a lookup field rule at all ????? As Bill said a simple lookupn expression will retrieve the fee. This could be a calculated field or a default expression. If it is more complicated than that (eg a patient has several carriers and you are looking for the cheapest rate for a particular procedure code) then there may be other options.

                Comment


                • #9
                  RE: Two dimensional lookup

                  Ohlen.....

                  But how do I lookup the fee for procedure 99203 for insurance company 1?

                  I wasn't prepaired to do that much thinking tonight!

                  The only thing I could can come up with would be to use the OnEdit field rule event. After you put the cpt into the browse and tab to the fee schedule field, the OnEdit event for that field will fire. The pseudo code would go something like this.

                  1) set variable1 = to the field value that stores the insurance carriers name for the current record. This doesn't have to be the complete name of the insurance company it can be a code that represents the field in the lookup table that contains the fee for the procedure based on the patients insurance company.

                  2) set variable2 = to the cpt code

                  3) open the table that contains cpt codes & fee schedules.

                  4) use fetch_find() to set a record pointer to the cpt code = to variable2

                  5) use the select....case function to get the proper fee based on the value
                  of variable1 ( variable1 will be used to identify which fee schedule "field"
                  will be captured & written to the desired browse.)

                  6) write the value

                  7) close the lookup table.

                  I'll be the first to say that this may not be the best approach, but if nothing else, it may spark some more suggestions from others.....

                  Comment


                  • #10
                    RE: Two dimensional lookup

                    Ohlen,

                    I can't speak explicitly to the Alpha 5 solution, but I have been writing/upgrading a medical application for many years in another language. I have ordered Alpha 5 V 4.5 for a rewrite and am very excited about the product and the imminent release of Version 5.

                    The problem I see with your proposed solution is the fact that you have to "hard code" the number of columns for payors, which is a dangerous practice.

                    The methodology of a table with three fields, as follows:
                    1. ProcCode
                    2. Payor
                    3. FeeRate
                    Plus a fourth field of the calculated type:
                    4. ProcPayor
                    Which would be the concatenation of (ProcCode + Payor)and used as the lookup key.

                    This makes for a simple lookup after creating a variable in your form that concatenates the ProcCode to the Payor and then uses it for the lookup.

                    Data entry for the ProcPayor Table is little more time consuming than the 2 dimensional "spreadsheet type" you discussed. There are several methods to ease that repetive process which I won't go into at this time.

                    Hope this helps,

                    Brent

                    Comment


                    • #11
                      RE: Two dimensional lookup

                      We did some work for an insurance provider, who used a consistent 8 insurance companies. We had a pricing table associated with these tables. On the form we had two dropdown list (lookup table fields but could be variable arrays--> whicick we use on our quote worksheet) The user finds the provider company and the associated plan and alpha counts the total number of participants and whamo the prices for billing are loaded automatically. Works very well.

                      Another way to do the same thing is to have a variable placed on a popup form with radio buttons. Once the user chooses the proper info the form closes and the variable is used as reference. Hope this is beneficial.

                      Other way is to have an orphaned set-->see Waynes website, and use the onkey event to fetch find the necessary information.

                      Comment


                      • #12
                        RE: Two dimensional lookup

                        Brent,

                        Based on your decision to build a combined field, I can guess at least one 'other database' you might have been using. In A5 the combined field isn't necessary to set up a relation to another table. Instead, when you define the set, just build a relational expression which is the same as your calculated field. This way you don't need to waste extra data space and have a field that somebody (maybe you in a few months) will wonder its purpose is. Worse yet, if you change the logic later and eliminate that set (or query in some 'other databases'), the calculated field will remain even though it is now useless unless you remember to delete it. But, in a few months, you may not even remember if it is needed somewhere else; so now it remains ... wasting space indefinitely.

                        Comment


                        • #13
                          RE: Two dimensional lookup

                          I may be missing something here. Why not set up a one to many set? - Procedures to Insurance Companies/Fees. Pop up a dialog form with the set, select the procedure, and put xbasic on the close button to write back the values. Perhaps not the prettiest solution, but it gives the user all the options. If you know the procedure in advance, you can query the dialog to only display that one, and list the Insurance Companies/Fees to fill. No?
                          Peter
                          AlphaBase Solutions, LLC

                          [email protected]
                          https://www.alphabasesolutions.com


                          Comment

                          Working...
                          X