Skip to content
Background Check your Doctor review aggregator software download dr norma c. salceda md

Background Check Your Doctor: Try This Health Care Provider Review Aggregator

Background Check Your Doctor: Try This Health Care Provider Review Aggregator published on

Background Check your Doctor review aggregator software download dr norma c. salceda md

I wrote a suite of scripts to help you background check your doctor.

The Primary Care Provider Investigator imports a list of health care providers and then scrapes multiple review sites (e.g. Yelp, UCompareHealthCare) to aggregate their reviews: PCPInvestigator.

This project was born of frustration with my health insurer’s “search for a doctor” function, which listed the doctors my insurance covered but didn’t give me any sense of whether a doctor was any good.

Now I have a database of doctors and a snapshot of their reviews across multiple sites, plus a local webpage that displays the results and lets me sort by the categories I care about. (Click any image to view full-size.)

PCP Investigator report doctor reviews ratings

Y’see, doctor reviews became important to me when I visited Dr. Norma C. Salceda back in 2009 and had such a bad experience that I complained to my insurer (then Blue Shield) and was told just go find another doctor.

If I’d had the PCPInvestigator at the time, I would have been able to see this before I ever made an appointment:

Norma C. Salceda MD Dr reviews ratings snapshot

That’s 38% positive reviews for Dr. Norma C. Salceda with over 150 reviews to examine. That’s bad.

In the summary report, I would have seen such quotables as “WORST experience that I’ve ever had with a doctor,” “worst medical experience I’ve ever had,” and “LADIES BEWARE SHE IS AN ANIMAL!!!”:

Norma C. Salceda MD Dr reviews ratings snapshot

Sure, any doctor can have dissatisfied patients and a few complaints, but the intensity and the sheer number here is pretty special.

If you want to try the PCPInvestigator out yourself, it’s on github. You’ll have to be comfortable with the command line, and it’s useful to have some familiarity with python and mongoDB. You may also have to massage the doctors’ information input parsing to get it to match whatever list you can get from your health insurer. There’s more detail in the README. And you should know…


  • Web scraping violates Google ToS. Irresponsible use may result in your IP getting blocked.
  • Pymongo cursor has been set to have no timeout (due to long intervals between scrapes.) Proceed w/ caution.


  • Health care review website formats change without notice.
  • Searches by doctor name and so may suffer false positives (i.e. include reviews for other doctors of the same name) or false negatives (i.e. omit some available reviews)
  • Disparities between your input file and the expected input format may require elbow grease to resolve.
  • Script developed on OSX. Installation/execution not tested on any other system.

Even with these issues, if you want to find the best, closest primary care provider covered by your insurance, this is the only way I’ve found.

Hope this helps. Enjoy!

Telnetlib not reading all output? Try asynchat

Telnetlib not reading all output? Try asynchat published on

Telnetlib not reading all output? Not receiving all the output from your telnetlib session? read_until() not an option because you don’t know what output to look for? telnetlib not queueing your writes?

Think you want a telnetlib alternative, but Google isn’t turning anything up?

I’ve been there.

Headbanging Gods of Metal Traveller
There was head-banging, but it was not a ball
Image stolen from Metal Traveller

After a couple of days of madness I learned a few things:

– In Maya at least, not all output generated by the server is available to be read. I can call print("foo") all day and never read back “foo” on the client. Apparently it is known that “python print does not appear in certain output”. I ended up using the mel warning command, and if you think that sounds like overkill you are probably right.

– After much much much Googling, this stackoverflow answer pointed me to asynchat. I ended up writing a tiny client by extending asynchat, and Turns out I didn’t want a telnetlib alternative; I wanted a module that did much less!

not a python but still happy
Not a python but still happy

telnetlib doesn’t seem to queue writes. You can send two writes in a row, but there’s no guarantee the second one will be received by the server. Troublesome if you’re trying to use a second write as a way to determine when the first write has finished executing. Fortunately asynchat.push() works like a boss.

– More information and a code sample can be found at stackoverflow. I have personal insight on a code problem about once in a bazillion years, so this is very exciting to me.

