|
| 1 | +.. This file is automatically generated. Do not edit this file directly. |
| 2 | +Cloud Healthcare API Python Samples |
| 3 | +=============================================================================== |
| 4 | + |
| 5 | +.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
| 6 | + :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/hl7v2/README.rst |
| 7 | + |
| 8 | + |
| 9 | +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. |
| 10 | +- See the `migration guide`_ for information about migrating to Python client library v0.25.1. |
| 11 | + |
| 12 | +.. _migration guide: https://cloud.google.com/vision/docs/python-client-migration |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +.. _Cloud Healthcare API: https://cloud.google.com/healthcare/docs |
| 18 | + |
| 19 | +Setup |
| 20 | +------------------------------------------------------------------------------- |
| 21 | + |
| 22 | + |
| 23 | +Authentication |
| 24 | +++++++++++++++ |
| 25 | + |
| 26 | +This sample requires you to have authentication setup. Refer to the |
| 27 | +`Authentication Getting Started Guide`_ for instructions on setting up |
| 28 | +credentials for applications. |
| 29 | + |
| 30 | +.. _Authentication Getting Started Guide: |
| 31 | + https://cloud.google.com/docs/authentication/getting-started |
| 32 | + |
| 33 | +Install Dependencies |
| 34 | +++++++++++++++++++++ |
| 35 | + |
| 36 | +#. Clone python-docs-samples and change directory to the sample directory you want to use. |
| 37 | + |
| 38 | + .. code-block:: bash |
| 39 | + $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git |
| 40 | +#. 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. |
| 41 | + |
| 42 | + .. _Python Development Environment Setup Guide: |
| 43 | + https://cloud.google.com/python/setup |
| 44 | +#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. |
| 45 | + |
| 46 | + .. code-block:: bash |
| 47 | + $ virtualenv env |
| 48 | + $ source env/bin/activate |
| 49 | +#. Install the dependencies needed to run the samples. |
| 50 | + |
| 51 | + .. code-block:: bash |
| 52 | + $ pip install -r requirements.txt |
| 53 | +.. _pip: https://pip.pypa.io/ |
| 54 | +.. _virtualenv: https://virtualenv.pypa.io/ |
| 55 | + |
| 56 | +Samples |
| 57 | +------------------------------------------------------------------------------- |
| 58 | + |
| 59 | +HL7v2 stores |
| 60 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 61 | + |
| 62 | +.. <
8000
span class="pl-c1">image:: https://gstatic.com/cloudssh/images/open-btn.png |
| 63 | + :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/hl7v2/hl7v2_stores.py,healthcare/api-client/hl7v2/README.rst |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +To run this sample: |
| 69 | + |
| 70 | +.. code-block:: bash |
| 71 | + $ python hl7v2_stores.py |
| 72 | + usage: hl7v2_stores.py [-h] [--project_id PROJECT_ID] [--cloud_region CLOUD_REGION] |
| 73 | + [--dataset_id DATASET_ID] |
| 74 | + [--hl7v2_store_id HL7V2_STORE_ID] |
| 75 | + [--pubsub_topic PUBSUB_TOPIC] [--member MEMBER] |
| 76 | + [--role ROLE] |
| 77 | + {create-hl7v2-store,delete-hl7v2-store,get-hl7v2-store,list-hl7v2-stores,patch-hl7v2-store,get_iam_policy,set_iam_policy} |
| 78 | + ... |
| 79 | + positional arguments: |
| 80 | + {create-hl7v2-store,delete-hl7v2-store,get-hl7v2-store,list-hl7v2-stores,patch-hl7v2-store,get_iam_policy,set_iam_policy} |
| 81 | + create-hl7v2-store Creates a new HL7v2 store within the parent dataset. |
| 82 | + delete-hl7v2-store Deletes the specified HL7v2 store. |
| 83 | + get-hl7v2-store Gets the specified HL7v2 store. |
| 84 | + list-hl7v2-stores Lists the HL7v2 stores in the given dataset. |
| 85 | + patch-hl7v2-store Updates the HL7v2 store. |
| 86 | + get_iam_policy Gets the IAM policy for the specified hl7v2 store. |
| 87 | + set_iam_policy Sets the IAM policy for the specified hl7v2 store. A |
| 88 | + single member will be assigned a single role. A member |
| 89 | + can be any of: - allUsers, that is, anyone - |
| 90 | + allAuthenticatedUsers, anyone authenticated with a |
| 91 | + Google account - user:email, as in |
| 92 | + 'user:somebody@example.com' - group:email, as in |
| 93 | + 'group:admins@example.com' - domain:domainname, as in |
| 94 | + 'domain:example.com' - serviceAccount:email, as in |
| 95 | + 'serviceAccount:my-other- |
| 96 | + app@appspot.gserviceaccount.com' A role can be any IAM |
| 97 | + role, such as 'roles/viewer', 'roles/owner', or |
| 98 | + 'roles/editor' |
| 99 | + optional arguments: |
| 100 | + -h, --help show this help message and exit |
| 101 | + --project_id PROJECT_ID |
| 102 | + GCP project name |
| 103 | + --cloud_region CLOUD_REGION |
| 104 | + GCP region |
| 105 | + --dataset_id DATASET_ID |
| 106 | + Name of dataset |
| 107 | + --hl7v2_store_id HL7V2_STORE_ID |
| 108 | + Name of HL7v2 store |
| 109 | + --pubsub_topic PUBSUB_TOPIC |
| 110 | + The Cloud Pub/Sub topic where notifications of changes |
| 111 | + are published |
| 112 | + --member MEMBER Member to add to IAM policy (e.g. |
| 113 | + "domain:example.com") |
| 114 | + --role ROLE IAM Role to give to member (e.g. "roles/viewer") |
| 115 | +HL7v2 messages |
| 116 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 117 | + |
| 118 | +.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
| 119 | + :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/hl7v2/hl7v2_messages.py,healthcare/api-client/hl7v2/README.rst |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | +To run this sample: |
| 125 | + |
| 126 | +.. code-block:: bash |
| 127 | + $ python hl7v2_messages.py |
| 128 | + usage: hl7v2_messages.py [-h] [--project_id PROJECT_ID] |
| 129 | + [--cloud_region CLOUD_REGION] |
| 130 | + [--dataset_id DATASET_ID] |
| 131 | + [--hl7v2_store_id HL7V2_STORE_ID] |
| 132 | + [--hl7v2_message_file HL7V2_MESSAGE_FILE] |
| 133 | + [--hl7v2_message_id HL7V2_MESSAGE_ID] |
| 134 | + [--label_key LABEL_KEY] [--label_value LABEL_VALUE] |
| 135 | + {create-hl7v2-message,delete-hl7v2-message,get-hl7v2-message,ingest-hl7v2-message,list-hl7v2-messages,patch-hl7v2-message} |
| 136 | + ... |
| 137 | + positional arguments: |
| 138 | + {create-hl7v2-message,delete-hl7v2-message,get-hl7v2-message,ingest-hl7v2-message,list-hl7v2-messages,patch-hl7v2-message} |
| 139 | + create-hl7v2-message |
| 140 | + Creates an HL7v2 message and sends a notification to |
| 141 | + the Cloud Pub/Sub topic. |
| 142 | + delete-hl7v2-message |
| 143 | + Deletes an HL7v2 message. |
| 144 | + get-hl7v2-message Gets an HL7v2 message. |
| 145 | + ingest-hl7v2-message |
| 146 | + Ingests a new HL7v2 message from the hospital and |
| 147 | + sends a notification to the Cloud Pub/Sub topic. |
| 148 | + Return is an HL7v2 ACK message if the message was |
| 149 | + successfully stored. |
| 150 | + list-hl7v2-messages |
| 151 | + Lists all the messages in the given HL7v2 store with |
| 152 | + support for filtering. |
| 153 | + patch-hl7v2-message |
| 154 | + Updates the message. |
| 155 | + optional arguments: |
| 156 | + -h, --help show this help message and exit |
| 157 | + --project_id PROJECT_ID |
| 158 | + GCP project name |
| 159 | + --cloud_region CLOUD_REGION |
| 160 | + GCP region |
| 161 | + --dataset_id DATASET_ID |
| 162 | + Name of dataset |
| 163 | + --hl7v2_store_id HL7V2_STORE_ID |
| 164 | + Name of HL7v2 store |
| 165 | + --hl7v2_message_file HL7V2_MESSAGE_FILE |
| 166 | + A file containing a base64-encoded HL7v2 message |
| 167 | + --hl7v2_message_id HL7V2_MESSAGE_ID |
| 168 | + The identifier for the message returned by the server |
| 169 | + --label_key LABEL_KEY |
| 170 | + Arbitrary label key to apply to the message |
| 171 | + --label_value LABEL_VALUE |
| 172 | + Arbitrary label value to apply to the message |
| 173 | +The client library |
| 174 | +------------------------------------------------------------------------------- |
| 175 | +This sample uses the `Google Cloud Client Library for Python`_. |
| 176 | +You can read the documentation for more details on API usage and use GitHub |
| 177 | +to `browse the source`_ and `report issues`_. |
| 178 | +.. _Google Cloud Client Library for Python: |
| 179 | + https://googlecloudplatform.github.io/google-cloud-python/ |
| 180 | +.. _browse the source: |
| 181 | + https://github.com/GoogleCloudPlatform/google-cloud-python |
| 182 | +.. _report issues: |
| 183 | + https://github.com/GoogleCloudPlatform/google-cloud-python/issues |
| 184 | +.. _Google Cloud SDK: https://cloud.google.com/sdk/ |
0 commit comments