Results 1 to 4 of 4

Thread: Unique Ids

  1. #1
    Join Date
    Nov 2003
    Posts
    4

    Unanswered: Unique Ids

    Hi,

    I am creating a database for Clinical data-entry in Access. Am trying to computerize the clinical records. Totally new. The manual system records are of two types; Adults & Children each with a unique number. The child number has CH in it, e.g CH/004/01 the CH signifies the child and the last digits signify the year. (You'll also find the same no without CH for an adult) My question is how would I generate an id number (records are from 1987) ranging from 1-inf with the year appended at the end. Do I have to have the CH for the child records. I wanted everything to be uniform, I mean if it is numbers then all should be numbers.

    Thnaks in advance,

    Samia

  2. #2
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369

    Re: Unique Ids

    Originally posted by Samia1667
    I am creating a database for Clinical data-entry in Access. Am trying to computerize the clinical records. Totally new. The manual system records are of two types; Adults & Children each with a unique number. The child number has CH in it, e.g CH/004/01 the CH signifies the child and the last digits signify the year. (You'll also find the same no without CH for an adult) My question is how would I generate an id number (records are from 1987) ranging from 1-inf with the year appended at the end. Do I have to have the CH for the child records. I wanted everything to be uniform, I mean if it is numbers then all should be numbers.
    First, would it be a problem adding a number other than zero as the first digit? Also, how many do you foresee in total, more than 1000? More than 10000 for years to come?

    For exampe, if you will "never" reach more than 10.000, start out with assigning 1001 as the ID that is currently 001, then you can use autonumber I can send you a query to set the counter to start at 1000 if you need/want. Use another field for the birth date/year.

    When you make queries, form fields, reports etc. you can do the following to continue the form it has today:

    In the main query, for each entry more recent than birth year X (a year that separates children from adults), you set query to prefix the value with CH , then the number (1001 etc.), then a slash (/) then the last two numbers of the year (using Len()? - Somebody can advice that part for queries better than me perhaps. You only need one query that does this, then you can base other queries forms on that one instead of directly on the table.
    Can assist you with some query examples if you like, nice practise for me too... ;-)

    kedaniel

  3. #3
    Join Date
    Nov 2002
    Location
    Wyoming
    Posts
    48
    Hi:

    Does the current ID CH/004/01 mean anything other than child and year? That is, does the user need this information. Second, what happens when a child becomes an adult?

    You could use a loop to append the year.
    Cheers,
    Ken

  4. #4
    Join Date
    Nov 2003
    Posts
    4
    Thanks so much to you all.

    Yes, I expect the number to go on upto maybe 10,000. However, I am trying to computerize and system that has been working well manually. So I didn't want to have a very big variation from the original manual system. The manual IDs run from 1- say 10,000. This would be for a given year say 2000 i.e. 1/00 the 00 being the year the patient was enrolled and 1 being the first patient for that year. So you would find the same ID number for the children except that the recorder added a CH to show it was a child. Would you advise I have two separate databases for child and adults?

    The database is for a follow-up study. A person can have several visits though their ID cannot be duplicated for another person. Eventually I'll want to be able to show how many times a person has visited (visits), how many persons have we served for a particular month, quarter or year minus the individual visits. How many were children, male or female etc etc.

    Thanks in advance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •