All Projects → FirelyTeam → RonFHIR

FirelyTeam / RonFHIR

Licence: other
R on FHIR

Programming Languages

r
7636 projects

Labels

Projects that are alternatives of or similar to RonFHIR

FHIR2Dataset
Query FHIR apis with SQL, for analytics and ML.
Stars: ✭ 26 (-46.94%)
Mutual labels:  fhir
monai-deploy
MONAI Deploy aims to become the de-facto standard for developing, packaging, testing, deploying and running medical AI applications in clinical production.
Stars: ✭ 56 (+14.29%)
Mutual labels:  fhir
fhir models
FHIR Resource Models
Stars: ✭ 68 (+38.78%)
Mutual labels:  fhir
id3c
Data logistics system enabling real-time pathogen surveillance. Built for the Seattle Flu Study.
Stars: ✭ 21 (-57.14%)
Mutual labels:  fhir
fhir-bridge
FHIR Bridge acts as a broker between an HL7 FHIR client and an openEHR server.
Stars: ✭ 22 (-55.1%)
Mutual labels:  fhir
hl7v2-fhir-converter
Converts HL7 v2 Messages to FHIR Resources
Stars: ✭ 40 (-18.37%)
Mutual labels:  fhir
structor
FHIR Questionnaire Form Builder
Stars: ✭ 25 (-48.98%)
Mutual labels:  fhir
node-on-fhir
Tech stack for building MACRA and 21st Century Cures compliant webapps.
Stars: ✭ 75 (+53.06%)
Mutual labels:  fhir
openui5-fhir
The openui5-fhir project connects the worlds of UI5 and FHIR®. Build beautiful and enterprise-ready web applications based on the FHIR® specification.
Stars: ✭ 31 (-36.73%)
Mutual labels:  fhir
Hammer
Simple, reliable FHIR validator
Stars: ✭ 27 (-44.9%)
Mutual labels:  fhir
openmrs-fhir-analytics
A collection of tools for extracting FHIR resources and analytics services on top of that data.
Stars: ✭ 55 (+12.24%)
Mutual labels:  fhir
hedis-ig
HEDIS FHIR-based Quality Reporting
Stars: ✭ 24 (-51.02%)
Mutual labels:  fhir
php-fhir
Tools for consuming data from a FHIR server with PHP
Stars: ✭ 87 (+77.55%)
Mutual labels:  fhir
Openemr
The most popular open source electronic health records and medical practice management solution.
Stars: ✭ 1,762 (+3495.92%)
Mutual labels:  fhir
fhir-questionnaire-render-react
Render FHIR Questionnaire as a web form using FHIRFormJS
Stars: ✭ 18 (-63.27%)
Mutual labels:  fhir
fhirpath
FHIRPath implementation in Python.
Stars: ✭ 25 (-48.98%)
Mutual labels:  fhir
CyFHIR
A Neo4j Plugin for Handling HL7 FHIR Data
Stars: ✭ 39 (-20.41%)
Mutual labels:  fhir
basisprofil-de-r4
No description or website provided.
Stars: ✭ 15 (-69.39%)
Mutual labels:  fhir
fhir-works-on-aws-persistence-ddb
A DynamoDB implementation of the FHIR Works on AWS framework, enabling users to complete CRUD operations on FHIR resources
Stars: ✭ 24 (-51.02%)
Mutual labels:  fhir
cql
Clincal Quality Language Specification
Stars: ✭ 16 (-67.35%)
Mutual labels:  fhir

RonFHIR

R on FHIR is an easy to use wrapper around the 'HL7 FHIR' REST API (STU 3 and R4). It provides tools to easily read and search resources on a FHIR server and bring the results into the R environment. R on FHIR is based on the FhirClient of the 'Firely .NET SDK', also made by Firely.

Installation

# To download the latest release from CRAN use:
install.packages("RonFHIR")

# Or download the development version from GitHub:
# install.packages("devtools")
devtools::install_github("FirelyTeam/RonFHIR")

Overview

  • Read
  • Search
  • GraphQL
  • Operations
  • Paging mechanism
  • Fluent search calls
  • OAuth 2.0
  • Bulk Data

Usage

fhirClient

library(RonFHIR)
# Setting up a fhirClient
client <- fhirClient$new("https://vonk.fire.ly/")

# Setting up a fhirClient with OAuth 2.0
client <- fhirClient$new("Endpoint of FHIR server that supports SMART on FHIR OAuth2 access")

client_id <- "id"
client_secret <- "secret"
app_name <- "TestApp"
scopes <- c("patient/*.read")

app <- httr::oauth_app(appname = app_name, client_id, client_secret)
oauth_endpoint <- httr::oauth_endpoint(authorize = paste(client$authUrl, "?aud=", client$endpoint, sep=""), access = client$tokenUrl)

token <- httr::oauth2.0_token(endpoint = oauth_endpoint, app = app, scope = scopes)

client$setToken(token)

# Search
bundle <- client$search("Patient", c("name=Peter", "address-postalcode=3999"))

while(!is.null(bundle)){
  # Do something useful here
  
  # Go to the next page of the bundle using FHIRs paging mechanism
  bundle <- client$continue(bundle)
}

# Searching with a searchParams object
query <- searchParams$new()
query$select(c("name", "birthDate"))$where("given:exact=Peter")$orderBy("family")

peters <- client$searchByQuery(query, "Patient") 
# equivalent: client$search("Patient", c("_elements=name,birthDate","given:exact=Peter", "_sort=family"))

#GraphQL read
client$qraphQL("{id name{given,family}}", "Patient/example")

#GraphQL read
client$qraphQL("{PatientList(name:\"pet\"){name @first @flatten{family,given @first}}}")

# Operations
client$operation("Observation", name = "lastn")

fhirBulkClient

privatekey <- openssl::read_key("PrivateKey.pem")

# Create your claim
claim <- jose::jwt_claim(iss = "ServiceURL",
                         sub = "ClientID",
                         aud = "TokenURL",
			 # expiration date as epoch (5 minutes)
                         exp = as.integer(as.POSIXct( Sys.time() + 300)), 
   			 # 'random' number
                         jti = charToRaw(as.character(runif(1, 0.5, 100000000000)))) 

# Sign your claim with your private key
jwt <- jose::jwt_encode_sig(claim, privatekey)

# Define your scope(s)
scopes <- c("system/*.read", "system/CommunicationRequest.write")

# Create a new fhirBulkClient
bulkclient <- fhirBulkClient$new("FHIRBulkServerURL", tokenURL = "TokenURL")

# Retrieve your token
token <- bulkclient$retrieveToken(jwt, scopes)

# Set your token
bulkclient$setToken(token$access_token)

# Request a download for Patient Cohort 3
bulkclient$groupExport(3)

# Request the progress of the requests
bulkclient$getBulkStatus()

# When the downloads a available, download the bulkdata
patient_cohort_3 <- bulkclient$downloadBulk(1)

View(patient_cohort_3)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].