A Clojure library designed to read the HCPCS codes from the CMS.gov Schedule B Excel workbooks and convert
There is a whole page dedicated to this (don't worry, it's pretty easy if you have git and Leiningen installed, if not, you may want to contact one of the developers for help). How to create a new package, schedule it for Panther upgrade-based deployment, and how to deploy it manually.
HCPCS Schedule B Extractor
Arguments: <format> <source>=<file.xlsx> [... SourceN=fileN.xlsx]
or: <format> <file.xlsx> [... fileN.xlsx]
Format: one of CSV, JSON, or SQL.
Source: an optional alias representing a useful name for the file. If not supplied, the filename is used as the source.
File: path to an Excel .xlsx Schedule B workbook from
https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Payment/HospitalOutpatientPPS/Addendum-A-and-Addendum-B-Updates
- When running in development with Leiningen, the commands start with
lein run - When running from a compiled jar file, the commands start with
java -jar target\com.softekpanther.cms-0.1.0-SNAPSHOT-standalone.jar, or wherever the path to the batteries-included uberjar is (the uberjar has all the dependencies, too).
Examples:
lein run CSV 2020.02="January 2020 Addendum B CORRECTION.02042020.xlsx"
lein run JSON 2020.02="January 2020 Addendum B CORRECTION.02042020.xlsx"
lein run SQL 2020.02="January 2020 Addendum B CORRECTION.02042020.xlsx"
It also works merges updates. Just put the later ones later in the argument list, like so:
lein run SQL january_2019_opps_web_addendum_b.12312018.xlsx "January 2020 Addendum B CORRECTION.02042020.xlsx"
Or, to save the JSON.
lein run JSON "January 2020 Addendum B CORRECTION.02042020.xlsx" > 02042020.json
Examples:
C:\ws\softek\hcpcs>lein run JSON "January 2020 Addendum B CORRECTION.02042020.xlsx" > "January 2020 Addendum B CORRECTION.02042020.xlsx".json
; 1683 HCPS Codes:
C:\ws\softek\hcpcs>lein run CSV "January 2020 Addendum B CORRECTION.02042020.xlsx" > "January 2020 Addendum B CORRECTION.02042020.xlsx".csv
; 1683 HCPS Codes:
build.cmd
:: -or-
lein uberjar
dir target\*standalone.jar
Source data may be found by downloading the latest "Schedule B" from https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Payment/HospitalOutpatientPPS/Addendum-A-and-Addendum-B-Updates
Generated by GenerateSamples.ps1:
The CSV format doesn't support multiple tables and so only the Payment Schedule is included.
HCPCSCode,ShortDescriptor,StatusIndicator,PaymentRate,Changed?,Source
"0001F","Heart failure composite","E1",,false,"2020"
"0001U","Rbc dna hea 35 ag 11 bld grp","A",,false,"2020"
"0002M","Liver dis 10 assays w/ash","Q4",,false,"2020"
"0002U","Onc clrct 3 ur metab alg plp","Q4",,false,"2020"{"PaymentStatusIndicators":
[{"StatusIndicator":"A",
"Paid":"Always",
"Description":
"Services Paid under Fee Schedule or Payment System other than OPPS"},
{"StatusIndicator":"F", "Paid":"Always", "Description":"Corneal"},
],
"PaymentSchedule":
[{"HCPCSCode":"0001F",
"ShortDescriptor":"Heart failure composite",
"StatusIndicator":"E1",
"PaymentRate":null,
"Changed?":false,
"Source":"2020"},
{"HCPCSCode":"0001U",
"ShortDescriptor":"Rbc dna hea 35 ag 11 bld grp",
"StatusIndicator":"A",
"PaymentRate":null,
"Changed?":false,
"Source":"2020"},
{"HCPCSCode":"0002M",
"ShortDescriptor":"Liver dis 10 assays w\/ash",
"StatusIndicator":"Q4",
"PaymentRate":null,
"Changed?":false,
"Source":"2020"},
]}Yields T-SQL for two table variables (@PaymentStatusIndicators and @ScheduleB) that can be used in INSERT or SELECT statements for use in some sort of import or query.
DECLARE @PaymentStatusIndicators TABLE (
StatusIndicator varchar( 2 ) NOT NULL PRIMARY KEY
,Paid varchar( 7 ) NOT NULL
,Description varchar( 93 ) NOT NULL)
INSERT @PaymentStatusIndicators VALUES ('A','Always','Services Paid under Fee Schedule or Payment System other than OPPS');
INSERT @PaymentStatusIndicators VALUES ('C','Never','Inpatient Procedures');
INSERT @PaymentStatusIndicators VALUES ('E2','Unknown','Items and Services for which pricing information and claims data are not available');
DECLARE @ScheduleB TABLE (
HCPCSCode varchar( 7 ) NOT NULL PRIMARY KEY
,ShortDescriptor varchar( 29 ) NOT NULL
,StatusIndicator varchar( 2 ) NOT NULL
,PaymentRate REAL NULL,
,Source varchar( 4 ) NOT NULL)
INSERT @ScheduleB VALUES ('0001F','Heart failure composite','E1',NULL,'2020');
INSERT @ScheduleB VALUES ('0001U','Rbc dna hea 35 ag 11 bld grp','A',NULL,'2020');
INSERT @ScheduleB VALUES ('0002M','Liver dis 10 assays w/ash','Q4',NULL,'2020');