Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python HealthImaging additions #5518

Merged
82 changes: 79 additions & 3 deletions .doc_gen/metadata/medical-imaging_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,18 @@ medical-imaging_SearchImageSets:
- sdk_version: 3
github: python/example_code/medical-imaging
excerpts:
- description:
- description: The utility function for searching image sets.
snippet_tags:
- python.example_code.medical-imaging.SearchImageSets
- description: "Use case #1: EQUAL operator."
snippet_tags:
- python.example_code.medical-imaging.SearchImageSets.use_case1
- description: "Use case #2: BETWEEN operator using DICOMStudyDate and DICOMStudyTime."
snippet_tags:
- python.example_code.medical-imaging.SearchImageSets.use_case2
- description: "Use case #3: BETWEEN operator using createdAt. Time studies were previously persisted."
snippet_tags:
- python.example_code.medical-imaging.SearchImageSets.use_case3
JavaScript:
versions:
- sdk_version: 3
Expand Down Expand Up @@ -370,9 +379,15 @@ medical-imaging_GetImageSetMetadata:
- sdk_version: 3
github: python/example_code/medical-imaging
excerpts:
- description:
- description: Utility function to get image set metadata.
snippet_tags:
- python.example_code.medical-imaging.GetImageSetMetadata
- description: Get image set metadata without version.
snippet_tags:
- python.example_code.medical-imaging.GetImageSetMetadata.withoutVersionID
- description: Get image set metadata with version.
snippet_tags:
- python.example_code.medical-imaging.GetImageSetMetadata.withVersionID
JavaScript:
versions:
- sdk_version: 3
Expand Down Expand Up @@ -507,9 +522,18 @@ medical-imaging_CopyImageSet:
- sdk_version: 3
github: python/example_code/medical-imaging
excerpts:
- description:
- description: Utility function to copy an image set.
snippet_tags:
- python.example_code.medical-imaging.CopyImageSet
- description: Copy an image set without a destination.
snippet_tags:
- python.example_code.medical-imaging.CopyImageSet1
- python.example_code.medical-imaging.CopyImageSet3
- description: Copy an image set with a destination.
snippet_tags:
- python.example_code.medical-imaging.CopyImageSet1
- python.example_code.medical-imaging.CopyImageSet2
- python.example_code.medical-imaging.CopyImageSet3
JavaScript:
versions:
- sdk_version: 3
Expand Down Expand Up @@ -668,6 +692,32 @@ medical-imaging_tagging_datastores:
synopsis: tag a &AHI; data store.
category: Scenarios
languages:
Python:
versions:
- sdk_version: 3
github: javascriptv3/example_code/medical-imaging
excerpts:
- description: To tag a data store.
snippet_tags:
- python.example_code.medical-imaging.tagging_datastore.arn
- python.example_code.medical-imaging.tagging_datastore.tag
- description: The utility function for tagging a resource.
snippet_tags:
- python.example_code.medical-imaging.TagResource
- description: To list tags for a data store.
snippet_tags:
- python.example_code.medical-imaging.tagging_datastore.arn
- python.example_code.medical-imaging.tagging_datastore.list
- description: The utility function for listing a resource's tags.
snippet_tags:
- python.example_code.medical-imaging.ListTagsForResource
- description: To untag a data store.
snippet_tags:
- python.example_code.medical-imaging.tagging_datastore.arn
- python.example_code.medical-imaging.tagging_datastore.untag
- description: The utility function for untagging a resource.
snippet_tags:
- python.example_code.medical-imaging.UntagResource
JavaScript:
versions:
- sdk_version: 3
Expand Down Expand Up @@ -725,6 +775,32 @@ medical-imaging_tagging_imagesets:
synopsis: tag a &AHI; image set.
category: Scenarios
languages:
Python:
versions:
- sdk_version: 3
github: javascriptv3/example_code/medical-imaging
excerpts:
- description: To tag an image set.
snippet_tags:
- python.example_code.medical-imaging.tagging_image_set.arn
- python.example_code.medical-imaging.tagging_image_set.tag
- description: The utility function for tagging a resource.
snippet_tags:
- python.example_code.medical-imaging.TagResource
- description: To list tags for an image set.
snippet_tags:
- python.example_code.medical-imaging.tagging_image_set.arn
- python.example_code.medical-imaging.tagging_image_set.list
- description: The utility function for listing a resource's tags.
snippet_tags:
- python.example_code.medical-imaging.ListTagsForResource
- description: To untag an image set.
snippet_tags:
- python.example_code.medical-imaging.tagging_image_set.arn
- python.example_code.medical-imaging.tagging_image_set.untag
- description: The utility function for untagging a resource.
snippet_tags:
- python.example_code.medical-imaging.UntagResource
JavaScript:
versions:
- sdk_version: 3
Expand Down
82 changes: 63 additions & 19 deletions python/example_code/medical-imaging/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--Generated by WRITEME on 2023-10-13 17:49:16.323539 (UTC)-->
<!--Generated by WRITEME on 2023-10-17 14:23:47.225401 (UTC)-->
# HealthImaging code examples for the SDK for Python

