Generating a patient ID Number and Adding to form

  • Thread starter Thread starter Mark M Simonian
  • Start date Start date
M

Mark M Simonian

I want to generate a unique patient ID number. I don't want to auto generate
a number because I need to separate the patient visit from a unique patient.
(Later view all the visits of each patient)

I thought I would start by using the last 4 letters of the last name, first
three letter of first name and 8 digits of the birthday. I can do this by
=Left([LName],4)& Left([FName],3& [BDate] but it will populate an unbound
text box in my form.

If I create a text box in the same table or form call [ID] , how do I
automatically move that unbound box information into the [ID] text box to
used as the patient identifier? Or is there an easier way to generate the
patient ID in the form?
-----------------------------------------------------
Mark M Simonian MD
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
(e-mail address removed)
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 
If you don't need to search on that field, then I would continue to use your
idea of a expression. The reason why I suggest this, is then you NEVER need
worry about that field being incorrect, or not updated to your custom id. In
other words, you don't need code to keep the field updated. If you need to
save the field, then you kind of have to be VERY careful, and ANY code, or
any part of your application that updates the first/last/bdate field will
have make sure the id field is updated.
I want to generate a unique patient ID number. I don't want to auto generate
a number because I need to separate the patient visit from a unique patient.
(Later view all the visits of each patient)

Why does using a autonumber prevent the above? Assuming you have a visit
table, then each visit would use the "key" of the parent record (the
patient). I don't see any reason why a autonumber is not fine for the
patient. I would think that you have a visit table with a date of visit,
which doctor saw the patient, comments about the visit etc etc etc. This
visit table will work just fine if the patient table has a autonumber key.
Further, the child table (visits) can automatically place the parent key in
the field used to relate the visits for you without code if you use a
sub-form.

If I create a text box in the same table or form call [ID] , how do I
automatically move that unbound box information into the [ID] text box to
used as the patient identifier? Or is there an easier way to generate the
patient ID in the form?

As mentioned, I don't see the need for this. You don't want to start writing
code all over the place. If you must do this...then you will need to add
code to all 3 fields (first,last, BD) field

The after update of each field would be:

me.BDate = Left([LName],4)& Left([FName],3& [BDate]

You will have to place the above code in all 3 conrols after update event.
 
Albert, Thank you for your comments. Most Practice Mangement programs
establish a unique ID for a patient as well as a visit. There are so many
fields to identify the patient visit that I don't think a subform would
work. Right now I am using a tabbed form to easily place the large amount of
information. I expect to use a subform to reveal the encounter summary like
diagnosis summary and treartment medication.

I will look at using an autonumber for both the encounter and the patient
ID. I thought that one created with last name and first name would be easier
to recognize and associate to a patient. I need to search on the patient's
last name, first name and ID to pull up the visit.

--
-----------------------------------------------------
Mark M Simonian MD
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
(e-mail address removed)
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.

Albert D. Kallal said:
If you don't need to search on that field, then I would continue to use your
idea of a expression. The reason why I suggest this, is then you NEVER need
worry about that field being incorrect, or not updated to your custom id. In
other words, you don't need code to keep the field updated. If you need to
save the field, then you kind of have to be VERY careful, and ANY code, or
any part of your application that updates the first/last/bdate field will
have make sure the id field is updated.
I want to generate a unique patient ID number. I don't want to auto generate
a number because I need to separate the patient visit from a unique patient.
(Later view all the visits of each patient)

Why does using a autonumber prevent the above? Assuming you have a visit
table, then each visit would use the "key" of the parent record (the
patient). I don't see any reason why a autonumber is not fine for the
patient. I would think that you have a visit table with a date of visit,
which doctor saw the patient, comments about the visit etc etc etc. This
visit table will work just fine if the patient table has a autonumber key.
Further, the child table (visits) can automatically place the parent key in
the field used to relate the visits for you without code if you use a
sub-form.

If I create a text box in the same table or form call [ID] , how do I
automatically move that unbound box information into the [ID] text box to
used as the patient identifier? Or is there an easier way to generate the
patient ID in the form?

As mentioned, I don't see the need for this. You don't want to start writing
code all over the place. If you must do this...then you will need to add
code to all 3 fields (first,last, BD) field

The after update of each field would be:

me.BDate = Left([LName],4)& Left([FName],3& [BDate]

You will have to place the above code in all 3 conrols after update event.


--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.attcanada.net/~kallal.msn
 
Albert, Thank you for your comments. Most Practice Mangement programs
establish a unique ID for a patient as well as a visit.

For sure you can have some "ID" for visiting..but that should not be used
for the relation. In other words...sure..display some "ID"..but if that ID
is to have meaning to humans, then I am 100% on your ship...(ie: don't use a
autonumber). So, if humans are ever going to reference that id, then don't
use autonumber. In fact, even if I had some patient visit id, or number...I
would NOT use that id in my relational design. It is just like using a
invoice number (you can use the invoice number...but behind the scenes...you
use a autonumber for relations. That way, you don't care if you generate a
invoice number...but the application is still free to function).
There are so many
fields to identify the patient visit that I don't think a subform would
work. Right now I am using a tabbed form to easily place the large amount of
information. I expect to use a subform to reveal the encounter summary like
diagnosis summary and treatment medication.

Excellent idea the above is. So, it means a bit of code to "pass" the parent
key id (autonumber that users never see) to those child forms.
I will look at using an autonumber for both the encounter and the patient
ID. I thought that one created with last name and first name would be easier
to recognize and associate to a patient.

Well, for humans..that nice id you have is much easer to deal with. However,
in a good relational application...it just works..and users NEVER need type
in any id to build a relation..(it should happen all behind the scenes). So,
those be-hind the scenes autonumbers used for relations are NEVER seen by
your users (you don't see them in QuickBooks...or accounting packages for
example. Heck, you also don't see the memory segment numbers when word loads
a document into memory!.....it is all hidden). So, if you have need to
display, search, or reference patients by your compounded custom ref
number...by all means use it...but don't use it to make your relational
database function.
I need to search on the patient's
last name, first name and ID to pull up the visit.

I would consider some kind of drill down. Why not pop up a list of visits by
date order. And, yes..if there is unique id for the visit..then why even
type in the name?

Anyway...for some drill down ideas...take a look at:

http://www.attcanada.net/~kallal.msn/Articles/Grid.htm

And for seaching...

http://www.attcanada.net/~kallal.msn/Search/index.html
 
Back
Top