Title: Message
We are digging some data out of our data repository and I cannot figure out how to evaluate and eliminate the duplicate records based on the CPT Code effective date. We want to use the "last", or most recent, CPT code according to the year that we are pulling information for.  
 
The first example below shows records for one patient in the calendar year 2004.  The TransactionProcedureID "73.01500" and "73.01203" have duplicates, one with a CPT Effective Date of 7/1/2000 and the other with an effective date of 2/1/2003.   We want to keep the records with the 2/1/2003 effective date and delete the ones with the older effective date.
 
I was thinking that the CPT EFF field could be evaluated with the DATEDIFF function, however, I could not figure out how to write the IF statement or CASE statement that would accomplish this.
The fields involved in the equation would be: AdmServDate, CPT EFF date #1, and CPT EFF date #2 (I think).
 
Would some kind soul help me?
 
Pretty please??

Thank you.
 
Doug
 
AccountNumber TransactionProcedureID TransactionCount Amount EffectiveDateTime Charge ChargeDeptName ProcedureChargeDept ProcedureDescription Code CPT EFF
J007131022 73.01500 1 $58.00 1/1/2004 $58.00 OCCUPATIONAL THERAPY REV 01.4092 OT -UPPER EXTREMITY EXERCISES 97110GO 2/1/2003
J007131022 73.01203 1 $58.00 1/1/2004 $58.00 OCCUPATIONAL THERAPY REV 01.4092 OT -FUNCTIONL MOBILTY/STABILTY 97535GO 2/1/2003
J007131022 73.00502 1 $171.00 1/1/2004 $171.00 OCCUPATIONAL THERAPY REV 01.4092 OT -INITIAL EVALUATION 97003GO 7/1/2000
J007131022 73.01500 1 $58.00 1/1/2004 $58.00 OCCUPATIONAL THERAPY REV 01.4092 OT -UPPER EXTREMITY EXERCISES 97530GO 7/1/2000
J007131022 73.01203 1 $58.00 1/1/2004 $58.00 OCCUPATIONAL THERAPY REV 01.4092 OT -FUNCTIONL MOBILTY/STABILTY 97530GO 7/1/2000
 
In the above example the CPT code did not change from one CPT EFFeffective date to the next. However, in the example below the two CPT EFF dates did have a change in the CPT code. 
 
AccountNumber TransactionProcedureID TransactionCount Amount EffectiveDateTime Charge ChargeDeptName ProcedureChargeDept ProcedureDescription Code CPT EFF
J007788987 58.00340 1 $63.00 1/1/2004 $63.00 ONCOLOGY REV 01.4021 ONC-CLINIC FEE LEVEL I 99212 4/1/2003
J007788987 58.00340 1 $63.00 1/1/2004 $63.00 ONCOLOGY REV 01.4021 ONC-CLINIC FEE LEVEL I 9921225 1/1/2005
 
 
 
 
 
Doug Hiteshew, MT(ASCP)
Senior Systems Analyst
Johnson Memorial Hospital
Franklin, IN
V: 317-736-3397
F: 317-346-3011
E: [EMAIL PROTECTED]
 
This electronic message is intended only for the individual or entity to which it is addressed and may contain information that is confidential and protected by law. If you are not the intended recipient of this e-mail, you are cautioned that use of its contents in any way is prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately by e-mail or telephone and return the original message by e-mail to the sender.
 

======================================
All messages should be posted in plain text.  
HTML will be converted to attachments.    

The meditech-l web site is MTUsers.com
______________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l

Reply via email to