Tuesday, February 12, 2008

HL7 v3.0 message handling.

Health Level 7 (http://www.hl7.org/) has released version 3.0 for quite a while back, and I have to work on its message handling and integration with health care applications. The new version completely focuses on XML based messages. The Normative Edition comes with a good load of xsds (XML Schema Definition); one for each message type and believe me there are tons of xsds. The message structure has got very much readable and easy to parse using any language which has good xml parser as compared to version 2.x.
The best approach which I can think of for now, is using the xsds do generate classes. I tried to use XSD.exe from the Visual Studio 2005 Tools, but I was unable to fix the reference types. The xsd.exe tool does not take into account the referenced schema definitions, and so I was not able to auto-generate class from those xsd, but when I get that done then I have no big headache. Once the classes are generated, we can just use XmlSerializer class to DeSerialize the xml-message directly to the class and then access the respective properties. Looks simple?

I tried the same trick within a test application which has "shiporder.xml" and "shiporder.xsd", these files were taken from w3c :)
http://www.w3schools.com/schema/schema_example.asp

I created the class using xsd.exe from VS.NET tools, which created "shiporder.cs" for me:
cmd>> xsd shiporder.xsd /c

Then I build a simple and sweet standalone application to test it.
//code c#
using System.IO;
using System.Xml.Serialization;
namespace XSDTest
{
class Program
{
static void Main(string[] args)
{
XmlSerializer serial = new XmlSerializer(typeof(shiporder)); // shiporder.cs
TextReader reader = new StreamReader("shiporder.xml");
shiporder so = (shiporder) serial.Deserialize(reader); // this is how you directly get the data back.
}
}
}
//end code

I hope I will be able to resolve the reference schemas in the HL7 xsds, and then build the classes out of it in near future, till then try out other possible methods :)

-Bugs

Friday, November 30, 2007

Good and short-time projects are rushing in...

Things where little bit relaxed for me last 2-3 weeks. The vacation to Rajashtan was really worth. I realized the importance of vacation during this trip and take my words for granted "Everyone needs a break from the routine life".

This week's start I resumed my duty with a fresh mind of a new born baby. When I finished from my mail-box I learned I had lots of things piled up in coming weeks, and adding more to tragedy my boss pushed more 2 projects on top of my head :). No matter the projects are interesting and will be cool to code for, but indeed it will be tons of code. One project is getting our platform on Oracle and second is HL7 integration.

Today I finished my research on HL7 and completed the UMLs, so the real stuff starts next week.

Sunday, June 10, 2007

Here's my latest favorite...

The song is "Beete Lamhein" from the movie "The Train". I haven't seriously thought about watching the movie but I loved the song. Hands up for the great K.K :)

Dard mein bhi yeh lab muskura jaate hai..
Beete lamhein humein jab bhi yaad aate hai...2

Chand lamhaat ke vaaste hi sahi
Mushkura kar mili thi mujhe zindagi ...2
Teri aagosh din the mere kate
Teri baaahon mein thi mere raatien kati

Aaj bhi jab woh pal mujhko yaad aate hain
Dil se saare gumo ko bhoola jate hai

Dard mein bhi yeh lab muskura jaate hai
Beete lamhein humein jab bhi yaad aate hai
Beete lamheinnnnn

Mere kandhein mein sar ko Jukana Tera
Mere sene mein khud ko chupana teraa
Aake mere panaho mein shaam-o-seher
Kanch ki trah woh tut jana tera

Aaj bhi jab woh manzar nazar aate hai
Dil ki viraniyon ko mita jate hai

Dard mein bhi yeh lab muskura jaate hai
Beet lamhein humein jab bhi yaad aate hai
Beete lamheinnnnn
Dard Mein …..Beete lamheinnnnn

Sunday, December 10, 2006

Good thoughts :)

Winning isn't everything. But wanting to win is.

You would achieve more, if you don't mind who gets the credit.

When everything else is lost, the future still remains.

Don't fight too much. Or the enemy would know your art of war.

The only job you start at the top is when you dig a grave.

If you don't stand for something, you'll fall for everything.

If you do little things well, you'll do big ones better.

Only thing that comes to you without effort is old age.

You won't get a second chance to make the first impression.

Only those who do nothing do not make mistakes.

Never take a problem to your boss unless you have a solution.

If you are not failing you're not taking enough risks.

Don't try to get rid of bad temper by losing it.

If at first you don't succeed, skydiving is not for you.

Those who don't make mistakes usually don't make anything.

There are two kinds of failures. Those who think and never do, and those who do and never think.

Pick battles big enough to matter, small enough to win.

All progress has resulted from unpopular decisions.

Change your thoughts and you change your world.

Understanding proves intelligence, not the speed of the learning.

There are two kinds of fools in this world. Those who give advise and those who don't take it.

The best way to kill an idea is to take it to a meeting.

Management is doing things right. Leadership is doing the right things.

-Bugs!

Thursday, November 23, 2006

Adrenaline rush - 5 | 11 | 2006

This the most breath taking experience up till now. The day was 5th November 2006, a normal boring sunday, and I was expecting something new. Till afternoon I was at home playing around with the television's remote control. I had planned to visit my friend's place so as to repair his computer system. He was having some problems while running programs, probably a virus. Around 2.00 p.m after having my lunch I left for Vashi.

I was heading towards my friend's house. I was somewhere close to Sanpada when I realised a jerk in the bike's handle. The rear wheel started to shake vigoursly. I turned back to check on the rear wheel and in no time the bike was out of control. The handle was shaking very much and I was on 65. Untill I could make my move so as to hit the brakes, the bike diverted off the road. I turned my eyes so as to look in the front and within a flash of seconds my bike was onto the road divider. I never got a chance to avert the diversion of my bike. As soon as it hit the divider at the speed of 60; I just felt a lift off. I was unable to think what was happening. After sometime I hit the ground and kept rolling for almost 5 to 6 times. It was a very different experience. I knew the accident was big. The whole incident might have happened in minute or less. After the toss in the air and all the rolling, I landed on the divider. I was lying flat on my stomatch.