If this post helps one person headbang only by choice, I have succeeded.

JDI on How to Ask a Good Programming Question

JDI on How to Ask a Good Programming Question published on

The coworker featured in this comic has written a post about the problem with short questions posted to StackOverflow. It is haughty and good.

For those that are immediately inclined to provide the complete code snippet to solve the problem, where do we draw the line? What if the question being asked would need 10 lines of code? 20? 100? And if you are also interested in frequently helping people, would you be willing to provide 5 lines of complete code to 10 people a day, knowing that each person probably didn’t learn much? Furthermore, after having given this individual a quick answer, you have now rewarded their lazy behavior, and more than likely just encouraged them to repeat the bad habit again.

That is all.

AndEngine Installation: Lessons from Last Night’s Tweets

AndEngine Installation: Lessons from Last Night’s Tweets published on

Y’all may have noticed from my Twittersplosion that I had a frustrating time trying to install and run the AndEngine examples.

This involved 7 hours, 3 different tutorials (including 2 ones on video!) and at least 10 distinct errors requiring a stop-and-Google. At four in the morning I got the emulator to launch the example but then crash, and I gave up.

To be fair, my process had to include installation and setup of Eclipse, which I didn’t have on my home PC. Maybe a true Android developer would have had Eclipse and ADT all set up in the way it needed to be, and I should not have expected the AndEngine tutorials to address those issues.

Even so, I’m going to step away from AndEngine because this much trouble installing can’t bode well for development. I may come back to it after I try a couple of other things (HTML5! Akihabara!), but I’m really angry and frustrated with it right now.

So here are some takeaway lessons to help give merit to last night’s nonproductivity:

1) Set a limit. This is hard as hell when you keep thinking you’re 20 minutes away from “getting it to work,” when each solution is really 20 minutes until the next error. I understand now how planes full of passengers end up on the tarmac for 8 hours. But, since I wasn’t locked in to AndEngine or even developing for the Android, if I had decided at the beginning I was only going to Google three errors and then cut my losses and try something else, I would have saved myself four hours.

2) Because you have a limit now, treat each error as a separate investigation and UNDERSTAND the problem before adopting a solution. For me, the desire to get past an error and keep moving is overwhelming. I’m probably going to grab the first solution that shows up in Google and works and keep going. Unfortunately there is 90% likelihood it’s going to cause another problem later, and I’m not going to remember the change I made because I didn’t understand it fully in the first place.

This has already happened twice on this project. I managed to screw up my git install while doing a homebrew install. Yeah, that is possible.

3) Document what you’re doing. That way if something breaks later you have something to refer to. Also you have a concrete explanation if you make a decision to use something else, instead of just a fog of fury.

Nowadays half of programming is choosing a toolkit and installing it, so if I take these steps going forward I can save myself a lot of heartache. With this project I’ve gotten to the point where I can get willing to set aside the time to do the research. What I need to do is get willing to set aside the time to do the installation, too.

So I feel a little mellowed out now. But seriously until I successfully install SOMETHING it’s a fragile peace, so don’t provoke me. DON’T PROVOKE ME I SAY.

Your Cocoa Build of Qt and You

Your Cocoa Build of Qt and You published on 1 Comment on Your Cocoa Build of Qt and You

Interestingly, I had to start building my apps on OSX because the apps I built on my Snow Leopard machine stopped working (loader error and other good times).

After much suffering my boss set up a working Qt/PyQt/PIL install on his OSX machine. I ditched my beloved Snow Leopard deployment script and cobbled together a new one. I apped remotely. All was OK.

But funny thing.

My application’s keyboard shortcuts stopped working.

To be more specific, my keyboard shortcuts modified with the COMMAND button stopped working. The same keyboard shortcuts modified with the CTRL button continued to work.

I overload my widget’s keyPressEvent() method like so:

def keyPressEvent(self, event):

isCommandButton = (event.modifiers() & QtCore.Qt.ControlModifier)
isCtrlButton = (event.modifiers() & QtCore.Qt.MetaModifier)
isCtrlOrCommand = isCtrlButton or isCommandButton

