*pbp_b7ae.sas;

libname out '.\sas_data_sets\PBP';
options pageno=1 linesize = 200 nocenter;

data pbp_b7ae;

length
	pbp_a_hnumber                    $5
	pbp_a_plan_identifier            $3
	pbp_a_ben_cov                    $1
	pbp_a_plan_type                  $2
	orgtype                          $2
	bid_id                           $13
	pbp_b7a_maxenr_yn                $1
	pbp_b7a_maxenr_per               $1
	pbp_b7a_coins_yn                 $1
	pbp_b7a_coins_cov_mc             $1
	pbp_b7a_ded_yn                   $1
	pbp_b7a_copay_yn                 $1
	pbp_b7b_bendesc_yn               $1
	pbp_b7b_bendesc_rc               $1
	pbp_b7b_bendesc_amo              $1
	pbp_b7b_bendesc_lim_rc           $1
	pbp_b7b_bendesc_per              $1
	pbp_b7b_maxplan_yn               $1
	pbp_b7b_maxplan_per              $1
	pbp_b7b_maxplan_cov              $1
	pbp_b7b_maxenr_yn                $1
	pbp_b7b_maxenr_per               $1
	pbp_b7b_coins_yn                 $1
	pbp_b7b_coins_cov_mc             $1
	pbp_b7b_coins_cov_cc             $1
	pbp_b7b_ded_yn                   $1
	pbp_b7b_copay_yn                 $1
	pbp_b7b_auth                     $5
	pbp_b7b_refer_yn                 $1
	pbp_b7c_maxenr_yn                $1
	pbp_b7c_maxenr_per               $1
	pbp_b7c_coins_yn                 $1
	pbp_b7c_coins_cov_mc             $1
	pbp_b7c_ded_yn                   $1
	pbp_b7c_copay_yn                 $1
	pbp_b7c_sep_cost_yn              $1
	pbp_b7c_auth                     $5
	pbp_b7c_refer_yn                 $1
	pbp_b7d_maxenr_yn                $1
	pbp_b7d_maxenr_per               $1
	pbp_b7d_coins_yn                 $1
	pbp_b7d_coins_cov_max_mc         $1
	pbp_b7d_ded_yn                   $1
	pbp_b7d_copay_yn                 $1
	pbp_b7d_auth                     $5
	pbp_b7d_refer_yn                 $1
	pbp_b7e_maxenr_yn                $1
	pbp_b7e_maxenr_per               $1
	pbp_b7e_coins_yn                 $1
	pbp_b7e_coins_mcis_intrvl_num    $1
	pbp_b7e_coins_cov_ind_mc         $1
	pbp_b7e_coins_mcgs_intrvl_num    $1
	pbp_b7e_coins_cov_grp_mc         $1
	pbp_b7e_ded_yn                   $1
	pbp_b7e_copay_yn                 $1
	pbp_b7e_copay_mcis_intrvl_num    $1
	pbp_b7e_copay_mcgs_intrvl_num    $1
	pbp_b7e_auth                     $5
	pbp_b7e_refer_yn                 $1
;

infile '.\pbp\pbp_b7_health_prof_1.txt' delimiter = '09'x
dsd lrecl = 30000 firstobs=2 missover;