So, finally it was over. Next thing what came to my mind was checking all my body parts :)). Miraclously! I just got up and swayed my hands and moved my legs. Then I removed my helmet and checked on my neck and shoulder. Well, strange everthing was in place and nothing really hurt. It was just a small bruise on the left palm and a little cut on the lower lip. Then I turned around to look for my bike. Well, there it was lying almost 6 feet behind me and inside the divider. It was wrecked. My helmet was also broken. I took a close look at my bike to find out what all things have got damaged. I learned that the front wheel was almost ruined and there was no chance that I could ride it back to my place. I just called up my friend and just told him that I'll be reaching late. I got back home by taking a lift. Then I went back to the place for taking my bike. I loaded my bike on to a goods carrier veichle and took it to a garage. In the evening I went to that friend's home and formatted his hard drive to clean it up.

My wounds healed in just two days, but my dear bike took almost 1 week :-(

-Bugs!

Thursday, September 28, 2006

25th SEP 2006 was a paranormal experience.

It was a extremly ordinary and boring day, Monday the 25th SEP 2006. As we had some issues about the release I stayed back in office to resolve it. It was too late; around 10 I left my office. From Andheri I took a fast train and got down at Bandra for the next train to Wadala. Bandra! it was really crowded platform and the trains were running 5-10 mins late. I was just strolling on the platform, it was when my eyes saw something unusual. I was on Harbour line platform and towards the west, up in the skies, I saw some lights. At first I thought that it might be some high focus lights from the city itself as Navraatri had started. But then I realised that the focus beam was no where to be seen. And the lights were oscillating in a strange fashion. The light used to oscilate left to right between fixed points. There were two lights which I saw. One with a less diameter, like something close to center and second with a much more lenghty diameter. The second light has same velocity but seemed far from the center. The sky was too cloudy and everything was blurred. I can't say it was a illusion as the lights were very prominant in that cloudy sky. I watched the lights for about 10 minutes. It seemed that the lights were not moving from there. It looked much like a lights below the space ship in some typically Sci-Fi movie. I'am still very skeptical about what I saw. On the same platform, I saw two more enthusiastic guys looking at those lights. I don't know what exactly I looked at, but it was strange. The next morning it was in papers. I was astonished to read the news. The phenomenon was witnessed by very less number of people. This experience will always haunt me throughout.

-Bugs!
It was a extremly ordinary and boring day, Monday the 25th SEP 2006. As we had some issues about the release I stayed back in office to resolve it. It was too late; around 10 I left my office. From Andheri I took a fast train and got down at Bandra for the next train to Wadala. Bandra! it was really crowded platform and the trains were running 5-10 mins late. I was just strolling on the platform, it was when my eyes saw something unusual. I was on Harbour line platform and towards the west, up in the skies, I saw some lights. At first I thought that it might be some high focus lights from the city itself as Navraatri had started. But then I realised that the focus beam was no where to be seen. And the lights were oscillating in a strange fashion. The light used to oscilate left to right between fixed points. There were two lights which I saw. One with a less diameter, like something close to center and second with a much more lenghty diameter. The second light has same velocity but seemed far from the center. The sky was too cloudy and everything was blurred. I can't say it was a illusion as the lights were very prominant in that cloudy sky. I watched the lights for about 10 minutes. It seemed that the lights were not moving from there. It looked much like a lights below the space ship in some typically Sci-Fi movie. I'am still very skeptical about what I saw. On the same platform, I saw two more enthusiastic guys looking at those lights. I don't know what exactly I looked at, but it was strange. The next morning it was in papers. I was astonished to read the news. The phenomenon was witnessed by very less number of people. This experience will always haunt me throughout.

-Bugs!

Monday, September 11, 2006

Sunday, 10th 2006

Yup it was a normal Sunday and everything was pretty much the same. Got up at 8, had my breakfast and was surfing on the net. There wasn't anything crucial to do, so logged into yahoo msgr. Was trying to understand SOCKS 5 proto from Mr. Fish and this guy is talented. I had many friends online on yahoo that Sunday. In the afternoon I had plans for a movie "Lage Raho Munna Bhai". As I was chatting with Mr Fish something strange or rather unexpected happened. One of my old and best friend poped up. We had seen each other back in Jr. college and last conversation very long back, might be 6 or 7 years back. Never got a chance to keep in touch. I was damn happy at that very moment; might be b'cos I missed her. Soon, we chatted for a while wherein I realized she was sounding a bit different, and I did let her know the same. The conversation soon ended, we got each other's numbers so as to keep in touch. The first thing I did was to let her know, how fantastic that expierence was to me, so I messaged her.
It was afternoon, as planned I headed to Vashi for the movie and she was on my mind. As expected the movie was running house full and we never got tickets. One of my friend decided that we should be going for another movie as we never wanted to go back that easy. It was like "aaye hai to kuch dekh ke hi jaayenge :) ". So got the tickets for "Kabhi Alvida Na Kehna", damn I cursed myself; I hate these Johar productions. We all went in cracked some jokes and then the movie started. I decided to take a nap :)). Then something striked me, over all these years I had never been to SRK's movie and he was her's favourite. I said to myself lets watch for sometime. In the middle of the movie another strange thing happened, Rani's favourite color was BLUE in that movie; hehe! her's favourite too. Well the movie wasn't even close to okay but, the wonderful part was somethings do reminded me of her. It all turned out to be a strange Sunday.

-Bugs