(Yes, on Mac the MetaModifier corresponds to the CTRL button and the ControlModifier corresponds to the COMMAND button. Yes, this is confusing.)

So when COMMAND+9 stopped doing what COMMAND+9 used to do, I dug a little deeper. Was the COMMAND button not sending the expected value?

It was. That wasn’t the problem. This is the problem:

CTRL+9 (works)

keyPressEvent! key: 16777250, text:
- Was that a ControlModifier? False
- Was that a MetaModifier? True
keyPressEvent! key: 57, text:
- Was that a ControlModifier? False
- Was that a MetaModifier? True

That makes sense, because the first keyPressEvent! happens when CTRL is pressed, and the second when 9 is pressed.

CMD+9 (does not work)

keyPressEvent! key: 16777249, text:
- Was that a ControlModifier? True
- Was that a MetaModifier? False

Only one keyPressEvent! I can mash the “9” button all day long and no keyPressEvent occurs.

It is like pressing the COMMAND button blocks any other key event.

What. The hey.

I read around and I figure the problem is some difference between the Qt Carbon (what I have locally on Snow Leopard) and Cocoa (what my boss has on his OSX) builds. A relevant bug:

On Mac OS X 10.6.4 with Qt 4.7.0 beta 2 Cocoa I found that Ctrl+Tab and Shift+Tab are not caught by an event filter on the qApp object. Tab and Alt+Tab pose no problems. It does not seems to me that the system intercept these key combinations (I’ve checked in System Preferences/Keyboard for the assigned shortcuts).

Mac cocoa only: QKeyEvent Qt::Key_Tab not accessible to event or eventFilter

Similarly, CMD+C doesn’t copy, CMD+V doesn’t paste, etc. My users miss those features. They miss them so.

My end run is, in Qt Designer, to add menu actions:


You may now gasp at my hacking overkill. But I really don’t know how else to get around it. I’m startled to madness that the menu actions work at all.


Wait a minute.

Shortcuts use event filters.

Event filters happen before keyPressedEvent()s get called.

I need an application-wide event filter.

Will update.


I couldn’t make EventFilter work — either by setting new values on the received event or trapping it and posting a new one. The former didn’t stick and the latter caused an event loop.

I also tried to overload the QApplication event() method, but the problem is that once COMMAND is depressed no further key events are captured, so even the app event() method is really too late.

So I wrote a menu shortcut for every shortcut in my application.

Yes, I did.

PIL on Snow Leopard: _jpeg_resync_to_restart error

PIL on Snow Leopard: _jpeg_resync_to_restart error published on 7 Comments on PIL on Snow Leopard: _jpeg_resync_to_restart error

Oh man I just got this working so I’m gonna write it all down in case I have to do this again later.



– jpeg-7
– PyQt 4.6
– PIL (aka Imaging) 1.1.6
– reportlab 2.3
– Snow Leopard (Mac OS X 10.6.4)

I use PIL and reportlab so my PyQt applications can make PDFs and print nicely. Rad. I like reportlab and it does what I need. I really like PyQt 4.6 especially now that Pixmaps have native jpeg support so I don’t need to do a song and dance to show a jpeg in my applications.

But in upgrading to Snow Leopard something in my PIL installation got a little borked. Executing this code:

imageFilePath = somePathToAJpeg
pixmapImage = QtGui.QPixmap(imageFilePath)

#Because it's a bum format, force it with PIL
pilImage =
stringIO = StringIO.StringIO(), format='png')
pixmapImage = QtGui.QPixmap()

Got this error:

Traceback (most recent call last):
File "test/ui/", line 89, in testCreatePDF
pdfCreatorObj.createPDF(desiredFilePath, True)
File "/homes/tory/workspace/spLib/ui/", line 183, in createPDF
File "/Library/Python/2.6/site-packages/reportlab/platypus/", line 1010, in build,flowables, canvasmaker=canvasmaker)
File "/Library/Python/2.6/site-packages/PIL/", line 532, in tostring
File "/Library/Python/2.6/site-packages/PIL/", line 164, in load
File "/Library/Python/2.6/site-packages/PIL/", line 381, in load_prepare
File "/Library/Python/2.6/site-packages/PIL/", line 231, in load_prepare =, self.size)
File "/Library/Python/2.6/site-packages/PIL/", line 37, in __getattr__
raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed

