1 Reply Latest reply on Apr 8, 2009 3:36 AM by Orlando

    Create and print variable number of field sets



      Create and print variable number of field sets


      I'm not sure how to search this so I'm just going to ask.  Sorry if it has been answered before.  We use FM 8.5 in our medical practice to create procedure forms.  We are trying to design a form with patient history, medical problems and medications.  For each patient, we must list the medication name, route of administration, and dose.  Obviously, each patient will have a different number of medications.  We'd like to have the form look something like a mail merge program where empty fields are not printed and the layout is adjusted accordingly.  Two different sheets would print out something like this


      Smith, John         Doe, Jane


      Med 1                 Med 1

      Med 2                 Med 2

                                Med 3

      Procedure            Med 4




      Should I just create fields as we normally do and then for medications create med1, route1, dose1, med2, route2, dose2......med30, route30, dose30?  The information below could be set to slide up when the medications are blank (like where I have Procedure written).  I'll have to experiment a little, but any guidance would be appreciated.

        • 1. Re: Create and print variable number of field sets

          Hi srv


          What you want to do is create a new table to track a patients history, so you will have your current PATIENT table, and then a separate table that is linked to the patient record by a UniqueID in the PATIENT table and that table will hold field for medication name, route of administration, and dose. Doing this you can have as many or as few related records per patient and you do not need to add additional fields each time. Then you can display these related record in a portal, and set up the layout to print as required.



          First you will need to have a UniqueID field in your PATIENT table, if you don't already have one, and to do this create a number field called UniqueID and then hit the 'Options...' button and under the 'Auto-Enter' tab select the option for 'serial number' and click 'OK'


          Now you want to create your HISTORY table, and in that table create a filed called PatientID and make that a number, you can also add any other fields you need to track info on i.e. MedicationName, RouteOfAdministration, and Dose.


          Now you link the two table go into the Relationship tab and create a link between your PATIENT table ad your new table using the ID field



          UniqueID --=--   PrimaryID


          You can then click on the '=' box to display options for the relationship and you could select to 'Allow creation of records in this table' under the HISTORY side, this will mean in the portal on your layout you can click into the bottom row, which will be blank, and quickly create a new related record.


          And then on your layout create a portal that references HISTORY and display the three fields.


          Then creating a new attendance record can be down via a script, or clicking in the last row and inputting a date.


          I hope this helps in getting you started with this.