Documentation

Overview

Package healthcare provides access to the Cloud Healthcare API.

For product documentation, see: https://cloud.google.com/healthcare

Creating a client

Usage example:

import "google.golang.org/api/healthcare/v1beta1"
...
ctx := context.Background()
healthcareService, err := healthcare.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

healthcareService, err := healthcare.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
healthcareService, err := healthcare.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

View Source
const (
	// View and manage your data across Google Cloud Platform services
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)

    OAuth2 scopes used by this API.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type ActivateConsentRequest

    type ActivateConsentRequest struct {
    	// ConsentArtifact: Required. The resource name of the consent artifact
    	// that contains proof of the end user's consent, of the form
    	// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c
    	// onsentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}
    	// `. If the draft consent had a consent artifact, this consent artifact
    	// overwrites it.
    	ConsentArtifact string `json:"consentArtifact,omitempty"`
    
    	// ExpireTime: Timestamp in UTC of when this consent is considered
    	// expired.
    	ExpireTime string `json:"expireTime,omitempty"`
    
    	// Ttl: The time to live for this consent from when it is marked as
    	// active.
    	Ttl string `json:"ttl,omitempty"`
    
    	// ForceSendFields is a list of field names (e.g. "ConsentArtifact") to
    	// unconditionally include in API requests. By default, fields with
    	// empty values are omitted from API requests. However, any non-pointer,
    	// non-interface field appearing in ForceSendFields will be sent to the
    	// server regardless of whether the field is empty or not. This may be
    	// used to include empty fields in Patch requests.
    	ForceSendFields []string `json:"-"`
    
    	// NullFields is a list of field names (e.g. "ConsentArtifact") to
    	// include in API requests with the JSON null value. By default, fields
    	// with empty values are omitted from API requests. However, any field
    	// with an empty value appearing in NullFields will be sent to the
    	// server as null. It is an error if a field in this list has a
    	// non-empty value. This may be used to include null fields in Patch
    	// requests.
    	NullFields []string `json:"-"`
    }

      ActivateConsentRequest: Activates the latest revision of the specified Consent by committing a new revision with `state` updated to `ACTIVE`. If the latest revision of the given consent is in the `ACTIVE` state, no new revision is committed.

      func (*ActivateConsentRequest) MarshalJSON

      func (s *ActivateConsentRequest) MarshalJSON() ([]byte, error)

      type AnalyzeEntitiesRequest

      type AnalyzeEntitiesRequest struct {
      	// DocumentContent: document_content is a document to be annotated.
      	DocumentContent string `json:"documentContent,omitempty"`
      
      	// ForceSendFields is a list of field names (e.g. "DocumentContent") to
      	// unconditionally include in API requests. By default, fields with
      	// empty values are omitted from API requests. However, any non-pointer,
      	// non-interface field appearing in ForceSendFields will be sent to the
      	// server regardless of whether the field is empty or not. This may be
      	// used to include empty fields in Patch requests.
      	ForceSendFields []string `json:"-"`
      
      	// NullFields is a list of field names (e.g. "DocumentContent") to
      	// include in API requests with the JSON null value. By default, fields
      	// with empty values are omitted from API requests. However, any field
      	// with an empty value appearing in NullFields will be sent to the
      	// server as null. It is an error if a field in this list has a
      	// non-empty value. This may be used to include null fields in Patch
      	// requests.
      	NullFields []string `json:"-"`
      }

        AnalyzeEntitiesRequest: The request to analyze healthcare entities in a document.

        func (*AnalyzeEntitiesRequest) MarshalJSON

        func (s *AnalyzeEntitiesRequest) MarshalJSON() ([]byte, error)

        type AnalyzeEntitiesResponse

        type AnalyzeEntitiesResponse struct {
        	// Entities: The union of all the candidate entities that the
        	// entity_mentions in this response could link to. These are UMLS
        	// concepts or normalized mention content.
        	Entities []*Entity `json:"entities,omitempty"`
        
        	// EntityMentions: entity_mentions contains all the annotated medical
        	// entities that were were mentioned in the provided document.
        	EntityMentions []*EntityMention `json:"entityMentions,omitempty"`
        
        	// Relationships: relationships contains all the binary relationships
        	// that were identified between entity mentions within the provided
        	// document.
        	Relationships []*EntityMentionRelationship `json:"relationships,omitempty"`
        
        	// ServerResponse contains the HTTP response code and headers from the
        	// server.
        	googleapi.ServerResponse `json:"-"`
        
        	// ForceSendFields is a list of field names (e.g. "Entities") to
        	// unconditionally include in API requests. By default, fields with
        	// empty values are omitted from API requests. However, any non-pointer,
        	// non-interface field appearing in ForceSendFields will be sent to the
        	// server regardless of whether the field is empty or not. This may be
        	// used to include empty fields in Patch requests.
        	ForceSendFields []string `json:"-"`
        
        	// NullFields is a list of field names (e.g. "Entities") to include in
        	// API requests with the JSON null value. By default, fields with empty
        	// values are omitted from API requests. However, any field with an
        	// empty value appearing in NullFields will be sent to the server as
        	// null. It is an error if a field in this list has a non-empty value.
        	// This may be used to include null fields in Patch requests.
        	NullFields []string `json:"-"`
        }

          AnalyzeEntitiesResponse: Includes recognized entity mentions and relationships between them.

          func (*AnalyzeEntitiesResponse) MarshalJSON

          func (s *AnalyzeEntitiesResponse) MarshalJSON() ([]byte, error)

          type Annotation

          type Annotation struct {
          	// AnnotationSource: Details of the source.
          	AnnotationSource *AnnotationSource `json:"annotationSource,omitempty"`
          
          	// CustomData: Additional information for this annotation record, such
          	// as annotator and verifier information or study campaign.
          	CustomData map[string]string `json:"customData,omitempty"`
          
          	// ImageAnnotation: Annotations for images. For example, bounding
          	// polygons.
          	ImageAnnotation *ImageAnnotation `json:"imageAnnotation,omitempty"`
          
          	// Name: Resource name of the Annotation, of the form
          	// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/a
          	// nnotationStores/{annotation_store_id}/annotations/{annotation_id}`.
          	Name string `json:"name,omitempty"`
          
          	// ResourceAnnotation: Annotations for resource. For example,
          	// classification tags.
          	ResourceAnnotation *ResourceAnnotation `json:"resourceAnnotation,omitempty"`
          
          	// TextAnnotation: Annotations for sensitive texts. For example, a range
          	// that describes the location of sensitive text.
          	TextAnnotation *SensitiveTextAnnotation `json:"textAnnotation,omitempty"`
          
          	// ServerResponse contains the HTTP response code and headers from the
          	// server.
          	googleapi.ServerResponse `json:"-"`
          
          	// ForceSendFields is a list of field names (e.g. "AnnotationSource") to
          	// unconditionally include in API requests. By default, fields with
          	// empty values are omitted from API requests. However, any non-pointer,
          	// non-interface field appearing in ForceSendFields will be sent to the
          	// server regardless of whether the field is empty or not. This may be
          	// used to include empty fields in Patch requests.
          	ForceSendFields []string `json:"-"`
          
          	// NullFields is a list of field names (e.g. "AnnotationSource") to
          	// include in API requests with the JSON null value. By default, fields
          	// with empty values are omitted from API requests. However, any field
          	// with an empty value appearing in NullFields will be sent to the
          	// server as null. It is an error if a field in this list has a
          	// non-empty value. This may be used to include null fields in Patch
          	// requests.
          	NullFields []string `json:"-"`
          }

            Annotation: An annotation record.

            func (*Annotation) MarshalJSON

            func (s *Annotation) MarshalJSON() ([]byte, error)

            type AnnotationConfig

            type AnnotationConfig struct {
            	// AnnotationStoreName: The name of the annotation store, in the form
            	// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/a
            	// nnotationStores/{annotation_store_id}`). * The destination annotation
            	// store must be in the same project as the source data. De-identifying
            	// data across multiple projects is not supported. * The destination
            	// annotation store must exist when using DeidentifyDicomStore or
            	// DeidentifyFhirStore. DeidentifyDataset automatically creates the
            	// destination annotation store.
            	AnnotationStoreName string `json:"annotationStoreName,omitempty"`
            
            	// StoreQuote: If set to true, the sensitive texts are included in
            	// SensitiveTextAnnotation of Annotation.
            	StoreQuote bool `json:"storeQuote,omitempty"`
            
            	// ForceSendFields is a list of field names (e.g. "AnnotationStoreName")
            	// to unconditionally include in API requests. By default, fields with
            	// empty values are omitted from API requests. However, any non-pointer,
            	// non-interface field appearing in ForceSendFields will be sent to the
            	// server regardless of whether the field is empty or not. This may be
            	// used to include empty fields in Patch requests.
            	ForceSendFields []string `json:"-"`
            
            	// NullFields is a list of field names (e.g. "AnnotationStoreName") to
            	// include in API requests with the JSON null value. By default, fields
            	// with empty values are omitted from API requests. However, any field
            	// with an empty value appearing in NullFields will be sent to the
            	// server as null. It is an error if a field in this list has a
            	// non-empty value. This may be used to include null fields in Patch
            	// requests.
            	NullFields []string `json:"-"`
            }

              AnnotationConfig: Specifies how to store annotations during de-identification operation.

              func (*AnnotationConfig) MarshalJSON

              func (s *AnnotationConfig) MarshalJSON() ([]byte, error)

              type AnnotationSource

              type AnnotationSource struct {
              	// CloudHealthcareSource: Cloud Healthcare API resource.
              	CloudHealthcareSource *CloudHealthcareSource `json:"cloudHealthcareSource,omitempty"`
              
              	// ForceSendFields is a list of field names (e.g.
              	// "CloudHealthcareSource") to unconditionally include in API requests.
              	// By default, fields with empty values are omitted from API requests.
              	// However, any non-pointer, non-interface field appearing in
              	// ForceSendFields will be sent to the server regardless of whether the
              	// field is empty or not. This may be used to include empty fields in
              	// Patch requests.
              	ForceSendFields []string `json:"-"`
              
              	// NullFields is a list of field names (e.g. "CloudHealthcareSource") to
              	// include in API requests with the JSON null value. By default, fields
              	// with empty values are omitted from API requests. However, any field
              	// with an empty value appearing in NullFields will be sent to the
              	// server as null. It is an error if a field in this list has a
              	// non-empty value. This may be used to include null fields in Patch
              	// requests.
              	N