6 Replies Latest reply on Mar 17, 2014 3:58 PM by MichaelPoling

    New Layout relationship

    MichaelPoling

      Title

      New Layout relationship

      Post

           I am trying to create a new layout without using a portal that will allow me to enter Data that will be stored under the patientID, episodeID and visitID.  I realize that without a portal I will have to do this via scripting, but it makes for better printing for the user.

           So I have created a script that will go to the appropriate layout for the table that will store the data (PatientHandout), create a new record and then allow my data entry.  As can be seen from my relationship diagram, all of the relationships are taken from the ProgressNotes table.  

           However when I create a new record, the patientID, episodeID and visitID do not populate.  My understanding was that creating the relationship would automatically populate these Fields.  Is this the case, or do I need to create an autofill lookup?

      Screen_Shot_2014-03-14_at_3.53.34_PM.png

        • 1. Re: New Layout relationship
          MichaelPoling

               I assume if I do need to create a lookup, I could just SetField for the PatientID, EpisodeID and VisitID in my script.

          • 2. Re: New Layout relationship
            philmodjunk

                 Why not just make a new layout based on Progress notes and format it to show info you want to hand to the patient? Why add another new table?

            • 3. Re: New Layout relationship
              MichaelPoling

                   Hmm...good point.  I suppose I was taking the FTS to heart and thinking that because it was another "section" of data, that I needed to capture it separately.

                   Never ceases to amaze me how many different ways there are to think of these things and how to design the database.

                   Thanks again PhilModJunk!  You are an excellent teacher!

                   Mike

              • 4. Re: New Layout relationship
                MichaelPoling

                     Hmm, ran into a snag for some reason.  I created the new layout, but when I created a button to Go to Layout from the Progress Notes portal, it doesn't bring up the correct record.  Only whatever record it was on previously.  It brings up the layout ok, but it looks like it isn't linking to the VisitID, even though it is in the same table...??

                     So to check it out, I created a Pop-over within the portal to do the same thing and display the layout there--it links fine there.

                     What am I missing?  I can't use the pop-over because you can't print them, but I also can't seem to get the record to come up in the new layout from the portal on the old layout.

                     Curious.

                • 5. Re: New Layout relationship
                  philmodjunk

                       Instead of go to layout--which does nothing to select a record on the target layout--it just shows whatever record happens to be current, use Go to Related records to pull up the desired portal record as the current record on your target layout.

                  • 6. Re: New Layout relationship
                    MichaelPoling

                         Ahh, ok.  I thought the Go to Layout would relate to the portal record, but of course neglected to think that it is the active portal row, not the active record...Thanks again!

                         Mike