Repository navigation
Expand file tree
/
Copy path200_data_management.html
More file actions
582 lines (514 loc) · 29.1 KB
/
Copy path200_data_management.html
File metadata and controls
582 lines (514 loc) · 29.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no">
<title>200_data_management.html</title>
<style>
html { -webkit-text-size-adjust: 100%; }
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px; line-height: 1.428;
margin: 0 auto; padding: 0 15px;
}
h1, h2, h3, h4, h5, h6 { margin: 20px 0 10px; }
h1 { font-size: 28px; } h2 { font-size: 24px; }
h3 { font-size: 18px; } h4 { font-size: 16px; }
h5 { font-size: 14px; } h6 { font-size: 12px; }
a { color: #337AB7; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul, ol { padding-left: 30px; }
pre, code, samp {
font-size: 13px;
font-family: Courier, monospace;
}
code, samp {
background-color: #F5F5F5;
border-radius: 3px; padding: 3px;
}
pre code, pre samp {
white-space: pre; background: transparent;
border: none; padding: 0;
}
pre {
line-height: 1.33; background-color: #F5F5F5;
border: 1px solid #CCCCCC; border-radius: 3px;
padding: 8px; overflow: auto;
}
</style>
<!-- ═══════════════════════════════════════════════════════════════════════
webdoc2 default theme header
Injected into <head> via: wdinit myfile, replace
(or manually: webdoc init myfile, replace header2(include("header.html")))
To customise: copy this file, edit freely, then point wdinit at it:
wdinit myfile, replace headerfile("my_custom_header.html")
════════════════════════════════════════════════════════════════════════ -->
<!-- Bootstrap 5.3 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<!-- Google Fonts: Inter -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap" rel="stylesheet">
<!-- Bootstrap Icons (chevron for back-to-top button) -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
<style>
/* ── Theme tokens — override here to change the colour scheme ────────────── */
:root {
--wd-primary: #1B2D55; /* navbar / headings / accents */
--wd-accent: #D44500; /* h2 underline, hover highlights */
--wd-link: #2B6CB0; /* body link colour */
--wd-light-bg: #F5F7FA; /* code blocks, TOC, accordion bg */
--wd-border: #DEE2E6;
--wd-text: #1A1A2E;
--wd-muted: #6C7A8D;
--wd-page-width: 90%; /* default content width; override with wdwidth command */
}
/* ── Always reserve scrollbar space; offset anchors below sticky navbar ──── */
html {
overflow-y: scroll;
scroll-behavior: smooth;
scroll-padding-top: 72px; /* matches navbar height so anchors aren't hidden */
}
/* ── Base typography ──────────────────────────────────────────────────────── */
body {
font-family: 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
font-size: 15px;
line-height: 1.68;
color: var(--wd-text);
background-color: #ffffff;
}
/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
background-color: var(--wd-primary) !important;
padding: 0.55rem 1.5rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.navbar-brand {
font-size: 0.95rem;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
color: #ffffff !important;
}
.navbar-toggler { border-color: rgba(255,255,255,0.4); }
.navbar-toggler-icon { filter: invert(1) brightness(2); }
.navbar-nav .nav-link {
font-size: 0.80rem;
font-weight: 500;
color: rgba(255,255,255,0.78) !important;
padding: 0.5rem 1.05rem !important;
letter-spacing: 0.07em;
text-transform: uppercase;
border-bottom: 2px solid transparent;
transition: color 0.16s ease, border-color 0.16s ease;
}
.navbar-nav .nav-link:hover {
color: #ffffff !important;
border-bottom-color: var(--wd-accent);
}
.navbar-nav .nav-link.active {
color: #ffffff !important;
border-bottom-color: var(--wd-accent);
font-weight: 600;
}
/* ── Navbar dropdowns ─────────────────────────────────────────────────────── */
.navbar .dropdown-menu {
background-color: #ffffff;
border: 1px solid var(--wd-border);
border-radius: 6px;
box-shadow: 0 4px 16px rgba(0,0,0,0.15);
margin-top: 0.25rem;
min-width: 180px;
}
.navbar .dropdown-item {
font-size: 0.85rem;
color: var(--wd-text);
padding: 0.45rem 1rem;
}
.navbar .dropdown-item:hover {
background-color: var(--wd-light-bg);
color: var(--wd-primary);
}
.navbar .dropdown-toggle::after { vertical-align: 0.1em; }
/* ── Headings ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
font-weight: 700;
color: var(--wd-primary);
margin-top: 1.75rem;
margin-bottom: 0.55rem;
}
h1 { font-size: 1.85rem; }
h2 {
font-size: 1.35rem;
border-bottom: 3px solid var(--wd-accent);
padding-bottom: 0.28rem;
}
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; color: var(--wd-muted); }
/* ── Links ────────────────────────────────────────────────────────────────── */
a { color: var(--wd-link); text-decoration: none; }
a:hover { color: var(--wd-accent); text-decoration: underline; }
/* ── Stata log blocks ─────────────────────────────────────────────────────── */
pre.stlog {
background-color: var(--wd-light-bg);
border: 1px solid var(--wd-border);
border-left: 4px solid var(--wd-primary);
border-radius: 0 6px 6px 0;
padding: 0.9rem 1.2rem;
font-size: 12.5px;
line-height: 1.55;
overflow-x: auto;
margin-bottom: 1.1rem;
}
.stinp { color: var(--wd-primary); font-weight: 600; }
.stres { color: #145A32; }
.stcmt { font-style: italic; opacity: 0.55; }
/* ── Bootstrap accordion (button.ado / graphbutton.ado) ───────────────────── */
.accordion, .accordion-item, .accordion-body { max-width: 100%; }
.accordion-item {
border: 1px solid var(--wd-border);
border-radius: 6px !important;
overflow: hidden;
margin-bottom: 0.5rem;
}
.accordion-button {
font-size: 0.82rem;
font-weight: 500;
background-color: var(--wd-light-bg);
color: var(--wd-primary) !important;
}
.accordion-button:not(.collapsed) {
background-color: var(--wd-primary);
color: #ffffff !important;
box-shadow: none;
}
.accordion-button:not(.collapsed)::after { filter: invert(1) brightness(2); }
.accordion-body { padding: 1rem 1.2rem; background-color: #ffffff; overflow-x: auto; }
/* ── Lists ────────────────────────────────────────────────────────────────── */
/* wdlist (dashed) — LaTeX-like em-dash markers via ::before. */
ul.wd-list-dashed {
list-style: none;
padding-left: 1.2rem;
}
ul.wd-list-dashed > li {
position: relative;
padding-left: 1.2rem;
margin-bottom: 0.15rem;
}
ul.wd-list-dashed > li::before {
content: "—";
position: absolute;
left: 0;
color: var(--wd-primary);
font-weight: 600;
}
/* wditemize (round) and wdenumerate (numbers) use default browser markers. */
ul:not(.wd-list-dashed) > li,
ol > li { margin-bottom: 0.15rem; }
/* ── Figures ──────────────────────────────────────────────────────────────── */
figure { margin: 0.8rem 0; }
figure img {
border-radius: 6px;
box-shadow: 0 2px 14px rgba(0,0,0,0.09);
max-width: 100%;
height: auto;
}
/* ── In-page Table of Contents ────────────────────────────────────────────── */
.wd-toc-wrap {
background-color: var(--wd-light-bg);
border: 1px solid var(--wd-border);
border-left: 4px solid var(--wd-primary);
border-radius: 0 6px 6px 0;
padding: 0.9rem 1.25rem;
margin-bottom: 1.5rem;
display: inline-block;
min-width: 220px;
max-width: 480px;
}
.wd-toc-title {
display: block;
font-size: 0.78rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.09em;
color: var(--wd-primary);
margin-bottom: 0.45rem;
}
.wd-toc-list { margin: 0; padding: 0; list-style: none; }
.wd-toc-list a {
display: block;
color: var(--wd-primary);
font-size: 0.87rem;
line-height: 1.95;
text-decoration: none;
transition: color 0.14s;
}
.wd-toc-list a:hover { color: var(--wd-accent); }
.wd-toc-h2 { padding-left: 0.8rem; }
.wd-toc-h3 { padding-left: 1.6rem; font-size: 0.81rem; }
.wd-toc-h4 { padding-left: 2.4rem; font-size: 0.78rem; }
.wd-toc-h5 { padding-left: 3.2rem; font-size: 0.75rem; }
.wd-toc-h6 { padding-left: 4.0rem; font-size: 0.72rem; }
/* ── Page width — controlled by --wd-page-width; use wdwidth command to change */
.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
max-width: var(--wd-page-width) !important;
}
/* ── Misc spacing ─────────────────────────────────────────────────────────── */
p { margin-bottom: 0.85rem; }
.container, .container-fluid { padding-top: 0.25rem; padding-bottom: 0.25rem; }
/* ── Back-to-top button ───────────────────────────────────────────────────── */
#wd-back-to-top {
display: none;
position: fixed;
bottom: 2rem; right: 2rem;
z-index: 9999;
width: 46px; height: 46px;
border-radius: 50%;
background-color: var(--wd-primary);
color: #ffffff;
border: none;
font-size: 1.3rem;
line-height: 46px;
text-align: center;
cursor: pointer;
box-shadow: 0 3px 14px rgba(0,0,0,0.22);
transition: background-color 0.18s;
padding: 0;
}
#wd-back-to-top:hover { background-color: var(--wd-accent); }
</style>
<!-- Bootstrap 5.3 JS Bundle — enables navbar toggler + accordion collapse -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" defer crossorigin="anonymous"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
/* ── Back-to-top floating button ──────────────────────────────────────── */
var btn = document.createElement('button');
btn.id = 'wd-back-to-top';
btn.title = 'Back to top';
btn.setAttribute('aria-label', 'Back to top');
btn.innerHTML = '<i class="bi bi-chevron-up"></i>';
document.body.appendChild(btn);
window.addEventListener('scroll', function () {
btn.style.display = (window.scrollY > 320) ? 'block' : 'none';
});
btn.addEventListener('click', function () {
window.scrollTo({ top: 0, behavior: 'smooth' });
});
/* ── Auto-generate in-page TOC from headings ──────────────────────────── */
// Finds every element with class "wd-toc-wrap" and fills it with heading links.
// wdtoc.ado writes the container; this script fills it in.
// Depth controlled per-wrap via data-wd-depth (1..6, default 3).
document.querySelectorAll('.wd-toc-wrap').forEach(function (wrap) {
var depth = parseInt(wrap.getAttribute('data-wd-depth') || '3', 10);
if (isNaN(depth) || depth < 1) depth = 3;
if (depth > 6) depth = 6;
var selectors = [];
for (var d = 1; d <= depth; d++) selectors.push('h' + d);
var headings = Array.prototype.slice.call(
document.querySelectorAll(selectors.join(','))
).filter(function (h) {
// Skip headings inside navbar and accordion headers
return !h.closest('.navbar') && !h.classList.contains('accordion-header');
});
if (headings.length === 0) return;
var ul = document.createElement('ul');
ul.className = 'wd-toc-list';
headings.forEach(function (h, i) {
if (!h.id) h.id = 'wdtoc-h-' + i;
var li = document.createElement('li');
li.className = 'wd-toc-' + h.tagName.toLowerCase();
var a = document.createElement('a');
a.href = '#' + h.id;
a.textContent = h.textContent.trim();
li.appendChild(a);
ul.appendChild(li);
});
wrap.appendChild(ul);
});
/* ── Remove stray closing-command echoes from Stata log output ──────────── */
var _wdClosingCmds = ['wdclose', 'buttonclose', 'graphbuttonclose',
'wdnavbarclose', 'wdnavdropdownclose'];
document.querySelectorAll('span.stinp').forEach(function (span) {
var txt = span.textContent.replace(/^\s*\.\s*/, '').trim();
if (_wdClosingCmds.indexOf(txt) !== -1) {
var pre = span.closest('pre.stlog');
span.remove();
if (pre && pre.textContent.trim() === '') pre.remove();
}
});
});
</script>
<style>
.stcmd .stcmt { font-style: italic; opacity: 0.5; }
.stoom, .stcnp { font-style: italic; }
@media screen { .stcnp { display: none; }}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-3">
<div class="container-fluid">
<a class="navbar-brand" href="index.html" title="Insurance_PriceTransparency_BCBSTX">Documentation</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNavbar" aria-controls="mainNavbar" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="mainNavbar">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item"><a class="nav-link " href="index.html">Home</a></li>
<li class="nav-item"><a class="nav-link " href="100_data_download.html">100 Download</a></li>
<li class="nav-item"><a class="nav-link active" href="200_data_management.html">200 Management</a></li>
<li class="nav-item"><a class="nav-link " href="300_labels.html">300 Labels</a></li>
<li class="nav-item"><a class="nav-link " href="400_data_profiler.html">400 Profiler</a></li>
<li class="nav-item"><a class="nav-link " href="500_aggregation.html">500 Aggregation</a></li>
<li class="nav-item"><a class="nav-link " href="600_analysis.html">600 Analysis</a></li>
<li class="nav-item"><a class="nav-link " href="help.html">Help</a></li>
</ul>
<span class="navbar-text ms-3" title="Texas 2036"><img src="tx2036_logo.png" alt="Texas 2036" height="18" style="opacity:0.55;vertical-align:middle;" onerror="this.style.display='none'"></span>
</div></div></nav>
<style>pre,.stlog,samp{white-space:pre !important;overflow-x:auto;display:block;font-size:0.8rem;line-height:1.25}table.tbl{font-size:0.85rem}</style>
<h1 id="200-data-management">200. Data management</h1>
<p>Types the extracted CSVs, attaches the Texas 2036 service menu, stamps a snapshot id, and writes the analytic datasets to <code>02_cleaned/</code>.</p>
<div id="wd-toc" class="wd-toc-wrap" data-wd-depth="2"><strong class="wd-toc-title">Contents</strong></div>
<h2 id="medical-prices-table-the-main-analytic-file">Medical prices table (the main analytic file)</h2>
<p>One row = one distinct negotiated price for a procedure in a network, with provider counts. <code>run_date</code> is the monthly-snapshot key (use it to stack months); <code>file_vintage</code> is the source file's production date (provenance only).</p>
<p>What this step produced: we read the extracted price file as text (so leading zeros in codes survive), turned the price and count columns into numbers, attached the Texas 2036 service menu (so a bare code like 99214 reads as "Office visit est pt 30-39min"), rolled each price's county up to a Public Health Region with a clean sort order, and flagged the prices that are comparable as dollars. The panel below shows the result: how many distinct prices we have, how many matched the menu and a Texas region, the comparable-price split, and five example rows.</p>
<div class="mb-4"> <div class="accordion" id="accordionExample"> <div class="accordion-item"> <h2 class="accordion-header"> <button class="accordion-button collapsed text-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapse2" aria-expanded="false" aria-controls="collapse2"> <small>Click to view code</small> </button></h2> <div id="collapse2" class="accordion-collapse collapse" data-bs-parent="#accordionExample"><div class="accordion-body">
<pre id="stlog-1" class="stlog"><samp><span class="stinp">. count</span>
<span class="stres">2,097,564</span>
<span class="stinp">. di as txt "Distinct medical prices in this snapshot: " %12.0fc r(N)</span>
Distinct medical prices in this snapshot: 2,097,564
<span class="stinp">. count if !missing(service_label)</span>
<span class="stres">2,097,564</span>
<span class="stinp">. di as txt " ... matched to the Texas 2036 service menu: " %12.0fc r(N)</span>
... matched to the Texas 2036 service menu: 2,097,564
<span class="stinp">. count if !missing(region)</span>
<span class="stres">2,082,378</span>
<span class="stinp">. di as txt " ... tagged with a Texas county / Public Health Region: " %12.0fc r(N)</span>
... tagged with a Texas county / Public Health Region: 2,082,378
<span class="stinp">. di as txt _n "Comparable fee-for-service dollar prices (dollar_ffs flag): 1 = yes"</span>
Comparable fee-for-service dollar prices (dollar_ffs flag): 1 = yes
<span class="stinp">. tab dollar_ffs, missing</span>
Comparable |
unit price |
(ffs, |
dollar |
basis) — |
use this |
filter for |
$ analysis | Freq. Percent Cum.
------------+-----------------------------------
0 |<span class="stres"> 195,354 9.31 9.31</span>
1 |<span class="stres"> 1,902,210 90.69 100.00</span>
------------+-----------------------------------
Total |<span class="stres"> 2,097,564 100.00</span>
<span class="stinp">. di as txt _n "Five example rows (one distinct price each):"</span>
Five example rows (one distinct price each):
<span class="stinp">. list service_label procedure_code provider_type negotiated_amount region in 1/5, noobs abbreviate(24)</span>
+-----------------------------------------------------------------------------------------------------+
| <span class="stres"> service_label procedure_code provider_type negotiated_amount region </span>|
|-----------------------------------------------------------------------------------------------------|
| <span class="stres"> Upper GI endoscopy diagnostic 43235 professional 423.16 </span>|
| <span class="stres"> Cystoscopy 52000 professional 85.04 </span>|
| <span class="stres"> Office visit est pt 30-39min 99214 professional 68.11 </span>|
| <span class="stres">Simple pneumonia & pleurisy wo CC/MCC 195 institutional 0 </span>|
| <span class="stres"> Office visit new pt 45-59min 99204 professional 108.69 </span>|
+-----------------------------------------------------------------------------------------------------+
</samp></pre>
</div> </div> </div> </div> </div> <br>
<h2 id="prescription-drug-prices-table">Prescription-drug prices table</h2>
<p>One row = one distinct drug price (NDC level), with pharmacy counts. Rx prices are PBM/plan-level (effectively national); pharmacies are not geographically filtered.</p>
<p>What this step produced: the same typing applied to the prescription-drug file (one row = one distinct drug price at the NDC level, with the dispensing/administrative fees alongside). Because drug pricing is set at the plan/PBM level it is effectively statewide, so there is no Texas geography column here. The panel shows the row count and the brand/generic/specialty split.</p>
<div class="mb-4"> <div class="accordion" id="accordionExample"> <div class="accordion-item"> <h2 class="accordion-header"> <button class="accordion-button collapsed text-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapse3" aria-expanded="false" aria-controls="collapse3"> <small>Click to view code</small> </button></h2> <div id="collapse3" class="accordion-collapse collapse" data-bs-parent="#accordionExample"><div class="accordion-body">
<pre id="stlog-2" class="stlog"><samp><span class="stinp">. count</span>
<span class="stres">1,198,555</span>
<span class="stinp">. di as txt "Distinct drug prices in this snapshot: " %12.0fc r(N)</span>
Distinct drug prices in this snapshot: 1,198,555
<span class="stinp">. di as txt _n "By drug type:"</span>
By drug type:
<span class="stinp">. capture confirm variable drug_type</span>
<span class="stinp">. if !_rc tab drug_type, missing</span>
drug_type | Freq. Percent Cum.
------------+-----------------------------------
Brand |<span class="stres"> 686,771 57.30 57.30</span>
Generic |<span class="stres"> 511,784 42.70 100.00</span>
------------+-----------------------------------
Total |<span class="stres"> 1,198,555 100.00</span>
<span class="stinp">. di as txt _n "Three example rows:"</span>
Three example rows:
<span class="stinp">. capture list drug_name drug_type negotiated_rate dispensing_fee in 1/3, noobs abbreviate(22)</span>
</samp></pre>
</div> </div> </div> </div> </div> <br>
<h2 id="texas-provider-organization-directory">Texas provider organization directory</h2>
<p>Which organizations appear in each network (raw and noisy — insurers sometimes file individual clinicians as their own tax ID). The full per-group directory is the large gzipped <code>providers.csv.gz</code>; decompress it only for named-provider attribution work.</p>
<p>What this step produced: a lookup of which organizations appear in each Texas network. It is intentionally raw — insurers sometimes file an individual clinician as their own tax ID — so treat it as a directory, not a clean provider count. The panel shows the row count and a few examples.</p>
<div class="mb-4"> <div class="accordion" id="accordionExample"> <div class="accordion-item"> <h2 class="accordion-header"> <button class="accordion-button collapsed text-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapse4" aria-expanded="false" aria-controls="collapse4"> <small>Click to view code</small> </button></h2> <div id="collapse4" class="accordion-collapse collapse" data-bs-parent="#accordionExample"><div class="accordion-body">
<pre id="stlog-3" class="stlog"><samp><span class="stinp">. count</span>
<span class="stres">192,438</span>
<span class="stinp">. di as txt "Network-organization rows: " %12.0fc r(N)</span>
Network-organization rows: 192,438
<span class="stinp">. di as txt _n "Three example rows:"</span>
Three example rows:
<span class="stinp">. capture list network_name provider_org_name n_group_entries in 1/3, noobs abbreviate(28)</span>
</samp></pre>
</div> </div> </div> </div> </div> <br>
<h2 id="medicare-benchmark-for-percent-of-medicare-analysis">Medicare benchmark (for percent-of-Medicare analysis)</h2>
<p>A national Medicare allowed-amount per code, built by <code>build_medicare_benchmark.py</code> from CMS fee schedules (MPFS for professional, OPPS for outpatient facility, IPPS for inpatient DRGs). A code can have more than one benchmark (e.g., a professional MPFS amount AND an outpatient-facility OPPS amount); <code>applies_to</code> says which to use. National figures with all geographic indices set to 1.0 (first-pass simplification).</p>
<p>What this step produced: a national Medicare allowed amount per code, so Section 5 of the analysis can express each BCBS Texas price as a percent of Medicare. A code can carry more than one benchmark (e.g., a professional MPFS amount and an outpatient-facility OPPS amount); the <code>applies_to</code> column says which to use. The panel shows how many benchmark rows we built, by fee schedule.</p>
<div class="mb-4"> <div class="accordion" id="accordionExample"> <div class="accordion-item"> <h2 class="accordion-header"> <button class="accordion-button collapsed text-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapse5" aria-expanded="false" aria-controls="collapse5"> <small>Click to view code</small> </button></h2> <div id="collapse5" class="accordion-collapse collapse" data-bs-parent="#accordionExample"><div class="accordion-body">
<pre id="stlog-4" class="stlog"><samp><span class="stinp">. count</span>
<span class="stres">121</span>
<span class="stinp">. di as txt "Benchmark rows: " %6.0fc r(N)</span>
Benchmark rows: 121
<span class="stinp">. di as txt _n "By Medicare fee schedule:"</span>
By Medicare fee schedule:
<span class="stinp">. capture confirm variable fee_schedule</span>
<span class="stinp">. if !_rc tab fee_schedule</span>
fee_schedul |
e | Freq. Percent Cum.
------------+-----------------------------------
IPPS |<span class="stres"> 17 14.05 14.05</span>
MPFS |<span class="stres"> 62 51.24 65.29</span>
OPPS |<span class="stres"> 42 34.71 100.00</span>
------------+-----------------------------------
Total |<span class="stres"> 121 100.00</span>
<span class="stinp">. di as txt _n "Three example rows:"</span>
Three example rows:
<span class="stinp">. capture list procedure_code fee_schedule applies_to medicare_allowed in 1/3, noobs abbreviate(26)</span>
</samp></pre>
</div> </div> </div> </div> </div> <br>
<h2 id="final-cleaned-tables">Final cleaned tables</h2>
<p>The three analytic tables this step writes to <code>02_cleaned/</code>, with their row and variable counts. Click to view the structure of each.</p>
<div class="mb-4"> <div class="accordion" id="accordionExample"> <div class="accordion-item"> <h2 class="accordion-header"> <button class="accordion-button collapsed text-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapse6" aria-expanded="false" aria-controls="collapse6"> <small>Click to view code</small> </button></h2> <div id="collapse6" class="accordion-collapse collapse" data-bs-parent="#accordionExample"><div class="accordion-body">
<pre id="stlog-5" class="stlog"><samp><span class="stinp">. foreach f in bcbstx_prices bcbstx_rx_prices bcbstx_provider_org_directory {</span>
2<span class="stinp">. use "${clean}/`f'.dta", clear</span>
3<span class="stinp">. di as txt "{hline 60}"</span>
4<span class="stinp">. di as txt "FILE: `f'.dta (rows=`=_N' vars=`=c(k)')"</span>
5<span class="stinp">. describe, simple</span>
6<span class="stinp">. }</span>
(BCBS Texas negotiated prices (1 row = 1 distinct price). See 300_labels.do.)
------------------------------------------------------------
FILE: bcbstx_prices.dta (rows=2097564 vars=33)
source_file payer_name code_syste~r negotiated~t rate_expir~n file_vinta~d region
network_name payer_type procedure_~e provider_t~e is_evergreen run_date_d region_id
market_seg~t schema_ver~n procedure_~c care_setting n_provider~s service_la~l dollar_ffs
county_fips file_vintage arrangement place_of_s~e n_npi_memb~s service_ca~y
run_date code_system rate_basis code_modif~r n_tax_ids county_name
(BCBS Texas prescription-drug negotiated prices (1 row = 1 distinct NDC price).)
------------------------------------------------------------
FILE: bcbstx_rx_prices.dta (rows=1198555 vars=17)
source_file payer_type ndc administra~e service_code n_pharmac~ps
run_date drug_name negotiated~e transactio~e n_price_re~s run_date_d
payer_name drug_type dispensing~e historical~e n_pharmac~ns
(BCBS Texas — Texas organizations by network (network-membership directory; raw).)
------------------------------------------------------------
FILE: bcbstx_provider_org_directory.dta (rows=192438 vars=5)
network_name tax_id_type tax_id provider_o~e n_group_en~s
</samp></pre>
</div> </div> </div> </div> </div> <br>
</body>
</html>