input
	pbp_a_hnumber
	pbp_a_plan_identifier
	segment_id
	pbp_a_ben_cov
	pbp_a_plan_type
	orgtype
	bid_id
	version
	pbp_b7a_maxenr_yn
	pbp_b7a_maxenr_amt
	pbp_b7a_maxenr_per
	pbp_b7a_coins_yn
	pbp_b7a_coins_pct_mc_min
	pbp_b7a_coins_pct_mc_max
	pbp_b7a_coins_cov_mc
	pbp_b7a_ded_yn
	pbp_b7a_ded_amt
	pbp_b7a_copay_yn
	pbp_b7a_copay_amt_mc_min
	pbp_b7a_copay_amt_mc_max
	pbp_b7b_bendesc_yn
	pbp_b7b_bendesc_rc
	pbp_b7b_bendesc_amo
	pbp_b7b_bendesc_lim_rc
	pbp_b7b_bendesc_num_rc
	pbp_b7b_bendesc_per
	pbp_b7b_maxplan_yn
	pbp_b7b_maxplan_amt
	pbp_b7b_maxplan_per
	pbp_b7b_maxplan_cov
	pbp_b7b_maxenr_yn
	pbp_b7b_maxenr_amt
	pbp_b7b_maxenr_per
	pbp_b7b_coins_yn
	pbp_b7b_coins_pct_mc_min
	pbp_b7b_coins_pct_mc_max
	pbp_b7b_coins_cov_mc
	pbp_b7b_coins_pct_cc_min
	pbp_b7b_coins_pct_cc_max
	pbp_b7b_coins_cov_cc
	pbp_b7b_ded_yn
	pbp_b7b_ded_amt
	pbp_b7b_copay_yn
	pbp_b7b_copay_mc_amt_min
	pbp_b7b_copay_mc_amt_max
	pbp_b7b_copay_rc_amt_min
	pbp_b7b_copay_rc_amt_max
	pbp_b7b_auth
	pbp_b7b_refer_yn
	pbp_b7c_maxenr_yn
	pbp_b7c_maxenr_amt
	pbp_b7c_maxenr_per
	pbp_b7c_coins_yn
	pbp_b7c_coins_pct_mc_min
	pbp_b7c_coins_pct_mc_max
	pbp_b7c_coins_cov_mc
	pbp_b7c_ded_yn
	pbp_b7c_ded_amt
	pbp_b7c_copay_yn
	pbp_b7c_copay_mc_amt_min
	pbp_b7c_copay_mc_amt_max
	pbp_b7c_sep_cost_yn
	pbp_b7c_auth
	pbp_b7c_refer_yn
	pbp_b7d_maxenr_yn
	pbp_b7d_maxenr_amt
	pbp_b7d_maxenr_per
	pbp_b7d_coins_yn
	pbp_b7d_coins_pct_mc_min
	pbp_b7d_coins_pct_mc_max
	pbp_b7d_coins_cov_max_mc
	pbp_b7d_ded_yn
	pbp_b7d_ded_amt
	pbp_b7d_copay_yn
	pbp_b7d_copay_amt_mc_min
	pbp_b7d_copay_amt_mc_max
	pbp_b7d_auth
	pbp_b7d_refer_yn
	pbp_b7e_maxenr_yn
	pbp_b7e_maxenr_amt
	pbp_b7e_maxenr_per
	pbp_b7e_coins_yn
	pbp_b7e_coins_mcis_intrvl_num
	pbp_b7e_coins_mcis_pct_intrvl1
	pbp_b7e_coins_mcis_bgns_ntrvl1
	pbp_b7e_coins_mcis_ends_ntrvl1
	pbp_b7e_coins_mcis_pct_intrvl2
	pbp_b7e_coins_mcis_bgns_ntrvl2
	pbp_b7e_coins_mcis_ends_ntrvl2
	pbp_b7e_coins_mcis_pct_intrvl3
	pbp_b7e_coins_mcis_bgns_ntrvl3
	pbp_b7e_coins_mcis_ends_ntrvl3
	pbp_b7e_coins_cov_ind_mc
	pbp_b7e_coins_mcgs_intrvl_num
	pbp_b7e_coins_mcgs_pct_intrvl1
	pbp_b7e_coins_mcgs_bgns_ntrvl1
	pbp_b7e_coins_mcgs_ends_ntrvl1
	pbp_b7e_coins_mcgs_pct_intrvl2
	pbp_b7e_coins_mcgs_bgns_ntrvl2
	pbp_b7e_coins_mcgs_ends_ntrvl2
	pbp_b7e_coins_mcgs_pct_intrvl3
	pbp_b7e_coins_mcgs_bgns_ntrvl3
	pbp_b7e_coins_mcgs_ends_ntrvl3
	pbp_b7e_coins_cov_grp_mc
	pbp_b7e_ded_yn
	pbp_b7e_ded_amt
	pbp_b7e_copay_yn
	pbp_b7e_copay_mcis_intrvl_num
	pbp_b7e_copay_mcis_amt_intrvl1
	pbp_b7e_copay_mcis_bgns_ntrvl1
	pbp_b7e_copay_mcis_ends_ntrvl1
	pbp_b7e_copay_mcis_amt_intrvl2
	pbp_b7e_copay_mcis_bgns_ntrvl2
	pbp_b7e_copay_mcis_ends_ntrvl2
	pbp_b7e_copay_mcis_amt_intrvl3
	pbp_b7e_copay_mcis_bgns_ntrvl3
	pbp_b7e_copay_mcis_ends_ntrvl3
	pbp_b7e_copay_mcgs_intrvl_num
	pbp_b7e_copay_mcgs_amt_intrvl1
	pbp_b7e_copay_mcgs_bgns_ntrvl1
	pbp_b7e_copay_mcgs_ends_ntrvl1
	pbp_b7e_copay_mcgs_amt_intrvl2
	pbp_b7e_copay_mcgs_bgns_ntrvl2
	pbp_b7e_copay_mcgs_ends_ntrvl2
	pbp_b7e_copay_mcgs_amt_intrvl3
	pbp_b7e_copay_mcgs_bgns_ntrvl3
	pbp_b7e_copay_mcgs_ends_ntrvl3
	pbp_b7e_auth
	pbp_b7e_refer_yn
