This script helps manage medical bills via https://us.castlighthealth.com/ in a spreadsheet.
This script populates a spreadsheet with one row per service.
- Each claim has multiple services, which you can see in Castlight by opening the claim details.
- Each service corresponds to a single line item in a bill from a provider.
- This helps make sure that EOBs from insurance match bills from provider.
- This script was built for the following column headers; you can also change them and edit the fields in the array.
ID Person Date of service Service Provider Description Type Original Amount Deductible Coinsurance To pay amount Statement/bill date Date Paid Payment type Notes
- Log into Castlight.
- Open the dev tools console.
- Paste the entire script into the console and run it. It will copy TSV data to the clipboard.
- Paste the copied data into the spreadsheet.
- If the spreadsheet is not empty, paste it over the last existing row. It will copy starting from the last row of the previous copy (this is stored in localStorage). If that last row changes, that means you're missing some rows and should investigate.
- If the localStorage is cleared (or if you use a different browser), you can copy the ID from the last row of the spreadsheet into the first line of the script.
Warning: Firefox doesn't seem to support copy(await ...)
. On Firefox, run this command to copy the result of the previous command to the clipboard: copy(rows.map(r => r.join('\t')).reverse().join('\n'))