473,785 Members | 2,423 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Prevent Duplicate records based on multiple fields

Hello,
I have a delima that I am not sure how to resolve. Records get entered
manually or through an import. The records contain, RecordID, Client ID,
Specimen Date, Visit Date, Client DOB, and other info on the client. The
problem is, we bill off this information, and it is possible that the same
client can be entered more than once. So I need to have a unique record
based on Client, Visit (or) Specimen Date, and date entered. Presently, all
this stuff is in one table. I though I may be able to split the info out,
but I would still run into the same issue without a prompt which could become
kind of a pain as they could (theoretically) have the same client entered
(depending upon test results, etc.) multiple billing cycles in a row.

Any ideas?
--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
1 3270
Kathie G via AccessMonster.c om wrote:
Hello,
I have a delima that I am not sure how to resolve. Records get entered
manually or through an import. The records contain, RecordID, Client ID,
Specimen Date, Visit Date, Client DOB, and other info on the client. The
problem is, we bill off this information, and it is possible that the same
client can be entered more than once. So I need to have a unique record
based on Client, Visit (or) Specimen Date, and date entered. Presently, all
this stuff is in one table. I though I may be able to split the info out,
but I would still run into the same issue without a prompt which could become
kind of a pain as they could (theoretically) have the same client entered
(depending upon test results, etc.) multiple billing cycles in a row.

Any ideas?


I'm no database architect but I'd say you have a classic problem with a
lack of structure here.

As you say, you need unique information about your clients. This is a
sure sign you should have a separate table for Clients. A clients table
would contain information about clients and *only* about clients. It
would contain a primary key (ClientID) name, DOB, gender, etc. It would
not contain (in all liklihood) any information about an encounter.

Then you have encounters. An encounter involves a client, on a specific
date, at a certain time, and with some services/charges. So you need an
EncounterID, a reference to the ClientID, DOS, time, SpecDate, and...
charges?

Then you need a charges table, because there can be many charges for one
encounter. So you have a unique ChargeID, a reference to the
EncounterID, and (maybe) charge description, amount, charge type (pro,
lab, xray). Or maybe all the latter stuff goes into a more or less
static services table.

Then maybe you need an insurance table, with references to the client,
date entered, insurance name, coverage dates, etc...

Hopefully can see where this is going. All the business processes you
have ("encounter" , "charge", "bill") are separate entities. Your clients
are separate entities. These entities, kept in separate tables, are what
a relational database is all about.
--
Smartin
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4511
by: Rado | last post by:
Hi All, This might quite simple process for some but I am finding it really difficult to do. What is required is not a standard Duplicate query but a variation on it. For example I have following records: ID_Number Date Name Amount 100 1/1/02 Andrew $100.00 101 1/1/02 Andrew $100.00 102 2/1/02 Andrew $100.00
9
14587
by: Catherine Jo Morgan | last post by:
Can I set it up so that a certain combination of fields can't contain the same entries, on another record? e.g. a combination of FirstName/LastName/address? Or FirstName/LastName/phone? Or FirstName/LastName/email? Or is it possible to allow this but to throw up an alert message? Warning that this person is probably already in the database? TIA
4
33665
by: suffrinmick | last post by:
Hi everyone! I (Along with the help of some of you guys!) have managed to get a query working which takes multiple values (types of organisation) from a list box. The query returns a list of contacts (tblContacts.ContactID, LastName etc. ) who are linked to these particular organisations. Some of the contacts are linked to more than one organisation and
2
4704
by: zeke | last post by:
Any assistance is much appreciated... I have a table with duplicate record information and I need to remove certain records based on values in four different fields. For example: PK field Name Date1 Date2 Date3 1 Bill 1/21/04 1/18/02 5/14/04 2 Bill 1/15/03 1/18/02 5/14/04 3 Bill 1/25/04 5/14/04
18
3397
by: Gleep | last post by:
I've searched google intensely on this topic and it seems noone really knows how to approch this. The goal I don't want clients to give out their usernames and passwords to friends, since the site relies on subscrption fees. Sessions ID's are matched between the browser and the server. So a users can login with same username and password and those sessions are tracked individually. Some suggest create table fields with the session ID...
4
3572
by: mcca0081 | last post by:
hi - i'm trying to delete one of the duplicate records based on the most current date. here's the code for my access 2000 db. any help would be appreciated!!! - thank you kindly Sub DeleteDuplicateRecords() ' Deletes duplicates from the specified table, keeping the most current received date record. ' No user confirmation is required.
2
3556
Zwoker
by: Zwoker | last post by:
Greetings everyone, I have a problem that I hope has a simple solution. I am using MS Access 2003. I have a table that is a list of financial transactions. I am using a make table query over that table, and want to return a single record where multiple exist for the five fields that are keys on the table. The rule as to which record I want returned where many exist is to use the record with the most recent transaction date (a field on the...
1
2915
by: colin-whitehead | last post by:
I have 2 tables tblReports primary key UPN, plus numeric fields Effort, Attain, etc tblComments numeric primary key ID & textfield Text In the Query I select each record from tblReports using UPN and for each of the numeric fields use DLookup to look up the Text in tblComments. the expression DLookUp("Text","tblComments","ID=" & tblReports!Effort)
4
2162
by: jbrumbau | last post by:
Hello, I have been successfully using a database I've created for several months to populate an equipment list for a project we've been working on. However, the form has recently stopped working for some unknown reason. I've been having a problem recently where one table (Project Info) keeps auto-incrementing when I try to create a new record with another table (Equipment Info). Only the Equipment table is supposed to grow. It used to never...
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10096
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.