connect_smart: use pyAnVIL/SMART python infrastructure to connect to FHIR...

View source: R/SMART.R

connect_smartR Documentation

use pyAnVIL/SMART python infrastructure to connect to FHIR server, producing instance of 'anvil.fhir.client.FHIRClient' (basilisk/reticulate python.builtin.object instance)

Description

use pyAnVIL/SMART python infrastructure to connect to FHIR server, producing instance of 'anvil.fhir.client.FHIRClient' (basilisk/reticulate python.builtin.object instance)

Usage

connect_smart(fhirclient, fhirurls = list(anvurl()), app_id = "my_app")

Arguments

fhirclient

from pyAnVIL and/or https://github.com/smart-on-fhir/client-py, assumed to be generated via 'abfhir_demo()' in anvil we use '$anvil$fhir$client$FHIRClient', populating the 'settings' field

Examples

dem = abfhir_demo()
sm = connect_smart(dem$anvil$fhir$client$DispatchingFHIRClient) # can handle list of stores
sm$ready
avail_resch = dem$fhirclient$models$researchstudy
res = avail_resch$ResearchStudy$where(reticulate::py_dict("", ""))$perform_resources(sm$server)
length(res)
unlist(lapply(res[1:5], function(x) x$id))

vjcitn/AnvBiocFHIR documentation built on May 31, 2022, 10:39 a.m.