Skip to content

Instantly share code, notes, and snippets.

View rajvansia's full-sized avatar

Raj Vansia rajvansia

View GitHub Profile
@rajvansia
rajvansia / NqLJYe.markdown
Last active August 29, 2015 14:25 — forked from anonymous/NqLJYe.markdown
NqLJYe
@rajvansia
rajvansia / fhir-bp.html
Last active May 30, 2016 15:11
fhir bp demo
<!DOCTYPE html>
<script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/smart-on-fhir/client-js/v0.1.1/dist/fhir-client.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.css"rel="stylesheet" type="text/css"></link>
<div id="chart"></div>
</div>
<button id=btn class="btn">patient</buton>
<button id=btn2 class="btn">patient2</buton>
@rajvansia
rajvansia / c3d3.html
Created May 8, 2016 16:55
library fhir c3.js
<script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.css"rel="stylesheet" type="text/css"></link>
pt.api.search({type: "Observation", query: {code: {$or: ["55284-4" ]}}}) // it worked you need to identifey what code you waan
.then(function(bps) {
var data=[];
bps.data.entry.forEach(function(bp){ // how can we access diffrent datat from the model for a set of blood pressures do it for one blood pressure
var blood= bp.resource.component;
console.log(bp.resource.effectiveDateTime
)
console.log(blood)
@rajvansia
rajvansia / .block
Last active September 1, 2022 06:31
Scatterplot with brush d3 v4
license: gpl-3.0
@rajvansia
rajvansia / PatientInfo.js
Last active August 12, 2016 11:51
react-fhir-pubnub
"use strict";
import React from 'react';
import ReactDOM from 'react-dom';
export class PatientInfo extends React.Component {
render () {
return (
<div>
<span className="patientInfo"><strong>Name: </strong>{this.props.fullname} |<strong>Age: </strong>{this.props.age} |<strong>MRN:{this.props.mrn} </strong></span>
@rajvansia
rajvansia / pom.xml
Last active November 28, 2016 00:59
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.rajvansia.kafka</groupId>
<artifactId>VitalsConsumer</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
{
"birth_date": "2001-01-13",
"gender": "male",
"id": "np-2",
"measures": {
"blood_pressure": [
{
"diastolic": {
"time": "2007-12-14T08:38:11Z",
"unit": "mmHg",
import json
import os
import requests
#fhir server endpoint
URL = "http://localhost:8080/hapi-fhir-jpaserver/fhir/"
#fhir server json header content
headers = {"Content-Type": "application/fhir+json;charset=utf-8"}