Tuesday, 17 December 2013

Visual Studio stops loading after attempting to open a solution




Ok, so, sometimes when you've been screwing around with a solution (e.g. taking a copy of an offline solution that is normally attached to TFS) and you open it you'll find that Visual Studio chokes and never finishes loading:

And you see the balloon we all love so much

I seem to encounter this the second time I open a solution, the first time it opens fine.  Visual Studio can sit in this state forever.  Or at least for so long that I can't be bothered waiting any longer. Then it needs to be killed via Task Manager.  This kind of sucks.

To fix this you can try deleting the .suo files for the solution.  These are Visual Studios solution user options files.  They are hidden files so you might need to tell explorer to show them:


Send them to the trash and next time you open the solution it might load a bit better.


Monday, 9 December 2013

HINZ 2013 Conference - a review in bullet points so I don't have to write coherently or in quantity




  • HINZ = Health Informatics New Zealand. What is an informatic? 
  • Rotorua is pretty cool.  (this is not sarcasm)
  • So many TrendCare dolls my colleagues accused me of acquiring them through illicit means
  • QualIT have really nice free pens, they have a solid, well made feel to them.  Would probably draw blood if thrown at a colleague.
  • Vendors are generally not very good at software innovation.  Wow look at the CSC & Orion booths.
  • There were a lot of managers talking to other managers about manager things. Where my dev buddies at?
  • It was jolly nice to talk to some folk from the other DHBs and to share some knowledge and maybe some code.
  • Conclusion: this is not a conference for developers, you won't learn anything practical, but the food is ok and if you want you can stare at the hot bubbling mud and imagine throwing vendor software in there.

From Wikipedia:  Health informatics is a discipline at the intersection of information science, computer science, and health care. It deals with the resources, devices, and methods required to optimize the acquisition, storage, retrieval blah blah blah no one cares 

Monday, 14 October 2013

Professional Achievements - we all like our victories noticed and recorded

I was recovering data off a semi failed disk and found some crap treasure that I had forgotten about. In a previous job I created a 'Professional Achievements' application, which is basically a rip-off of steam achievements but for work.

This is the front page. Observant people may notice that the default MVC template has been hardly changed.



Here's some of the achievements that were earned by me after a lot of dedicated effort:





The app would let you create your own achievements and assign them (or other previously created achievements) to anyone.


You could pick different pre-loaded icons or upload your own.  Most people used the team fortress 2 ones. I suspect this is because they were lazy. I also suspect this is a stunning copyright breach. I think I included any achievement icons that were easily found from a Google search! Please don't sue me Valve!

Here's some other random achievements that could be given out:





Spelling 'achievements' correctly in this post has really been a challenge. The More You Know.
Also, I've made the pictures full size even though it will blow out the layout cause I'm the boss round these parts.

NHI number validation or whatever


Yeah NHI number validation!  There is an exciting document here that the Ministry of Health have supplied which specifies what makes an NHI number valid or not.

Here's a method y'all.

public bool ValidateNhi(string nhi)
{
    bool valid = false;
    const string validNhiChars = "ABCDEFGHJKLMNPQRSTUVWXYZ";
                
    nhi = nhi.ToUpper();
    // must be seven chars long
    if (nhi.Length == 7)
    {
        // must not contain I or O
        if (!nhi.Contains("I") && !nhi.Contains("O"))
        {
            // last four must be integer
            int parsed;
            if (int.TryParse(nhi.Substring(3), out parsed))
            {
                // multiply each character by 8 minus its index and then sum em all together
                // e.g. first char * 7 + second char * 6 + third char * 5 etc
                int result = 0;
                int counter = 7;
                foreach (var character in nhi.Substring(0, 6)) // exclude last character
                {
                    int parsedCharacter = counter > 4 ? validNhiChars.IndexOf(character) + 1 : (int)Char.GetNumericValue(character);
                    result = result + (counter * parsedCharacter);
                    counter--;
                }
                // create a checksum by mod 11
                int checksum = result % 11;
                int checkDidgit = 11 - checksum;
                if (checkDidgit == 10)
                    checkDidgit = 0;

                // last value in nhi number must equal check digit
                valid = (int)Char.GetNumericValue(nhi.Last()) == checkDidgit;
            }
        }
    }

    return valid;
}

I can't deal with the excitement!

Tuesday, 1 October 2013

Extracting Data from the Patient Administration System (it's the PAS yo)


You want patient data out of the system?  Sure, sure, let me connect in and write some quick SQL for you.  Let's see what tables we have here.



Ok. This might take a little while. Lets have a look at the field names.



Hmmm.  Well, we'll try the data dictionary.



Ummm, hey look it's home time, let's do this tomorrow.

Tuesday, 10 September 2013

Support Queue Monitor


We have a Support II triage system where generally all the issues being sent to level 2 support go into a big (metaphorical) support 2 bucket and then the peeps on support 2 that week look at the issues and either assign them to themselves to resolve or reassign them to someone else (another support 2 person, or level 3 support).

Our issue tracking system is 'not very good'.  That is a direct quote from me when I was using non-cuss-words. To see what issues were sitting in our metaphorical level 2 support bucket you had to load up the issue system, click on a menu, select an item, wait a bit, scroll down, click the next page arrow, expand a thing and ta-da, there they were.  Visibility on what issues were there was lacking. The goal is to keep as few issues in the bucket as possible, they should all be assigned to someone to work on as soon as possible but it was always a bit of a challenge for people to know what was in there.

So I made an auto-refresh dash-board type page.
 

It refreshes every minute and indicates how many issues are there that need to be assigned out.  At the bottom is a list of issues, which link off to the incident tracking system so the issue can be reassigned.  The colour changes depending on how bad the situation is, typically we never get over 5 issues in the queue, we've never seen the red page yet! Go team!


This is an MVC application with a tiny bit of javascript on the front end.  It reads the data out of the issue tracking system from a custom view created on the db.

There is a cat hanging out at the top left of the page, when you hover over the cat it will slide out and give you a link to click on:

This takes you to a statistics page.  You get basic information around how many incidents have been assigned to Support 2 over the last week and what the current status of those incidents is:

Obviously, green/happy cat is best because that mean the incident has been resolved. Blue/ambivalent cat is ok but not ideal; this means the incident has been allocated to someone but it's still open.  You want to avoid red/wet cat which means the incident is sitting there waiting to be assigned to someone - it won't get fixed if no one is looking at it! It's depressing to see a lot of wet cats around.

If you mouse over an incident in the graph you'll get some pretty basic details:

There is a second tab which shows a list of peeps with the count of issues currently assigned to them; clicking on a person will give you a basic break down of issues they have:


And that's enough writing for one day.





Tuesday, 3 September 2013

A change is as good as a rest

We have a change control document that needs to be filled in before changes can be done to produciton systems.  This is not a technical document, but since the PMs throw their hands in the air and say "I don't know how to do those!" the technical peeps end up filling in fields in a non-technical document, trying to answer questions they don't know the answers too. We all know the best thing to do in that situation is to either guess, or be a smart ass.