3 Replies Latest reply on May 10, 2011 2:26 PM by philmodjunk

    setting up relationship to show a subset of records

    denno

      Title

      setting up relationship to show a subset of records

      Post

      I am setting up a database for patients admitted to the hospital with pneumonia. The data are imported from an Excel file. The 1st table is PATIENTS. One of the fields is hospital location; one of the values for that field is ICU. I would like to analyze the subset of patients admitted to the ICU. I created a 2nd table named ICU. This table has a location field that has an = relationship to the location in PATIENTS.

      I'm stuck on creating records in ICU. If there are 20 ICU admissions in PATIENTS, I need to create 20 records in ICU, correct? I'm not sure how to accomplish this--do I need to run a script after import that creates the record based on a calc?

      Thanks for any help-

        • 1. Re: setting up relationship to show a subset of records
          philmodjunk

          Are you sure that you need the extra table?

          Did you know that you can enter find mode and enter ICU into the hospital location field to pull up all records for that loation?

          What kind of analysis do you need to do with your data? (That will better help me understand what you need here.)

          • 2. Re: setting up relationship to show a subset of records
            denno
            I was thinking it would be easier to just switch to a layout that displays what I want to see rather than going in to Find mode. I did set it up with a portal that displays what I need. I will probably also need to be able to do some summary reporting on some of the other fields (e.g., time between 2 events that are recorded.)
            • 3. Re: setting up relationship to show a subset of records
              philmodjunk

              All that can be done. And the find can be automated. In fact, you can create a layout for this purpose and use a script trigger to run a find that pulls up the desired records each time you select that layout from the layout drop down or click a button that takes you to that layout.

              Nothing wrong with using a portal, however, though summary reports will work best from a layout based directly on your original table here. It doesn't have to the the same layout, however. You can create a layout strictly for the purpose of your summary report.