;


label
	pbp_a_hnumber                    = 'H Number'
	pbp_a_plan_identifier            = 'Plan ID'
	segment_id                       = 'Segment ID'
	pbp_a_ben_cov                    = 'Coverage Criteria'
	pbp_a_plan_type                  = 'Plan Type'
	orgtype                          = 'Organization Type'
	bid_id                           = 'Bid ID'
	version                          = 'Version Number'
	pbp_b7a_maxenr_yn                = 'Primary Care Max Enr YN'
	pbp_b7a_maxenr_amt               = 'Primary Care Max Enr Amt'
	pbp_b7a_maxenr_per               = 'Primary Care Max Enr Per'
	pbp_b7a_coins_yn                 = 'Primary Care Coinsurance YN'
	pbp_b7a_coins_pct_mc_min         = 'Primary Care MC Min Coins Pct'
	pbp_b7a_coins_pct_mc_max         = 'Primary Care MC Max Coins Pct'
	pbp_b7a_coins_cov_mc             = 'Primary Care MC Coins Cov'
	pbp_b7a_ded_yn                   = 'Primary Care Deductible YN'
	pbp_b7a_ded_amt                  = 'Primary Care Deductible Amt'
	pbp_b7a_copay_yn                 = 'Primary Care Copayment YN'
	pbp_b7a_copay_amt_mc_min         = 'Primary Care MC Min Copay Amt'
	pbp_b7a_copay_amt_mc_max         = 'Primary Care MC Max Copay Amt'
	pbp_b7b_bendesc_yn               = 'Chiropractic Ben Desc YN'
	pbp_b7b_bendesc_rc               = 'Chiropractic Ben Desc Enhance'
	pbp_b7b_bendesc_amo              = 'Chiropractic Ben Desc AMO'
	pbp_b7b_bendesc_lim_rc           = 'Chiropractic Ben Desc Lim'
	pbp_b7b_bendesc_num_rc           = 'Chiropractic Ben Desc Num'
	pbp_b7b_bendesc_per              = 'Chiropractic Ben Desc Per'
	pbp_b7b_maxplan_yn               = 'Chiropractic Max Plan YN'
	pbp_b7b_maxplan_amt              = 'Chiropractic Max Plan Amt'
	pbp_b7b_maxplan_per              = 'Chiropractic Max Plan Per'
	pbp_b7b_maxplan_cov              = 'Chiropractic Max Plan Cov'
	pbp_b7b_maxenr_yn                = 'Chiropractic Max Enr YN'
	pbp_b7b_maxenr_amt               = 'Chiropractic Max Enr Amt'
	pbp_b7b_maxenr_per               = 'Chiropractic Max Enr Per'
	pbp_b7b_coins_yn                 = 'Chiropractic Coinsurance YN'
	pbp_b7b_coins_pct_mc_min         = 'Chiropractic MC Min Coins Pct'
	pbp_b7b_coins_pct_mc_max         = 'Chiropractic MC Max Coins Pct'
	pbp_b7b_coins_cov_mc             = 'Chiropractic MC Coins Cov'
	pbp_b7b_coins_pct_cc_min         = 'Chiropractic RC Min Coins Pct'
	pbp_b7b_coins_pct_cc_max         = 'Chiropractic RC Max Coins Pct'
	pbp_b7b_coins_cov_cc             = 'Chiropractic RC Coins Cov'
	pbp_b7b_ded_yn                   = 'Chiropractic Deductible YN'
	pbp_b7b_ded_amt                  = 'Chiropractic Deductible Amt'
	pbp_b7b_copay_yn                 = 'Chiropractic Copayment YN'
	pbp_b7b_copay_mc_amt_min         = 'Chiropractic MC Min Copay Amt'
	pbp_b7b_copay_mc_amt_max         = 'Chiropractic MC Max Copay Amt'
	pbp_b7b_copay_rc_amt_min         = 'Chiropractic RC Min Copay Amt'
	pbp_b7b_copay_rc_amt_max         = 'Chiropractic RC Max Copay Amt'
	pbp_b7b_auth                     = 'Chiropractic Auth'
	pbp_b7b_refer_yn                 = 'Chiropractic Referral YN'
	pbp_b7c_maxenr_yn                = 'Occ Therapy Max Enr YN'
	pbp_b7c_maxenr_amt               = 'Occ Therapy Max Enr Amt'
	pbp_b7c_maxenr_per               = 'Occ Therapy Max Enr Per'
	pbp_b7c_coins_yn                 = 'Occ Therapy Coinsurance YN'
	pbp_b7c_coins_pct_mc_min         = 'Occ Therapy MC Min Coins Pct'
	pbp_b7c_coins_pct_mc_max         = 'Occ Therapy MC Max Coins Pct'
	pbp_b7c_coins_cov_mc             = 'Occ Therapy MC Coins Cov'
	pbp_b7c_ded_yn                   = 'Occ Therapy Deductible YN'
	pbp_b7c_ded_amt                  = 'Occ Therapy Deductible Amt'
	pbp_b7c_copay_yn                 = 'Occ Therapy Copayment YN'
	pbp_b7c_copay_mc_amt_min         = 'Occ Therapy MC Min Copay Amt'
	pbp_b7c_copay_mc_amt_max         = 'Occ Therapy MC Max Copay Amt'
	pbp_b7c_sep_cost_yn              = 'Separate Cost Share YN'
	pbp_b7c_auth                     = 'Occ Therapy Auth'
	pbp_b7c_refer_yn                 = 'Occ Therapy Referral YN'
	pbp_b7d_maxenr_yn                = 'Phys Spclist Max Enr YN'
	pbp_b7d_maxenr_amt               = 'Phys Spclist Max Enr Amt'
	pbp_b7d_maxenr_per               = 'Phys Spclist Max Enr Per'
	pbp_b7d_coins_yn                 = 'Phys Spclist Coinsurance YN'
	pbp_b7d_coins_pct_mc_min         = 'Phys Spclist Min MC Coins Pct'
	pbp_b7d_coins_pct_mc_max         = 'Phys Spclist Max MC Coins Pct'
	pbp_b7d_coins_cov_max_mc         = 'Phys Spclist MC Coins Cov'
	pbp_b7d_ded_yn                   = 'Phys Spclist Deductible YN'
	pbp_b7d_ded_amt                  = 'Phys Spclist Deductible Amt'
	pbp_b7d_copay_yn                 = 'Phys Spclist Copayment YN'
	pbp_b7d_copay_amt_mc_min         = 'Phys Spclist Min MC Copay Amt'
	pbp_b7d_copay_amt_mc_max         = 'Phys Spclist Max MC Copay Amt'
	pbp_b7d_auth                     = 'Phys Spclist Auth'
	pbp_b7d_refer_yn                 = 'Phys Spclist Referral YN'
	pbp_b7e_maxenr_yn                = 'Mental Health Max Enr YN'
	pbp_b7e_maxenr_amt               = 'Mental Health Max Enr Amt'
	pbp_b7e_maxenr_per               = 'Mental Health Max Enr Per'
	pbp_b7e_coins_yn                 = 'Mental Health Coinsurance YN'
	pbp_b7e_coins_mcis_intrvl_num    = 'MH MCIS Coins Interval Num'
	pbp_b7e_coins_mcis_pct_intrvl1   = 'MH MCIS Coins Pct Intrvl 1'
	pbp_b7e_coins_mcis_bgns_ntrvl1   = 'MH MCIS Coins BgnS Intrvl 1'
	pbp_b7e_coins_mcis_ends_ntrvl1   = 'MH MCIS Coins EndS Intrvl 1'
	pbp_b7e_coins_mcis_pct_intrvl2   = 'MH MCIS Coins Pct Intrvl 2'
	pbp_b7e_coins_mcis_bgns_ntrvl2   = 'MH MCIS Coins BgnS Intrvl 2'
	pbp_b7e_coins_mcis_ends_ntrvl2   = 'MH MCIS Coins EndS Intrvl 2'
	pbp_b7e_coins_mcis_pct_intrvl3   = 'MH MCIS Coins Pct Intrvl 3'
	pbp_b7e_coins_mcis_bgns_ntrvl3   = 'MH MCIS Coins BgnS Intrvl 3'
	pbp_b7e_coins_mcis_ends_ntrvl3   = 'MH MCIS Coins EndS Intrvl 3'
	pbp_b7e_coins_cov_ind_mc         = 'MH MCIS Coins Cov'
	pbp_b7e_coins_mcgs_intrvl_num    = 'MH MCGS Coins Interval Num'
	pbp_b7e_coins_mcgs_pct_intrvl1   = 'MH MCGS Coins Pct Intrvl 1'
	pbp_b7e_coins_mcgs_bgns_ntrvl1   = 'MH MCGS Coins BgnS Intrvl 1'
	pbp_b7e_coins_mcgs_ends_ntrvl1   = 'MH MCGS Coins EndS Intrvl 1'
	pbp_b7e_coins_mcgs_pct_intrvl2   = 'MH MCGS Coins Pct Intrvl 2'
	pbp_b7e_coins_mcgs_bgns_ntrvl2   = 'MH MCGS Coins BgnS Intrvl 2'
	pbp_b7e_coins_mcgs_ends_ntrvl2   = 'MH MCGS Coins EndS Intrvl 2'
	pbp_b7e_coins_mcgs_pct_intrvl3   = 'MH MCGS Coins Pct Intrvl 3'
	pbp_b7e_coins_mcgs_bgns_ntrvl3   = 'MH MCGS Coins BgnS Intrvl 3'
	pbp_b7e_coins_mcgs_ends_ntrvl3   = 'MH MCGS Coins EndS Intrvl 3'
	pbp_b7e_coins_cov_grp_mc         = 'MH MCGS Coins Cov'
	pbp_b7e_ded_yn                   = 'Mental Health Deductible YN'
	pbp_b7e_ded_amt                  = 'Mental Health Deductible Amt'
	pbp_b7e_copay_yn                 = 'Mental Health Copayment YN'
	pbp_b7e_copay_mcis_intrvl_num    = 'MH MCIS Copay Interval Num'
	pbp_b7e_copay_mcis_amt_intrvl1   = 'MH MCIS Copay Amt Intrvl 1'
	pbp_b7e_copay_mcis_bgns_ntrvl1   = 'MH MCIS Copay BgnS Intrvl 1'
	pbp_b7e_copay_mcis_ends_ntrvl1   = 'MH MCIS Copay EndS Intrvl 1'
	pbp_b7e_copay_mcis_amt_intrvl2   = 'MH MCIS Copay Amt Intrvl 2'
	pbp_b7e_copay_mcis_bgns_ntrvl2   = 'MH MCIS Copay BgnS Intrvl 2'
	pbp_b7e_copay_mcis_ends_ntrvl2   = 'MH MCIS Copay EndS Intrvl 2'
	pbp_b7e_copay_mcis_amt_intrvl3   = 'MH MCIS Copay Amt Intrvl 3'
	pbp_b7e_copay_mcis_bgns_ntrvl3   = 'MH MCIS Copay BgnS Intrvl 3'
	pbp_b7e_copay_mcis_ends_ntrvl3   = 'MH MCIS Copay EndS Intrvl 3'
	pbp_b7e_copay_mcgs_intrvl_num    = 'MH MCGS Copay Interval Num'
	pbp_b7e_copay_mcgs_amt_intrvl1   = 'MH MCGS Copay Amt Intrvl 1'
	pbp_b7e_copay_mcgs_bgns_ntrvl1   = 'MH MCGS Copay BgnS Intrvl 1'
	pbp_b7e_copay_mcgs_ends_ntrvl1   = 'MH MCGS Copay EndS Intrvl 1'
	pbp_b7e_copay_mcgs_amt_intrvl2   = 'MH MCGS Copay Amt Intrvl 2'
	pbp_b7e_copay_mcgs_bgns_ntrvl2   = 'MH MCGS Copay BgnS Intrvl 2'
	pbp_b7e_copay_mcgs_ends_ntrvl2   = 'MH MCGS Copay EndS Intrvl 2'
	pbp_b7e_copay_mcgs_amt_intrvl3   = 'MH MCGS Copay Amt Intrvl 3'
	pbp_b7e_copay_mcgs_bgns_ntrvl3   = 'MH MCGS Copay BgnS Intrvl 3'
	pbp_b7e_copay_mcgs_ends_ntrvl3   = 'MH MCGS Copay EndS Intrvl 3'
	pbp_b7e_auth                     = 'Mental Health Auth'
	pbp_b7e_refer_yn                 = 'Mental Health Referral YN'
