Thank you for your response to my date question.
During entry, if the date field is not applicable to a certain record (whereas I do not need to enter a date for that specific record, rather skip it) what do I designate as my skip code. I did have -77, but when I would enter that, it would say it was an illegal entry.
How do I write the code, so that a skip is -77, and it still be a legal entry in some instances?
legdat RANGE 01/01/1900 31/12/2008 LEGAL 30/12/2009 24/11/2008 END END
(somewhere in there, I need to put it a skip code)
Thank you for your time,
Lindsay
Lindsay Iser, M.A. University of South Florida Florida Mental Health Institute Department of Aging and Mental Health 13301 N. Bruce B. Downs BlVd. MHC 1403 Tampa, FL 33612 Tel-(813)-974-1975 Fax-(813)-974-1968
-----Original Message----- From: epidata-list-bounces@lists.umanitoba.ca [mailto:epidata-list-bounces@lists.umanitoba.ca] On Behalf Of epidata-list-request@lists.umanitoba.ca Sent: Thursday, November 13, 2008 1:10 PM To: epidata-list@lists.umanitoba.ca Subject: EpiData-list Digest, Vol 61, Issue 7
Send EpiData-list mailing list submissions to epidata-list@lists.umanitoba.ca
To subscribe or unsubscribe via the World Wide Web, visit http://lists.umanitoba.ca/mailman/listinfo/epidata-list or, via email, send a message with subject or body 'help' to epidata-list-request@lists.umanitoba.ca
You can reach the person managing the list at epidata-list-owner@lists.umanitoba.ca
When replying, please edit your Subject line so it is more specific than "Re: Contents of EpiData-list digest..."
EpiData-list mailing list ___________________________________
Today's Topics:
1. Re: "Illegal entry" Dates (epidata-list@lists.umanitoba.ca) 2. charting developments in hospital infections - extension (epidata-list@lists.umanitoba.ca) 3. Re: Algorithm RUT, numeric field (epidata-list@lists.umanitoba.ca)
----------------------------------------------------------------------
Message: 1 Date: Wed, 12 Nov 2008 20:21:14 +0100 From: epidata-list@lists.umanitoba.ca Subject: Re: [EpiData-list] "Illegal entry" Dates To: epidata-list@lists.umanitoba.ca Message-ID: 491B2CAA.1090708@tbrieder.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed
You cannot have illegal dates: 99, -77, 88 are not dates and if they were, they are not legal, there is no date that contains, e.g. "99". A command for a legal date range and legal date values should look something like this (using European date format here):
legdat RANGE 01/01/1900 31/12/2008 LEGAL 30/12/2009 24/11/2008 END END
Regards,
Hans
epidata-list@lists.umanitoba.ca wrote:
Provided below is the syntax. I've also made a few notes about the error I am getting. I have tried several times to fix this, but for some reason EpiData is telling me it is illegal.
- fa163axxxx
RANGE 01/01/1900 12/31/2008
LEGAL
99 -77 88
END
MUSTENTER
END
The concept of validation of dates is that only legitimate dates can be entered. While you can enter partial dates, they must correspond to real dates. For example entering 15 into your date field will yield a date of the 15th of the current month (e.g. 11/15/2008) as EpiData assumes you just entered the day. But you cannot put in invalid days (i.e must 1-# of days in the month).
You could just let people leave the field blank, but I know that many experts feel that entering something in every field is a better practice.
I suggest you pick a date such as 01/01/2020 to be your skip value and just let users leave the field blank as they enter data. Then provide a prompt to ensure that the date was meant to be skipped. This ensures that an accidentally skipped date field is validated immediately.
legdat RANGE 01/01/1900 31/12/2008 LEGAL 01/01/2020 END if legdat = . then legdat = date(1,1,2020) help "Confirm that data is not entered - will show as 01/01/2020" endif end
If you really insist on having something like 77 represent the skip, then you will have to construct your own date and validate it via a second field. The DATE function will give an error message if an invalid date is created. The user is forced to back up and fix the date fields. It's not pretty, though.
.qes:
legdat ## ## #### (3 fields with names legdat legdat1 legdat2 as day, month, year) legdatd <dd/mm/yyyy> nextfield ###
.chk:
legdat range 0 31 legal 77 88 end jumps 77 nextfield 88 nextfield end end
legdat1 range 1 12 end
legdat2 range 1900 2008 legdatd = date(legdat, legdat1, legdat2) end
Jamie Lindsay wrote:
Thank you for your response to my date question.
During entry, if the date field is not applicable to a certain record (whereas I do not need to enter a date for that specific record, rather skip it) what do I designate as my skip code. I did have -77, but when I would enter that, it would say it was an illegal entry.
How do I write the code, so that a skip is -77, and it still be a legal entry in some instances?
legdat RANGE 01/01/1900 31/12/2008 LEGAL 30/12/2009 24/11/2008 END END
(somewhere in there, I need to put it a skip code)
Thank you for your time,
Lindsay
You cannot make an entry "-77" in a date field. You need another variable before the date field to decide (with, let's say value 0 if no need to enter, and value 1 if you want to enter) whether you want to enter a date or skip it:
enterdate AFTER ENTRY IF enterdate=0 THEN GOTO varx ENDIF END
legdat RANGE 01/01/1900 31/12/2008 LEGAL 30/12/2009 24/11/2008 END END
varx ...... END
Hans
epidata-list@lists.umanitoba.ca wrote:
Thank you for your response to my date question.
During entry, if the date field is not applicable to a certain record (whereas I do not need to enter a date for that specific record, rather skip it) what do I designate as my skip code. I did have -77, but when I would enter that, it would say it was an illegal entry.
How do I write the code, so that a skip is -77, and it still be a legal entry in some instances?
legdat RANGE 01/01/1900 31/12/2008 LEGAL 30/12/2009 24/11/2008 END END
(somewhere in there, I need to put it a skip code)
Thank you for your time,
Lindsay
participants (1)
-
epidata-list@lists.umanitoba.ca