13 Replies Latest reply on Jan 7, 2013 1:15 PM by KatG

    Capture2.PNG

    KatG

      Capture2.PNG

        • 1. Re: Capture2.PNG
          philmodjunk

               Why would you need to change more than just the DOS date for the patient being seen after midnight?

               There are ways for a script to pull up a found set of records and use Replace Field contents to update them all in one batch, but such scripts entail the risk of modifying large numbers of records incorrectly due to user error and I don't see why you need to do that.

          • 2. Re: Capture2.PNG
            KatG

                 I manage chronic wounds, I have the layout set up with a portal that shows all the patients on my schedule for that day.  I can click on the name and the encounter record for that patient is active.  I also have tabs and for that patient encounter I have a portal for the wound exams, under each tab the portal is copied but set to show the second portal row and the next tab has the third portal row, Etc. and they show up if the records are active. The tabs are all conditionally formatted (thanks to you :) to cue me if I have "opened" the portal records The last tab has a copy of the portal set to scroll and display 10 lines and there are also count fields so I know when I need to scroll so I don't miss wounds 9 and 10

                 Joe has 3 wounds, Jane has 5 wounds and Jack has 8 wounds....  and so on. I know at a glance what I need to look at for each patient without having to scroll and lose my place or change layouts.  I have it formatted so that when I am done with an assessment It changes color so I can pick up where I left off if I am interrupted ( which basically happens every 5 minutes)  New patients are obviously more time consuming but the data entry is very smooth with this set up. Everything is linked by the global date and I need to maintain that if for nothing more than my own sanity.  I know at a glance that these records belong together, And the layout only shows the portal records for that patient/encounter Date of service. At the end of the day, or next day if after midnight, I have to resort to the prehistoric era and print these out on paper and file them in the cave we medical people call a patient's chart and I finally have that in a report.  

                 I am able to "open" the portal records easily with a script and I usually know what I need to assess ahead of time, I just don't always have the luxury of doing things in order. So if Jack is seen after midnight, It's easy enough to change the encounter date of service with one click but then I need to go to the Wound exam portal and manually change all of 8 or however many wound records.   During my set up for the day I may have entered Data into some of the fields (Lab values, test reports etc ) so I need to be able to keep those records open, instead of just opening a new set.

                 One patient has many encounters, each encounter may have one or many wound exams....

                 I hope this makes sense.

                  

            • 3. Re: Capture2.PNG
              philmodjunk

                   Why do you have the date of serve date field in both the encounter and the wound care records? Why not just put the date in the encounter record and show the date of service on each wound care record by showing the field from the related encounter record?

                   This assumes that you are creating a new record each time you provide care for a specific wound and that each can then be linked to a specific encounter record.

              • 4. Re: Capture2.PNG
                KatG

                     I put a date field in both tables because somewhere along the line it was suggested by the forum developers and was related to something else I wanted FM to do for me, OR it was something someone else posted and they had a similar situation and I was able to apply the steps to my database and accomplish what I needed.  I can't remember which. I had a hard time when starting this project with "losing" the linked records (I know they are not lost but I didn't know how to search for them...moot point now, this is how that problem was solved) 

                     This way I see only the date related records in those portals. I know there are ways to find the set of related records however they are linked... this works for me and I can have the peace of mind that this is information that belongs on that date of service at a glance, I don't have to worry about it... And when it comes to the report, I have somehow managed to use that date's related records as a value list and then I bring the related records into a field for this purpose into encounter record...I have multiple tables that need to be represented in the same report without printing from portals on the report layout. I know this is something I picked up from someone else's post, the developers (probably you) suggested something called a "Max Creation Date" and provided a calculation for it... I am not very good at explaining my rationale for needed things a certain way... I was told by another developer that I could not create a report in the way I wanted and I think you even commented that it would be very difficult to create a script  to do what I wanted at the time...

                     Now that I have you thoroughly confused... I need the dates in there,  I was hoping there was a way to write a script that basically translates to:

                     IF the Encounter::DOS equals the WndExam::DOSwndexam,  When the Encounter::DOS value is changed to a different value... insert the the new value into the WndExam::DOS Fields that contained the original value....  

                     If I get it to work for this portal I can then duplicate the script to work for the other tables if I need it to do that

                     Thanks Phil, hopefully this is a little clearer.

                      

                • 5. Re: Capture2.PNG
                  KatG

                       Oh and Sorry about the headline Capture2.png.... I submitted the post before I entered a title

                  • 6. Re: Capture2.PNG
                    philmodjunk

                         I really don't think that you need the dates in there. There may be a situation where you may need that value, but can use a calcualtion field to repeat the data from the encounters record. This unstored calculation will automatically udpate when you change a date in the encounters table.

                    • 7. Re: Capture2.PNG
                      KatG

                           I need the date.  I'm not sure of the "why" or "how".   I enter the data into the wound exam portals. I have narrowed it down so that a text calculation field combines all the fields in that entire record into a narrative paragraph.  If I have 8 wound records I then have 8 paragraphs.  There is another calculation field that turns those 8 paragraphs into a value list for a check box set, but it relies on the Date.  (if I did not use the date, checkbox set  would grow so large that it would not be usable, and it would sort alphabetically everything would be out of order)  On the encounter table I have a field  "get wound exams"... I am able to check off all 8 of those paragraphs (in whatever order I choose) and they then become 8 records from one table entered into one field of another  table.  That same field is in the report as but set as an edit box, and then  8 paragraphs are all nicely in there I can apply the sliding/ resize attribute to that one field in the report where I could not apply those same attributes to the portal.   I also have a similar set up for a Time Table, a Diagnosis Table and a Face Sheet Table.   I can’t lump the Wound table and the Diagnosis table together.  I also need to be able prioritize the diagnosis order at the last minute….so having the check box for that is nice because I can change the order without having to sort.   I could not get a report into a format that would work for what I needed and this all came about because of those report limitations and portal format restrictions, not to mention, the recurring theme of every developer on the forum has insisted that one should never design a report to print from portals…. Such is the method to my madness. 

                           Back to the screen shot,  how  do I set up a script to find the related records and change the dates?

                      • 8. Re: Capture2.PNG
                        philmodjunk

                             I remain unconvinced that you are correct.

                             In which table are there sets of records you have to update in this fashion? I only see one table with a date field and from what you describe, you have two. (The field in encounter appears to be global.)

                             In general terms, you can use go to related records to pull up a set of records and then use replace field contents to update a field in the resulting set.

                        • 9. Re: Capture2.PNG
                          KatG

                               Sorry if this is duplicated I thought it was submitted but I don't see it.

                               The encounter table has a DOS field and a gDOS field, The Wound Exam table has a DOS field, The gDOS from the enocunter filed links to it. the records will need to update in the Wound Exam Table when the DOS is altered in the Encounter table and the other portals also

                               I moved them out of the way when I did the screen shot, I figured that if I could get a script to work for one of the portals, I could duplicate it and alter it as necessary. The other tables have similiar Date, MaxCreationDate and calcualtion fields. My layout is set up so that I only see the encounter records for that date (I have a portal the lists the patients), if I change the date of the ecnounter the patient disappears from that list and the portal records related to that date.  so maybe the next screen shot will make sense to you. I am sorry that I can't explain it any better.

                          • 10. Re: Capture2.PNG
                            philmodjunk

                                 From your encounter layout, this script:

                                 If [ Not IsEmpty ( encounter_WndEXAM::ID_PT ) ]
                                    Freeze Window
                                    Set Variable [$DOS ; value: Encounter::DOS ]
                                    Go To Related Record [Show only related records; From table: encounter_WndEXAM; Using layout: "encounter_WndEXAM" (encounter_WndEXAM)]
                                    Replace Field Contents [no dialog; encounter_WndEXAM::DOS ; $DOS ]
                                    Go To Layout [original layout]
                                 End If

                                 Will update all the wndExam records related to the current encounter record.

                            • 11. Re: Capture2.PNG
                              KatG

                                   Good Morning Phil!

                                   I get error messages with this so I have a couple of questions (i'm trying to learn the rationale to the script steps in the hopes that I might one day be able to write them :)

                              Go To Related Record [Show only related records; From table: encounter_WndEXAM; Using layout: "encounter_WndEXAM" (encounter_WndEXAM)]
                                   Replace Field Contents [no dialog; encounter_WndEXAM::DOS ; $DOS ]

                                   I can set this  From table: encounter_WndExam; because that is the bouy, there wasn't a layout "encounter_WndEXAM" (encounter_WndEXAM), my understanding is that Layouts should all be based on the ANCHOR table and the portals based on the bouy...

                                        I created a layout based on the encounter_WndExam Bouy just so this would have somewhaere to go but it didn't work,

                                   Also, I'm not sure if this matters,    When I do this update manually, I need to change each portal record  before I change the Encounter::DOS

                                   I think because that layout is showing me the records for the Encounter gDOS?

                                   If I change the Encounter DOS First,  the Wndexam portal goes blank... is that because WndExamDOS  is not linked anymore to the

                                   Encounter::gDOS ?)  

                                   Do I need script steps that target the portal or is targeting the other layout the way the portal is targeted?

                              • 12. Re: Capture2.PNG
                                philmodjunk
                                     

                                          I can set this  From table: encounter_WndExam; because that is the bouy, there wasn't a layout "encounter_WndEXAM" (encounter_WndEXAM), my understanding is that Layouts should all be based on the ANCHOR table and the portals based on the bouy...

                                     Any layout based on an occurrence of the same data source table:wndExam can be specified. Creating the new layout should have worked. "Didn't work" doesn't tell me HOW it didn't work so I don't have much to go on there.

                                     

                                          When I do this update manually, I need to change each portal record  before I change the Encounter::DOS

                                     

                                          I think because that layout is showing me the records for the Encounter gDOS?

                                     Why do you need to do that? Is the portal to encounter_WndExam or some other table occurrence? Given the relationships shown, changing the value of Encounter::DOS will not affect what records in encounter_WndExam are linked to the current record so this should not be necessary. It sounds like you are changing the gDOS field instead of the DOS field.

                                • 13. Re: Capture2.PNG
                                  KatG

                                       I missed this on the first go around   "replace with calculated result"   $DOS   in the   specify section... "

                                       Then I got it to work and  but it had the "replace field contents" popup  .....

                                       Then I figured out this is what "Perform without dialog" is about!  

                                       Thank you so much, Phil!

                                       Even though I need to be fed a lot of FM fish, I am very slowly learning how to fish!

                                       You have no idea of how much time you have saved me!

                                       Thanks again

                                       Kat