|
| 1 | +.. This file is automatically generated. Do not edit this file directly. |
| 2 | +
|
| 3 | +Cloud Healthcare API Python Samples |
| 4 | +=============================================================================== |
| 5 | + |
| 6 | +.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
| 7 | + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=healthcare/api-client/dicom/README.rst |
| 8 | + |
| 9 | + |
| 10 | +This directory contains samples for Cloud Healthcare API. `Cloud Healthcare API`_ implements healthcare-native protocols and formats to accelerate ingestion, storage, analysis, and integration of healthcare data with cloud-based applications. |
| 11 | +- See the `migration guide`_ for information about migrating to Python client library v0.25.1. |
| 12 | + |
| 13 | +.. _migration guide: https://cloud.google.com/vision/docs/python-client-migration |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +.. _Cloud Healthcare API: https://cloud.google.com/healthcare/docs |
| 19 | + |
| 20 | +Setup |
| 21 | +------------------------------------------------------------------------------- |
| 22 | + |
| 23 | + |
| 24 | +Authentication |
| 25 | +++++++++++++++ |
| 26 | + |
| 27 | +This sample requires you to have authentication setup. Refer to the |
| 28 | +`Authentication Getting Started Guide`_ for instructions on setting up |
| 29 | +credentials for applications. |
| 30 | + |
| 31 | +.. _Authentication Getting Started Guide: |
| 32 | + https://cloud.google.com/docs/authentication/getting-started |
| 33 | + |
| 34 | +Authentication |
| 35 | +++++++++++++++ |
| 36 | + |
| 37 | +Authentication for this service is done via an `API Key`_. To obtain an API |
| 38 | +Key: |
| 39 | + |
| 40 | +1. Open the `Cloud Platform Console`_ |
| 41 | +2. Make sure that billing is enabled for your project. |
| 42 | +3. From the **Credentials** page, create a new **API Key** or use an existing |
| 43 | + one for your project. |
| 44 | + |
| 45 | +.. _API Key: |
| 46 | + https://developers.google.com/api-client-library/python/guide/aaa_apikeys |
| 47 | +.. _Cloud Console: https://console.cloud.google.com/project?_ |
| 48 | + |
| 49 | +Install Dependencies |
| 50 | +++++++++++++++++++++ |
| 51 | + |
| 52 | +#. Clone python-docs-samples and change directory to the sample directory you want to use. |
| 53 | + |
| 54 | + .. code-block:: bash |
| 55 | +
|
| 56 | + $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git |
| 57 | +
|
| 58 | +#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. |
| 59 | + |
| 60 | + .. _Python Development Environment Setup Guide: |
| 61 | + https://cloud.google.com/python/setup |
| 62 | + |
| 63 | +#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. |
| 64 | + |
| 65 | + .. code-block:: bash |
| 66 | +
|
| 67 | + $ virtualenv env |
| 68 | + $ source env/bin/activate |
| 69 | +
|
| 70 | +#. Install the dependencies needed to run the samples. |
| 71 | + |
| 72 | + .. code-block:: bash |
| 73 | +
|
| 74 | + $ pip install -r requirements.txt |
| 75 | +
|
| 76 | +.. _pip: https://pip.pypa.io/ |
| 77 | +.. _virtualenv: https://virtualenv.pypa.io/ |
| 78 | + |
| 79 | +Samples |
| 80 | +------------------------------------------------------------------------------- |
| 81 | + |
| 82 | +DICOM stores |
| 83 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 84 | + |
| 85 | +.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
| 86 | + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=healthcare/api-client/dicom/dicom_stores.py,healthcare/api-client/dicom/README.rst |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +To run this sample: |
| 92 | + |
| 93 | +.. code-block:: bash |
| 94 | +
|
| 95 | + $ python dicom_stores.py |
| 96 | +
|
| 97 | + usage: dicom_stores.py [-h] [--service_account_json SERVICE_ACCOUNT_JSON] |
| 98 | + [--api_key API_KEY] [--project_id PROJECT_ID] |
| 99 | + [--cloud_region CLOUD_REGION] [--dataset_id DATASET_ID] |
| 100 | + [--dicom_store_id DICOM_STORE_ID] |
| 101 | + [--pubsub_topic PUBSUB_TOPIC] [--uri_prefix URI_PREFIX] |
| 102 | + [--content_uri CONTENT_URI] |
| 103 | + [--export_format {FORMAT_UNSPECIFIED,DICOM,JSON_BIGQUERY_IMPORT}] |
| 104 | + {create-dicom-store,delete-dicom-store,get-dicom-store,list-dicom-stores,patch-dicom-store,export-dicom-store,import-dicom-store} |
| 105 | + ... |
| 106 | +
|
| 107 | + positional arguments: |
| 108 | + {create-dicom-store,delete-dicom-store,get-dicom-store,list-dicom-stores,patch-dicom-store,export-dicom-store,import-dicom-store} |
| 109 | + create-dicom-store Creates a new DICOM store within the parent dataset. |
| 110 | + delete-dicom-store Deletes the specified DICOM store. |
| 111 | + get-dicom-store Gets the specified DICOM store. |
| 112 | + list-dicom-stores Lists the DICOM stores in the given dataset. |
| 113 | + patch-dicom-store Updates the DICOM store. |
| 114 | + export-dicom-store Export data to a Google Cloud Storage bucket by |
| 115 | + copying it from the DICOM store. |
| 116 | + import-dicom-store Import data into the DICOM store by copying it from |
| 117 | + the specified source. |
| 118 | +
|
| 119 | + optional arguments: |
| 120 | + -h, --help show this help message and exit |
| 121 | + --service_account_json SERVICE_ACCOUNT_JSON |
| 122 | + Path to service account JSON file. |
| 123 | + --api_key API_KEY Your API key |
| 124 | + --project_id PROJECT_ID |
| 125 | + GCP project name |
| 126 | + --cloud_region CLOUD_REGION |
| 127 | + GCP region |
| 128 | + --dataset_id DATASET_ID |
| 129 | + Name of dataset |
| 130 | + --dicom_store_id DICOM_STORE_ID |
| 131 | + Name of DICOM store |
| 132 | + --pubsub_topic PUBSUB_TOPIC |
| 133 | + The Cloud Pub/Sub topic that notifications of changes |
| 134 | + are published on |
| 135 | + --uri_prefix URI_PREFIX |
| 136 | + URI for a Google Cloud Storage directory to which |
| 137 | + result filesshould be written (e.g., "bucket- |
| 138 | + id/path/to/destination/dir"). |
| 139 | + --content_uri CONTENT_URI |
| 140 | + URI for a Google Cloud Storage directory from which |
| 141 | + filesshould be imported (e.g., "bucket- |
| 142 | + id/path/to/destination/dir"). |
| 143 | + --export_format {FORMAT_UNSPECIFIED,DICOM,JSON_BIGQUERY_IMPORT} |
| 144 | + Specifies the output format. If the format is |
| 145 | + unspecified, thedefault functionality is to export to |
| 146 | + DICOM. |
| 147 | +
|
| 148 | +
|
| 149 | +
|
| 150 | +
|
| 151 | +
|
| 152 | +The client library |
| 153 | +------------------------------------------------------------------------------- |
| 154 | + |
| 155 | +This sample uses the `Google Cloud Client Library for Python`_. |
| 156 | +You can read the documentation for more details on API usage and use GitHub |
| 157 | +to `browse the source`_ and `report issues`_. |
| 158 | + |
| 159 | +.. _Google Cloud Client Library for Python: |
| 160 | + https://googlecloudplatform.github.io/google-cloud-python/ |
| 161 | +.. _browse the source: |
| 162 | + https://github.com/GoogleCloudPlatform/google-cloud-python |
| 163 | +.. _report issues: |
| 164 | + https://github.com/GoogleCloudPlatform/google-cloud-python/issues |
| 165 | + |
| 166 | + |
| 167 | +.. _Google Cloud SDK: https://cloud.google.com/sdk/ |
0 commit comments