![]() | |
#11
| |||
| |||
|
|
Now, I'm just wondering: how can a patient's ID get changed? Wasn't the person the one he claimed to be, or has he undergone a severe Identity Transplantation? I don't think the ID is the name: I want to modify the record because the patients name has changed or their ID has changed. Presumably here the ID and the name are different fields. Marriage, divorce, adoption, voluntary legal name change. The problem Plus, in the USA there's no law saying that twins have to have different names. is that the OP used the patients name as the primary key for the table. No, it's quite apparent that the ID and the name are different fields. You are correct! I missed that he said the name OR ID would change. Then his job is _much_ easier. He can simply duplicate the patientID field and call the latest one "displayPatientID" or something like that. Then the old patientID remains unchanged as a primary key and all he need do is get the data from the "displayPatientID" for display purposes. Changes of "ID" would only appear in "displayPatientID". He could also add searches based up "displayPatientID" if he wants to, besides "patientID". |
#12
| |||
| |||
|
|
That is why nearly all the tables I create that use a primary key have it called something like "ID" and are auto-incremented. It bears no |
|
relation to anything else, be they unique or not. So, while social security numbers, for example, may be unique, they would only be an attribute field in any table I create. I can always search on that field if I have to. IOW, my primary keys are for referential integrity. I can always create indeces and uniqueness constraints on other fields or combinations of fields. |
#13
| |||
| |||
|
|
The problem is that the OP used the patients name as the primary key for the table. |
#14
| |||
| |||
|
|
Now, why would the *ID* change? * |
#15
| |||
| |||
|
|
Now, why would the *ID* change? * The ID changed due to government policy... Here in Canada we have government involved in hospitals. Some times it's provincial, municipal or federal. So in a country where you can go from state to state your health record can follow you. In my case yes. The patients ID can change over time. It's a mess tracking down all the references to that ID, but that's the way it is. |
#16
| |||
| |||
|
|
Now, why would the *ID* change? The ID changed due to government policy... Here in Canada we have government involved in hospitals. Some times it's provincial, municipal or federal. So in a country where you can go from state to state your health record can follow you. In my case yes. The patients ID can change over time. It's a mess tracking down all the references to that ID, but that's the way it is. I think sheldonlg was right.. there should be a record number that is unique to the database... |
#17
| |||
| |||
|
|
We have that down here as well. It is called the social security number. However, that is national. |
#18
| ||||
| ||||
|
|
We have that down here as well. It is called the social security number. However, that is national. According to the Social Security Administration, the social security number was not designed to be unique, and it isn't. Even if it |
|
were, there are lots of identity thieves, and people who really think their personally assigned SSN was given to them in a wallet |
|
they bought. Also, not everyone in the USA has one or is eligible to have one. (People in the USA as tourists can get sick too.) |
|
As far as I know, the SSN doesn't change much except perhaps for people put in the Witness Protection Program, and they shouldn't be telling you that. |
#19
| |||||
| |||||
|
|
We have that down here as well. It is called the social security number. However, that is national. According to the Social Security Administration, the social security number was not designed to be unique, and it isn't. Even if it That was before the days of "1984". I believe that they are unique. There are, after all, 10 billion combinations. |
|
were, there are lots of identity thieves, and people who really think their personally assigned SSN was given to them in a wallet Identity thieves can do that with any id that is chosen. Why, in particular, is this counter to what I said? |
|
they bought. Also, not everyone in the USA has one or is eligible to have one. (People in the USA as tourists can get sick too.) |
|
You can pretty much tell the general area that a person lived in when he got the number. The first three digits are more or less geographical. Also, people with green cards get numbers like 999-xxx-xxxx (I believe). |
|
That allows for 10 million of them. Tourists are another matter. As far as I know, the SSN doesn't change much except perhaps for people put in the Witness Protection Program, and they shouldn't be telling you that. Correct. In fact, I believe it is illegal to have more than one. |
#20
| |||
| |||
|
|
We have that down here as well. It is called the social security number. However, that is national. According to the Social Security Administration, the social security number was not designed to be unique, and it isn't. Even if it That was before the days of "1984". I believe that they are unique. There are, after all, 10 billion combinations. No, that's a math error. xxx-xx-xxxx. 1 billion = 10**9. |
|
That might mean that all SSNs assigned after 1984 are different from all other SSNs assigned after 1984, but it doesn't mean that older people with non-unique SSNs aren't still alive. |
![]() |
| Thread Tools | |
| Display Modes | |
| |