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 documentation of the 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. A FAILED_PRECONDITION error occurs if the latest revision of the given consent is in the `REJECTED` or `REVOKED` state.

      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 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.
              	NullFields []string `json:"-"`
              }

                AnnotationSource: AnnotationSource holds the source information of the annotation.

                func (*AnnotationSource) MarshalJSON

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

                type AnnotationStore

                type AnnotationStore struct {
                	// Labels: Optional. User-supplied key-value pairs used to organize
                	// Annotation stores. Label keys must be between 1 and 63 characters
                	// long, have a UTF-8 encoding of maximum 128 bytes, and must conform to
                	// the following PCRE regular expression: \p{Ll}\p{Lo}{0,62} Label
                	// values must be between 1 and 63 characters long, have a UTF-8
                	// encoding of maximum 128 bytes, and must conform to the following PCRE
                	// regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64
                	// labels can be associated with a given store.
                	Labels map[string]string `json:"labels,omitempty"`
                
                	// Name: Resource name of the Annotation store, of the form
                	// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/a
                	// nnotationStores/{annotation_store_id}`.
                	Name string `json:"name,omitempty"`
                
                	// ServerResponse contains the HTTP response code and headers from the
                	// server.
                	googleapi.ServerResponse `json:"-"`
                
                	// ForceSendFields is a list of field names (e.g. "Labels") 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. "Labels") 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:"-"`
                }

                  AnnotationStore: An Annotation store that can store annotation resources such as labels and tags for text, image and audio.

                  func (*AnnotationStore) MarshalJSON

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

                  type ArchiveUserDataMappingRequest

                  type ArchiveUserDataMappingRequest struct {
                  }

                    ArchiveUserDataMappingRequest: Archives the specified User data mapping.

                    type ArchiveUserDataMappingResponse

                    type ArchiveUserDataMappingResponse struct {
                    	// ServerResponse contains the HTTP response code and headers from the
                    	// server.
                    	googleapi.ServerResponse `json:"-"`
                    }

                      ArchiveUserDataMappingResponse: Archives the specified User data mapping.

                      type Attribute

                      type Attribute struct {
                      	// AttributeDefinitionId: Indicates the name of an attribute defined in
                      	// the consent store.
                      	AttributeDefinitionId string `json:"attributeDefinitionId,omitempty"`
                      
                      	// Values: The value of the attribute. Must be an acceptable value as
                      	// defined in the consent store. For example, if the consent store
                      	// defines "data type" with acceptable values "questionnaire" and
                      	// "step-count", when the attribute name is data type, this field must
                      	// contain one of those values.
                      	Values []string `json:"values,omitempty"`
                      
                      	// ForceSendFields is a list of field names (e.g.
                      	// "AttributeDefinitionId") 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. "AttributeDefinitionId") 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:"-"`
                      }

                        Attribute: An attribute value for a Consent or User data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.

                        func (*Attribute) MarshalJSON

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

                        type AttributeDefinition

                        type AttributeDefinition struct {
                        	// AllowedValues: Required. Possible values for the attribute. The
                        	// number of allowed values must not exceed 100. An empty list is
                        	// invalid. The list can only be expanded after creation.
                        	AllowedValues []string `json:"allowedValues,omitempty"`
                        
                        	// Category: Required. The category of the attribute. The value of this
                        	// field cannot be changed after creation.
                        	//
                        	// Possible values:
                        	//   "CATEGORY_UNSPECIFIED" - No category specified. This option is
                        	// invalid.
                        	//   "RESOURCE" - Specify this category when this attribute describes
                        	// the properties of resources. For example, data anonymity or data
                        	// type.
                        	//   "REQUEST" - Specify this category when this attribute describes the
                        	// properties of requests. For example, requester's role or requester's
                        	// organization.
                        	Category string `json:"category,omitempty"`
                        
                        	// ConsentDefaultValues: Optional. Default values of the attribute in
                        	// Consents. If no default values are specified, it defaults to an empty
                        	// value.
                        	ConsentDefaultValues []string `json:"consentDefaultValues,omitempty"`
                        
                        	// DataMappingDefaultValue: Optional. Default value of the attribute in
                        	// User data mappings. If no default value is specified, it defaults to
                        	// an empty value. This field is only applicable to attributes of the
                        	// category `RESOURCE`.
                        	DataMappingDefaultValue string `json:"dataMappingDefaultValue,omitempty"`
                        
                        	// Description: Optional. A description of the attribute.
                        	Description string `json:"description,omitempty"`
                        
                        	// Name: Resource name of the Attribute definition, of the form
                        	// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c
                        	// onsentStores/{consent_store_id}/attributeDefinitions/{attribute_defini
                        	// tion_id}`. Cannot be changed after creation.
                        	Name string `json:"name,omitempty"`
                        
                        	// ServerResponse contains the HTTP response code and headers from the
                        	// server.
                        	googleapi.ServerResponse `json:"-"`
                        
                        	// ForceSendFields is a list of field names (e.g. "AllowedValues") 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. "AllowedValues") 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:"-"`
                        }

                          AttributeDefinition: A client-defined consent attribute.

                          func (*AttributeDefinition) MarshalJSON

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

                          type AuditConfig

                          type AuditConfig struct {
                          	// AuditLogConfigs: The configuration for logging of each type of
                          	// permission.
                          	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
                          
                          	// Service: Specifies a service that will be enabled for audit logging.
                          	// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
                          	// `allServices` is a special value that covers all services.
                          	Service string `json:"service,omitempty"`
                          
                          	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") 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. "AuditLogConfigs") 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:"-"`
                          }

                            AuditConfig: Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.

                            func (*AuditConfig) MarshalJSON

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

                            type AuditLogConfig

                            type AuditLogConfig struct {
                            	// ExemptedMembers: Specifies the identities that do not cause logging
                            	// for this type of permission. Follows the same format of
                            	// Binding.members.
                            	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
                            
                            	// LogType: The log type that this config enables.
                            	//
                            	// Possible values:
                            	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.