Showing posts with label coding. Show all posts
Showing posts with label coding. Show all posts

January 12, 2023

Helping Patients Find Care: Calculating for "Near Me"


Our CarePrecise Gold™ and CarePrecise Platinum™ customers have been wild about the geographic lookup of healthcare providers since we first introduced geographic radius search more than ten years ago in our CP ListMaker™ software. It's not a hard thing to do, and I'll show you how it works so you can use it in your own applications!

 All you need is a Zip Code® table that incudes longitude and latitude for the center of each zip if you want a rough estimation of distance (included in CarePrecise Gold and Platinum), or you can purchase our SelectGeo database that has the rooftop-level latitude/longitude pair ("geocode") for every U.S. healthcare provider's address.

The code we offer here is also included in CP ListMaker as open source, and it relies on some of the built-in functions available in VBA: the Sin() and Cos() math functions (sine and cosine), and a few others like the Abs() function (returns the absolute of a number).  All of the build-in functions can be found fully described at support.microsoft.com.

You can use the first function, CalcDistance(), to just return the distance between two points, or along with the others to list all of the spots in a miles radius from a central point. If you want to see only all of the physicians located within a radius, you would first create a query that filters for just physician locations. 

The Calculations

The magic happens with just three little Visual Basic for Application functions, shown below, which are pretty easily converted to VB or other code. After you create the CalcDistance() function, you send it the latitude and longitude of both locations, and it calculates the distance between them. 

Here's the VB/VBA code (shown as used in a Microsoft Access module)...

CalcDistance

This function calculates the distance between latitude/longitude pairs, and returns it in miles.

Public Function CalcDistance(lat1, lon1, lat2, lon2) As Variant

'This function calculates the distance between two latitude/longitude pairs.

Dim theta

Dim dist As Double

theta = lon1 - lon2

dist = Sin(deg2rad(lat1)) * Sin(deg2rad(lat2)) + Cos(deg2rad(lat1)) * Cos(deg2rad(lat2)) * Cos(deg2rad(theta))

If dist > 0 Then

    dist = dist - 0.00000000000001

End If

dist = acos(dist)

dist = rad2deg(dist)

dist = dist * 69.09

CalcDistance = dist

End Function

The Radius Functions

Use these functions to return the points of interest within a radius from a central point:

Public Function acos(Rad)

  If CDbl(Abs(Rad)) <> 1 Then

  acos = (pi / 2) - Atn(Rad / Sqr(1 - Rad * Rad))

  ElseIf Rad = -1 Then

    acos = pi

  End If

End Function

Public Function deg2rad(Deg)

    deg2rad = CDbl(Deg * pi / 180)

End Function

Public Function rad2deg(Rad)

    rad2deg = CDbl(Rad * 180 / pi)

End Function

Geocoding Applications

One of the most common applications of this code, used in tandem with our healthcare provider databases, is in web apps that help patients find nearby providers. CarePrecise physician, hospital and clinic data powers many online applications and services – some may be familiar to you (we maintain NDAs with our clients so we won't list them here).

Once a patient has chosen a nearby provider, the CalcDistance() function is used to say just how far away it is. Integration with Google Maps or another mapping API can then map the route using the coordinates from our SelectGeo database. 

This is some of the hardest working code out there, and the uses abound. Play with it!

Note: CarePrecise does not offer technical support on the open source code we publish. We put all of our efforts into supporting our data products! To get a copy of CP ListMaker, complete with center-zip geocodes for all U.S. zips, you can either purchase CarePrecise Gold, Platinum, which have include data on all HIPAA-covered U.S. healthcare providers, or just the CP ListMaker add-on (with no provider data).
- Michael

February 1, 2013

15 Types of Medical Billing Fraud & Abuse

Estimates of U.S. medical fraud and abuse go as high as $80 billion. It contributes significantly to rising healthcare and insurance costs.  The complexity and fragmentation of the American healthcare billing landscape is frequently a culprit makes fraud and abuse easier to commit and more difficult to detect.

One of our long-time clients, PayerFusion, has just published an article on its blog highlighting fifteen different forms of fraud and abuse, including upcoding, cloning, phantom billing, and a dozen more. Read the article for useful and timely information on this important subject.

CarePrecise provides software, data and services employed by law enforcement, including the Federal Bureau of Investigation, in ongoing investigations. To report fraud or abuse, go to http://oig.hhs.gov/fraud/hotline/
______
CarePrecise encourages you to attend the Big Data for Healthcare Forum, April 29 - May 1, 2013.

April 25, 2012

ICD-10 Selling Coding Systems


Are those coders in the basement about to see their pink slips? Maybe so, within the coming two years, as roughly half of inpatient providers say they expect to buy automated coding solutions over the next one to two years.

According to a new report released by KLAS Research, many healthcare providers are seriously considering purchases of inpatient computer-assisted coding (CAC) systems during the coming 24 months, despite the ICD-10 deadline delay to a recently proposed date of October 1, 2014.

Providers say that encoder/grouper integration is particularly important. 73% of providers reported that they are considering 3M, which currently holds a 50% market share and three quarters of the inpatient encoder market.  OptumInsight and Dolbey have also generated strong interest among providers.

Interest in CAC is being driven by concerns about the productivity impact that ICD-10 will have on providers' practices in both outpatient and inpatient settings. The transition to ICD-10 cranks up the number of diagnostic codes to 68,000 from 13,000 in the ICD-9 code set. Codes for inpatient procedures will shoot from 11,000 to 87,000 codes.

November 3, 2010

Call for CMS to Release Tax Number Data

The NPI Final Rule called for CMS to establish a system that would assign a National Provider Identifier (NPI) number to essentially every healthcare provider in the U.S. (HIPAA "covered entities"): now more than 3 million providers and growing. Great. But it was years before CMS released that data for the industry to use. CarePrecise personnel were at the forefront even back then, calling for CMS to release the data. If necessary, we were ready to fight for it, filing our own request under the Freedom of Information Act (FOIA). Federal agencies can't keep such kinds of data from the public. It's the law. CMS eventually looked at FOIA, and at their provider data, and decided that, sure enough, they were going to have to release it. We and our clients were ecstatic; now the industry would be able to produce the complex crosswalks necessary to actually achieve the efficiencies promised by the Final Rule.

Hurray... except CMS decided not to release one of the most useful data points of all. A provider's federal tax number is hardly a private number. Businesses have to give their tax number on every imaginable type of transaction. Employees see the employer's number on their W-2s. CMS's excuse was that sole proprietors and pretty much all individual practitioners would have to give their Social Security Number, or that busy doctors might type in the SSN in the wrong spot. Fair enough, but, as everyone who works with data knows, it's a piece of cake to parse a tax number field to determine if the number is a SSN or a business tax number.In fact, that's just exactly what CMS does in the Other ID fields of the NPPES (National Plan and Provider Enumeration System) database, replacing 000-00-0000 with a string of equals signs.

Instead of just redacting the SSNs, CMS decided it was best just to wipe clean the complete Employer Identification Number (EIN) field -- just in case some uppity docs got... uppity. Many of us have been hoping that CMS would revisit the issue of this gaping hole in the provider data, but it seems that the issue is to be ignored so that it will just go away.

So, here we are, once again, years into it, asking CMS to release non-SSN tax numbers/EINs so that we -- health systems and health plans large and small, clearinghouses, HIT vendors, medical billing and coding vendors -- can make this data do what it was intended to do for healthcare and for the taxpayers.