** SAS Code for Surgical / Medical Outpatient Identification ; **********************************************************; ** SAS Code for identifying Surgical/Medical Outpatients using DRGs ** READ Hospital Separation Abstract FILE **format 'S'urgical' or 'M'edical; DRGSM = put(DRG, $drg13sm.); **select a surgical outpatient; IF TRANCODE = "outpatient" OR TRANCODE = "day care surgery" OR ADMSTAT = "day surgery" then IF DRGSM = "surgical" THEN SURGOUT = "true"; ELSE SURGOUT = "false"; **********************************************************; ** SAS Code for Identifying Surgical Outpatients using ICD-9-CM Codes **read in outpatient hospital abstracts; READ OUTPAT; **format 'M'edical/'S'urgical/'X'Other designation; SURGMED=PUT(PROC,$SURGMED.); **select surgical outpatient; IF SURGMED='S' then SURGOUT = "true"; ELSE SURGOUT = "false";