Sample Exam 2
Sample Exam 2
For each question, please answer in the space indicated. For coding
questions, please use the datasets provided and include the complete
SAS code to answer the question as well as the answer itself.
Read the entire exam before beginning, and above all, REMAIN CALM.
a. Sensitivity
b. Positive predictive value (PPV)
c. Negative predictive value (NPV)
d. Kappa
e. Likelihood ratio
********************************************************************/
********************************************************************/
/*******************************************************************
2. (10 marks) During the validation of codes/algorithms used to
identify people with a disease in health administrative data, what are
important considerations for how you would develop true positive and
negative reference cohorts to provide an accurate estimation of
predictive values (PPV and NPV)?
********************************************************************/
********************************************************************/
/*********************************************************************
3. (10 marks)
Which lab test code is the most frequent for admissions in the year
2000?
Details:
********************************************************************/
/*******************************************************************
4. (10 marks)
In what proportion of admissions in the year 2000 was the lab test
identified in question 3 done at least once?
Details:
a) All admissions are in NHRABSTRACTS.
b) Linking variables: NHRABSTRACTS.HRAENCWID = NSERVICE.SVCENCWID
*******************************************************************/
********************************************************************/
/*********************************************************************
5. (10 marks)
You are the CEO of the local hospital. The chief of the division of
respirology tells you that a recent analysis found that less than 1 in
3 patients with primary pulmonary hypertension are treated with a
'life-saving' drug. The analysis identified these patients in
NRHABSTRACTS using a code with a sensitivity and specificity of 90%.
You estimate that (at most) 0.1% of all admissions to your hospital
have primary pulmonary hypertension. The respirology chief recommends
that the hospital pay for a full-time nurse who would ensure that all
primary pulmonary hypertension patients admitted to your hospital get
the proper treatment.
********************************************************************/
5. (20 marks)
In a recent paper, diagnostic codes from a National Patient Registry
were used to identify cases of celiac disease. They cited a previous
study in which these diagnostic codes were validated for a
jurisdiction within the same country, and they found that 80 out of 90
children coded with celiac disease actually had the condition, while
70 out of 5150 children who were not coded with celiac disease truly
had the condition.
*********************************************************************/
/*******************************************************************
7. (10 marks)
Which hospital service has the LONGEST average length of stay? Which
hospital service had the SHORTEST average length of stay?
Details:
a) Length of stay is stored in NHRABSTRACTS.HRALOS.
c) Service stored in NHRABSTRACTS.HRAPATSVC.
e) Exclude all services with less than 10 admissions.
*********************************************************************/
********************************************************************/
/*******************************************************************
8. (10 marks)
The NHRDIAGNOSIS.HDGCD value of 428.X (where X can be any number)
indicates congestive heart failure. Determine what proportion of
admissions in 1999 (admission date NHRABSTRACTS.HRAADMDTM)included a
diagnosis of heart failure.
*******************************************************************/
********************************************************************/
/*******************************************************************
9. (10 marks)
How many people had multiple admissions in 1999?
********************************************************************/
/********************************************************************
10. (10 marks)
What is the lowest and highest recorded serum sodium?
Details:
a) Sodium indicated by NSERVICE.SVCSTMWID=5784.
b) Result of sodium test located in NLABSERVICE.LABSINGLERESULT.
*******************************************************************/
********************************************************************/
/*******************************************************************
11. (10 marks) Convert your answer to question 9 into a macro called
“labrange”, so that you can specify any STMWID and return the lowest
and highest recorded lab value for that lab test.
*******************************************************************/
********************************************************************/
data _null_;
set old;
if _n_=1 then call symputx('variable',column_var);
run;
/*******************************************************
12. (10 marks)
a) In a data step, create a variable called x. Assign a value of 5 to
this variable. Finally, within this data step, create a global macro
variable called xvalue that takes on the value of the data step
variable x.
b) If your solution to a) creates a temporary or permanent dataset,
how would you write this data step so that it completes the tasks in
a) but does not actually create a temporary or permanent dataset after
being run?
*******************************************************/
data _null_;
********************************************************************/
/******************************************************************
********************************************************************/
/*******************************************************************
Bonus Questions:
1) Do you believe that Donald Trump will be the Republican
Presidential Nominee in the next US election?
*******************************************************************/
********************************************************************/