Skip to content

fhircrackr 2.0.0

Compare
Choose a tag to compare
@palmjulia palmjulia released this 14 Jul 11:25
· 63 commits to master since this release

Bugs fixed

  • Erroneous warnings when using fhir_search() with token authentication have been fixed.
  • fhir_authenticate() doesn't cache a .httr-oauth file anymore.
  • fhir_url() now url encodes string type parameter values too.
  • fhir_search() can now log errors from FHIR servers regardless of whether they are valid xml.
  • fhir_search() can now handle relative next links when paging through bundles

New functions

  • fhir_build_bundle(): Build a xml FHIR Bundle from a wide table.
  • fhir_build_resource(): Build a xml FHIR resource from a wide table.
  • fhir_bundle_list(): Constructor function to create fhir_bundle_list objects is now exported.
  • fhir_cast(): Similar to fhir_melt() but spreads multiple entries across columns instead of rows.
  • fhir_count_resource(): Count resources matching a specific search request on a server.
  • fhir_get_resource_ids(): Extract the logical IDs of all FHIR resources matching a specific search request from a server.
  • fhir_get_resources_by_ids(): Extract a set of resources based on their logical IDs.
  • fhir_post(): POST an object to a FHIR server.
  • fhir_put(): PUT an object to a FHIR server.
  • fhir_recent_http_error(): Returns the most recent http error to the console.
  • fhir_request(): Wrapper for fhir_url()
  • fhir_resource_xml(): Constructor function to create fhirresource_xml() objects is now exported.
  • fhir_rm_div(): Remove html elements from FHIR bundles.
  • fhir_rm_tag(): Remove elements enclosed by a specified xml-tag from FHIR bundles.
  • fhir_sample_resources_by_ids(): Randomly sample resources from a given logical ID vector and download them from a FHIR server.
  • fhir_sample_resources(): Randomly sample from a set of resources matching a specific search request in a FHIR server.
  • fhir_tree(): Returns a string representing the tree structure implicit in the column names of a wide table.
  • pastep(): Concatenates two or more strings to a path string correctly.

New behaviour

  • fhir_melt() has been rewritten to be faster and more memory efficient.

  • fhir_style: This class is now deprecated, all the information contained in the fhir_style object has been moved to the fhir_table_description.

  • fhir_table_description:

    • The structure of a fhir_table_description has changed insofar that the elements that used to be part of fhir_style are now direct elements of fhir_table description.
    • There are two new elements to describe the created table: format and keep_attr. For more information see ?fhir_table_description
  • fhir_crack():

    • Rewritten to be faster and more efficient, can now crack bundles in parallel (only on linux) when argument ncores > 1.
    • Can now optionally return tables in wide format where multiple entries are distributed over several columns instead of being pasted together in one column (argument format).
    • Will now extract elements regardless of their xml-attribute (@value, @id, @url), attributes can be attached to the column names when argument keep_attr = TRUE.
    • Argument remove_empty_columns renamed to rm_empty_cols.
  • fhir_search():

    • New argument rm_tag="div" per default removes all html bits in the bundle immediately after download. Can be disabled by setting rm_tag=NULL.

    • delay_between_attempts can now be a vector with different waiting times between retries of reaching the server. The length of delay_between_attempts determines the number of retries.

    • max_attempts is deprecated in favor of delay_between_attempts.

  • fhir_load() and fhir_save() have a new argument max_bundles that allows to restrict the number of bundles that is loaded/saved.