re-coding values

  • Thread starter Thread starter Bluesky
  • Start date Start date
B

Bluesky

I know this is simple to do, but can’t seem to do it correctly!!

I have a “final_status†variable field that contains values such as “activeâ€
“complete†“patient refused†and “doctor refused.â€

I want to re-code or re-group these into 4 new variables.

“Eligible†would contain all the values above: “active†“complete†“patient
refused†and “doctor refusedâ€.

“Active†would not change, but would include only the “active†values (do I
need to re-code it, though?)

“Complete†would not change, but would include only the “complete†values

“Refused†would include “doctor refused†and “patient refused.â€

I thought I could use the IIF expression but am having trouble getting it
correctly

Thanks in advance.
 
Perhaps what you want is something like the following:

Field: Eligible: IIF([Status] in ("Active","Complete","Patient
Refused","Doctor Refused","Eligible",Null)

Field: Active: IIF([Status] = "Active","Active",Null)

Field: Active: IIF([Status] = "Complete","Complete",Null)

Field: Refused: IIF([Status] in ("Patient Refused","Doctor
Refused","Refused",Null)


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
Hi John,

I tried this:

Eligible: IIf([final_status] in ("Complete","Active","Provider
refuses","Pat/Fam refuses","Second interview refused","Eligible",Null))

and get an error:
"the expression you entered has a function containing the wrong number of
arguments."

I can't figure out what is wrong.

Thanks again,

BlueSky

John Spencer said:
Perhaps what you want is something like the following:

Field: Eligible: IIF([Status] in ("Active","Complete","Patient
Refused","Doctor Refused","Eligible",Null)

Field: Active: IIF([Status] = "Active","Active",Null)

Field: Active: IIF([Status] = "Complete","Complete",Null)

Field: Refused: IIF([Status] in ("Patient Refused","Doctor
Refused","Refused",Null)


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
I know this is simple to do, but can’t seem to do it correctly!!

I have a “final_status†variable field that contains values such as “activeâ€
“complete†“patient refused†and “doctor refused.â€

I want to re-code or re-group these into 4 new variables.

“Eligible†would contain all the values above: “active†“complete†“patient
refused†and “doctor refusedâ€.

“Active†would not change, but would include only the “active†values (do I
need to re-code it, though?)

“Complete†would not change, but would include only the “complete†values

“Refused†would include “doctor refused†and “patient refused.â€

I thought I could use the IIF expression but am having trouble getting it
correctly

Thanks in advance.
 
Parentheses in the wrong places

Eligible: IIf([final_status] in ("Complete","Active","Provider
refuses","Pat/Fam refuses","Second interview refused"),"Eligible",Null)

I see I left out the closing parens in the In expression. Sorry about
that.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

Hi John,

I tried this:

Eligible: IIf([final_status] in ("Complete","Active","Provider
refuses","Pat/Fam refuses","Second interview refused","Eligible",Null))

and get an error:
"the expression you entered has a function containing the wrong number of
arguments."

I can't figure out what is wrong.

Thanks again,

BlueSky

John Spencer said:
Perhaps what you want is something like the following:

Field: Eligible: IIF([Status] in ("Active","Complete","Patient
Refused","Doctor Refused","Eligible",Null)

Field: Active: IIF([Status] = "Active","Active",Null)

Field: Active: IIF([Status] = "Complete","Complete",Null)

Field: Refused: IIF([Status] in ("Patient Refused","Doctor
Refused","Refused",Null)


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
I know this is simple to do, but can’t seem to do it correctly!!

I have a “final_status†variable field that contains values such as “activeâ€
“complete†“patient refused†and “doctor refused.â€

I want to re-code or re-group these into 4 new variables.

“Eligible†would contain all the values above: “active†“complete†“patient
refused†and “doctor refusedâ€.

“Active†would not change, but would include only the “active†values (do I
need to re-code it, though?)

“Complete†would not change, but would include only the “complete†values

“Refused†would include “doctor refused†and “patient refused.â€

I thought I could use the IIF expression but am having trouble getting it
correctly

Thanks in advance.
 
Hi John,

Thanks for your help!

Is there a way to string these all together to get a new variable called
"NewFinalStatus" that will have four values: eligible, complete, active and
refused, and to get a total count of each. I thought I could figure it out,
am having trouble..

Thanks,

Debbie



John Spencer said:
Parentheses in the wrong places

Eligible: IIf([final_status] in ("Complete","Active","Provider
refuses","Pat/Fam refuses","Second interview refused"),"Eligible",Null)

I see I left out the closing parens in the In expression. Sorry about
that.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

Hi John,

I tried this:

Eligible: IIf([final_status] in ("Complete","Active","Provider
refuses","Pat/Fam refuses","Second interview refused","Eligible",Null))

and get an error:
"the expression you entered has a function containing the wrong number of
arguments."

I can't figure out what is wrong.

Thanks again,

BlueSky

John Spencer said:
Perhaps what you want is something like the following:

Field: Eligible: IIF([Status] in ("Active","Complete","Patient
Refused","Doctor Refused","Eligible",Null)

Field: Active: IIF([Status] = "Active","Active",Null)

Field: Active: IIF([Status] = "Complete","Complete",Null)

Field: Refused: IIF([Status] in ("Patient Refused","Doctor
Refused","Refused",Null)


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

Bluesky wrote:
I know this is simple to do, but can’t seem to do it correctly!!

I have a “final_status†variable field that contains values such as “activeâ€
“complete†“patient refused†and “doctor refused.â€

I want to re-code or re-group these into 4 new variables.

“Eligible†would contain all the values above: “active†“complete†“patient
refused†and “doctor refusedâ€.

“Active†would not change, but would include only the “active†values (do I
need to re-code it, though?)

“Complete†would not change, but would include only the “complete†values

“Refused†would include “doctor refused†and “patient refused.â€

I thought I could use the IIF expression but am having trouble getting it
correctly

Thanks in advance.
 
Well, I don't understand what you want.

IF someone has a Final_Status of "Active" is NewFinalStatus "Eligible" or is
it "Active"?
What if Final_Status is "Patient Refused" or "Doctor Refused" what is the
final Status "Eligible" or "Refused"?

You can set up an expression to give you one of the four categories, but the
rules need to be clear.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Hi John,

Thanks for your help!

Is there a way to string these all together to get a new variable called
"NewFinalStatus" that will have four values: eligible, complete, active and
refused, and to get a total count of each. I thought I could figure it out,
am having trouble..

Thanks,

Debbie



John Spencer said:
Parentheses in the wrong places

Eligible: IIf([final_status] in ("Complete","Active","Provider
refuses","Pat/Fam refuses","Second interview refused"),"Eligible",Null)

I see I left out the closing parens in the In expression. Sorry about
that.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

Hi John,

I tried this:

Eligible: IIf([final_status] in ("Complete","Active","Provider
refuses","Pat/Fam refuses","Second interview refused","Eligible",Null))

and get an error:
"the expression you entered has a function containing the wrong number of
arguments."

I can't figure out what is wrong.

Thanks again,

BlueSky

:

Perhaps what you want is something like the following:

Field: Eligible: IIF([Status] in ("Active","Complete","Patient
Refused","Doctor Refused","Eligible",Null)

Field: Active: IIF([Status] = "Active","Active",Null)

Field: Active: IIF([Status] = "Complete","Complete",Null)

Field: Refused: IIF([Status] in ("Patient Refused","Doctor
Refused","Refused",Null)


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

Bluesky wrote:
I know this is simple to do, but can’t seem to do it correctly!!

I have a “final_status†variable field that contains values such as “activeâ€
“complete†“patient refused†and “doctor refused.â€

I want to re-code or re-group these into 4 new variables.

“Eligible†would contain all the values above: “active†“complete†“patient
refused†and “doctor refusedâ€.

“Active†would not change, but would include only the “active†values (do I
need to re-code it, though?)

“Complete†would not change, but would include only the “complete†values

“Refused†would include “doctor refused†and “patient refused.â€

I thought I could use the IIF expression but am having trouble getting it
correctly

Thanks in advance.
 
Hi John,

I might be going at this incorrectly. I basically need to know how many
subjects are eligible and of those eligible how many completed the study,
refused, or are still active, to know my response rate.

I already have a "final_status" field which contains multiple values. bit
I'm only interested in these five who are considered "eligible" - complete,
active, provider refuses, pat/fam refuses, second interview refused.

So, first I want to get a count of all those that are "eligible" (those five
listed above).

then I want to know how many of those that are "eligible" are "completed
"(which I already have as a value in "final_status"), and "active", (which I
already have as a value in "final_status"), and then I want to know how many
of those that are "eligible" fall under "refused" which would be combining
the "final_status" values of "provider refuses", Pat/fam refuses" and +second
interview refused."

So, this is what I came up with, which of course doesn't work. Thanks for
all your help. I really do appreciate it. - BlueSky

New_Final_Status: IIf([final_status] In ("Complete","Active","Provider
refuses","Pat/Fam refuses","Second interview
refused"),"Eligible",Null)IIf([final_status]="Complete","Complete",Null),
IIf([final_status]="Active","Active",Null),IIf([final_status] in ("Provider
refuses","Pat/fam refuses","Second interview refused"),"Refused",Null))

John Spencer said:
Well, I don't understand what you want.

IF someone has a Final_Status of "Active" is NewFinalStatus "Eligible" or is
it "Active"?
What if Final_Status is "Patient Refused" or "Doctor Refused" what is the
final Status "Eligible" or "Refused"?

You can set up an expression to give you one of the four categories, but the
rules need to be clear.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Hi John,

Thanks for your help!

Is there a way to string these all together to get a new variable called
"NewFinalStatus" that will have four values: eligible, complete, active and
refused, and to get a total count of each. I thought I could figure it out,
am having trouble..

Thanks,

Debbie



John Spencer said:
Parentheses in the wrong places

Eligible: IIf([final_status] in ("Complete","Active","Provider
refuses","Pat/Fam refuses","Second interview refused"),"Eligible",Null)

I see I left out the closing parens in the In expression. Sorry about
that.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Bluesky wrote:
Hi John,

I tried this:

Eligible: IIf([final_status] in ("Complete","Active","Provider
refuses","Pat/Fam refuses","Second interview refused","Eligible",Null))

and get an error:
"the expression you entered has a function containing the wrong number of
arguments."

I can't figure out what is wrong.

Thanks again,

BlueSky

:

Perhaps what you want is something like the following:

Field: Eligible: IIF([Status] in ("Active","Complete","Patient
Refused","Doctor Refused","Eligible",Null)

Field: Active: IIF([Status] = "Active","Active",Null)

Field: Active: IIF([Status] = "Complete","Complete",Null)

Field: Refused: IIF([Status] in ("Patient Refused","Doctor
Refused","Refused",Null)


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

Bluesky wrote:
I know this is simple to do, but can’t seem to do it correctly!!

I have a “final_status†variable field that contains values such as “activeâ€
“complete†“patient refused†and “doctor refused.â€

I want to re-code or re-group these into 4 new variables.

“Eligible†would contain all the values above: “active†“complete†“patient
refused†and “doctor refusedâ€.

“Active†would not change, but would include only the “active†values (do I
need to re-code it, though?)

“Complete†would not change, but would include only the “complete†values

“Refused†would include “doctor refused†and “patient refused.â€

I thought I could use the IIF expression but am having trouble getting it
correctly

Thanks in advance.
 
Back
Top