## Overview
Expand Down Expand Up @@ -39,24 +39,32 @@ python -m pip install -r requirements.txt

Code excerpts that show you how to call individual service functions.

* [Add a tag to a resource](medical_imaging_basics.py#L391) (`TagResource`)
* [Copy an image set](medical_imaging_basics.py#L337) (`CopyImageSet`)
* [Create a data store](medical_imaging_basics.py#L21) (`CreateDatastore`)
* [Delete a data store](medical_imaging_basics.py#L84) (`DeleteDatastore`)
* [Delete an image set](medical_imaging_basics.py#L369) (`DeleteImageSet`)
* [Get an image frame](medical_imaging_basics.py#L257) (`GetImageFrame`)
* [Get data store properties](medical_imaging_basics.py#L41) (`GetDatastore`)
* [Get image set properties](medical_imaging_basics.py#L202) (`GetImageSet`)
* [Get import job properties](medical_imaging_basics.py#L131) (`GetDICOMImportJob`)
* [Get metadata for an image set](medical_imaging_basics.py#L225) (`GetImageSetMetadata`)
* [Import bulk data into a data store](medical_imaging_basics.py#L101) (`StartDICOMImportJob`)
* [List data stores](medical_imaging_basics.py#L61) (`ListDatastores`)
* [List image set versions](medical_imaging_basics.py#L284) (`ListImageSetVersions`)
* [List import jobs for a data store](medical_imaging_basics.py#L152) (`ListDICOMImportJobs`)
* [List tags for a resource](medical_imaging_basics.py#L427) (`ListTagsForResource`)
* [Remove a tag from a resource](medical_imaging_basics.py#L409) (`UntagResource`)
* [Search image sets](medical_imaging_basics.py#L176) (`SearchImageSets`)
* [Update image set metadata](medical_imaging_basics.py#L310) (`UpdateImageSetMetadata`)
* [Add a tag to a resource](medical_imaging_basics.py#L411) (`TagResource`)
* [Copy an image set](medical_imaging_basics.py#L351) (`CopyImageSet`)
* [Create a data store](medical_imaging_basics.py#L27) (`CreateDatastore`)
* [Delete a data store](medical_imaging_basics.py#L90) (`DeleteDatastore`)
* [Delete an image set](medical_imaging_basics.py#L389) (`DeleteImageSet`)
* [Get an image frame](medical_imaging_basics.py#L271) (`GetImageFrame`)
* [Get data store properties](medical_imaging_basics.py#L47) (`GetDatastore`)
* [Get image set properties](medical_imaging_basics.py#L208) (`GetImageSet`)
* [Get import job properties](medical_imaging_basics.py#L137) (`GetDICOMImportJob`)
* [Get metadata for an image set](medical_imaging_basics.py#L234) (`GetImageSetMetadata`)
* [Import bulk data into a data store](medical_imaging_basics.py#L107) (`StartDICOMImportJob`)
* [List data stores](medical_imaging_basics.py#L67) (`ListDatastores`)
* [List image set versions](medical_imaging_basics.py#L298) (`ListImageSetVersions`)
* [List import jobs for a data store](medical_imaging_basics.py#L158) (`ListDICOMImportJobs`)
* [List tags for a resource](medical_imaging_basics.py#L447) (`ListTagsForResource`)
* [Remove a tag from a resource](medical_imaging_basics.py#L429) (`UntagResource`)
* [Search image sets](medical_imaging_basics.py#L182) (`SearchImageSets`)
* [Update image set metadata](medical_imaging_basics.py#L324) (`UpdateImageSetMetadata`)

### Scenarios

Code examples that show you how to accomplish a specific task by calling multiple
functions within the same service.

* [Tagging a data store](tagging_data_stores.py)
* [Tagging an image set](tagging_image_sets.py)

## Run the examples

Expand All @@ -68,6 +76,42 @@ Code excerpts that show you how to call individual service functions.



#### Tagging a data store

This example shows you how to tag a HealthImaging data store.


<!--custom.scenario_prereqs.medical-imaging_tagging_datastores.start-->
<!--custom.scenario_prereqs.medical-imaging_tagging_datastores.end-->

Start the example by running the following at a command prompt:

```
python tagging_data_stores.py
```


<!--custom.scenarios.medical-imaging_tagging_datastores.start-->
<!--custom.scenarios.medical-imaging_tagging_datastores.end-->

#### Tagging an image set

This example shows you how to tag a HealthImaging image set.


<!--custom.scenario_prereqs.medical-imaging_tagging_imagesets.start-->
<!--custom.scenario_prereqs.medical-imaging_tagging_imagesets.end-->

Start the example by running the following at a command prompt:

```
python tagging_image_sets.py
```


<!--custom.scenarios.medical-imaging_tagging_imagesets.start-->
<!--custom.scenarios.medical-imaging_tagging_imagesets.end-->

### Tests

⚠ Running tests might result in charges to your AWS account.
Expand Down
Loading
Loading