5 Replies Latest reply on Jan 15, 2017 1:44 PM by RickWhitelaw

    Importing matched fields

    tays01s

      Can I check my 'logic' for flaws.

       

      I have a multi-table DB who's tables are related by UUIDs, Parent < Child. I've illustrated the parent child levels below using numbers, with a, b, c representing different tables at the same level:

      1a < 2a < 3 < 4 < 5

      1a < 2b

      1b < 2a

      Users will use 1a to ID records and will export by combined match fields showing a name/number field combination. Up to here I'm reasonably confident the system works.

       

      There can only be  records in table 1b and related to each record in table 1a for tables 2a, 2b and 3. I am thinking of using 'Date' as the match field for tables 1b, 2a/b, and 3 and UUID for 4 and 5.

       

      Potential problem: The DB is a standalone RT where 2 or more users might potentially generate records for tables 1b and 2-5 based on the same 1a record on the same of different dates. Because there's potentially an overlap in dates, would my proposed 'match field' import system result in the 1a parent record having the maximum number of 1b and 2a/b-3 table records collated?

        • 1. Re: Importing matched fields
          philmodjunk

          Replacing your names with letters produces an alphabet soup that his generally harder to follow than if you used names.

           

          What would dates have have to do with with relationships based on UUIDs?

          • 2. Re: Importing matched fields
            tays01s

            Ah, I was hoping to make it simpler to understand.

             

            Relationships are via UUIDs. However, I wrongly also used UUIDs as the import match fields. Of course it 2 users deal with the same Patient (Table 1a) and each have a record for this, importing from one user to the other will never find a match, because they are each unique IDs. Hence I switched to a name/hospital number method for the 1a match field. Records from tables 1b, 2a/b and 3 are each recognised by the User by their date, so I thought it best to match fields by date for each of these tables. As for tables 4/5, if they were related to a new parent record, they'd get added even using UUID as the match, and if their parent wasn't new, it's probably best they weren't added.

             

            At least, that's my logic. But I'd appreciate comments on whether I've making mistakes before I try rolling it out !!

            • 3. Re: Importing matched fields
              philmodjunk

              UUIDs are specifically designed to make this sort of thing easier not harder. Matching by dates does not seem like a workable approach.

               

              It sounds like the problem you are dealing with is that 2 users on separate copies might create a patient record for the same patient. That will pose a problem for any type of ID that you might generate from separate applications.  You need an identifier available to that patient which is unique to that patient.

              • 4. Re: Importing matched fields
                tays01s

                I'd like a unique ID, but because they're standalone Runtime's it doesn't look possible. The best I can do (that I know of) is to ID the patient by name + fairly uinque hospital ID and the other tables in another way.

                • 5. Re: Importing matched fields
                  RickWhitelaw

                  Why doesn't it look possible?