1 Reply Latest reply on May 9, 2012 9:48 AM by Stephen Huston

    Copying records from one table to another.


      Hello All,


      I am trying to figure out a better way to do the following. I have a table called "Reference ROS". In it I have a bunch of records that I use as a reference to import into another table. Specifically these are called Review of Systems items which are used to ask patients questions about symptoms or history. For example, one record may be in the category of "cardiovascular" and the specific item is "chest pain?" Over time, I may want to add items or change the text but since they are going to be copied into an encounter note for a patient, the changes can only occur prospectively. (I believe this is termed transactional data? ) Anyway, from the patient encounter table I have a "join" table that I copy all the records into so that there is a new "cardiovascular, chest pain" record in the join table for each encounter. The way I have done this is to set up a layout with a portal from the join table to the Reference ROS table. I create a new record in the join table and then copy the data from the first row of the portal. Then I create a new record and copy the data from the next row of the portal and so on. This works but is very slow, now that I am up to about 200 ROS items. Is there a better way? It seems to me I could identify the entire group of records I want and copy them en block into the join table, but I can't figure out how to do this and keep them referenced to the encounter table. I have a field in the Reference ROS tablet that I can use to decide which ROS items I want for a specific type of note. For example, if a patient is being seen for a new patient visit, all the items will be copied over, but if they are there just to have a blood pressure check, than I might only want a few items to be copied over. I've used this field as a way to limit which records I want in the portal on the join table and that works well.


      I appreciat the help.





        • 1. Re: Copying records from one table to another.
          Stephen Huston

          You could make the "questions" in one table, as you have, and have them entered into question fields in the individual records as lookups on creation. This way each new record for a patient would have the current question entered in each field. These fields could be used as text objects on the layouts for answering the questions.


          If you are using the questions in related child records rather than each as separate Q# and A# fields, you could still use the question table as a source of a value list, or even filtered as a related value list, so that you select the next appropriate question to ask as one field of the related record for the patient, and then have an answer field.