1 2 Previous Next 23 Replies Latest reply on Dec 22, 2012 10:30 AM by philmodjunk

    Allow Duplicate but set up a dialog to alert the duplicate

    KatG

      Title

      Allow Duplicate but set up a dialog to alert the duplicate

      Post

           OK one more question and I promise (I'll try really hard :) not to bug you anymore today.

           I currently have several patients with the same last name, scheduled for the same day. How do I format to cue me with a ""Name Alert"  show dialog or something else?

           I did a forum search and the posts seem to be related to different fields or dates I didn't come across one that seemed to address this.

           I created an a name alert field but I am in the dark as to how to write the formula condition for the format     

           The Table     PATIENT::ID_Pt             primary key

                                PATIENT::LastName     Text Field

                                PATIENT::NameAlert    Text Field

           I need something like "when the ID_Pt doesn't equal the ID_Pt in another record but the Last Name fields are equal... launch a dialog box.... "Name alert"

           Is my reasoning on the right track?

        • 1. Re: Allow Duplicate but set up a dialog to alert the duplicate
          philmodjunk

               First cut: Does this work?

               In Manage | database | Fields, double click the name field and select "unique values", but also allow the user to override the data entry warning. Then use the custom validation box to enter a custom message to the user that will appear when they create a record where the value in the field duplicates that found in an existing record.

          • 2. Re: Allow Duplicate but set up a dialog to alert the duplicate
            KatG

                 That works when I am entering in a new patient (and I will keep it there, thanks) It does nothing when I am finding exisitng patients. When 2 patients of the same name appear on the schedule (which is sorted by room number) it is not obvious that there are 2 patients of the same name if they are at opposite ends of the building. I have a portal which creates my "schedule" and I have a GTRR button in the portal for that patient on that particular encounter.  Is there a step I could add to the GTRR button that would recognize duplicate names in the name field of the portal?

            • 3. Re: Allow Duplicate but set up a dialog to alert the duplicate
              philmodjunk

                   Can you explain what you are doing in more detail?

                   Especially: what are the relationship details, do you match records by patient name or an internally generated serial number?

              • 4. Re: Allow Duplicate but set up a dialog to alert the duplicate
                KatG

                     for the FEDS:   HIPAA disclaimer:  All names were changed to protect the innocent

                     Records matched by serial number:  

                        In the browse mode pic, hopefully you can see that the duplicate names appear in the schedule portal... they are somewhat obvious in this example but though I try to keep the room numbers updated, the facility plays musical rooms and there are even husband and wife residents who live in the same room...(Edith Jones and Edward Jones) I have had patients with very similar names (Neilson and Nelson) Or duplicate last names with very similar first names ... Ray Smith and Roy Smith... in the same room or down the hall..... very risky and is an invitation to enter the data for the wrong patient.... but it is what it is, I don't have any choice over where these patients are.  At a glance at 2am I might not realize that Roy is actually a new patient and I think I'm seeing my established patient Ray whose room was changed.... I also don't have the luxury of starting an encounter and finishing it.... I am constantly interrupted and need to be able to jockey back and forth so that GTRR button is really handy....

                     Some sort of alert, either on the schedule portal itself, or on the main layout that would alert me to the fact that there is a duplicate named patient to be seen in that day's schedule would just be a safe guard.... Put it on the "front burner"  I work evenings and into the wee hours, I'm just trying to head off any mistakes... ( I have learned the hard way with this and it is not fun to try make corrections in a patient's medical record.) Hope this helps!

                      

                • 5. Re: Allow Duplicate but set up a dialog to alert the duplicate
                  philmodjunk

                       The problems you describe with names are very familiar to anyone who has worked with databases with names for very long at all. The names aren't unique, names get changed and names can have very idisosyncratic spelling.

                       The first change that I'd make to your schedule portal is to include the patient ID number to help distinguish between patients that might have the same or similar names. If patients in your facility have wristbands, I'd take this one step further and see if I can set up a gadget to scan the bar code on the patient's wrist, but this sounds more like a long term care facility where you wouldn't necessarily have that option.

                       Flagging IDENTICAL names are easy, Flagging SIMILAR names would be pretty difficult.

                       I can probably come up with a way to flag entries in the schedule with identical names (Identical last and/or identical first names), but your relationship raises a question:

                       You have this relationship for your portal:

                       Encounters::gDOS = Encounter_jb_gDOS_Encounter::DOS AND
                       Encounters::gRoom_Cht = Encounter_jb_gDOS_Encounter::gRoom_Cht

                       Does the lower case g in these field names denote a field with global storage?

                       If so, what is the purpose for including the second pair of match fields, both of which are global, in this relationship?

                       Is this a filtered portal?

                  • 6. Re: Allow Duplicate but set up a dialog to alert the duplicate
                    KatG

                    The first change that I'd make to your schedule portal is to include the patient ID number to help distinguish between patients that might have the same or similar names. I can easily do that but it will only really help me if I am overtly aware of the duplicate. 

                          

                    If patients in your facility have wristbands, I'd take this one step further and see if I can set up a gadget to scan the bar code on the patient's wrist, but this sounds more like a long term care facility where you wouldn't necessarily have that option.  You nailed it... LTF we are extremely limited in our resources, I am a consultant, not an employee so I have even less "say" than the averge bear.  I created this database because I go to multiple facilites and they all have a differnet way of doing things...it is not uncommon to see patients in different facilities and it is very helpful for me to have their past history at my fingertips.... I really appreciate all of your help.

                    Flagging IDENTICAL names are easy, Yippee!

                    Flagging SIMILAR names would be pretty difficult.  Isn't really that big of a deal, I was just giving you an example of obstacles. I know I can't anticpate or run interference on everything... but it can't hurt to ask! :)

                    I can probably come up with a way to flag entries in the schedule with identical names (Identical last and/or identical first names), but your relationship raises a question:    A flag for the identical last names woudl be great as a start...

                    You have this relationship for your portal:

                    Encounters::gDOS = Encounter_jb_gDOS_Encounter::DOS AND
                         Encounters::gRoom_Cht = Encounter_jb_gDOS_Encounter::gRoom_Cht

                    Does the lower case g in these field names denote a field with global storage?  Yes I named the tables in that way so as not to lose what little mind I have left.... the tables will "stack" and it is easier to find which T.O. I need to use at the time. I'm sure I have quite a bit I really don't need by developer standards but I'm afraid to delete anything lest I lose something valuable.

                    If so, what is the purpose for including the second pair of match fields, both of which are global, in this relationship?  First, I wanted to have a "day list" sorted by the patient's room number, at some point I either posted a question related to this or I vicariously created it using examples from other forum posts. I have noticed that you and your fellow developers upload sample databases and I will study them, the scripts and formatting and such and try to apply it to my DB.  I have manged to be successful with several things.   I would like to say that I understand the rational behind the set up but I don't... I just know that this portal works   It is a list of patients for any one date  and is sorted by the patient's room number in ascending order.

                    Is this a filtered portal?  No filters in the portal set up.

                          

                    • 7. Re: Allow Duplicate but set up a dialog to alert the duplicate
                      philmodjunk

                      Yes I named the tables in that way so as not to lose what little mind I have left.... the tables will "stack" and it is easier to find which T.O. I need to use at the time. I'm sure I have quite a bit I really don't need by developer standards but I'm afraid to delete anything lest I lose something valuable.

                           But I was asking about the FIELD names, not the table names.

                           A relationship where both fields in a pair of match fields have global storage specified makes no sense here as the values in these two fields will have no effect on what records appear in the field Portal.

                           The trick for what I am working up to relies on an accurate understanding of your relationships as I plan to use ValueCount, FilterValues and List to compare the last name field of one portal record to a list of all last names currently showing in the portal.

                      • 8. Re: Allow Duplicate but set up a dialog to alert the duplicate
                        KatG

                             Oh sorry. Yes, the "g" in front does denote the global storage field

                             I think see what you are talking about:   gRoom_cht >--------<gRoom_cht  of the same  Encounter T.O.s (the blue tables)   The portal is sorted by   Room_cht (the patient's room number , which is a Text field)

                             I just made a copy of the DB and went in and changed that relationship (and only that relationship) to     gRoom_cht >-----------<Room_cht    and for whatever reason....the portal went blank.  All the Fields went blank in portal.  (The theme to the Twighlight Zone is playing softly in the background.... )    I restored the relationship and everything was the way it was before...

                             I then went in and deleted  "gRoom_cht >-----<gRoom"  but left  "gDOS >-----<DOS"  intact and the portal records were then sorted by Patient_ID but did appear to be correct.  . 

                             I have no idea why this occurs, or how it came to work in the first place ..... it was either some weird accident I stumbled upon or another developer suggested the relationship design. But it does appear to be necessary for that portal to sort by room number.

                             So.... If what you are suggesting would not work with the relationships as is.... is it "thinking like a developer" to  create another set ot T.O.s with just the gDOS>--------<DOS relationship , and apply your "plan" to another portal based on the new set of  T.O.s ?   BTW... I'm using FM12.

                        • 9. Re: Allow Duplicate but set up a dialog to alert the duplicate
                          philmodjunk

                               I don't see how including a pair of global fields as match fields can have any impact on how the records sort. My suggestion was to remove that pair to keep things simple. Perhaps you could upload a screen shot of the dialog that appers when you duoble click that relationship line? I'm still being careful here.

                               Nevertheless I believe that you can use this expression or one very similar as a conditional value list to flag records in the portal with identical last names

                               ValueCount ( Filtervalues ( List ( Encounter_jb_gDOS_Encounter::LastName ) ; Encounter_jb_gDOS_Encounter::LastName ) ) > 1

                               If a patient's last name is not in Encounter_jb_gDOS_Encounter::LastName, it should still work if you refer to the related table occurrence that does contain the name.

                          • 10. Re: Allow Duplicate but set up a dialog to alert the duplicate
                            KatG

                                 I don't begin to understand it either...but as I have stated if I remove the relationship... it doesn't work.    I will play around on the copy DB with another set of Table occurances.

                                 I have never used the Value Count... Where Does this show up or where do I put it?  Is it a formula for a conditional format? and if so, it is formatting for the last name field?

                                 The patient's last name (the field) is from the bouy (the purple T.O.) "  encounter__jb_gDOS__encounter__jb_PtID__Patient::pt Last "

                                 So I would use this in the above expression?

                            • 11. Re: Allow Duplicate but set up a dialog to alert the duplicate
                              philmodjunk
                                   

                                        I don't begin to understand it either.

                                   Yes but when I say that, I'm speaking from the perspective of over 10 years experience working with FileMaker databases. I can't help wondering if one of those fields really isn't global.

                                   

                                        Is it a formula for a conditional format? and if so, it is formatting for the last name field?

                                   Yes and yes.

                                   I believe that this will work:

                                   ValueCount ( Filtervalues ( List ( encounter__jb_gDOS__encounter__jb_PtID__Patient::pt Last ) ; encounter__jb_gDOS__encounter__jb_PtID__Patient::pt Last ) ) > 1

                                   But test it to make sure.

                              • 12. Re: Allow Duplicate but set up a dialog to alert the duplicate
                                KatG

                                     forgot to attach this with last post

                                • 13. Re: Allow Duplicate but set up a dialog to alert the duplicate
                                  philmodjunk

                                       The "allow creation" option in conjunction with the global fields might be a factor in what you are seeing. Using a portal to create a new record will automatically copy the value from the global field in the other table into the global field in the portal table--not how I'd do it, but maybe a factor here...

                                       It should not affect what I am doing, however...

                                  • 14. Re: Allow Duplicate but set up a dialog to alert the duplicate
                                    KatG

                                         This is the field... is there something else I should have checked of or enabled? I didn't mean to suggest that you are not experienced here  I am so appreciative of your help... I think if I was a baseball player I'd be excellent at throwing curve balls.... 

                                    1 2 Previous Next