Jump to content

This topic is 5205 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

In my patients database, I need the age of the patient.

I want to enter in the field one of three values " depending on what we can get from the patient's relatives" : The specific DOB, the year of birth (four digits) or the age of the patient.

For example: 2/15/60, or 1960, or 50; and yet get the same output "50" for any of these entries.

Can you help?

Posted

I've done something like this for an archive. Make a day, month and year field to store the data you get. Instead of an "age" field, get the data entry person to calculate the year ie, if they are 50 then enter 1960 into the year.

You need to think about what the "default" values will be for the missing data, and what should happen if you do a search in the date field.

Posted

Your question is hard to understand.

IIUC, you want the age of a person in years if you have entered

the actual dob of 11/1/1960

or the year of 1960

or 50 to get the year?

It is probably best to enter the whole date. i.e. 11/1/1960 because it becomes a real date, which you will want to use in other ways.

This is one of many that will provide the years, if you have a real DOB date.

Your field for Years (Calc; Number Result) =

Let([

n = Get(CurrentDate);

b = DOB];

Year(n) - Year(: - ((Month(n) + Day(n) / 100) < (Month(: + Day(B) / 100))

)

If this doesn't do what you are looking for, let us know.

Lee

Posted (edited)

Let me rephrase what i need to do:

When the secretary asks patients for their age, she gets one of three answers: specific DOB, age, or year of birth.

I do not want the secretaries to do extra work of calculation. I want the data to be entered "as is" in one field and get the output in another field.

"entry filed"-----"output field"

1/1/1960------------50

1960-----------------50

50--------------------50

Thanks for your help

Edited by Guest
Posted

I want the data to be entered "as is" in one field and get the output in another field.

You don't want "50" entered into the database because it will never change. Next year the person will still be 50. Instead, convert the current age into a year from which the person's future age can be calculated.

I still believe that three fields are needed for day, month and year for the person's birth date, from which a range of dates can be calculated and used for date searches. You could also have an "age now" field from which the birth year could be calculated, but I think this will complicate things (for instance, you'll also need to record the date the entry was made) and it's easy enough for the user to do the math in their head and type the birth year into the field.

The reason you want to calculate a range of dates is so that if you want to search for somebody whose birthday is in March 1950, it should find all these records:

12 March 1950

March 1950

1950

The calculation for 12 March 1950 returns 12 March 1950.

The calculation for "March 1950" calculates the range 1 March 1950 to 31 March 1950.

The calculation for "1950" calculates the range 1 January 1950 to 31 December 1950.

(The system I built for the archive went further and allowed the entry of year ranges as well, so an item could be identified as being from 1926 to 1938 if necessary.)

Posted

Your method makes much more sense than mine.

One thing is that I want the age to be fixed at the time of the patient's visit. So that if I print a report on a patient that has been seen in my office a few years ago, the age that should be printed out is the age at that visit, not the current age.

Please write the necessary steps, fields and calculations for me.

Thanks very much.

Posted

Please write the necessary steps, fields and calculations for me.

:jaw:

Posted

I'm having a problem understanding Why you want to allow different kinds of entries in the same field that would represent the age of the patients.

It's been my experience when going to a doctor's appointment, that everyone asks me my DOB, before they will let me proceed. This includes the doctor's receptionist, the nurse, the lab, and the drug store.

It appears to me that asking the DOB, in a normal date format, would be proper database normalization for your need here. AND, trying to short cut it to accommodate either the receptionist, or clients, by just entering the year, or a number like 50, will hinder future needs, and will come back to bite you in the Butt. Vaughan is correct, they are 50 this year and every year from here on out.

I have seen this many times in the past, a person creates a database and tries to short cut things. All they are doing is delaying the inevitable, and in the mean time will be asking for workarounds to cover their data structure.

A proper structure includes; one field = one piece of information. Dates are dates, times are times, and the more you have separate fields for things like First Name, Middle Name, Last Name, Street Address,Mailing address, City, State, Zip, work phone, home phone, etc.., the less problems you will run into in the future when searching, reports, etc.

Trust me, you will not regret structuring your data properly, and teaching the people who are entering the data to enter the data as it should be.

HTH

Lee

Posted

Thanks Lee,

The reason that I don't have the exact DOB is that I have a pathology lab and most of the time, the biopsy specimen is not brought by the patient himself, but rather by one of his family members, who may only know the age or the year of birth of the patient. Plus, where I practice (outside USA), old patients (> 80 y) do not even have the exact birth date.

The format I'm suggesting is not imaginary, but is implemented in the leading pathology softwares such as CoPath.

This topic is 5205 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.