Documentation ¶
Overview ¶
Package fhirio provides an API for reading and writing resources to Google Cloud Healthcare Fhir stores.
Package fhirio provides an API for reading and writing resources to Google Cloud Healthcare Fhir stores.
Package fhirio provides an API for reading and writing resources to Google Cloud Healthcare Fhir stores.
Package fhirio provides an API for reading and writing resources to Google Cloud Healthcare Fhir stores.
Package fhirio provides an API for reading and writing resources to Google Cloud Healthcare Fhir stores.
Package fhirio provides an API for reading and writing resources to Google Cloud Healthcare Fhir stores.
Index ¶
- Constants
- func Deidentify(s beam.Scope, srcStore, dstStore string, config *healthcare.DeidentifyConfig) beam.PCollection
- func ExecuteBundles(s beam.Scope, fhirStorePath string, bundles beam.PCollection) (beam.PCollection, beam.PCollection)
- func Import(s beam.Scope, fhirStorePath, tempDir, deadLetterDir string, ...) (beam.PCollection, beam.PCollection)
- func Read(s beam.Scope, resourcePaths beam.PCollection) (beam.PCollection, beam.PCollection)
- func Search(s beam.Scope, fhirStorePath string, searchQueries beam.PCollection) (beam.PCollection, beam.PCollection)
- type ContentStructure
- type SearchQuery
Constants ¶
const (
UserAgent = "apache-beam-io-google-cloud-platform-healthcare/" + core.SdkVersion
)
Variables ¶
This section is empty.
Functions ¶
func Deidentify ¶ added in v2.41.0
func Deidentify(s beam.Scope, srcStore, dstStore string, config *healthcare.DeidentifyConfig) beam.PCollection
Deidentify transform de-identifies sensitive data in resources located in a Google Cloud FHIR store. It receives a source and destination store paths as well as de-identification configuration ( https://cloud.google.com/healthcare-api/docs/reference/rest/v1/DeidentifyConfig#FhirConfig). It performs de-identification on the source store using the provided configuration and applies the result in the destination store. It outputs a PCollection containing the destination store path if de-identification was performed successfully, otherwise it returns an empty PCollection. See: https://cloud.google.com/healthcare-api/docs/how-tos/fhir-deidentify
func ExecuteBundles ¶ added in v2.41.0
func ExecuteBundles(s beam.Scope, fhirStorePath string, bundles beam.PCollection) (beam.PCollection, beam.PCollection)
ExecuteBundles performs all the requests in the specified bundles on a given FHIR store. This transform takes a path to a FHIR store and a PCollection of bundles as JSON-encoded strings. It executes the requests defined on the bundles on the FHIR store located on the provided path. It outputs two PCollection<string>, the first containing the response bodies of the successfully performed requests and the second one error messages of the requests that failed to be executed. See: https://cloud.google.com/healthcare-api/docs/samples/healthcare-fhir-execute-bundle
func Import ¶ added in v2.42.0
func Import(s beam.Scope, fhirStorePath, tempDir, deadLetterDir string, contentStructure ContentStructure, resources beam.PCollection) (beam.PCollection, beam.PCollection)
Import consumes FHIR resources as input PCollection<string> and imports them into a given Google Cloud Healthcare FHIR store. It does so by creating batch files in the provided Google Cloud Storage `tempDir` and importing those files to the store through FHIR import API method: https://cloud.google.com/healthcare-api/docs/concepts/fhir-import. If `tempDir` is not provided, it falls back to the dataflow temp_location flag. Resources that fail to be included in the batch files are included as the first output PCollection. In case a batch file fails to be imported, it will be moved to the `deadLetterDir` and an error message will be provided in the second output PCollection. If `deadLetterDir` is not provided, the failed import files will be deleted and be irretrievable, but the error message will still be provided.
func Read ¶
func Read(s beam.Scope, resourcePaths beam.PCollection) (beam.PCollection, beam.PCollection)
Read fetches resources from Google Cloud Healthcare FHIR stores based on the resource path. It consumes a PCollection<string> of notifications from the FHIR store of resource paths, and fetches the actual resource object on the path in the notification. It outputs two PCollection<string>. The first contains the fetched object as a JSON-encoded string, and the second is a dead-letter with an error message, in case the object failed to be fetched. See: https://cloud.google.com/healthcare-api/docs/how-tos/fhir-resources#getting_a_fhir_resource.
func Search ¶ added in v2.41.0
func Search(s beam.Scope, fhirStorePath string, searchQueries beam.PCollection) (beam.PCollection, beam.PCollection)
Search transform searches for resources in a Google Cloud Healthcare FHIR store based on input queries. It consumes a PCollection<fhirio.SearchQuery> and outputs two PCollections, the first a tuple (identifier, searchResults) where `identifier` is the SearchQuery identifier field and `searchResults` is a slice of all found resources as a JSON-encoded string. The second PCollection is a dead-letter for the input queries that caused errors when performing the search. See: https://cloud.google.com/healthcare-api/docs/how-tos/fhir-search
Types ¶
type ContentStructure ¶ added in v2.42.0
type ContentStructure int
ContentStructure representation as per: https://cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.fhirStores/import#contentstructure
const ( // ContentStructureUnspecified is to be used as argument to Import if the content // structure is not specified, the default value BUNDLE is used. ContentStructureUnspecified ContentStructure = iota // ContentStructureBundle is to be used as argument to Import if the source file // contains one or more lines of newline-delimited JSON (ndjson). Each line is a // bundle that contains one or more resources. ContentStructureBundle // ContentStructureResource is to be used as argument to Import if the source // file contains one or more lines of newline-delimited JSON (ndjson). Each line // is a single resource. ContentStructureResource )
func (ContentStructure) String ¶ added in v2.42.0
func (cs ContentStructure) String() string
type SearchQuery ¶ added in v2.41.0
type SearchQuery struct { // An identifier for the query, if there is source information to propagate // through the pipeline. Identifier string // Search will be performed only on resources of type ResourceType. If not set // (i.e. ""), the search is performed across all resources. ResourceType string // Query parameters for a FHIR search request as per https://www.hl7.org/fhir/search.html. Parameters map[string]string }
SearchQuery concisely represents a FHIR search query, and should be used as input type for the Search transform.