Sunday, May 4, 2014

Medical Recordkeeping

...is a very hot domain for my line of work (building line of business applications). I've never done any work myself in this space, but I've brushed into a few interesting things. At Veterans Affairs I had a coworker who was working on an application that would seize funds from tax returns to doctors who owed Veterans Affairs money! The way these situations would arise is that a patient would visit a doctor, a doctor would get Veterans Affairs to pay for the visit, Veterans Affairs would (after the fact) realize that the doctor should have gotten Medicare to pay for the costs, and would then ask to be reimbursed for the mix-up. If a doctor did not pay up, one recourse the U.S. government had was to seize funds in would-be tax returns! In 2012, I interviewed for a job I did not get at a company which audited the records of client hospitals to try to find individuals who welched on emergency room visits who were covered by Medicare and for whom Medicare could pay their bills. Individuals who get food stamps are in fact covered by Medicare in these scenarios (mostly). If a hospital knows who these parties are, it may recover lost revenue by asking the government to pay instead of the patient.

MultiDimensional eXpressions

Wikipedia says: "The MultiDimensional eXpressions (MDX) language provides a specialized syntax for querying and manipulating the multidimensional data stored in OLAP cubes."

Thursday, May 1, 2014

Distributed Transactions in C#

...is something I'd like to learn about!

Check to see if a record exists in SQL before making an insert so as not to make a duplicate!

IF NOT EXISTS(SELECT 1 FROM dbo.Foo WHERE Foo_ID=13)
BEGIN
   SET IDENTITY_INSERT dbo.Foo ON
   
   INSERT INTO dbo.Foo (Foo_ID, Name, Description)
   VALUES (13, 'Whatever', 'blah. blah. blah.')
   
   SET IDENTITY_INSERT dbo.Foo OFF
   PRINT('record thirteen was added')
END

openssl req -new -out Whatever.csr -keyout Whatever.privkey.pem

May be run as a command line against OpenSSL for Windows to make a Whatever.privkey.pem file. This assumes that you have navigated to C:/user/local/ssl/ and that openssl.exe and openssl.cnf are both in the directory.

WinRAR is a good tool to open tarballs and zip files.

Get it here or here and use it to open .rar, .tar.gz, and .zip files.

Who may verify and who may sign?

Following up on this and this...

  • Again, a CSR authorized by a CA is a PEM.
  • With a PEM alone you may verify a request.
  • With a PEM, a private key, and a password you may sign a request.
  • The PEM and the private key may be kept together for convenience, and their togetherness is called a PFX or P12. See: this
  • Under Certificates at "the console" there should be a folder for "Trusted Root Certification Authorities" which lists all of the CAs that the computer trusts. Unless you've doctored this list all of the CAs should largely be the same from computer to computer. Go Daddy is an example of a vendor which is a trusted CA (typically). If you interface with a web site that uses both an SSL (https://www.example.com) and a trusted CA, you will not be prompted with "are you sure?" alerts. You will get the alerts if the CA is not trusted but is instead just something random.