|
|
|||||||||
|
Python in the IT Field --------------------------- Greg Lindstrom Senior Programmer Novasys Health Little Rock, Arkansas Abstract ---------- Python is a popular Open Source language that is easy to learn and use. Unfortunately, the easy of use is seen by many as an indication that Python can not be a “serious” language for use in the “real world”. In this paper we present reasons which lead us to believe that Python is the best language for use in the Information Technology (IT) field. We present three “real world” examples of how routines written in Python have saved time and money in the day to day operations at Novasys Health. About the Author --------------------- Greg Lindstrom has been writing code for a living for over 20 years. He has worked as a research consultant for NASA's Solar Physics Department, GTE Data Services, Acxiom Corporation, and most recently as senior programmer for Novasys Health in Little Rock, Arkansas. He has taught mathematics and physics at the High School and University levels, and has been an enthusiastic supported of Python for over 5 years When not writing code, Greg spends his time playing tuba in a brass quintet and spending time with his wife and two daughters. Python in the IT Field -------------------------- Introduction --------------- In business, customer service is the name of the game. The “number one” rule of business is “If you don't take care of the customer, someone else will”. At Novasys Health we administer health care plans. When you visit a doctor, a claim is filed which will eventually need to be processed. Novasys specializes in all aspects of claims processing. It is highly competitive and doing the job correctly is crucial. Until the Spring of 2004, virtually all of the IT services at Novasys were outsourced to various third party firms. Changes – such as changing a record layout or mapping a new field – could takes days (or longer) and cost thousands of dollars each. The leadership at Novasys decided this was unacceptable and decided to start an in-house IT department. The greatest problem with starting this up was they could not afford to hire an army of programmers and, even if they could, would not be able to take the time to teach computer science majors the ins and outs of the insurance industry. Novasys Health is here to server our clients; doctors, hospitals, and patients. We emphasize customer service and are constantly reminded to listen to our clients because they pay our salaries. The staff of the IT department takes the attitude that we are here to serve the staff at Novasys. We are not paid to write code; we write code to serve our company. If our projects to not serve the interests of the company we need to rethink what we are doing. We do not have time to pursue anything else; we are here to serve. Just as we take the attitude that the IT department is here to serve, we also believe that any technology we use is here to serve us, and that's why we use Python as our programming language. Python serves us, and serves us well. There are numerous essays advocating Python as a programming language. Our reasons are blatantly self-centered. Python allows us to do everything we need to do in a simple, efficient manner. Python encourages efficient, clean code that is easy to maintain. Python is easy enough to learn and use that our existing personnel can learn to program giving us a coding staff knowledgeable in the health care industry. Python serves us by letting us serve our customers. It is an unfortunate reality that many people think that since Python is easy to learn it must not be a “serious” language for “serious” applications. Since it is Open Source, there is no support available. Since it is not well known (like Java or Perl), it is a language used by coders wanting to stay out of the mainstream. We would like to present three examples of programs written at Novasys Health during the past year. Success is measured in cost savings, labor savings, or increased customer satisfaction. Extractor ----------- A daily task at Novasys is to pull, or extract, data from our database, format it into various record styles (fixed-length, comma delimited, EDI X12, XML) and electronically send it to our clients. This was being done manually; logging into an HP-9000 computer in Maryland, running extract scripts, running the results through a third party software package, and then ftp'ed to the client. It was a labor-intense process ripe for errors. We had one person trained to perform the process. If he would go on vacation, no files would be sent. We were asked to create a routine that would perform all extracts for all clients and simplify modifications and maintenance. We created Extractor. Extractor is written in 100% Python and has become a workhorse for us. All of the configuration data is held in an SQL Server. This includes the customer name, directory locations, ftp information, SQL query and all record layouts. By storing the SQL query and layouts in the database, changes can be made in minutes rather then days or longer. We have had numerous calls with clients where a change has been requested and when they ask for a time-cost estimate, we ask where to send the test file. Changes are made to the database, reducing risk and limiting regression testing. Additions and modifications to extracts can be made without the use of a coding resource. Recently, a PHP front-end was added allowing web access for the configuration. The savings? We have freed up a resource from having to perform daily extracts. We took the process one step further by automating the extractor jobs (more on that in a minute). We have decreased the time required to execute changes in jobs, and reduced errors by having one code base for all our extractions. When new features are requested, we change the code once and the feature is available to all clients. Could we have written this in another language? Sure, but why? The code is simple. The application is saving us time and money, while allowing us to serve our clients better. Extractor Spin-off ---------------------- As stated above, we believe the IT department is business to serve others at Novasys. One way we do that is to talk (!) to the other departments to see where we might be able to help. While in the break room one day, a member of our credentialing department mentioned that she had to send out a stack of letters each month to verify the credentials of out participating providers and estimated it took four to five days each month to prepare the recredentialing packets. Pulling data from a database is a job for extractor; we sat down with the department and wrote the SQL query, added a job to the extractor routine, and now the packets which took 32 to 40 hours a month are prepared n a matter of an hour or two. Our Vice President of Finance likes that. The same department has a meeting last month and decided that we could help out with the letters they send out when the recredentialing process was completed. Each provider is sent a letter stating they have been recredentialed (or why they have not been). We were asked to prepare another extractor run to produce the letters. Very good! Automating File I/O ------------------------ The person in charge of running all of the extractions is a young man with a degree in Logistics and a couple years coding Visual Basic. We decided to teach him Python by having him automate the extraction process. In a matter of days he had written code to detect the arrival of new files, decrypt the files using GPG, and archive the processed files. On the outbound side of the house, he automated the extractor jobs, encrypts the files and sends them on their way to the clients. The code could use some help, but it's important to note that he wrote all of this while learning the language! The simplicity of Python has him asking business questions (“How to I do such-and-such) rather than asking about virtual destructors, abstract data types, or pointers. Facesheets ------------ At the end of each workday jobs are run to produce a single page report called a facesheet. This involves running multiple COBOL jobs on the HP-9000 and verifying each job has completed successfully before the next job is kicked off. Once all the jobs are completed, the results are transferred to a local box and printed off for mailing. A routine was written to remotely log into the HP-9000 and kick off the jobs, insuring each job completes before kicking off the next. The files are ftp'ed and printed. Now, instead of spending most of the day producing the facesheets, our personnel are greeted each morning with a stack of facesheets to mail. Cost savings? Almost 40 hours a week. This program has been running nightly for over 9 months with no problems at all. Current Projects -------------------- The success of the above projects have encouraged the leadership at Novasys to have us write even grander projects, all with the aim of helping us serve our clients. We have four people involved in writing our code and plan to have more working with us as we teach them Python. One of the nicest comments made about our code came from out VP of Information Technology. While trying to isolate a (perceived) bug in the extractor routine, he opend up the code and “looked under the hood”. The comment he made was that he could follow the logic all the way through! As we said above, you can write good code in any language, or bad code in any language. We like that Python encourages – some say coerces you – to write simple, clean code. Conclusion ------------- Business is tough, and that's OK with us. We must server our customers or we will lose their business. Everything the IT department does is aimed at severing those who serve our customers and our technology must serve us. Because it simple enough for virtually anyone to understand and more than powerful enough to do everything we need to do to perform our job, we believe there is no better choice than Python for a programming language. |