fhir_serialize-methods: Serialize a fhir_bundle, fhir_bundle_list or fhir_resource

fhir_serializeR Documentation

Serialize a fhir_bundle, fhir_bundle_list or fhir_resource

Description

Serializes FHIR bundles or resources to allow for saving in .rda or .RData format without losing integrity of pointers i.e. it turns a fhir_bundle_xml/fhir_resource_xml object into an fhir_bundle_serialized/fhir_resource_serialized object.

Usage

fhir_serialize(bundles)

## S4 method for signature 'fhir_bundle_xml'
fhir_serialize(bundles)

## S4 method for signature 'fhir_bundle_serialized'
fhir_serialize(bundles)

## S4 method for signature 'fhir_bundle_list'
fhir_serialize(bundles)

## S4 method for signature 'fhir_resource_xml'
fhir_serialize(bundles)

## S4 method for signature 'fhir_resource_serialized'
fhir_serialize(bundles)

Arguments

bundles

A fhir_bundle, fhir_bundle_list or fhir_resource object.

Value

A fhir_bundle_xml, fhir_bundle_list or fhir_resource_xml object.

Examples


#example bundles are serialized, unserialize like this:
bundles <- fhir_unserialize(medication_bundles)

#Serialize like this:
bundles_for_saving <- fhir_serialize(bundles)

#works also on single bundles
fhir_serialize(bundles[[1]])



POLAR-fhiR/fhircrackr documentation built on Dec. 24, 2024, 3:06 a.m.