<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Reviving The Health Revolution &#187; HealthVault</title>
	<atom:link href="http://healthblog.vitraag.com/topics/healthvault/feed/" rel="self" type="application/rss+xml" />
	<link>http://healthblog.vitraag.com</link>
	<description>A view from inside the HealthVault</description>
	<lastBuildDate>Tue, 27 Jul 2010 18:12:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OSCON&#8217;10 Notes</title>
		<link>http://healthblog.vitraag.com/2010/07/oscon10-notes/</link>
		<comments>http://healthblog.vitraag.com/2010/07/oscon10-notes/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 19:41:31 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=278</guid>
		<description><![CDATA[Over four days from July 20-23, I had great fun connecting 1:1 with a some of the influencers in Healthcare IT and learning about new technologies on the horizon (Asynchronous programming, Scala, Go, Android, ..) at the Open Source Conference in Portland. 
So how did my talk go?        [...]]]></description>
			<content:encoded><![CDATA[<p>Over four days from July 20-23, I had great fun connecting 1:1 with a some of the influencers in Healthcare IT and learning about new technologies on the horizon (Asynchronous programming, Scala, Go, Android, ..) at the Open Source Conference in Portland. </p>
<p><b><u>So how did my talk go?        <br /></u></b>My <a href="http://www.oscon.com/oscon2010/public/schedule/detail/15292">talk</a> went reasonably smooth, overall I was happy with what I could put together in limited time. According to the polls and some in person conversations people seemed to like the fact that I attempted to break it down with a technical deep dive, especially taking time to go deeper on on-the-wire protocols and standards.</p>
<p>The talk was recorded by Robert Wood Johnson foundation and I’ll post a link around when they make it available online.</p>
<p><strong><u>OSCON Healthcare Track        <br /></u></strong>I attended most of the talks at OSCON HealthCare <a href="http://www.oscon.com/oscon2010/public/schedule/topic/Health">track</a>. This was the first Healthcare track at the conference, in my opinion it turned out splendid! Andy Oram has a good summary of the <a href="http://radar.oreilly.com/2010/07/day-one-of-the-health-care-it.html">first</a>, <a href="http://radar.oreilly.com/2010/07/vista-scenarios-and-other-cont.html">second</a> &amp; <a href="http://radar.oreilly.com/2010/07/wrap-up-of-the-health-care-it.html">third</a> day, and Fred Totter has links to <a href="http://www.fredtrotter.com/2010/07/26/nhin-and-others-at-oscon/">interviews</a> of some of the presenters. Over the three days of Healthcare track I learnt a lot about various NHIN and VistA projects.</p>
<p><strong><u>Sessions        <br /></u></strong>In addition, I attended a few session and a couple of tutorials. I’ll summarize some of them below with key take-away or interesting links :</p>
<ul>
<li><b>Cloud computing&#160; – “Situation Normal, Everything Must change”:</b> If nothing else I would highly recommend watching <a href="http://www.youtube.com/watch?v=5Oyf4vvJyy4&amp;feature=PlayList&amp;p=12696FB0B040FA53&amp;playnext_from=PL&amp;index=39">this</a> key-note, no new content but the <a href="http://radar.oreilly.com/simon/">Simon Wardley</a> is very effective in communicating his point about Cloud computing and managing technology in general. </li>
<li><strong>Asynchronous Programming</strong> – I learnt a lot about nginx web-server and the principles behind <a href="http://nodejs.org/">node.js</a>. Ilya’s <a href="http://www.oscon.com/oscon2010/public/schedule/detail/13709">talk</a> was specific to Ruby but learnt a lot about the perf gain PostRank has gotten owing to Asychcrony. He was gracious to have lunch with me and one of interesting things he mention was use of <a href="http://www.amqp.org/confluence/download/attachments/720900/amqp0-8.pdf">AMQP</a>. AMQP is near real-time (low latency, high throughput) general purpose message standard used by most of the guys on Wall-street! An open source implementation of the same is RabbitMQ. </li>
<li><b><a href="http://www.oscon.com/oscon2010/public/schedule/detail/14760">Another Go at Language Design: </a></b>Since I’m a compiler wonk and systems’ programmer, it was great to see Rob Pike’s presentation on Go language and specially see the fast Go compilers, most optimizations are owing to managing the dependencies for linking. </li>
<li>jQuery – The presentation on <a href="http://assets.en.oreilly.com/1/event/45/Cooking%20with%20jQuery%20Presentation.pdf">jQuery</a> was very detailed even for a novice. I particularly liked the show-casing of selectors to write succinct iavascript code. </li>
<li>Graph Database – <a href="http://neo4j.org/">Neo4j</a> : At fore front in the NoSQL camp Neo4j offers up to 1000x performance gain over relational database for implementing applications like a social network. Key different from RDBMS is that the Graph itself is the main index! </li>
<li>Android: I learnt a quite a bit about Google Android and their development methodology. Android developers in general focus a lot on remove perceivable slowness from the application (called “Jank” in Google lingo).Anything which takes more than 200ms to process is considered bad. A good rule of thumb to prevent “Jank” is to never stall the event loop.&#160; To spur further Android excitement Google gave away the soon to be de-commissioned Nexus one devices in one of their workshops.&#160; </li>
<li><a href="http://openstack.org/"><strong>Open stack</strong></a>:Open source system for creating Amazon EC2-like clouds. In fact this project is open sourcing of the RackSpace cloud system.<b><u></u></b> </li>
<li>An interesting <a href="http://xmlvm.org/overview/">project</a> to cross-compile Android projects to iPhone. </li>
</ul>
<p><b><u>Birds of feather session on Healthcare Standards        <br /></u></b>I participated in the <a href="http://www.oscon.com/oscon2010/public/schedule/detail/15598">BOF</a> on Healthcare Standards. </p>
<p>The conversation started by highlighting the classic problem of how people who have been in the industry want semantic interoperability&#160; and how the new entrants in the area want simple systems. I contribute to this conversation by pointing out that if standards get developed with industrial strength open implementations they are more tend to be more sane (read NHIN-D).</p>
<p>The conversation then drifted towards terminologies. Everyone in the room was outraged with CPT and AMA’s greed J. David Riley (head of NHIN project) added to the conversation saying that ICD-10 procedures are designed to replace CPT. I contributed to the conversation detailing how it’s difficult to develop a coherent system with all the different vocabularies with different licensing requirement and incomplete&#160; mappings to each other. David was then gracious to detail a project done in the federal government where they attempted to come up with a common terminology service by inventing something akin to OIDs for each terminology. He is hoping that he can open source those terminologies sometime soon. Brian Bhelendorf then added to the conversation asking how can we enable or create open source terminologies. I was suggested that may be can do something like RxNorm to create a uniform mapping system which the terminology licensors can adopt. There was more discussion on this topic, no one felt that UMLS was adequate.</p>
<p>PS: I’ll update the this post with more links and thought-blocks as I remember <img src='http://healthblog.vitraag.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2010/07/oscon10-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HIMSS 10 Conference &#8211; Cover It Live!</title>
		<link>http://healthblog.vitraag.com/2010/02/himss-10-conference-cover-it-live/</link>
		<comments>http://healthblog.vitraag.com/2010/02/himss-10-conference-cover-it-live/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 21:27:45 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[HIT]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=256</guid>
		<description><![CDATA[Cover It Live event for HIMSS Conference:
HIMSS 10 Conference
]]></description>
			<content:encoded><![CDATA[<p>Cover It Live event for HIMSS Conference:</p>
<p><iframe src="http://www.coveritlive.com/index2.php/option=com_altcaster/task=viewaltcast/altcast_code=82aceeb9ff/height=550/width=470" scrolling="no" height="550px" width="470px" frameBorder="0" allowTransparency="true" ><a href="http://www.coveritlive.com/mobile.php/option=com_mobile/task=viewaltcast/altcast_code=82aceeb9ff" >HIMSS 10 Conference</a></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2010/02/himss-10-conference-cover-it-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding CCR</title>
		<link>http://healthblog.vitraag.com/2009/10/understanding-ccr/</link>
		<comments>http://healthblog.vitraag.com/2009/10/understanding-ccr/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 22:27:50 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[Vocabularies]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=204</guid>
		<description><![CDATA[Update: Fixed typos, added links to related tools and articles, updated the example.
CCR or Continuity of Care Record is a standard meant to ease the exchange of clinical information with a relatively easy to read and practical data-format and schema. There is ton of great information about CCR on its resource site. CCR document format [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> Fixed typos, added links to related tools and articles, updated the example.</p>
<p>CCR or Continuity of Care Record is a standard meant to ease the exchange of clinical information with a relatively easy to read and practical data-format and schema. There is ton of great information about CCR on its <a href="http://www.ccrstandard.com/">resource site</a>. CCR document format is supported by majority of personal Health clouds, both &#8211; Microsoft HealthVault &amp; Google Health.</p>
<p>The CCR specification comprises an implementation guide, XML schema definition and a guidance spreadsheet for each data element that makes up the standard. These resources can be <a href="http://www.astm.org/Standards/E2369.htm">bought</a> from ASTM. </p>
<p>The document format of CCR is very straight forward, consisting of a header, body and a footer with the following top-level elements:</p>
<table border="0" cellspacing="0" cellpadding="1" width="602">
<tbody>
<tr>
<td valign="top" width="200"><strong>Header</strong></td>
<td valign="top" width="178"><strong>Body</strong></td>
<td valign="top" width="155"><strong>Body</strong></td>
<td valign="top" width="67"><strong>Footer</strong></td>
</tr>
<tr>
<td valign="top" width="200">
<li>CCR Document ID </li>
<li>Language </li>
<li>Version </li>
<li>Creation Date </li>
<li>Patient </li>
<li>From </li>
<li>To </li>
<li>Purpose </li>
</td>
<td valign="top" width="178">
<li>Payers </li>
<li>Advance Directives </li>
<li>Support </li>
<li>Functional Status </li>
<li>Problems </li>
<li>Family History </li>
<li>Social History </li>
<li>Alerts </li>
<li>Medications </li>
</td>
<td valign="top" width="155">
<li>Medical Equipment </li>
<li>Immunizations </li>
<li>Vital Signs </li>
<li>Results </li>
<li>Procedures </li>
<li>Encounters </li>
<li>Plan Of Care </li>
<li>HealthCareProviders </li>
</td>
<td valign="top" width="67">
<li>Actors </li>
<li>Signatures </li>
<li>References </li>
<li>Comments <strong></strong></li>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Google Health supports only a <a href="http://code.google.com/apis/health/ccrg_imagemap.gif">limited set of entities</a> from the above, while HealthVault supports the entire standard and also allows transformation of some of these entities in to native HealthVault types. You can read more about working with <a href="http://msdn.microsoft.com/en-us/dd797577.aspx">CCR in HealthVault</a> and various <a href="http://msdn.microsoft.com/en-us/ee663895.aspx">input</a> <a href="http://msdn.microsoft.com/en-us/ee663894.aspx">mappings</a>, <a href="http://msdn.microsoft.com/en-us/ee663897.aspx">output</a> <a href="http://msdn.microsoft.com/en-us/ee663896.aspx">mappings</a>, and <a href="http://msdn.microsoft.com/en-us/ee663898.aspx">CCR vocabularies</a>.</p>
<p>Here are some illustrative CCR figures from Dr. Waldren’s presentation (see end of article).</p>
<p><a href="http://healthblog.vitraag.com/wp-content/uploads/2009/10/image7.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://healthblog.vitraag.com/wp-content/uploads/2009/10/image_thumb4.png" width="368" height="256" /></a> <a href="http://healthblog.vitraag.com/wp-content/uploads/2009/10/image8.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://healthblog.vitraag.com/wp-content/uploads/2009/10/image_thumb5.png" width="308" height="284" /></a></p>
<p>Using the SNOMED-CT concepts one can write the Systolic Blood pressure reading in CCR as the following (<strong>UPDATE</strong>: Well-formatted the CCR to include source, object-id and actors, thanks to Matt Wagner):</p>
<p> <a href="http://11011.net/software/vspaste"></a>
<pre style="width: 581px; height: 1832px" class="code"><font size="2"><span style="color: blue">&lt;?</span><span style="color: #a31515">xml </span><span style="color: red">version</span><span style="color: blue">=</span>&quot;<span style="color: blue">1.0</span>&quot; <span style="color: red">encoding</span><span style="color: blue">=</span>&quot;<span style="color: blue">utf-8</span>&quot;</font><font size="2"><span style="color: blue">?&gt;
&lt;</span><span style="color: #a31515">ContinuityOfCareRecord </span><span style="color: red">xmlns</span><span style="color: blue">=</span>'<span style="color: blue">urn:astm-org:CCR</span>'</font><font size="2"><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">CCRDocumentObjectID</span><span style="color: blue">&gt;</span>Doc<span style="color: blue">&lt;/</span><span style="color: #a31515">CCRDocumentObjectID</span></font><font size="2"><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Language</span></font><font size="2"><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Text</span><span style="color: blue">&gt;</span>English<span style="color: blue">&lt;/</span><span style="color: #a31515">Text</span></font><font size="2"><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Language</span></font><font size="2"><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Version</span><span style="color: blue">&gt;</span>V1.0<span style="color: blue">&lt;/</span><span style="color: #a31515">Version</span></font><font size="2"><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">DateTime</span></font><font size="2"><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">ExactDateTime</span><span style="color: blue">&gt;</span>2008<span style="color: blue">&lt;/</span><span style="color: #a31515">ExactDateTime</span></font><font size="2"><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">DateTime</span></font><font size="2"><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Patient</span></font><font size="2"><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">ActorID</span><span style="color: blue">&gt;</span>Patient<span style="color: blue">&lt;/</span><span style="color: #a31515">ActorID</span></font><font size="2"><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Patient</span></font><font size="2"><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Body</span></font><font size="2"><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">VitalSigns</span></font><font size="2"><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">Result</span></font><font size="2"><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">CCRDataObjectID</span><span style="color: blue">&gt;</span>0001<span style="color: blue">&lt;/</span><span style="color: #a31515">CCRDataObjectID</span></font><font size="2"><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Text</span><span style="color: blue">&gt;</span>Blood Pressure<span style="color: blue">&lt;/</span><span style="color: #a31515">Text</span></font><font size="2"><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Source</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Text</span><span style="color: blue">&gt;</span>Unknown<span style="color: blue">&lt;/</span><span style="color: #a31515">Text</span></font><font size="2"><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">Source</span></font><font size="2"><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Test</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">CCRDataObjectID</span><span style="color: blue">&gt;</span>0002<span style="color: blue">&lt;/</span><span style="color: #a31515">CCRDataObjectID</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Text</span><span style="color: blue">&gt;</span>Systolic<span style="color: blue">&lt;/</span><span style="color: #a31515">Text</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Code</span></font><font size="2"><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>163030003<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span></font><font size="2"><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">CodingSystem</span><span style="color: blue">&gt;</span>SNOMEDCT<span style="color: blue">&lt;/</span><span style="color: #a31515">CodingSystem</span></font><font size="2"><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">Code</span></font><font size="2"><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Source</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Text</span><span style="color: blue">&gt;</span>Unknown<span style="color: blue">&lt;/</span><span style="color: #a31515">Text</span></font><font size="2"><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">Source</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">TestResult</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>120<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Units</span></font><font size="2"><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Unit</span><span style="color: blue">&gt;</span>mmHg<span style="color: blue">&lt;/</span><span style="color: #a31515">Unit</span></font><font size="2"><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">Units</span></font><font size="2"><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">TestResult</span></font><font size="2"><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">Test</span></font><font size="2"><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Test</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">CCRDataObjectID</span><span style="color: blue">&gt;</span>0003<span style="color: blue">&lt;/</span><span style="color: #a31515">CCRDataObjectID</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Text</span><span style="color: blue">&gt;</span>Diastolic<span style="color: blue">&lt;/</span><span style="color: #a31515">Text</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Code</span></font><font size="2"><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>163031004<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span></font><font size="2"><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">CodingSystem</span><span style="color: blue">&gt;</span>SNOMEDCT<span style="color: blue">&lt;/</span><span style="color: #a31515">CodingSystem</span></font><font size="2"><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">Code</span></font><font size="2"><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Source</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Text</span><span style="color: blue">&gt;</span>Unknown<span style="color: blue">&lt;/</span><span style="color: #a31515">Text</span></font><font size="2"><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">Source</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">TestResult</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>75<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Units</span></font><font size="2"><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Unit</span><span style="color: blue">&gt;</span>mmHg<span style="color: blue">&lt;/</span><span style="color: #a31515">Unit</span></font><font size="2"><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">Units</span></font><font size="2"><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">TestResult</span></font><font size="2"><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">Test</span></font><font size="2"><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">Result</span></font><font size="2"><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">VitalSigns</span></font><font size="2"><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Body</span></font><font size="2"><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Actors</span></font><font size="2"><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Actor</span></font><font size="2"><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">ActorObjectID</span><span style="color: blue">&gt;</span>Patient<span style="color: blue">&lt;/</span><span style="color: #a31515">ActorObjectID</span></font><font size="2"><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">Person</span></font><font size="2"><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Name</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">CurrentName</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Given</span><span style="color: blue">&gt;</span>John<span style="color: blue">&lt;/</span><span style="color: #a31515">Given</span></font><font size="2"><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Family</span><span style="color: blue">&gt;</span>Doe<span style="color: blue">&lt;/</span><span style="color: #a31515">Family</span></font><font size="2"><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">CurrentName</span></font><font size="2"><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">Name</span></font><font size="2"><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">Person</span></font><font size="2"><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">Source</span></font><font size="2"><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Text</span><span style="color: blue">&gt;</span>Unknown<span style="color: blue">&lt;/</span><span style="color: #a31515">Text</span></font><font size="2"><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">Description</span></font><font size="2"><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">Source</span></font><font size="2"><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">Actor</span></font><font size="2"><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Actors</span></font><font size="2"><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">ContinuityOfCareRecord</span></font><span style="color: blue"><font size="2">&gt;</font>
</span></pre>
<p>Note <strong>CodingSystem</strong> element. It allows CCR to interpret various medical vocabularies.</p>
<p><strong>Relevant Tools</strong>:</p>
<p>(Thanks to Kathleen Connor)</p>
<ul>
<li>The <a href="http://chit.dyndns.org/CCRValidation">CCR Validator</a>, is an important resource to test/validate a CCR instance, is a now available&#160; Not only does it validate the CCR against the XSD but also the constraints of the implementation guide. </li>
<li>An Open Source <a href="http://sourceforge.net/projects/ccr-resources/">StyleSheet</a> to view CCR files.</li>
<li><a href="http://wiki.hl7.org/index.php?title=Mappings_and_Translations">CCR to CCD &amp; HL7 Mappers</a> – tools which Map CCR to CCD and HL7 V2 &amp; V3. You can access them directly <a href="http://gforge.hl7.org/gf/project/v2v3-mapping/frs/">here</a>.</li>
<li><a href="http://rubyforge.org/projects/ccredit/">Application</a> to embed CCR in PDF-HealthCare.</li>
</ul>
<p><strong>Related Article(s):</strong></p>
<ul>
<li>To get familiar with CCR I would highly recommended <a href="http://www.veoh.com/collection/astmccr/watch/v14141513WQRzgjzc">this</a> 13 minute video by Dr. Steve Waldren. </li>
<li>Adam Bosworth <a href="http://adambosworth.net/2009/10/29/talking-to-dc/">posted</a> an interesting read on standards, his take (simple, human readable, focus on known structured data, etc.) favors CCR.</li>
</ul>
<p><strong>In this series:</strong></p>
<ol>
<li><a href="http://healthblog.vitraag.com/2009/04/understanding-vocabularies-wait-what-did-you-say/">Understanding Vocabularies. Wait! What did you say?</a> </li>
<li><a href="http://healthblog.vitraag.com/2009/07/understanding-vocabularies-2-healthvault-recommendations/">Understanding Vocabularies #2 – HealthVault Recommendations</a> </li>
<li><a href="http://healthblog.vitraag.com/2009/10/understanding-snomed-ct/">Understanding SNOMED CT</a> </li>
<li><a href="http://healthblog.vitraag.com/2009/10/understanding-ccr/">Understanding CCR</a> </li>
</ol>
<div style="margin-top: 10px; height: 15px" class="zemanta-pixie">Special thanks to Kathy Osborne for proof reading this post.</div>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2009/10/understanding-ccr/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running HealthVault Apps On Windows Azure</title>
		<link>http://healthblog.vitraag.com/2009/10/healthvault-apps-on-windows-azure/</link>
		<comments>http://healthblog.vitraag.com/2009/10/healthvault-apps-on-windows-azure/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 10:21:00 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[HealthVault]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=184</guid>
		<description><![CDATA[HealthVault SDK 1.0 introduces an interesting capability by which an HealthVault application can read their application certificate from a file. Eric has some details about this on his blog.
I’m going to describe how this capability of reading an application’s certificates from the file store could be used to run HealthVault application on Windows Azure. Here [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.msdn.com/healthvault/archive/2009/08/27/healthvault-0908-release-notes.aspx">HealthVault SDK 1.0</a> introduces an interesting capability by which an HealthVault application can read their application certificate from a file. Eric has some details about this on his <a href="http://blogs.msdn.com/ericgu/archive/2009/10/16/healthvault-0908-sdk-highlights.aspx">blog</a>.</p>
<p>I’m going to describe how this capability of reading an application’s certificates from the file store could be used to run HealthVault application on Windows Azure. Here are the steps to get a simple HealthVault application (which I call HelloHV) running on Windows Azure:</p>
<ol>
<li>Install the <a href="http://www.microsoft.com/windowsazure/windowsazure/">Azure SDK</a> and <a href="http://msdn.microsoft.com/HealthVault">HealthVault SDK</a>. Create your HealthVault application as a Web Role. </li>
<li>Configure and create an HealthVault application using the application manager utility in HealthVault SDK. <strong>Make sure</strong> you set the <strong>Action-Url</strong> to http://&lt;yourapp&gt;.cloudapp.net/Redirect.aspx&#160; using the Application Configuration Center. </li>
<li>Copy the Redirect.aspx &amp; Redirect.cs from HealthVault samples (HelloWorld in HealthVault SDK) in to your application and add reference to HealthVault assemblies (you can find them in C:\Program Files\Microsoft HealthVault\SDK\DotNet\Assemblies) </li>
<li>Add the HealthVault related config settings to your WebRole’s Web.Config, the easiest way to do this would be copy the relevant key(s) from a sample in HealthVault SDK. Here is an illustration :
<pre style="width: 748px; height: 306px" class="code"><font size="2"><span style="color: blue">&lt;</span><span style="color: #a31515">appSettings</span></font><font size="2"><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">add </span><span style="color: red">key</span><span style="color: blue">=</span>&quot;<span style="color: blue">ApplicationId</span>&quot; <span style="color: red">value</span><span style="color: blue">=</span>&quot;<span style="color: blue">01e21bd1-cb13-40d6-8f01-596286827d6d</span>&quot;</font><font size="2"><span style="color: blue">/&gt;
  &lt;</span><span style="color: #a31515">add </span><span style="color: red">key</span><span style="color: blue">=</span>&quot;<span style="color: blue">ShellUrl</span>&quot; <span style="color: red">value</span><span style="color: blue">=</span>&quot;<span style="color: blue">https://account.healthvault-ppe.com/</span>&quot;</font><font size="2"><span style="color: blue">/&gt;
  &lt;</span><span style="color: #a31515">add </span><span style="color: red">key</span><span style="color: blue">=</span>&quot;<span style="color: blue">HealthServiceUrl</span>&quot; <span style="color: red">value</span><span style="color: blue">=</span>&quot;<span style="color: blue">https://platform.healthvault-ppe.com/platform/</span>&quot;</font><span style="color: blue"><font size="2">/&gt;
  &lt;!-- </font></span><span style="color: green"><font size="2">when we call the SignOut() method on HealthServicePage,
       it redirects us to the page below </font></span><font size="2"><span style="color: blue">--&gt;
  &lt;!--</span><span style="color: green">&lt;add key=&quot;NonProductionActionUrlRedirectOverride&quot; value=&quot;Redirect.aspx&quot; /&gt;</span></font><span style="color: blue"><font size="2">--&gt;
  &lt;!-- </font></span><span style="color: green"><font size="2">The redirect page (specified above) uses these keys below to redirect to different
       pages based on the response from the shell </font></span><font size="2"><span style="color: blue">--&gt;
  &lt;</span><span style="color: #a31515">add </span><span style="color: red">key</span><span style="color: blue">=</span>&quot;<span style="color: blue">WCPage_ActionHome</span>&quot; <span style="color: red">value</span><span style="color: blue">=</span>&quot;<span style="color: blue">default.aspx</span>&quot;</font><font size="2"><span style="color: blue">/&gt;
  &lt;</span><span style="color: #a31515">add </span><span style="color: red">key</span><span style="color: blue">=</span>&quot;<span style="color: blue">WCPage_ActionAppAuthSuccess</span>&quot; <span style="color: red">value</span><span style="color: blue">=</span>&quot;<span style="color: blue">HelloHV.aspx</span>&quot;</font><font size="2"><span style="color: blue">/&gt;
  &lt;</span><span style="color: #a31515">add </span><span style="color: red">key</span><span style="color: blue">=</span>&quot;<span style="color: blue">ApplicationCertificateFileName</span>&quot;
       <span style="color: red">value</span><span style="color: blue">=</span>&quot;<span style="color: blue">~\cert\WildcatApp-01e21bd1-cb13-40d6-8f01-596286827d6d.pfx</span>&quot;</font><font size="2"><span style="color: blue">/&gt;
&lt;/</span><span style="color: #a31515">appSettings</span><span style="color: blue">&gt;</span></font></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
</li>
<li>While testing on your local machine uncomment the following line in the Web.Config, this will allow HealthVault to communicate with your local machine. However make sure that this is commented when you publish the application.&#160; Alternatively the following key can also be stored in UserApplicationConfigs.xml, if you maintain one for your development.
<pre style="width: 750px; height: 35px" class="code"><font size="2"><span style="color: blue">&lt;!--</span><span style="color: green">&lt;add key=&quot;NonProductionActionUrlRedirectOverride&quot; value=&quot;Redirect.aspx&quot; /&gt;</span></font><span style="color: blue"><font size="1"><font size="2">—-&gt;</font></font></span></pre>
<p><strong>Gotacha1:</strong> Windows Azure changes the port numbers for your application so its hard to make it work without using the action-url configured for your application in Application Configuration Center.</p>
</li>
<li>In your Default HealthVault Page Make sure you read the certificate for your application from a local file (you can also use Azure Storage).
<p><strong>Gotacha2: </strong>HealthVault SDK expects the <strong>ApplicationCertificateFileName</strong> to be absolute filename, this is impossible to determine for a cloud system like Azure. However we can get the absolute path by changing the value of the key at run-time.</p>
<pre style="width: 750px; height: 254px" class="code">

<font size="2"><span style="color: blue">public partial class </span><span style="color: #2b91af">HelloHV </span>: </font><font size="2"><span style="color: #2b91af">HealthServicePage
</span>{
    <span style="color: blue">protected void </span>Page_PreInit(<span style="color: blue">object </span>sender, <span style="color: #2b91af">EventArgs </span>e)
    {
        <span style="color: #2b91af">ConfigurationSettings</span>.AppSettings[<span style="color: #a31515">&quot;ApplicationCertificateFileName&quot;</span>] =
            MapPath(<span style="color: #a31515">@&quot;~\cert\WildcatApp-01e21bd1-cb13-40d6-8f01-596286827d6d.pfx&quot;</span>);
    }

    <span style="color: blue">protected void </span>Page_Load(<span style="color: blue">object </span>sender, <span style="color: #2b91af">EventArgs </span>e)
    {</font>

<font size="2">..</font>
</pre>
</li>
<li>Hit Run and see your Hello HealthVault&#160; application in action!! </li>
</ol>
<p><strong><u><font color="#ff0000">Now the show time:</font></u></strong></p>
<p>Check out a simple (HelloHV application) running on Windows Azure <a href="http://hvsamples.cloudapp.net/HelloHV.aspx">here</a>.</p>
<p><a href="http://healthblog.vitraag.com/wp-content/uploads/2009/10/image4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://healthblog.vitraag.com/wp-content/uploads/2009/10/image_thumb1.png" width="509" height="226" /></a></p>
<p>The associated code for this application is shared <a href="http://code.msdn.microsoft.com/healthvaultazure">here</a>.</p>
<p>Remember to switch to SSL and secure your application certificate (using password or Azure Storage) before you consider taking an application running on Windows Azure live as a production HealthVault application.</p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2009/10/healthvault-apps-on-windows-azure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Understanding SNOMED CT</title>
		<link>http://healthblog.vitraag.com/2009/10/understanding-snomed-ct/</link>
		<comments>http://healthblog.vitraag.com/2009/10/understanding-snomed-ct/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 22:11:00 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[Vocabularies]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=153</guid>
		<description><![CDATA[I have previously posted about Understanding Health Ontologies and Standards. In this post I’ll focus on SNOMED-CT (Systematized Nomenclature of Medicine Clinical Terms). SNOMED-CT is the most comprehensive vocabulary to express clinical terms &#8211; it spans languages, specialties and geographic borders.
SNOMED-CT includes:

Terms or synonyms relating to a clinical concept 
Links between different concepts 

To give [...]]]></description>
			<content:encoded><![CDATA[<p>I have <a href="http://healthblog.vitraag.com/2009/07/understanding-vocabularies-2-healthvault-recommendations/">previously posted</a> about Understanding Health Ontologies and Standards. In this post I’ll focus on SNOMED-CT (<a class="zem_slink" title="SNOMED CT" href="http://en.wikipedia.org/wiki/SNOMED_CT" rel="wikipedia">Systematized Nomenclature of Medicine Clinical Terms</a>). SNOMED-CT is the most comprehensive vocabulary to express clinical terms &#8211; it spans languages, specialties and geographic borders.</p>
<p>SNOMED-CT includes:</p>
<ul>
<li>Terms or synonyms relating to a clinical concept </li>
<li>Links between different concepts </li>
</ul>
<p>To give you a taste here is an example of Blood pressure reading represented using SNOMED-CT from the <a href="http://delivery.acm.org/10.1145/1280000/1273668/p69-ryan.pdf?key1=1273668&amp;key2=3916594521&amp;coll=GUIDE&amp;dl=GUIDE&amp;CFID=56633091&amp;CFTOKEN=23055582">linked</a> paper (<em>“Towards semantic interoperability in healthcare: ontology mapping from SNOMED-CT to <a class="zem_slink" title="Health Level 7" href="http://en.wikipedia.org/wiki/Health_Level_7" rel="wikipedia">HL7</a> version 3”</em>, Amanda Ryan):</p>
<p><a href="http://healthblog.vitraag.com/wp-content/uploads/2009/10/Ontology_Mapping.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Ontology_Mapping" border="0" alt="Ontology_Mapping" src="http://healthblog.vitraag.com/wp-content/uploads/2009/10/Ontology_Mapping_thumb.png" width="821" height="590" /></a></p>
<p>In addition to having a model to represent concepts and linkages the biggest draw of SNOMED CT is a staggering number of coded qualifiers (which belong to one concept or other). According to <a href="http://www.ihtsdo.org/snomed-ct/snomed-ct0/">IHTSO</a> there are about 311,000 actively used SNOMED CT concepts.</p>
<p>You can register for SNOMED CT <a href="http://wwwcf.nlm.nih.gov/umlslicense/snomed/license.cfm">here</a>. Its free for companies and individuals in United States, however your registration is processed by NLM and it might take over 3 days to receive a confirmation and access.</p>
<p>Once you are through with registration and have an account, start by downloading the core subset of SNOMED CT concepts <a href="http://download.nlm.nih.gov/umls/kss/SNOMEDCT_CORE_SUBSET/SNOMEDCT_CORE_SUBSET_200907.zip">here</a>, this list consists of about 5000 most frequently used terms by institutions across US. Its a good set to get familiar with, it consists of the following concept area:</p>
<ul>
<li>Clinical finding&#160;&#160;&#160;&#160;&#160;&#160;&#160; : 4,550 codes in total </li>
<li>Procedure&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; :&#160;&#160; 414 codes in total </li>
<li>Situation with explicit context&#160;&#160;&#160; :&#160;&#160; 132 codes in total </li>
<li>Event&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; :&#160;&#160;&#160; 38 codes in total </li>
<li>Body structure&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; :&#160;&#160;&#160; 46 codes in total </li>
<li>Social context&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; :&#160;&#160;&#160;&#160; 2 codes in total</li>
</ul>
<p><a href="http://healthblog.vitraag.com/wp-content/uploads/2009/10/Snomed_Subset.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Snomed_Subset" border="0" alt="Snomed_Subset" src="http://healthblog.vitraag.com/wp-content/uploads/2009/10/Snomed_Subset_thumb.png" width="652" height="250" /></a></p>
<p>We can use <a href="http://msdn.microsoft.com/en-us/library/ms162802.aspx" jquery1255120021662="18672">BCP</a> to copy the files from SNOMED CT Core in to our local database, and do more interesting queries &amp; data analysis like find distribution on these terms, co-relate problems vs. findings and of course work on the larger SNOMED CT database to find synonyms etc.; but I’ll keep that for another day. Here very quickly I’ll show how one can use a web-based browser, Snowflake, <a title="http://snomed.dataline.co.uk/" href="http://snomed.dataline.co.uk/">http://snomed.dataline.co.uk/</a> (requires registration) to lookup a SNOMED code and see what else it relates to. We can see that in line 3 above SNOMED CT concept 10085004 is marked as Metatarsalgia (finding), however using the Snowflake browser we can see in that in addition to being a finding this concept is a problem as well.</p>
<p><a href="http://healthblog.vitraag.com/wp-content/uploads/2009/10/Snomed_Snowflake.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Snomed_Snowflake" border="0" alt="Snomed_Snowflake" src="http://healthblog.vitraag.com/wp-content/uploads/2009/10/Snomed_Snowflake_thumb.png" width="338" height="221" /></a></p>
<p>This was just tip of the ice-berg, please leave comments for future posts / areas to consider in the Ontology domain.</p>
<p>Further reading / relevant links:</p>
<ul>
<li>LexGrid: <a href="https://cabig-kc.nci.nih.gov/Vocab/KC/index.php?title=LexGrid_Resources&amp;amp;diff=5039&amp;amp;oldid=prev">Wiki</a></li>
</ul>
<p>In this series:</p>
<ol>
<li><a href="http://healthblog.vitraag.com/2009/04/understanding-vocabularies-wait-what-did-you-say/">Understanding Vocabularies. Wait! What did you say?</a> </li>
<li><a href="http://healthblog.vitraag.com/2009/07/understanding-vocabularies-2-healthvault-recommendations/">Understanding Vocabularies #2 – HealthVault Recommendations</a> </li>
<li><a href="http://healthblog.vitraag.com/2009/10/understanding-snomed-ct/">Understanding SNOMED CT</a> </li>
</ol>
<div style="margin-top: 10px; height: 15px" class="zemanta-pixie"></div>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2009/10/understanding-snomed-ct/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Guns, *Germs* and Steel</title>
		<link>http://healthblog.vitraag.com/2009/10/guns-germs-and-steel/</link>
		<comments>http://healthblog.vitraag.com/2009/10/guns-germs-and-steel/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 05:43:38 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=158</guid>
		<description><![CDATA[Jared Diamond makes a case that our recent history has been shaped by Guns, Germs and Steel. In this century we have seen in various ways how Guns, Germs and Steel wield their power. Currently, we are dealing with one such power fit of *Germs*. They say, flu is in the air, beware!
Earlier this year [...]]]></description>
			<content:encoded><![CDATA[<p><a class="zem_slink" title="Jared Diamond" href="http://en.wikipedia.org/wiki/Jared_Diamond" rel="wikipedia">Jared Diamond</a> makes a case that our recent history has been shaped by <a class="zem_slink" title="Guns, Germs and Steel: The Fates of Human Societies" href="http://www.amazon.com/Guns-Germs-Steel-Fates-Societies/dp/0393038912%3FSubscriptionId%3D0G81C5DAZ03ZR9WH9X82%26tag%3Dvaibhavb%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0393038912" rel="amazon">Guns, Germs and Steel</a>. In this century we have seen in various ways how Guns, Germs and Steel wield their power. Currently, we are dealing with one such power fit of *Germs*. They say, flu is in the air, beware!</p>
<p>Earlier this year I had made a <a href="http://healthblog.vitraag.com/2009/04/swine-flu-crisis-management/">post</a> about tracking Swine Flu using Ushahidi’s software. Various folks online have tried to help raise awareness of the pertinent epidemic, most noticeably <a href="http://www.cdc.gov/">CDC</a> has launched a comprehensive website <a href="http://www.flu.gov/">flu.gov</a> to inform us better. Microsoft has launched the <a href="http://apps.healthvault.com/app5">H1N1 Response Center</a> and Google is helping through <a href="http://www.google.org/flutrends/">Flu trends</a>.</p>
<p>Most common flu is the seasonal flu, which every year takes a toll of about <strong>36,000</strong> lives from late fall (Nov) to early Spring (March) and effects about 5-20 percent of population. This season we have a risk for a getting hit by swine flu (<a class="zem_slink" title="Influenza A virus subtype H1N1" href="http://en.wikipedia.org/wiki/Influenza_A_virus_subtype_H1N1" rel="wikipedia">H1N1</a>) which can cause more deaths, and there is an even deadlier version – the avian flu (<a class="zem_slink" title="Influenza A virus subtype H5N1" href="http://en.wikipedia.org/wiki/Influenza_A_virus_subtype_H5N1" rel="wikipedia">H5N1</a>).</p>
<p><strong>So what should you do?</strong></p>
<ul>
<li>Wash your hands and avoid close contact with sick people. </li>
<li>Consider taking the Flu shot from a facility <a href="http://flu.gov/individualfamily/vaccination/locator.html">near</a> you </li>
<li>If you feel Flu, take a <a href="http://apps.healthvault.com/app5">Flu assessment</a> powered by HealthVault <img src='http://healthblog.vitraag.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . </li>
<li>Spread Flu Awareness – may be use the widget below: </li>
</ul>
<p> <iframe height="200" src="http://www.reemedix.com/misc/fluwidget.html" frameborder="0" width="300" scrolling="no"></iframe>
<p>Here is the code to copy this widget to your blog / website:</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">iframe </span><span style="color: red">height</span><span style="color: blue">=&quot;200&quot; </span><span style="color: red">src</span><span style="color: blue">=&quot;http://www.reemedix.com/misc/fluwidget.html&quot;
    </span><span style="color: red">frameborder</span><span style="color: blue">=&quot;0&quot; </span><span style="color: red">width</span><span style="color: blue">=&quot;300&quot; </span><span style="color: red">scrolling</span><span style="color: blue">=&quot;no&quot;&gt;
&lt;/</span><span style="color: #a31515">iframe</span><span style="color: blue">&gt;</span></pre>
<p>
  <br /><a href="http://11011.net/software/vspaste"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2009/10/guns-germs-and-steel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Talking to HealthVault via ASP.NET MVC #1</title>
		<link>http://healthblog.vitraag.com/2009/07/talking-to-healthvault-via-aspnet-mvc-1/</link>
		<comments>http://healthblog.vitraag.com/2009/07/talking-to-healthvault-via-aspnet-mvc-1/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 21:35:58 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/2009/07/talking-to-healthvault-via-aspnet-mvc-1/</guid>
		<description><![CDATA[Recently the ASP.NET MVC framework came out of beta and has garnered a lot of developer interest. This framework tries to provide interesting things like – total control over HTML, human readable URLs, AJAX, and facilitates test driven development. Successful web development frameworks like Ruby on Rails (ruby), Django (python) and Spring (Java) – also [...]]]></description>
			<content:encoded><![CDATA[<p>Recently the <a class="zem_slink" title="ASP.NET MVC Framework" href="http://en.wikipedia.org/wiki/ASP.NET_MVC_Framework" rel="wikipedia">ASP.NET MVC</a> framework came out of beta and has garnered a lot of developer interest. This framework tries to provide interesting things like – total control over HTML, human readable URLs, AJAX, and facilitates test driven development. Successful web development frameworks like <a class="zem_slink" title="Ruby on Rails" href="http://rubyonrails.org/" rel="homepage">Ruby on Rails</a> (ruby), <a class="zem_slink" title="Django (web framework)" href="http://www.djangoproject.com/" rel="homepage">Django</a> (python) and Spring (Java) – also enable these characteristics. So cleary, there is some traction and tread for web frameworks to facilitate the Model, View, Controller paradigm.</p>
<p>There are quite a few challenges with regards to <a class="zem_slink" title="Microsoft HealthVault" href="http://www.healthvault.com/" rel="homepage">HealthVault</a> SDK to work in this realm. The standard HealthServicePage no longer works in a controller paradigm. Eventually the SDK will need to provide a HealthServiceController, but until then I’ll try and explain how we can use the current SDK to work in an ASP.NET MVC world.</p>
<p>As I have explained earlier in <a href="http://healthblog.vitraag.com/2009/03/working-with-healthvault-xml-apis/">my ruby series</a> HealthVault authenticates an application in three contexts – <a href="http://healthblog.vitraag.com/2008/04/talking-to-the-public-methods-of-healthvault-platform/">anonymous</a>, the application itself and the application in presence of user information. In this series I will try to take the same approach and explain how we can do the same with ASP.NET MVC. </p>
<p>It’s relative easy to talk to HealthVault via the anonymous GetServiceDefination method. Here is the heart of the code which enables this:</p>
<div id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> ActionResult Index()</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     ViewData[<span style="color: #006080">&quot;Message&quot;</span>] = <span style="color: #006080">&quot;Welcome to HealthVault ASP.NET MVC!&quot;</span>;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     <span style="color: #008000">// Do an anonymous connection with HealthVault using the Hello World application id</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     ApplicationConnection appConnection = <span style="color: #0000ff">new</span> ApplicationConnection(</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>         <span style="color: #0000ff">new</span> Guid(<span style="color: #006080">&quot;05a059c9-c309-46af-9b86-b06d42510550&quot;</span>),</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         <span style="color: #006080">&quot;https://platform.healthvault-ppe.com/platform/&quot;</span>);</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     <span style="color: #008000">// Get the service defination from HealthVault platform</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>     ServiceInfo sInfo = appConnection.GetServiceDefinition();</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>     <span style="color: #008000">// Pass the data for viewing</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>     ViewData[<span style="color: #006080">&quot;ServiceInfo&quot;</span>] = sInfo.HealthServiceUrl.ToString();</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>     <span style="color: #0000ff">return</span> View();</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span> }</pre>
</p></div>
</div>
<div>
<p>
    <br />Here is the output from running this sample Mvc application, the entire source code for this application is shared <a href="http://code.msdn.microsoft.com/hvmvcapp">here</a>.</p>
<p><a href="http://healthblog.vitraag.com/wp-content/uploads/2009/07/healthvaultmvc-12.jpg"><img style="border-right-width: 0px; margin: 0px 0px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="HealthVault Mvc #1" border="0" alt="HealthVault Mvc #1" src="http://healthblog.vitraag.com/wp-content/uploads/2009/07/healthvaultmvc-1-thumb2.jpg" width="591" height="208" /></a> </p>
</div>
<p><strong>Next time:</strong> How to authenticate your application with HealthVault through ASP.NET MVC</p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2009/07/talking-to-healthvault-via-aspnet-mvc-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Understanding Vocabularies #2 &#8211; HealthVault Recommendations</title>
		<link>http://healthblog.vitraag.com/2009/07/understanding-vocabularies-2-healthvault-recommendations/</link>
		<comments>http://healthblog.vitraag.com/2009/07/understanding-vocabularies-2-healthvault-recommendations/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 01:46:50 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[Vocabularies]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=132</guid>
		<description><![CDATA[In my last article in the vocabulary category, I described the need for semantically enabled data and how different categories of health data have different standard vocabulary / ontology associated with them. In the following table I attempt to summarize the recommended vocabularies for different HealthVault types. 
Disclaimer: Please note this is not a definitive [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://healthblog.vitraag.com/2009/04/understanding-vocabularies-wait-what-did-you-say/">last article</a> in the vocabulary category, I described the need for semantically enabled data and how different categories of health data have different standard vocabulary / ontology associated with them. In the following table I attempt to summarize the recommended vocabularies for different HealthVault types. </p>
<p><strong>Disclaimer:</strong> Please note this is not a definitive or complete list, and I will update the table as I discover inconsistencies. The definitive source are the XSDs associated with <a href="http://developer.healthvault.com/types/types.aspx">HealthVault data types</a>.</p>
<table border="1" cellspacing="0" cellpadding="1" width="843">
<tbody>
<tr>
<td valign="top" width="157"><strong>HealthVault Type</strong></td>
<td valign="top" width="310"><strong>Type Schema</strong></td>
<td valign="top" width="194"><strong>HV Recommended vocabulary related to this type</strong></td>
<td valign="top" width="180"><strong>Comments</strong></td>
</tr>
<tr>
<td valign="top" width="158">Advance Directive</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=822a5e5a-14f1-4d06-b92f-8f3f1b05218f">822a5e5a-14f1-4d06-b92f-8f3f1b05218f</a></td>
<td valign="top" width="194">None</td>
<td valign="top" width="180">
<p>Examples include living wills and <a class="zem_slink" title="Power of attorney" href="http://en.wikipedia.org/wiki/Power_of_attorney" rel="wikipedia">power of attorney</a> for healthcare.</p>
</td>
</tr>
<tr>
<td valign="top" width="159">Allergy</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=52bf9104-2c5e-4f1f-a66d-552ebcc53df7">52bf9104-2c5e-4f1f-a66d-552ebcc53df7</a></td>
<td valign="top" width="194"><a href="http://developer.healthvault.com/types/vocab.aspx?name=icd9cm&amp;family=icd&amp;version=1.0">icd9cm</a>, <a href="http://developer.healthvault.com/types/vocab.aspx?name=icd9cm-reactions&amp;family=icd&amp;version=1.0">icd9cm-reactions</a></td>
<td valign="top" width="180">Details on <a href="http://en.wikipedia.org/wiki/List_of_ICD-9_codes">ICD-9 Codes</a></td>
</tr>
<tr>
<td valign="top" width="160">Basic Demographic Information</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=bf516a61-5252-4c28-a979-27f45f62f78d">bf516a61-5252-4c28-a979-27f45f62f78d</a></td>
<td valign="top" width="194"><a href="http://developer.healthvault.com/types/vocab.aspx?name=iso3166&amp;family=iso&amp;version=1.0">ISO-3166</a></td>
<td valign="top" width="180">Country of residence</td>
</tr>
<tr>
<td valign="top" width="161">Blood Glucose Measurement</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=879e7c04-4e8a-4707-9ad3-b054df467ce4">879e7c04-4e8a-4707-9ad3-b054df467ce4</a></p>
</td>
<td valign="top" width="194">glucose-measurement-type</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Blood Oxygen Saturation</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=3a54f95f-03d8-4f62-815f-f691fc94a500">3a54f95f-03d8-4f62-815f-f691fc94a500</a></p>
</td>
<td valign="top" width="194">blood-oxygen-saturation-measurement-method</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Body Composition</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=18adc276-5144-4e7e-bf6c-e56d8250adf8">18adc276-5144-4e7e-bf6c-e56d8250adf8</a></p>
</td>
<td valign="top" width="194">body-composition-measurement-methods</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Body Dimension</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=dd710b31-2b6f-45bd-9552-253562b9a7c1">dd710b31-2b6f-45bd-9552-253562b9a7c1</a></td>
<td valign="top" width="194">body-dimension-measurement-names, body-dimension-measurement-names-pediatric</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Calorie Guideline</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=d3170d30-a41b-4bde-a116-87698c8a001a">d3170d30-a41b-4bde-a116-87698c8a001a</a></p>
</td>
<td valign="top" width="194">calorie-guideline-names</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Concern</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=aea2e8f2-11dd-4a7d-ab43-1d58764ebc19">aea2e8f2-11dd-4a7d-ab43-1d58764ebc19</a></td>
<td valign="top" width="194">concern-description</td>
<td valign="top" width="180">Concerns are more general than conditions</td>
</tr>
<tr>
<td valign="top" width="161">Condition</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=7ea7a1f9-880b-4bd4-b593-f5660f20eda8">7ea7a1f9-880b-4bd4-b593-f5660f20eda8</a></td>
<td valign="top" width="194">&#160;</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Continuity of Care Document (<a class="zem_slink" title="Charge-coupled device" href="http://en.wikipedia.org/wiki/Charge-coupled_device" rel="wikipedia">CCD</a>)</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=9c48a2b8-952c-4f5a-935d-f3292326bf54">9c48a2b8-952c-4f5a-935d-f3292326bf54</a></p>
</td>
<td valign="top" width="194">&#160;</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Continuity of Care Record (<a href="http://en.wikipedia.org/wiki/Continuity_of_Care_Record">CCR</a>)</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=1e1ccbfc-a55d-4d91-8940-fa2fbf73c195">1e1ccbfc-a55d-4d91-8940-fa2fbf73c195</a></p>
</td>
<td valign="top" width="194">&#160;</td>
<td valign="top" width="180"><a title="http://www.ccrstandard.com/" href="http://www.ccrstandard.com/">http://www.ccrstandard.com/</a></td>
</tr>
<tr>
<td valign="top" width="161">Daily Medication Usage</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=a9a76456-0357-493e-b840-598bbb9483fd">a9a76456-0357-493e-b840-598bbb9483fd</a></td>
<td valign="top" width="194">dose-purpose, usage-schedule, <a href="http://developer.healthvault.com/types/vocab.aspx?name=x12-de-1330&amp;family=x12-de&amp;version=1.0">x12-de-1330</a>, prescription-type, <a href="http://developer.healthvault.com/types/vocab.aspx?name=x12-de-355&amp;family=x12-de&amp;version=1.0">x12-d3-355</a>, </td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Diabetes Insulin Injection Use</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=184166be-8adb-4d9c-8162-c403040e31ad">184166be-8adb-4d9c-8162-c403040e31ad</a></p>
</td>
<td valign="top" width="194">insulin-types, </td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Discharge Summary</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=02ef57a2-a620-425a-8e92-a301542cca54">02ef57a2-a620-425a-8e92-a301542cca54</a></p>
</td>
<td valign="top" width="194">icd9cm</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">HbA1C Measurement</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=227f55fb-1001-4d4e-9f6a-8d893e07b451">227f55fb-1001-4d4e-9f6a-8d893e07b451</a></p>
</td>
<td valign="top" width="194">HbA1C-assay-method</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Health Assessment</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=58fd8ac4-6c47-41a3-94b2-478401f0e26c">58fd8ac4-6c47-41a3-94b2-478401f0e26c</a></p>
</td>
<td valign="top" width="194">health-assessment-name, health-assessment-value-sets, health-assessment-groups, health-assessment-category</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Heart Rate</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=b81eb4a6-6eac-4292-ae93-3872d6870994">b81eb4a6-6eac-4292-ae93-3872d6870994</a></td>
<td valign="top" width="194">heart-rate-measurement-conditions</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">HL7 Clinical Document Architecture, Release 2</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=1ed1cba6-9530-44a3-b7b5-e8219690ebcf">1ed1cba6-9530-44a3-b7b5-e8219690ebcf</a></p>
</td>
<td valign="top" width="194">&#160;</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Immunization</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=cd3587b5-b6e1-4565-ab3b-1c3ad45eb04f">cd3587b5-b6e1-4565-ab3b-1c3ad45eb04f</a></p>
</td>
<td valign="top" width="194"><a href="http://developer.healthvault.com/types/vocab.aspx?name=vaccines-cvx&amp;family=HL7&amp;version=2.3%2009_2008">vaccines-cvx</a>, vaccine-manufacturers-mvx, medication-routes, </td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Insulin Injection</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=3b3c053b-b1fe-4e11-9e22-d4b480de74e8">3b3c053b-b1fe-4e11-9e22-d4b480de74e8</a></p>
</td>
<td valign="top" width="194">insulin-types</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Insurance Plan</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=9366440c-ec81-4b89-b231-308a4c4d70ed">9366440c-ec81-4b89-b231-308a4c4d70ed</a></p>
</td>
<td valign="top" width="194">coverage-types</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Lab Test Results</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=f57746af-9631-49dc-944e-2c92bee0d1e9">f57746af-9631-49dc-944e-2c92bee0d1e9</a></p>
</td>
<td valign="top" width="194"><a href="http://developer.healthvault.com/types/vocab.aspx?name=LOINC&amp;family=regenstrief&amp;version=2.26">LOINC</a>, lab-status, lab-results-flag, </td>
<td valign="top" width="180">More on LOINC <a href="http://en.wikipedia.org/wiki/LOINC">here</a>.</td>
</tr>
<tr>
<td valign="top" width="161">Medication</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=30cafccc-047d-4288-94ef-643571f7919d">30cafccc-047d-4288-94ef-643571f7919d</a></td>
<td valign="top" width="194"><a href="http://developer.healthvault.com/types/vocab.aspx?name=RxNorm%20Active%20Ingredients&amp;family=RxNorm&amp;version=07AC_080303F">Rxnorm</a>, NDC, medication-prescribed</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Medication Fill</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=167ecf6b-bb54-43f9-a473-507b334907e0">167ecf6b-bb54-43f9-a473-507b334907e0</a></p>
</td>
<td valign="top" width="194"><a href="http://developer.healthvault.com/types/vocab.aspx?name=RxNorm%20Active%20Ingredients&amp;family=RxNorm&amp;version=07AC_080303F">Rxnorm</a>, NDC</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Personal Demographic Information</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=92ba621e-66b3-4a01-bd73-74844aed4f5b">92ba621e-66b3-4a01-bd73-74844aed4f5b</a></p>
</td>
<td valign="top" width="194">blood-types, ethnicity, marital-status, religion, education-level, </td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Pregnancy</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=46d485cf-2b84-429d-9159-83152ba801f4">46d485cf-2b84-429d-9159-83152ba801f4</a></td>
<td valign="top" width="194">delivery-complications, anesthesia-methods, delivery-methods, pregnancy-outcomes, gender-types, conception-methods, </td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Question Answer</td>
<td valign="top" width="310"><a href="http://developer.healthvault.com/types/type.aspx?id=55d33791-58de-4cae-8c78-819e12ba5059">55d33791-58de-4cae-8c78-819e12ba5059</a></td>
<td valign="top" width="194">question-sets, answer-choice-sets</td>
<td valign="top" width="180">&#160;</td>
</tr>
<tr>
<td valign="top" width="161">Sleep Related Activity</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=031f5706-7f1a-11db-ad56-7bd355d89593">031f5706-7f1a-11db-ad56-7bd355d89593</a></p>
</td>
<td valign="top" width="194">&#160;</td>
<td valign="top" width="180">
<p>November 2005, &quot;Your Guide to Healthy Sleep&quot;, ISBN 1-933236-05-1</p>
</td>
</tr>
<tr>
<td valign="top" width="161">Sleep Session</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=11c52484-7f1a-11db-aeac-87d355d89593">11c52484-7f1a-11db-aeac-87d355d89593</a></p>
</td>
<td valign="top" width="194">&#160;</td>
<td valign="top" width="180">
<p>November 2005, &quot;Your Guide to Healthy Sleep&quot;, ISBN 1-933236-05-1</p>
</td>
</tr>
<tr>
<td valign="top" width="161">Vital Signs</td>
<td valign="top" width="310">
<p><a href="http://developer.healthvault.com/types/type.aspx?id=73822612-c15f-4b49-9e65-6af369e55c65">73822612-c15f-4b49-9e65-6af369e55c65</a></p>
</td>
<td valign="top" width="194">lab-results-units, lab-results-flag, </td>
<td valign="top" width="180">&#160;</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>As&#160; you can notice above we recommend ICD-9, RxNorm, LOINC, NDC. x12-de-1130, x12-de-335. We do prefer <a href="http://en.wikipedia.org/wiki/SNOMED_CT">SNOMED-CT</a> as well, however the application using it need to have license for it.</p>
</p>
<p>Having written the above I would like to match that with what Dr. Halamka recommends in his <a href="http://geekdoctor.blogspot.com/2009/04/data-elements-of-ehr.html">post</a>. Note that I mention content column for completeness, however its not useful for comparison.</p>
<table border="1" cellspacing="0" cellpadding="2" width="718">
<tbody>
<tr>
<td valign="top" width="236"><strong> Data </strong></td>
<td valign="top" width="231"><strong> Content</strong></td>
<td valign="top" width="249"><strong> Vocabulary</strong></td>
</tr>
<tr>
<td valign="top" width="236">Demographics</td>
<td valign="top" width="231">HL7 2.x for messaging, CCD for document summaries</td>
<td valign="top" width="249">HITSP Harmonized code sets for gender, marital status</td>
</tr>
<tr>
<td valign="top" width="236">Problem List</td>
<td valign="top" width="231">HL7 2.x for messaging, CCD for document summaries</td>
<td valign="top" width="249"><a href="http://www.nlm.nih.gov/research/umls/Snomed/snomed_main.html">SNOMED-CT</a></td>
</tr>
<tr>
<td valign="top" width="236">Medications </td>
<td valign="top" width="231"><a href="http://www.ncpdp.org/">NCPDP</a> script for messaging, CCD for document summaries</td>
<td valign="top" width="249">RxNorm and Structured SIG</td>
</tr>
<tr>
<td valign="top" width="236">Allergies</td>
<td valign="top" width="231">HL7 2.x for messaging, CCD for document summaries</td>
<td valign="top" width="249"><a href="http://www.fda.gov/ForIndustry/DataStandards/SubstanceRegistrationSystem-UniqueIngredientIdentifierUNII/ucm127839.htm">UNII</a> for foods and substances, NDF-RT for medication class, RxNorm for Medications</td>
</tr>
<tr>
<td valign="top" width="236">Progress Notes and Other Narrative Documents (History and Physical, Operative Notes, Discharge Summary)</td>
<td valign="top" width="231">HL7 2.x for messaging, CCD for document summaries</td>
<td valign="top" width="249">CDA Templates (interesting <a href="http://www.openehr.org/wiki/display/stds/openEHR+Archetypes+for+HL7+CDA+Documents">note</a>)</td>
</tr>
<tr>
<td valign="top" width="236">Departmental Reports (Pathology/Cytology, GI, Pulmonary, Cardiology etc.)</td>
<td valign="top" width="231">HL7 2.x for messaging, CCD for document summaries</td>
<td valign="top" width="249">SNOMED-CT</td>
</tr>
<tr>
<td valign="top" width="236">Laboratory Results</td>
<td valign="top" width="231">HL7 2.x for messaging, CCD for document summaries</td>
<td valign="top" width="249">LOINC for lab name, <a href="http://unitsofmeasure.org/">UCUM</a> for units of measure, SNOMED-CT for test ordering reason</td>
</tr>
<tr>
<td valign="top" width="236">Microbiology</td>
<td valign="top" width="231">HL7 2.x for messaging, CCD for document summaries</td>
<td valign="top" width="249">LOINC for lab name/observation</td>
</tr>
<tr>
<td valign="top" width="236">Images</td>
<td valign="top" width="231">DICOM</td>
<td valign="top" width="249">&#160;</td>
</tr>
<tr>
<td valign="top" width="236">Administrative Transactions (Benefits/Eligibility, Referral/Authorization, Claims/Remittance)</td>
<td valign="top" width="231">X12</td>
<td valign="top" width="249"><a href="http://www.x12.org/">X12</a>, <a href="http://www.caqh.org/">CAQH</a> CORE</td>
</tr>
</tbody>
</table>
<p><strong></strong></p>
<p><strong>Next Time: </strong>I’ll try to update the above tables with more details and try to come with recommendations of which clinical type (in the Data column above) would potentially match with which HealthVault type.</p>
<p>As usual leave your suggestions in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2009/07/understanding-vocabularies-2-healthvault-recommendations/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Syncing with HealthVault &#8211; the WalkMe way</title>
		<link>http://healthblog.vitraag.com/2009/07/syncing-with-healthvault-the-walkme-way/</link>
		<comments>http://healthblog.vitraag.com/2009/07/syncing-with-healthvault-the-walkme-way/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 22:48:00 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[WalkMe]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=114</guid>
		<description><![CDATA[A few months back I promised that I will do subsequent posts detailing implementation of WalkMe. In this post I’ll attempt to described the way WalkMe synchronizes with HealthVault. As you might have noticed WalkMe keeps track of your most recent steps when you login to the application and without you having to log-in to [...]]]></description>
			<content:encoded><![CDATA[<p>A few months back <a href="http://healthblog.vitraag.com/2009/02/walkme-walk-with-your-friends/">I promised</a> that I will do subsequent posts detailing implementation of <a href="http://apps.healthvault.com/walkme">WalkMe</a>. In this post I’ll attempt to described the way WalkMe synchronizes with HealthVault. As you might have noticed WalkMe keeps track of your most recent steps when you login to the application and without you having to log-in to the application via the <a href="http://healthblog.vitraag.com/2009/07/sharing-your-walkme-pedometer-using-e-mail-signature/">pedometer widget</a>, how does this magic happen?</p>
<p><strong><u>The Syncing Philosophy       <br /></u></strong>Microsoft provides a <a href="http://en.wikipedia.org/wiki/Microsoft_Sync_Framework">sync framework</a> which solves the problem of syncing between various data sources elegantly. However the framework is largely designed for data which is sourced using multiple masters, in WalkMe’s case we simplify this and consider HealthVault to be the master data source. Given that <strong>HealthVault is our master data source</strong> we radically simplify the complexity of syncing and don’t need to employ the services of sync framework.</p>
<p>To make HealthVault as the master data source any data input from WalkMe is always entered in HealthVault first and then the WalkMe database syncs with HealthVault</p>
<p><strong><u>The Data Model       <br /></u></strong>In WalkMe’s case it maintains a local database of all its users and their data with regards to <a href="http://developer.healthvault.com/types/type.aspx?id=90dbf000-fc55-4b92-b4a1-da45c36ad8bb">aerobic exercise session</a> and <a href="http://developer.healthvault.com/types/type.aspx?id=85a21ddb-db20-4c65-8d30-33c899ccf612">exercise</a>. I’ll keep the discussion about where to look for which data in HealthVault data types context for some other day. So why does WalkMe need a local database? We need a local database to maintain running totals of a users total steps, weekly steps and yearly steps. Also various analytical, notificational and graphical tools are only able to run in context of local data.</p>
<p>For each HealthVault user WalkMe keeps the following in the database:</p>
<ul>
<li>HealthVault Person Id – This is unique to each person.</li>
<li>HealthVault Record Id – This is unique to each record Id, since WalkMe is a single record application (doesn’t work on multiple records associated with a person at a time), the record id has one to one mapping with the WalkMe user id</li>
<li>Last Sync Time with HealthVault – The time at which this user last synched with HealthVault. We will discuss the tuning aspects of sync time later in the mechanics section.</li>
<li>Last Sync Entity – Who performed the last sync. We will discuss various sync mechanism WalkMe we employs in the mechanics section.</li>
<li>Last Sync Status – Details about the sync status. This is helpful to reform the sync or flag whether the sync is in progress.</li>
</ul>
<p>For each activity (aerobic exercise session and exercise) entry for each user, WalkMe keeps the following in the database:</p>
<ul>
<li>HealthVault Item Id – This is the GUID of the item (any HealthVault thing). The contents of this HealthVault item are stored in this particular activity row. The content in our case are – steps, aerobic steps, calories, distance.</li>
<li>Updated_at – This is the time at which this item was last updated.</li>
</ul>
<p>For each sync job / activity we maintain a database table having:</p>
<ul>
<li>sync server name</li>
<li>sync status</li>
<li>sync timestamp</li>
<li>sync frequency (in hours)</li>
<li>sync job id</li>
<li>sync msg</li>
</ul>
<p><a href="http://healthblog.vitraag.com/wp-content/uploads/2009/07/walkmedatamodel.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="WalkMe-DataModel" border="0" alt="WalkMe-DataModel" src="http://healthblog.vitraag.com/wp-content/uploads/2009/07/walkmedatamodel-thumb.jpg" width="340" height="372" /></a> </p>
<p align="left"><strong>Fig1. Relevant Parts Of WalkMe Data Model</strong></p>
<p><strong><u>The Mechanics       <br /></u></strong>The key aspects to understand in any sync problem is when is it that your user will need the most up to date information and how are they going to access it. Other than the time when a user is directly logged in the application, WalkMe’s needs the most up to date information when showing the WalkMe pedometers (which exist outside the context of WalkMe and HealthVault and they are accessed via a public webpage). Other key piece is for the WalkMe groups to show the most up to date information with regards to the leaders in the group they need each users data to be synched at least in last 24 hours.</p>
<p>So I can summarize that we have the following three scenarios needing the most up to date HealthVault data:</p>
<ol>
<li>When the user in logged in the application – data needed to show his analytics, and standings in age-group, BMI, Zip etx.</li>
<li>When the user pedometer is accessed from a public page – data needed to show the most recent steps.</li>
<li>When the user accesses their group page – the current standings of participants should be up to date at least as of last 24 hours.</li>
</ol>
<p><u><strong>When and How to Sync       <br /></strong></u>Clearly for scenarios 1 and 2 above we need to sync for a single user while for scenario #3 (and a part of #2) we need to sync the entire list of application users. Also note that for scenario 1 the user is present and for scenario 2 the user is not online. Lets name them #1 is <strong>UserOnlineSync</strong> #2 is <strong>UserOfflineSync</strong> and #3 is <strong>ApplicationSync. </strong></p>
<p><strong>UserOnlineSync</strong> : We should sync it every 20 minutes (based on a cookie) and sync the account when the user signs in.</p>
<p><strong>UserOfflineSync:</strong> This sync should be done as requested but in the context of this sync user is not online (This is done using HealthVault offline calls). However the frequency is deteremined by output caching enabled on the widgets (I would put that to 20 minutes as well).</p>
<p><strong>ApplicationSync: </strong>This is done for all the user and typically by a background process the last table in the data model is primarily meant for this process. However we don&#8217;t want to ping HealthVault for all the records so we use the method <a href="https://platform.healthvault-ppe.com/platform/XSD/method-getupdatedrecordsforapplication.xsd">GetUpdateRecordsForApplication</a>. The background process can run once or twice a day the frequency of the same can be made configurable.</p>
<p>Please note application sync is not fully functional in WalkMe yet owing to resource constraints on background processes in our hosting environment.</p>
<p><strong><u>What to do when things go wrong?       <br /></u></strong>As you will note in the above three sync mechanisms are primarily tailored to be partial syncs i.e they dont fetch all the user activities all the time. So what happens if a user deletes an entry in HealthVault or lets say the sync never completed? Well the user will see discrepancy is his/ her record and in that case we provide a mechanism for them to do a full sync with HealthVault. The idea of full sync being that all the current items are deleted and all the items form the users HealthVault record are imported again, and of course all the totals are re-calculated. In addition to taking care of uncompleted syncs this process also account for deleted items (there is not other way for delete items to be communicated). This is a powerful “reset” button and is exposed to the user with caution.</p>
<p><strong><u>The Implementation</u></strong></p>
<p><strong><u>&#160;<strong><u><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="caution" border="0" alt="caution" align="left" src="http://healthblog.vitraag.com/wp-content/uploads/2009/07/caution-thumb.jpg" width="104" height="86" /></u></strong>        <br /></u></strong>Here is some code showing the implementation of above three sync mechanisms with full and partial syncs. Please take it with grain of salt its here for illustrative purposes only and is no way meant to be used as is.</p>
<p>&#160;</p>
<ul>
<li>
<div align="left"><strong>UserOnlineSync</strong></div>
</li>
</ul>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> OnlineSyncUser(ProfileModel profile, PersonInfo info, <span style="color: #0000ff">bool</span> partialSync)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>  {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>      <span style="color: #0000ff">string</span> syncType = <span style="color: #006080">&quot;partial&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>      DateTime? lastSyncTime = profile.UserCtx.hv_last_sync_time;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>      DateTime timeStamp = DateTime.Now;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>      <span style="color: #008000">// reset lastsynctime if this is a full sync</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>      <span style="color: #0000ff">if</span> (!lastSyncTime.HasValue || !partialSync)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>      {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>          WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync.cs:OnlineSyncUser&quot;</span>, WlkMiEvent.UserSync,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>                WlkMiCat.Info, <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;Full syncing for User: {0}&quot;</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>                  profile.UserCtx.user_id));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>          lastSyncTime = <span style="color: #0000ff">null</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>      }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>      <span style="color: #008000">// Retrieve the latest info from HealthVault</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>      HealthRecordItemCollection items = </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>          GetHVItemsOnline(info, lastSyncTime);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>      <span style="color: #0000ff">if</span> (items != <span style="color: #0000ff">null</span> &amp;&amp; items.Count &gt; 0)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>      {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>          <span style="color: #0000ff">foreach</span> (HealthRecordItem item <span style="color: #0000ff">in</span> items)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>          {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>              <span style="color: #008000">// Do the distinct per item work</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>              ProcessStepsHealthItem(item, profile);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>          }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>      }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>      <span style="color: #008000">//only update the last sync time if we are able to download items</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span>      <span style="color: #0000ff">if</span> (items != <span style="color: #0000ff">null</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>      {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span>          <span style="color: #008000">//set last sync time</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>          profile.UserCtx.hv_last_sync_time = timeStamp;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span>          profile.Save();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span>      }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span>      <span style="color: #008000">// Clear the WlkMi data cache if the last sync is null or this is a full sync</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37">  37:</span>      <span style="color: #0000ff">if</span> (!lastSyncTime.HasValue || !partialSync)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38">  38:</span>      {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39">  39:</span>          WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync.cs:OnlineSyncUser&quot;</span>, WlkMiEvent.UserSync,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40">  40:</span>                WlkMiCat.Info, <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;Full sync deleting information for User: {0}&quot;</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41">  41:</span>                  profile.UserCtx.user_id));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42">  42:</span>          lastSyncTime = <span style="color: #0000ff">null</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43">  43:</span>          WalkLogModel.ClearUserCache(profile);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44">  44:</span>          syncType = <span style="color: #006080">&quot;full&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45">  45:</span>      }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46">  46:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47">  47:</span>      <span style="color: #008000">//Processtotals for this user</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48">  48:</span>      WalkLogModel.ProcessTotals(profile.UserCtx.user_id);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49">  49:</span>      </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum50">  50:</span>      WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync:OnlineSyncUser&quot;</span>, WlkMiEvent.UserSync,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum51">  51:</span>          WlkMiCat.Info, <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;Completed Online {1} Sync of User: {0}&quot;</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum52">  52:</span>          profile.UserCtx.user_id.ToString(), syncType));  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum53">  53:</span>  }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum54">  54:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum55">  55:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> HealthRecordItemCollection GetHVItemsOnline(PersonInfo info, DateTime? lastSync)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum56">  56:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum57">  57:</span>     HealthRecordSearcher searcher = info.SelectedRecord.CreateSearcher();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum58">  58:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum59">  59:</span>     HealthRecordFilter filter = <span style="color: #0000ff">new</span> HealthRecordFilter(Exercise.TypeId,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum60">  60:</span>         AerobicSession.TypeId);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum61">  61:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum62">  62:</span>     <span style="color: #0000ff">if</span>(lastSync.HasValue)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum63">  63:</span>         filter.UpdatedDateMin = (DateTime) lastSync;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum64">  64:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum65">  65:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum66">  66:</span>     <span style="color: #008000">// TODO: Add filter so that we get only items with steps</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum67">  67:</span>     searcher.Filters.Add(filter);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum68">  68:</span>     HealthRecordItemCollection items = searcher.GetMatchingItems()[0];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum69">  69:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum70">  70:</span>     <span style="color: #0000ff">return</span> items;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum71">  71:</span> }</pre>
<p><!--CRLF--></div>
</div>
<ul>
<li><u><strong>UserOfflineSync</strong></u></li>
</ul>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> OfflineSyncUser(ProfileModel profile)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     DateTime timeStamp = DateTime.Now;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     <span style="color: #008000">// Retrieve the latest info from HealthVault</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     <span style="color: #0000ff">if</span> (profile.UserCtx.hv_personid != <span style="color: #0000ff">null</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         HealthRecordItemCollection items = GetHVItemsOffline(profile.UserCtx.hv_personid, </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>             profile.UserCtx.hv_recordid,profile.UserCtx.hv_last_sync_time);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         <span style="color: #0000ff">if</span> (items != <span style="color: #0000ff">null</span> &amp;&amp; items.Count &gt; 0)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>             <span style="color: #0000ff">foreach</span> (HealthRecordItem item <span style="color: #0000ff">in</span> items)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>             {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>                 <span style="color: #008000">// Do the distinct per item work</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>                 ProcessStepsHealthItem(item, profile);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>             WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync.cs:OfflineSyncUser&quot;</span>, WlkMiEvent.AppSync,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>                 WlkMiCat.Info, <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;Number of items retrieved from HV: {0}&quot;</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>                 items.Count));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>         <span style="color: #008000">//only update the last sync time if we are able to download items</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>         <span style="color: #0000ff">if</span> (items != <span style="color: #0000ff">null</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>             <span style="color: #008000">//set last sync time</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>             profile.UserCtx.hv_last_sync_time = timeStamp;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>             profile.Save();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>     <span style="color: #008000">// Clear the WlkMi data cache if the last sync is null</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span>     <span style="color: #008000">// In other words, you can also set the time stamp for user's last sync to null</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>     <span style="color: #008000">// to trigger a full offline sync.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span>     <span style="color: #008000">// TODO: Consider not doing this for production</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span>     <span style="color: #0000ff">if</span> (!profile.UserCtx.hv_last_sync_time.HasValue)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span>         WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync.cs:OfflineSyncUser&quot;</span>, WlkMiEvent.AppSync,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37">  37:</span>             WlkMiCat.Info, <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;Deleting information for user {0}&quot;</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38">  38:</span>             profile.UserCtx.user_id));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39">  39:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40">  40:</span>         WalkLogModel.ClearUserCache(profile);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41">  41:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42">  42:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43">  43:</span>     <span style="color: #008000">// Processtotals for this user</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44">  44:</span>     WalkLogModel.ProcessTotals(profile.UserCtx.user_id);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45">  45:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46">  46:</span>     WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync.cs:OfflineSyncUser&quot;</span>, WlkMiEvent.AppSync,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47">  47:</span>         WlkMiCat.Info, <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;Completed Offline Sync of User: {0}&quot;</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48">  48:</span>         profile.UserCtx.user_id.ToString()));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49">  49:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum50">  50:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum51">  51:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> HealthRecordItemCollection GetHVItemsOffline(Guid personId, </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum52">  52:</span>     Guid recordGuid, DateTime? lastSync)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum53">  53:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum54">  54:</span>     <span style="color: #008000">// Do the offline connection</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum55">  55:</span>     OfflineWebApplicationConnection offlineConn =</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum56">  56:</span>         <span style="color: #0000ff">new</span> OfflineWebApplicationConnection(personId);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum57">  57:</span>     offlineConn.RequestTimeoutSeconds = 180;  <span style="color: #008000">//extending time to prevent time outs for accounts with large number of items</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum58">  58:</span>     offlineConn.Authenticate();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum59">  59:</span>     HealthRecordAccessor accessor =</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum60">  60:</span>         <span style="color: #0000ff">new</span> HealthRecordAccessor(offlineConn, recordGuid);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum61">  61:</span>     HealthRecordSearcher searcher = accessor.CreateSearcher();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum62">  62:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum63">  63:</span>     HealthRecordFilter filter = <span style="color: #0000ff">new</span> HealthRecordFilter(Exercise.TypeId,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum64">  64:</span>         AerobicSession.TypeId);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum65">  65:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum66">  66:</span>     <span style="color: #0000ff">if</span> (lastSync.HasValue)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum67">  67:</span>         filter.UpdatedDateMin = (DateTime)lastSync;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum68">  68:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum69">  69:</span>     searcher.Filters.Add(filter);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum70">  70:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum71">  71:</span>     HealthRecordItemCollection items = <span style="color: #0000ff">null</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum72">  72:</span>     <span style="color: #0000ff">try</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum73">  73:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum74">  74:</span>         items = searcher.GetMatchingItems()[0];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum75">  75:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum76">  76:</span>     <span style="color: #0000ff">catch</span> (Exception err)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum77">  77:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum78">  78:</span>         WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync.cs:GetHVItemsOffline&quot;</span>, WlkMiEvent.AppSync, WlkMiCat.Error,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum79">  79:</span>                 <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;Error for user {0} : {1} &quot;</span>, </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum80">  80:</span>                 recordGuid.ToString(),err.ToString()));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum81">  81:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum82">  82:</span>     <span style="color: #0000ff">return</span> items;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum83">  83:</span> }</pre>
<p><!--CRLF--></div>
</div>
<ul>
<li><u><strong>ApplicationSync</strong></u></li>
</ul>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> SyncWlkMiWithHealthVault(</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     DateTime? lastUpdatedDate)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync.cs&quot;</span>, WlkMiEvent.AppSync, WlkMiCat.Info, </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>         <span style="color: #006080">&quot;Getting updated records from HealthVault&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     <span style="color: #008000">// Do the offline connection</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     OfflineWebApplicationConnection offlineConn =</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         <span style="color: #0000ff">new</span> OfflineWebApplicationConnection();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     offlineConn.Authenticate();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>     IList&lt;Guid&gt; updatedUserIds = </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>         offlineConn.GetUpdatedRecordsForApplication(lastUpdatedDate);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>     WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync.cs&quot;</span>, WlkMiEvent.AppSync, WlkMiCat.Info,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>         <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;Got {0} updated records from HealthVault&quot;</span>, updatedUserIds.Count));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>     <span style="color: #0000ff">foreach</span>(Guid recordid <span style="color: #0000ff">in</span> updatedUserIds)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>         ProfileModel syncUser = ProfileModel.Fetch(recordid);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>         <span style="color: #0000ff">if</span> (syncUser == <span style="color: #0000ff">null</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>             WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync.cs&quot;</span>, WlkMiEvent.AppSync, WlkMiCat.Error,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>                 <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;No WlkMi user found for recordif {0} &quot;</span>, recordid));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>             <span style="color: #0000ff">continue</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>         <span style="color: #008000">// Decide to update this guy?</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>         <span style="color: #0000ff">if</span> (syncUser.UserCtx.hv_last_sync_time &gt; DateTime.Now.AddSeconds(</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>             -Constants.UserSyncIntervalInSeconds))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>             WlkMiTracer.Instance.Log(<span style="color: #006080">&quot;HVSync.cs&quot;</span>, WlkMiEvent.AppSync, WlkMiCat.Info,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span>                 <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;Skipping sync for user {0} &quot;</span>, syncUser.UserCtx.user_id));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span>         <span style="color: #0000ff">else</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span>             HVSync.OfflineSyncUser(syncUser);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p><strong><u>Suggestions?<br />
      <br /></u></strong>There are various ways in which the HealthVault platform can assist application in syncing with the data native to HealthVault. One thing comes to my mind is support for <a href="http://en.wikipedia.org/wiki/FeedSync">feedsync</a>. You may have a lot of suggestions, please feel free to chime in the comments!!</p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2009/07/syncing-with-healthvault-the-walkme-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sharing Your WalkMe Pedometer using E-Mail Signature</title>
		<link>http://healthblog.vitraag.com/2009/07/sharing-your-walkme-pedometer-using-e-mail-signature/</link>
		<comments>http://healthblog.vitraag.com/2009/07/sharing-your-walkme-pedometer-using-e-mail-signature/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 02:43:00 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/2009/07/sharing-your-walkme-pedometer-using-e-mail-signature/</guid>
		<description><![CDATA[Several folks have asked me how can one get the WalkMe pedometer to show in Outlook signature. I’m outlining the steps below, for the restless folks most important step is Step 7.

Sign-In the WalkMe HealthVault application 
Click on the “Share” tab 
Make sure the “Allow Other to see my WalkMe data” checkbox is checked 
If [...]]]></description>
			<content:encoded><![CDATA[<p>Several folks have asked me how can one get the <a href="http://apps.healthvault.com/walkme">WalkMe</a> pedometer to show in Outlook signature. I’m outlining the steps below, for the restless folks most important step is <strong>Step 7</strong>.</p>
<ol>
<li>Sign-In the <a href="http://apps.healthvault.com/walkme">WalkMe HealthVault application</a> </li>
<li>Click on the “<strong>Share</strong>” tab </li>
<li>Make sure the “Allow Other to see my WalkMe data” checkbox is checked </li>
<li>If you check the box the page refreshes, saying <strong>Sharing is turn on</strong> </li>
<li>Scroll to the bottom of the page – to <strong>Share your steps as an image</strong> option<a href="http://healthblog.vitraag.com/wp-content/uploads/2009/07/walkme1.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Walkme" border="0" alt="Walkme" src="http://healthblog.vitraag.com/wp-content/uploads/2009/07/walkme-thumb1.jpg" width="333" height="117" /></a> </li>
<li>Click on <strong>file </strong>part of “Save this file as your outlook signature” </li>
<li>Save the walkme.htm file in your <strong>C:\Users\[YourUserName]\AppData\Roaming\Microsoft\Signatures </strong>director. Please note the part after [YourUserName] of this directory is hidden and you will manually need to type it in your Windows explorer to get to the full directory. Let me know if you can’t locate this directory on Windows systems other Vista or Seven (it should be under <strong>C:\Documents &amp; Settings\[YourUserName]\Application Data\Roaming\Microsoft\Signatures</strong> on Windows XP).</li>
<li>To test the signature open Outlook and and create new mail. Click on the “Signature” part of ribbon (outlook 2007) and you will see WalkMe in drop down. If you select WalkMe signature you should see something like below in your outlook email :<a href="http://healthblog.vitraag.com/wp-content/uploads/2009/07/untitled.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="Untitled" border="0" alt="Untitled" align="left" src="http://healthblog.vitraag.com/wp-content/uploads/2009/07/untitled-thumb.jpg" width="330" height="202" /></a>&#160; </li>
</ol>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>Enjoy your walking and keep yourself motivated by communicating your live pedometer through the signature.</p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2009/07/sharing-your-walkme-pedometer-using-e-mail-signature/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
