R/stack_fhir.R
stack_fhir.Rd
convert data of a given FHIR type in a list of bundles to a data.frame
stack_fhir(blist, type, droperr = TRUE)
list of FHIR bundles imported with process_fhir_bundle
character(1) type, in names(blist[[1]]), e.g.
logical(1) exclude records for which process_[type] fails, defaults to TRUE
data.frame
jj = make_test_json_set()
b2 = lapply(jj[1:2], process_fhir_bundle)
ss = stack_fhir(b2, "Procedure")
head(ss,2)
#> id
#> 93 be67f97e-1c27-4df0-9b1e-d51e6b801513
#> 121 28da1225-0b63-438d-9e3c-1a4dd3d11a06
#> subject status
#> 93 urn:uuid:15e20922-0f51-47a0-9345-225906c35fbf completed
#> 121 urn:uuid:15e20922-0f51-47a0-9345-225906c35fbf completed
#> performedPeriod.start performedPeriod.end code.system
#> 93 2012-07-16T09:02:10-04:00 2012-07-16T09:32:10-04:00 http://snomed.info/sct
#> 121 2012-12-11T08:02:10-05:00 2012-12-11T08:17:10-05:00 http://snomed.info/sct
#> code.code code.display
#> 93 395142003 Allergy screening test
#> 121 430193006 Medication Reconciliation (procedure)