Created
June 19, 2016 14:28
-
-
Save rajvansia/246440d6d5a18435af77a97f15e6bd23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
blood.forEach(function(b){ | |
data.push({"bloodp": b.valueQuantity.value, "date": bp.resource.effectiveDateTime, "type": b.code.text, "code": b.code.coding[0].code}) | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment