2 Replies Latest reply on Dec 14, 2015 8:55 AM by Linda

    How to handle related record update?

    Linda

      I'm new here, both to the forum and FMP, so please bear with me!  I'm using FMP14 on win7.

       

      I have a patient visits table, which is related to a sensor master table by sensor id. We give a sensor to a patient at a visit.  The sensor master tracks which patient has the sensor, at which visit it was given to the patient, when it is due back and when it actually came back.  Also, the sensor master has a sensor status of “in use”, “available”, “retired”, or “lost”.  The user is entering visit data through a patient portal that displays all visits associated with a patient.

       

      Is there a way to not update the related sensor master record until the user finishes entering the visit record?  Can I have a button on the visit portal row that the user must click to add or update the visit record and update the sensor master?  I want them to have a chance to review what they have entered before they add or update the visit record.  After they click the button, I want to update the sensor master record with sensor status of "in use", patient id, visit number, due date, and return date.

       

      How do I handle the situation where the user realizes that they have assigned the wrong sensor to the visit and comes back to the visit record to change the sensor id associated with the visit.  I need to update the previously assigned sensor to make it available for someone else.  How do capture the previously assigned sensor id and then do the update to that sensor?

       

      Should I just make the users go to the sensor master layout and make the corrections there?  Can I force them to the sensor master layout to make their changes and then return them back to the visit record?  Can I track the event "on a change in sensor id" when in the visit record so I will know to have them update the sensor master record?

       

      I'm all over the map on this and am hoping someone can help me sort this out!  Thanks in advance for your responses.

       

      Linda

        • 1. Re: How to handle related record update?
          macwombat

          Hi Linda.  Welcome to FMP and the forum   There are several options open to you and your choice will be determined by your business needs and workflow processes.

          1.  Its helpful to know that records in a portal are not committed until the main record is committed.  If your layout is based on patient and you have a portal to patient visit, fields you change in the related patient visit records are not committed until the patient record is committed.  Now turn off the "Save record changes automatically" in the Layout Setup in Layout mode.  When a user clicks outside the portal on the patient record they will be prompted with a "Save changes to this record?" dialog.  They can choose from "Don't Save", "Save" or "Cancel".  If you then want to make it more explicit what they should do you can add buttons to your layout to "Save" (commit records) or "Don't Save" (revert records).

          2.  This thread describes a way to work with new records in a modal dialog window before committing them, so that they can be reverted. Modal Windows/Revert Record  Instead of viewing the patient visit in a portal it could be viewed in a new window.

          3.  Another alternative would be to setup global fields for all the patient visit data - a new window or a popover button  is opened with the global fields on it.  Information is entered.  A "Save" button then runs a script to copy the data from each of the global fields into the actual fields.

          Hope this helps.

          • 2. Re: How to handle related record update?
            Linda

            HI Chris,

             

            Thanks for all your great suggestions.  I will rethink when I update the sensor master.  It sounds like I can create a button in the portal for the user to click with a script to add the visit record and update the sensor master.  If the visit record already exists, since my key is unique, will the add automatically update the visit record instead?

             

            thanks again.

             

            Linda