SQL With

Using mssql:

pulling data out of air from the system tables:


select top 5 ROW_NUMBER() over(order by a.name) + 2014 as yr from sys.all_objects a

above query gives you 5 rows with column yr with values 2015-2019

ROW_NUMBER() over (order by years.yr) as idx, yr as FISCAL_YR_VAL , yr-2000 as FISCAL_YY
from (select top 5 ROW_NUMBER() over(order by a.name) + 2014 as yr from sys.all_objects a) years
where years.yr < 2017 +1
select ROW_NUMBER() over (order by years.yr) as idx, yr+8 as FISCAL_YR_VAL, yr-2000 + 8 as FISCAL_YY
from (select top 5 ROW_NUMBER() over(order by a.name) + 2014 as yr from sys.all_objects a) years
where years.yr < 2017 +1
Select * from ds ;



Create more data


select CONCAT(‘ABC’, CONVERT(varchar(10), (ROW_NUMBER() over (order by years.yr)) )) as code,
CASE WHEN yr % 2 = 0 THEN ‘Apple’ WHEN yr % 2 = 1 THEN ‘Android’ END as typ
, yr as ItemCount , years.yr + 14 as amt
from (select top 5 ROW_NUMBER() over(order by a.name) as yr from sys.all_objects a) years
where years.yr < 2017 +1
select CONCAT(‘ABC’, CONVERT(varchar(10), (ROW_NUMBER() over (order by years.yr)) )) as code
CASE WHEN (yr+7) % 2 = 0 THEN ‘Android’ WHEN (yr+7) % 2 = 1 THEN ‘Apple’ END as typ
, yr + 8 as ItemCount , years.yr + 14 as amt
from (select top 5 ROW_NUMBER() over(order by a.name) as yr from sys.all_objects a) years
where years.yr < 2017 +1

The following grouping

To sum up  the totals per code

SELECT code,SUM(ItemCount) AS ItemCount,Typ,SUM(amt) AS Amount
GROUP BY code, typ;

To sum up  the total amt of bill , but  give total number of items per code

Code, SUM(ItemCount) ItemCount,Typ,
(SELECT SUM(Amt) FROM ds) Amount
GROUP BY Code, Typ;

Posted in Uncategorized | Leave a comment

Health Vault


this is a library that can be used to write applications in Java that use the HealthVault servers. It does not implement all the functionality that is present in the HealthVault .NET API libraries, but does provide a framework in which that support can be implemented.


“With HealthVault, users control their own health records, so they can share their health information with family, friends, and health care professionals, and have access to trustworthy”





Healthvault login page can be invoked from here:

Healthvault Config URL –> https://config.healthvault-ppe.com/default.aspx


From http://msdn.microsoft.com/en-us/library/dn539122.aspx#connectivityModels under Direct Messaging:

“Applications that use Direct Messaging integration to send CCDAs to HealthVault for Meaningful Use purposes, must register an application in the Application Configuration Center, enable Meaningful Use on theMethods tab, and associate their sending Direct Messaging domain with the application ID on the Meaningful Use tab. When the application is ready to be configured in the HealthVault production environment, contact hvbd@microsoft.com to start the process.”





API : http://developer.healthvault.com/pages/sdk/docs/index.html

Methods: https://developer.healthvault.com/pages/methods/methods.aspx



Posted in Uncategorized | Leave a comment



Meaningful use of health information technology is an umbrella term for rules and regulations that hospitals and physicians must meet to qualify for federal incentive funding under the American Recovery and Reinvestment Act of 2009


HL7 Implementation Guide for CDA release 2


To receive an EHR incentive payment, providers have to show that they are “meaningfully using” their certified EHR technology by meeting certain measurement thresholds that range from recording patient information as structured data to exchanging summary care records.



Eligible Professionals (EP)

Clinical Summary

Transition of Care









Posted in Uncategorized | Leave a comment




Posted in Uncategorized | Leave a comment

Casandra LInks

cloud times web site why nosql ?

Big Data – Data Never Sleeps

The Casandra paper

The Casandra RefCard

Casandra  roots traced back to facebook

Casandra api example on dumping data from it

Few words on unstructured database blog

Cassandra winning the NoSql race 2009

Cassandra quick tour

Cassandra getting started

WTF is a supercolumn and more

Should the terminology change

Replication in Cassandra and HBase blog

client choices in Cassandra clientdrivers

client cassandra  api

spring data Casandra api

GUI for Cassandra

Compare of Cassandra



Clones of Big Table on Cassandra

  • Written in: Java
  • Main point: Best of BigTable and Dynamo
  • License: Apache
  • Protocol: Thrift & custom binary CQL3
  • Tunable trade-offs for distribution and replication (N, R, W)
  • Querying by column, range of keys (Requires indices on anything that you want to search on)
  • BigTable-like features: columns, column families
  • Can be used as a distributed hash-table, with an “SQL-like” language, CQL (but no JOIN!)
  • Data can have expiration (set on INSERT)
  • Writes can be much faster than reads (when reads are disk-bound)
  • Map/reduce possible with Apache Hadoop
  • All nodes are similar, as opposed to Hadoop/HBase
  • Very good and reliable cross-datacenter replication

Best used: When you write more than you read (logging). If every component of the system must be in Java. (“No one gets fired for choosing Apache’s stuff.”)

For example: Banking, financial industry (though not necessarily for financial transactions, but these industries are much bigger than that.) Writes are faster than reads, so one natural niche is data analysis.


Cassandra vs HBase NoSql battle

Cassandra at twitter

why they moved to Cassandra blog

blog big data overview slides

cassandra myths infoq

cassandra maven

how do i cassandra slides

cassandra under hood

Posted in Uncategorized | Leave a comment

Big Data annd No SQL links

Hadoop Intro By HortonWorks  Linkedin engineer . you tube

The Cloudera video

Hadoop ecosystem  map with Hortonworks

what is hadoop – quick answer

Intro HBase

Hadoop 2

Database design with hadoop

Columnur vs Key value

Talk with Jim Goodnight on analytics and big data Datanami Live

Lars George talk about file locality blog

The Hadoop Distributed File System description

The Yahoo Hadoop tutorial

HDFS and Map Reduce name node overview

Big Data for Dummies

The engineering behind Facebook messages moves to Hadoop 

architects zone on

Facebook under the hood article

IBM Hadoop space

Hadoop realtime at Facebook paper

Map Reduce paper

The NoSql ecosystem description description

NoSql data modeling blog

whatisbigdata blog

NoSQL and MySQL at Craigslist

Jeremy Zawodny on Lessons learned  migation NoSQL

NoSQL is what?

Posted in Uncategorized | Leave a comment

EMS data

My first experience with medical data came with the department of Emergency Medicine at University of North Carolina at Chapel Hill. The medical record information system was known as PreMIS , and collected emergency patient care data throughout the state of North Carolina.

Posted in Uncategorized | Leave a comment