6 Replies Latest reply on May 28, 2009 1:52 PM by philmodjunk

    Problems with Portal display

    SEMJ

      Title

      Problems with Portal display

      Post

      I have been having a problem with a portal that I can't work out how to fix. I have 2 separate FileMaker files. In my main file I have a table called "Patient" and in the main layout (also called "patient") I have I have a portal referencing the other file using the relationship "Logbook". Using this relationship the portal is populated with individual entries into the "Logbook" file. However each entry into the logbook file may contain multiple procedures referenced using a "CaseID" field. I want to populate my portal with procedures and related data. Using another relationship in the portal in my main file gives me the correct number of entries but I think that the references are not unique so there are errors in some of the data displayed in the portal.

       

      I hope I have explained this fully. If anyone can help me or wants better explanation I would be grateful. I have a database diagram I can upload if I can work out how to do it.

        • 1. Re: Problems with Portal display
          jimlee
            

          Maybe you could define a calculated field in the logbook file that creates what you'd like to see in the patient file. Then display that in your porthole?

           

          -jim lee

          • 2. Re: Problems with Portal display
            philmodjunk
              

            I recommend placing each Procedure in a separate log record. Each record would have a Patient ID field that controls what records are visible in your portal (you have that already, I  believe). You would use your CaseID field to identify all log records that are from the same case. Now add an additional field (This can be a serial number field) that uniquely identifies each log record.

             

            Now set up your portal to sort all portal records first by CaseID and then by the new LogID field. Sorting on the first field will cluster the procedures by CaseID the subsequent sort by LogID will but them in their original data-entry order. If each logged procedure has date/time data, you may be able to avoid using the additional LogID field, and just add the date and time or timestamp fields to your sort order.

             

            • 3. Re: Problems with Portal display
              SEMJ
                

              Thanks for the suggestions but I don't think I explained all of the relationships properly. Each patient referenced in both databases has a unique reference number. If I have got this right then the portal should use this to get all procedures from the other "Logbook". I think that the problem I have is that in patients who have had multiple separate entries in the logbook file (multiple visits to theatre), some of which have multiple procedures in a single visit, the portal generates multiple related records rather than a single related record for each line in the portal.

               

              I don't think I am explaining this well.

               

              As an example, in one case there is a patient who has had 2 visits to the operating room. On one visit 2 procedures were carried out and on the second one procedure was carried out. If I set the portal to use the relationship "Logbook" then 2 procedures are listed. The second procedure from the first visit is not shown. If the other relationship (Procedure) is used then 3 procedures are listed, which is what I want to see. The problem then is that related records are not unique and the date of the latest is shown against all procedures, rather than the date for that particular record. Other records are also placed against each procedure from other tables in the same file which seem to behave normally.

               

              Do relationships to external files behave differently? Sorry if this makes little sense. I will try to clarify if necessary.

               

              Thanks again. 

              • 4. Re: Problems with Portal display
                philmodjunk
                  

                It's always a challenge to recommend solutions when we don't know the exact structure of your tables, fields and relationships. :smileywink:

                 

                "The problem then is that related records are not unique" That's a key problem. Each procedure record should have a unique ID. An auto-entered serial number may be a useful way to do this. In addition, the combination of date and procedure name should also be unique for each logged procedure. Keep in mind that you can have multiple key fields in your procedure table. One key can identify the patient, another the specific hospital visit and a third can uniquely identify the specific procedure.

                 

                "... and the date of the latest is shown against all procedures, rather than the date for that particular record." I can't tell from your post why this would be the case. The date of each procedure should be stored in the procedure record and should be specified during data entry when it is "logged".

                 

                Perhaps you could layout for us the tables and relationships involved?

                • 5. Re: Problems with Portal display
                  SEMJ
                     Thanks again for the suggestions. I have actually worked out how to fix this myself. I think explaining it helped me to see where the problem was.
                  • 6. Re: Problems with Portal display
                    philmodjunk
                       As long as it works for you and you understand how/why it works--that's what really matters.