PyQt 4.6’s native jpeg support meant I could just rip out this code (that I had needed way back in 4.4.3) and my jpegs loaded fine and I could deal with my PIL malfunctions another day.

Today is the day I have to deal with my PIL malfunctions.


There’s a problem with my _imaging C library, you say? Let’s find out some more about it.

Public Image Lame-ited

Stop. Google time.

Google this error, there are many links and many suggestions. I searched and searched for the “click your heels three times” option, but apparently I was going to need to clean house and reinstall.

The good news is it hella worked. Some of my steps might not be strictly necessary, but here’s what I did that worked:


1) Force the gcc and gcov paths to 4.2:

sudo rm /usr/bin/gcc
sudo ln -s /usr/bin/gcc-4.2 /usr/bin/gcc
sudo rm /usr/bin/gcov
sudo ln -s /usr/bin/gcov-4.2 /usr/bin/gcov

(Suggested by Remi in comments here.)

gcc 4.2 is the latest at the time of this writing. gcc 4.0 is required for successful MySQLdb installation, and that’s probably what got borked.

[Also, per Bram Braakman’s advice, I checked my .profile file. (Turns out I didn’t have the explicit “export CC” line he warned about in my .profile file, but I may have the last time I was messing with my PIL install.)]

Now I know I’m using the right version of gcc.


2) In my .profile, commented out these lines I had kicking around:

#ARCHFLAGS="-arch x86_64"

Did I need to do this? I dunno.


3) Picked through my system to delete EVERYTHING called anything like “libjpeg,” “PIL” or “Imaging.”

Over time I’d tried so many different ways to fix this install that I had libjpeg and PIL files everywhere from /usr/local to /opt/local to /sw/lib. It looks like my PIL was only ever referencing the installation at /Library/Python/2.6/site-packages, which is good, but better safe than re-installing.


4) Followed these installation instructions, starting with downloading libjpeg afresh.




YESSSSSSS. Now my PDFs have images!

In our cube we have a gong so that those who have accomplished coding tasks may celebrate their fleeting victories.

I hella gonged the gong out of that gong.

Make “make” faster

Make “make” faster published on

I dread installing Qt because it’s an all-day project. With this pro-tip it’s a matter of minutes — and it applies to any make you make. From teammate Justin:

I was complaining about building Qt to my genius head programmer friend at Sony, and he told me a little trick that was freaking awesome.

When you are compiling something from source and using ‘make’…. do:

make -j 9

-j specifies how many ‘jobs’ or threads to run when compiling.

He suggested one more than the cores you have.

I did this building pyqt and it seriously finished in MINUTES.

Justin is smartly smart. And knows smartly smart people. And I know Justin, so I reap the benefits.

Generous Genius Programmer Shares Secrets of PyQt Multiple Autocomplete

Generous Genius Programmer Shares Secrets of PyQt Multiple Autocomplete published on 1 Comment on Generous Genius Programmer Shares Secrets of PyQt Multiple Autocomplete

It so happens I was looking for a way to do multiple autocompletes in a QComboBox.

In other words, I had an editable combo box containing the list:
– cupcake
– muffin
– pie

I wanted the user to be able to type “p” and have it autocomplete to “pie.”
This is no problem. Qt makes this automatic and wonderful, and it is a reason I want to give Qt a hug sometimes.

But then I want the user to keep typing “pie c” and have the combo box autocomplete “pie cupcake.”

This is a bit trickier.

I had seen some code for doing one’s own autocompletion combo box from scratch, and let us just say I did not want to write any.

So I sniffed around and found John Schember’s post about QCompleter and autocompleting multiple entries, and I was saved!


Fortunately, a QComboBox contains a QLineEdit object, so I was able to adapt this code while being very very lazy.

Woot. Thank you, John Schember.

Primary Sidebar