3 Replies Latest reply on Jul 20, 2011 9:04 AM by philmodjunk

    Auto-populate fields in new record with data from previous record

    BenPlunkett

      Title

      Auto-populate fields in new record with data from previous record

      Post

      Hello,

      I'm just beginnig to work with FileMaker, so please bear with me.

      I'm working on a database which will track patients and the medications they are taking. When a physician sees a patient in clinic, they will create a record in the database with a list of all the medications they are taking, and the doses. When a patient comes in for a subsequent visit and their medications change, the physician will create a new record with the current list of medications (rather than editing a single record for each patient, to allow the physician to see the patient's medication history).

      Is there a way for subsequent medication records created for the patient to be automatically populated with the data from the previous record? If a patient is taking 6 medications, and on the second visit they only change a single one, it would be easier to create a record that's a copy of the previous record and make the change, rather than re-creating the full list of medications from scratch.

        • 1. Re: Auto-populate fields in new record with data from previous record
          philmodjunk

          There are several auto-enter options that can enter data from either the previously visited record (that can be hard to control sometimes) or a related record (which can be set up with a self-join).

          I think, however, your system would work better for you if your medication list for a given patient record was recorded in a set of related records displayed in a portal. With this approach, you'd pull up a patient record (or create a new record for this patient's visit) and a PatientID field would link the current record to their current medication list table and you can then modify the records in this portal to update their current medication list.

          • 2. Re: Auto-populate fields in new record with data from previous record
            BenPlunkett

            Thanks for the reply!

            I think I understand what you're talking about with the portal solution, but would modifying the records in the portal maintain the history of the medications? If a patient was taking medication X in June, but the dosage was increased in July, would there be a single record for that patient taking that medication, or two different ones with dates?

            • 3. Re: Auto-populate fields in new record with data from previous record
              philmodjunk

              As described above, it would not. I'd still use the portal approach as many other database tasks become easier when you have one related record for each listed medication.

              By using a script and a slightly different relationship, you can duplicate the medication records so that the portal displays records copied from the previous office visit for that patient.

              That now gives you two options. You can define a "self join" based on PatientID with a looked up value setting to copy the medications from a field into the new office visit record or you can use a script to duplicate the medication records, but update them with an "officeVisitID" number from the new office visit record so that the duplicated records automatically appear in your portal on the office visit layout.