How to Calculate the Contraceptive Care Measures

User Guide for SAS Programs (v5.02)

The SAS programs for contraceptive care performance measures can be downloaded below. These updated v5.01 programs are valid for calculating measures for measurement year 2023. The programs can automatically download the correct claims-code lookup tables from the Office of Population Affairs (OPA) website for a user-specified year of measurement.

Although they will no longer be updated, the previous versions of the SAS programs (v4.01, v3.01, v2.01, and v1.03a) are still available so users can reproduce historical reports of contraceptive provision rates (the programs can be downloaded at the bottom of this page). Note: 2018 measure rates calculated with v1.03a SAS programs (and subsequent years) are not directly comparable to the rates from 2013–2017. This is because the v1.03a 2013–2017 claims code tables use ICD-9 and ICD-10 procedure codes and ICD-9 diagnosis codes to flag live births, but the specifications were revised with the 2018 claims code tables to also include ICD-10 diagnosis codes for live births. In addition, the 2018 tables exclude diagnosis and procedure codes related to labor, delivery, and postpartum care to flag pregnancy.

We recommend downloading and using the most current version of the SAS programs (v5.01, linked below) for measure calculation, as this version uses the latest specifications for the contraceptive care measures.

Defining the Eligible Population

These OPA-provided SAS Programs (v5.02) can calculate the contraceptive care measures for all continuously enrolled and family-planning waiver recipients or for postpartum women, but not for both at the same time. Because these eligible populations are different, calculating both types of measures requires the use of different data sets.

To calculate the contraceptive care measures among all women of reproductive age

Your claims data set should consist entirely of women ages 15–44 years. The data set should include both:

  1. General Medicaid recipients who are continuously enrolled in the measurement year, defined as no more than one gap in enrollment of up to 45 days during the continuous enrollment period.
  2. Family-planning waiver recipients (regardless of continuous enrollment).

For continuously enrolled women who have no claims in the measurement year, add a single record to the data set with a unique patient ID, date of birth (or age if date of birth is not available), and January 1 assigned as the date of service (enabling these cases to be included in the denominator).

Your input data set should represent a single calendar year of data. The analysis will automatically exclude women outside of ages 15–44 years, as well as records without dates during the measurement year.

To calculate contraceptive care measures for postpartum women

Use a similarly formatted data set, with one important difference. The data set must include all women ages 15–44 years, regardless of enrollment status. Continuous enrollment is not required for postpartum measures because women remain enrolled in Medicaid for at least the first 60-day postpartum measurement period in all 50 states.

Data Requirements

Your input SAS data set must be at the claims level (multiple records per woman per encounter, with each record being a separate claim) and contain the following types of variables:

  • Unique patient ID.
  • Date of service (for continuously enrolled recipients without claims, January 1 should be assigned as the date of service).
  • Patient date of birth (if patient date of birth is unavailable, you may specify the patient’s age at date of service).
  • Diagnosis, procedure, and drug code variables, each with a unique prefix for each type of code. For example:
    • International Classification of Diseases (ICD) diagnosis code variables: ICD1, ICD2, ICD3, ICD4, and so on.
    • Procedure (Proc) code variables: PROC1, PROC2, and so on.
    • National Drug Code (NDC) variables (in 11-character format): NDC1, NDC2, and so on.

Example of claims-level data

example claims level data 2018

Steps to Run Programs

  1. Download all SAS programs from the following link, and then start SAS and open the programs in the editor.
  2. Edit 00.setup.sas as follows:
    • In the USER SETUP section, carefully follow the notes for editing (denoted by *…Edit ONLY) found inside the program. The following edits are required for the programs to run:
      • The location where the programs have been saved (in the filename statement) and where your input data are saved (the data_dir macro variable).
      • The name of your input data set (DSN), measurement year of claims data (Year), and variable names for unique PatientIDPatientDOB, and DateOfService. Choose the correct data set, as eligibility requirements differ for calculating measures for all women of reproductive age versus postpartum women only.
      • Prefixes of the variables used for diagnosis, procedure, and drug codes. Each of these types of claims variables should have a unique prefix (for example, the set of diagnosis codes would have a prefix “DIAG” if your actual variables were named DIAG1, DIAG2, etc.
    • The following edits are optional:
      • To stratify measure reporting, add your demographic variables to the macro variable stratifying_var_list. These variables must be found in your input data set. Specify the stratification variable names as a list with spaces (for example, stratifying_var_list = race education).
      • If the patient’s date of birth is not available, you can use the patient’s age at date of service for age exclusions by specifying UseSvcAgeforExclusions = Y, along with the variable name for patient’s age at date of service (for example, Ageatdateofservice = EncounterAge).
      • To perform additional measure calculations for the postpartum population, you must first change the data set according to the eligibility requirements. Specify postpartum = Y and the number of days postpartum at which to perform the calculation in the dayspp_list = macro variable. If postpartum = N or is left blank (or something other than Y is entered), then postpartum calculations will not be reported, and a note will appear in the log. If postpartum = Y and dayspp_list is blank, the default is 3 and 60 days postpartum.
    • Do not edit any other sections of the programs. Doing so might result in incorrect measure values or runtime errors.
  3. Highlight only the top section of 00.setup.sas down through the %include OPA(“setup_helper.sas”), and run it. The setup_helper.sas program will check that your input data meet the minimum requirements and prepare these data for the analysis. The setup_helper.sas program will create a pop-up window with information about the process. If this window does not appear above your current window, look for a tab named SETUP_HELPER at the bottom of your SAS session window, and click the tab to view it.
    • The SETUP_HELPER window will show these details about your data:
      • Total claims, total patients, and average number of claims per patient
      • The prefixes for the diagnosis, procedure, and drug codes
      • Optional user choices for the postpartum measures, exclusions based on age at last service, and report stratification variables
      • Your SAS version and whether the lookup tables can be downloaded automatically
      • Location and name of a zip file that can be used for troubleshooting
    • After reviewing the above details, hit the ENTER key. The DATA_CHECKS window will show information about required measure calculation variables, including:
      • The date of service variable name, format, range of values, and number of records to be dropped due to missing values
      • The age variable name, format, and range of values (calculated as of December 31 of the measurement year from patient date of birth or age at last service date)
      • The drug code variable name, format, and range of value lengths (these should be in the 11-character National Drug Code standard)
    • After reviewing the details above, hit the Enter key, and the DATA_CHECKS window will close. The setup information will also be printed in the SAS log. A small deidentified sample, log file, and list of variables from the analysis data set will be saved in a zip file (in the same location as the input data).
    • Your analysis data set is now ready to use with programs 01-05.
  4. Download the claims-code lookup tables into your work directory. The SETUP_HELPER will let you know if SAS can automatically download the tables.
  5. Calculate the measures by running the final %include commands found in the last section of 00.setup.sas. These commands execute programs 01–05 and calculate the measures. Or you can submit each program 01–05 yourself from the editor window, in sequence.

If you wish to reproduce previous reports on rates of contraceptive provision, you may download the previous versions of the SAS programs (v1.03a v2.01, v3.01 or v4.01) and claims-code lookup tables below. Please be aware of the caveats on the incomparability of rates, as noted above.

If you have questions or cannot access this content, please contact Jamie.Kim@hhs.gov.