Numpy for Python

  •  python
  • >>> import numpy as np
  • >>> foo = [[1,5,9]]
  • >>> print (foo)
  • [[1, 5, 9]]
  • >>> print (np.average(foo))
  • 5.0
  • >>> a = np.array ([[1,5,9]])
  • >>> print (a)
  • [[1 5 9]]
  • >>> a
  • array([[1, 5, 9]])
  • >>> a.shape
  • (1, 3)
  • >>> a.size
  • 3
  • >>> a.ndim
  • >>> a.itemsize
  • 8
  • >>> a.dtype
  • dtype(‘int64’)
  • >>> b = np.array ([[1,2,3], [4,5,6]])
  • >>> b
  • array([[1, 2, 3],
  •        [4, 5, 6]])
  • >>> b.shape
  • (2, 3)
  • >>> b.ndim
  • 2

 

http://www.numpy.org/

 

https://docs.scipy.org/doc/numpy-dev/user/quickstart.html

 

Advertisements
Posted in Uncategorized | Leave a comment

Python

condo update anaconda

spyder perl tutorial https://www.youtube.com/watch?v=J5GevIHNctM

http://www.numpy.org/

https://www.scipy.org

console : print “hello”

editor: run by select f9

inspector : debugging

active state

python tutorial https://pythonprogramming.net/introduction-to-python-programming/

https://www.youtube.com/watch?list=PLQVvvaa0QuDe8XSftW-RAxdo6OmaeL85M&time_continue=163&v=IX6mc9l6tY4

https://www.youtube.com/watch?v=5aP9Bl9hcqI

https://docs.cs50.net/2016/fall/notes/8/week8.html

https://www.cs.cornell.edu/courses/cs1110/2017fa/lectures/index.php python class

http://stanfordpython.com/#lecture

http://arc-ts.umich.edu/mini-course-introduction-to-python-sept-11-14/ python

https://stanford.edu/~schmit/cme193/ python

Posted in Uncategorized | Leave a comment

sql case statement

 

WITH
dt (idx, FISCAL_YR_VAL, FISCAL_YY) as
(
select
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

) ,

dx (idx, FISCAL_YR_VAL, FISCAL_YY) as
(
select
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
* ,
case
when idx > 1 then 3
else idx
end evnt_typ
from dt ;

Posted in Uncategorized | Leave a comment

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

WITH ds (idx, FISCAL_YR_VAL, FISCAL_YY) as
(
select
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
union
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
union
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
FROM
ds
GROUP BY code, typ;

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

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

Posted in Uncategorized | Leave a comment

Health Vault

http://healthvaultjavalib.codeplex.com/

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.

http://msdn.microsoft.com/en-us/healthvault/bb802509.aspx#_Installing_the_SDK

“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”

 

 

 

http://blogs.msdn.com/b/healthvault/archive/2013/02/18/a-healthvault-application-development-primer-using-asp-net-mvc.aspx

Healthvault login page can be invoked from here:
https://www.healthvault.com/us/en

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

https://config.healthvault-ppe.com/CreateNewApp.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.”

http://msdn.microsoft.com/en-us/library/dn539122.aspx#vdtReport

http://msdn.microsoft.com/en-us/library/dn539122.aspx#_Key_CCDA_fields

http://mangstacular.blogspot.com/2010/03/creating-connect-request-in-healthvault.html

https://developer.healthvault.com/default.aspx

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

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

http://developer.healthvault.com/pages/sdk/docs/GetMeaningfulUseVDTReport.html
http://developer.healthvault.com/pages/sdk/docs/GetServiceDefinition.html
http://developer.healthvault.com/pages/sdk/docs/CreateAuthenticatedSessionToken.html

https://platform.healthvault-ppe.com/platform/XSD/method-getmeaningfulusetimelyaccessreport.xsd

Posted in Uncategorized | Leave a comment

MU

meaningful-use-101

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.

http://www.cms.gov/Regulations-and-Guidance/Legislation/EHRIncentivePrograms/Meaningful_Use.html

http://www.dhhr.wv.gov/oeps/documents/2013-symposium/Symposium-MeaningfulUse.pdf

Eligible Professionals (EP)

Clinical Summary

Transition of Care

http://www.healthstory.com/pdf/HealthStoryMeaningfulUse.pdf

http://www.healthstory.com/standards/standards.htm

http://www.himss.org/files/HIMSSorg/content/files/Code%20101_Clinical%20summaries%20and%20meaningful%20use%20A%20primer_Artz_JHIM_W2011.pdf

http://blog.agilehealthservices.com/2013/05/landscape-of-meaningful-use-stage-2.html

http://socialhealthinsights.com/2013/08/what-the-hqmf-ecqms/

 

 

 

Posted in Uncategorized | Leave a comment

Nodejs

http://www.joezimjs.com/javascript/node-js-for-true-beginners/

 

Posted in Uncategorized | Leave a comment