1 Reply Latest reply on Mar 11, 2013 3:28 PM by philmodjunk

    Multiple level search layout?

    SabrinaHollinger

      Title

      Multiple level search layout?

      Post

           Hey,

           I currently have a database with 2 layouts, one for patients and another for the visits that are related to one another.

           I am attempting to make a new layout, if possible, that will allow me to put in certain search criteria to find the patients that fall into the specified criteria.

           One example would be finding the patients with arthitis, along with being in the range of 30-40 years. Not only would I want a number of patients that qualify that criteria, but also the amount of patients between 30-40 that do not have arthitis.

           Ideally I think the search would need to have various inputs, at least two, that could be changed using the browse mode, and to give results in number format. Very many searchs will need to be done that will all have multiple criterias, possibly on different tables, so it would not be very useful to use the "Find' button and input the desired criteria that way.

           I haven't been able to located anything similar to this online and was just wondering if it would be possible to streamline the search process or if I will need to use the "Find" function. Likewise if it is possible to do so using only one table, or if both can be employed.

           Thanks for any help!

        • 1. Re: Multiple level search layout?
          philmodjunk

               One example would be finding the patients with...

               What you describe is really finding all patients in the specified age range and then sorting them into two groups::those that have at least one visit where the reason for the visit was arthritis.

               First, take at least a quick look at the scripted find examples at: Scripted Find Examples

               What I am describing follows the pattern set down in those simple find scripts.

               You can use two global fields, gCondition and gAge for a scripted find and sort.

               Define a calculation field, cHasCondition that uses gCondition to return a 1 if at least 1 related visit record was for the specified condition. The precise syntax of that calculation depends on what field or fields in the Visits table would contain data that identifies the reason for the visit.

               You would enter an age or range of ages in gAge and your script would then perform a find to find all patients in that age range. Then it would sort your records by cHasCondition to sort them into the two groups. A sub summary layout part (when sorted by gHasCondition), can be used to split the resulting list of records into two groups and a summary field can give you the number of records in each group.

               You may find this old but still relevant post on summary reports helpful: Creating Filemaker Pro summary reports--Tutorial