;

run;

proc sort data = pbp_b7ae out=out.pbp_b7ae;
  by Pbp_a_hnumber pbp_a_plan_identifier segment_id;
run;

proc print data = out.pbp_b7ae(obs = 10);
  title 'pbp_b7_health_prof_1 file ';
run;

proc means data = out.pbp_b7ae;
  title 'pbp_b7_health_prof_1 file ';
run;

proc freq data = out.pbp_b7ae;
table
	pbp_a_ben_cov
	pbp_a_plan_type
	orgtype
	pbp_b7a_maxenr_yn
	pbp_b7a_maxenr_per
	pbp_b7a_coins_yn
	pbp_b7a_coins_cov_mc
	pbp_b7a_ded_yn
	pbp_b7a_copay_yn
	pbp_b7b_bendesc_yn
	pbp_b7b_bendesc_rc
	pbp_b7b_bendesc_amo
	pbp_b7b_bendesc_lim_rc
	pbp_b7b_bendesc_per
	pbp_b7b_maxplan_yn
	pbp_b7b_maxplan_per
	pbp_b7b_maxplan_cov
	pbp_b7b_maxenr_yn
	pbp_b7b_maxenr_per
	pbp_b7b_coins_yn
	pbp_b7b_coins_cov_mc
	pbp_b7b_coins_cov_cc
	pbp_b7b_ded_yn
	pbp_b7b_copay_yn
	pbp_b7b_auth
	pbp_b7b_refer_yn
	pbp_b7c_maxenr_yn
	pbp_b7c_maxenr_per
	pbp_b7c_coins_yn
	pbp_b7c_coins_cov_mc
	pbp_b7c_ded_yn
	pbp_b7c_copay_yn
	pbp_b7c_sep_cost_yn
	pbp_b7c_auth
	pbp_b7c_refer_yn
	pbp_b7d_maxenr_yn
	pbp_b7d_maxenr_per
	pbp_b7d_coins_yn
	pbp_b7d_coins_cov_max_mc
	pbp_b7d_ded_yn
	pbp_b7d_copay_yn
	pbp_b7d_auth
	pbp_b7d_refer_yn
	pbp_b7e_maxenr_yn
	pbp_b7e_maxenr_per
	pbp_b7e_coins_yn
	pbp_b7e_coins_mcis_intrvl_num
	pbp_b7e_coins_cov_ind_mc
	pbp_b7e_coins_mcgs_intrvl_num
	pbp_b7e_coins_cov_grp_mc
	pbp_b7e_ded_yn
	pbp_b7e_copay_yn
	pbp_b7e_copay_mcis_intrvl_num
	pbp_b7e_copay_mcgs_intrvl_num
	pbp_b7e_auth
	pbp_b7e_refer_yn
/ missing;
run;

proc contents data = out.pbp_b7ae;
  title 'pbp_b7ae data';
run;
