This is the what is in the variable indicators: Exam matched indicator flag;Signed by Attending;PACS transfer complete;Clinical;EMR transfer complete;Completed When I use the following code it marks this record as 'Educational' and it is not. data qpath_us ; retain MRN CSN full_name exam_type date attending signatory institution indicators notes covered_exam discat ; length discat $10. notes $60. ; set &dsn1 (drop=accession qa_status operator reviewer gender rename=(account=CSN patient_id=MRN)) ; if CSN ne . ; /*remove temporary ids*/ if put (csn,wq9639l.) = '@#%' then notes='9639' ; if put (csn,wq9640l.) = '@#%' then notes='9640' ; billing_provider = left(upcase(attending)) ; if put(exam_type,$examfmt.) = '1' then covered_exam = 'Y' ; else covered_exam = 'N' ; if find(exam_type,'Procedural') then discat = 'PROC' ; else select (exam_type) ; when ('ED Abdominal Aorta') discat = 'AORTA'; when ('ED FAST Exam') discat = 'FAST'; when ('ED Focused Chest Ultrasound') discat = 'ECHO'; when ('ED Focused Echo') discat = 'ECHO'; when ('ED Renal Ultrasound') discat = 'RENAL'; when ('ED ULTRASOUND EDUCATION') discat = 'EDUCAT' ; otherwise discat = 'ALL OTHER'; end ; new_indicators = upcase(indicators) ; if find(new_indicators, "EDUCATIONAL") then notes = 'Educational'; else if exam_type = 'ED ULTRASOUND EDUCATION' then notes = 'Educational' ; else notes=notes ; if notes = 'Educational' then covered_exam = 'E' ; run ; Thanks Gina
... View more