Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Mencari set gambar
Gunakan SearchImageSets
tindakan untuk menjalankan kueri penelusuran terhadap semua kumpulan gambar di penyimpanan ACTIVE
HealthImaging data. Menu berikut memberikan prosedur untuk contoh AWS Management Console dan kode untuk AWS CLI dan AWS SDKs. Untuk informasi selengkapnya, lihat SearchImageSets
dalam Referensi AWS HealthImaging API.
catatan
Ingatlah poin-poin berikut saat mencari set gambar.
-
SearchImageSets
menerima parameter kueri penelusuran tunggal dan mengembalikan respons paginasi dari semua kumpulan gambar yang memiliki kriteria pencocokan. Semua kueri rentang tanggal harus dimasukkan sebagai(lowerBound, upperBound)
. -
Secara default,
SearchImageSets
gunakanupdatedAt
bidang untuk menyortir dalam urutan menurun dari yang terbaru ke yang terlama. -
Jika Anda membuat penyimpanan data dengan AWS KMS kunci milik pelanggan, Anda harus memperbarui kebijakan AWS KMS kunci sebelum berinteraksi dengan kumpulan gambar. Untuk informasi selengkapnya, lihat Membuat kunci terkelola pelanggan.
Untuk mencari set gambar
Pilih menu berdasarkan preferensi akses Anda AWS HealthImaging.
catatan
Prosedur berikut menunjukkan cara mencari set gambar menggunakan filter Series
Instance UID
dan Updated at
properti.
- Series Instance UID
-
Cari set gambar menggunakan filter
Series Instance UID
properti-
Pilih penyimpanan data.
Halaman detail penyimpanan data terbuka dan tab Image sets dipilih secara default.
-
Pilih menu filter properti dan pilih
Series Instance UID
. -
Di kolom Masukkan nilai untuk dicari, masukkan (tempel) Instance Seri UID yang menarik.
catatan
UIDNilai Instans Seri harus identik dengan yang tercantum dalam Registry of DICOM Unique Identifiers (UIDs)
. Perhatikan persyaratan termasuk serangkaian angka yang berisi setidaknya satu periode di antara mereka. Periode tidak diperbolehkan pada awal atau akhir Instans SeriUIDs. Huruf dan spasi putih tidak diperbolehkan, jadi berhati-hatilah saat menyalin dan menempelkanUIDs. -
Pilih menu Rentang tanggal, pilih rentang tanggal untuk Instans SeriUID, dan pilih Terapkan.
-
Pilih Cari.
Instance Seri UIDs yang termasuk dalam rentang tanggal yang dipilih dikembalikan dalam urutan Terbaru secara default.
- Updated at
-
Cari set gambar menggunakan filter
Updated at
properti-
Pilih penyimpanan data.
Halaman detail penyimpanan data terbuka dan tab Image sets dipilih secara default.
-
Pilih menu filter properti dan pilih
Updated at
. -
Pilih menu Rentang tanggal, pilih rentang tanggal yang ditetapkan gambar, dan pilih Terapkan.
-
Pilih Cari.
Kumpulan gambar yang termasuk dalam rentang tanggal yang dipilih dikembalikan dalam urutan Terbaru secara default.
- C++
-
- SDKuntuk C ++
-
Fungsi utilitas untuk mencari set gambar.
//! Routine which searches for image sets based on defined input attributes. /*! \param dataStoreID: The HealthImaging data store ID. \param searchCriteria: A search criteria instance. \param imageSetResults: Vector to receive the image set IDs. \param clientConfig: Aws client configuration. \return bool: Function succeeded. */ bool AwsDoc::Medical_Imaging::searchImageSets(const Aws::String &dataStoreID, const Aws::MedicalImaging::Model::SearchCriteria &searchCriteria, Aws::Vector<Aws::String> &imageSetResults, const Aws::Client::ClientConfiguration &clientConfig) { Aws::MedicalImaging::MedicalImagingClient client(clientConfig); Aws::MedicalImaging::Model::SearchImageSetsRequest request; request.SetDatastoreId(dataStoreID); request.SetSearchCriteria(searchCriteria); Aws::String nextToken; // Used for paginated results. bool result = true; do { if (!nextToken.empty()) { request.SetNextToken(nextToken); } Aws::MedicalImaging::Model::SearchImageSetsOutcome outcome = client.SearchImageSets( request); if (outcome.IsSuccess()) { for (auto &imageSetMetadataSummary: outcome.GetResult().GetImageSetsMetadataSummaries()) { imageSetResults.push_back(imageSetMetadataSummary.GetImageSetId()); } nextToken = outcome.GetResult().GetNextToken(); } else { std::cout << "Error: " << outcome.GetError().GetMessage() << std::endl; result = false; } } while (!nextToken.empty()); return result; }
Kasus penggunaan #1: EQUAL operator.
Aws::Vector<Aws::String> imageIDsForPatientID; Aws::MedicalImaging::Model::SearchCriteria searchCriteriaEqualsPatientID; Aws::Vector<Aws::MedicalImaging::Model::SearchFilter> patientIDSearchFilters = { Aws::MedicalImaging::Model::SearchFilter().WithOperator(Aws::MedicalImaging::Model::Operator::EQUAL) .WithValues({Aws::MedicalImaging::Model::SearchByAttributeValue().WithDICOMPatientId(patientID)}) }; searchCriteriaEqualsPatientID.SetFilters(patientIDSearchFilters); bool result = AwsDoc::Medical_Imaging::searchImageSets(dataStoreID, searchCriteriaEqualsPatientID, imageIDsForPatientID, clientConfig); if (result) { std::cout << imageIDsForPatientID.size() << " image sets found for the patient with ID '" << patientID << "'." << std::endl; for (auto &imageSetResult : imageIDsForPatientID) { std::cout << " Image set with ID '" << imageSetResult << std::endl; } }
Kasus penggunaan #2: BETWEEN operator menggunakan DICOMStudyDate danDICOMStudyTime.
Aws::MedicalImaging::Model::SearchByAttributeValue useCase2StartDate; useCase2StartDate.SetDICOMStudyDateAndTime(Aws::MedicalImaging::Model::DICOMStudyDateAndTime() .WithDICOMStudyDate("19990101") .WithDICOMStudyTime("000000.000")); Aws::MedicalImaging::Model::SearchByAttributeValue useCase2EndDate; useCase2EndDate.SetDICOMStudyDateAndTime(Aws::MedicalImaging::Model::DICOMStudyDateAndTime() .WithDICOMStudyDate(Aws::Utils::DateTime(std::chrono::system_clock::now()).ToLocalTimeString("%Y%m%d")) .WithDICOMStudyTime("000000.000")); Aws::MedicalImaging::Model::SearchFilter useCase2SearchFilter; useCase2SearchFilter.SetValues({useCase2StartDate, useCase2EndDate}); useCase2SearchFilter.SetOperator(Aws::MedicalImaging::Model::Operator::BETWEEN); Aws::MedicalImaging::Model::SearchCriteria useCase2SearchCriteria; useCase2SearchCriteria.SetFilters({useCase2SearchFilter}); Aws::Vector<Aws::String> usesCase2Results; result = AwsDoc::Medical_Imaging::searchImageSets(dataStoreID, useCase2SearchCriteria, usesCase2Results, clientConfig); if (result) { std::cout << usesCase2Results.size() << " image sets found for between 1999/01/01 and present." << std::endl; for (auto &imageSetResult : usesCase2Results) { std::cout << " Image set with ID '" << imageSetResult << std::endl; } }
Kasus penggunaan #3: BETWEEN operator menggunakancreatedAt. Studi waktu sebelumnya bertahan.
Aws::MedicalImaging::Model::SearchByAttributeValue useCase3StartDate; useCase3StartDate.SetCreatedAt(Aws::Utils::DateTime("20231130T000000000Z",Aws::Utils::DateFormat::ISO_8601_BASIC)); Aws::MedicalImaging::Model::SearchByAttributeValue useCase3EndDate; useCase3EndDate.SetCreatedAt(Aws::Utils::DateTime(std::chrono::system_clock::now())); Aws::MedicalImaging::Model::SearchFilter useCase3SearchFilter; useCase3SearchFilter.SetValues({useCase3StartDate, useCase3EndDate}); useCase3SearchFilter.SetOperator(Aws::MedicalImaging::Model::Operator::BETWEEN); Aws::MedicalImaging::Model::SearchCriteria useCase3SearchCriteria; useCase3SearchCriteria.SetFilters({useCase3SearchFilter}); Aws::Vector<Aws::String> usesCase3Results; result = AwsDoc::Medical_Imaging::searchImageSets(dataStoreID, useCase3SearchCriteria, usesCase3Results, clientConfig); if (result) { std::cout << usesCase3Results.size() << " image sets found for created between 2023/11/30 and present." << std::endl; for (auto &imageSetResult : usesCase3Results) { std::cout << " Image set with ID '" << imageSetResult << std::endl; } }
Gunakan kasus #4: EQUAL operator aktif DICOMSeriesInstanceUID dan aktif updatedAt dan BETWEEN urutkan respons secara ASC berurutan di updatedAt lapangan.
Aws::MedicalImaging::Model::SearchByAttributeValue useCase4StartDate; useCase4StartDate.SetUpdatedAt(Aws::Utils::DateTime("20231130T000000000Z",Aws::Utils::DateFormat::ISO_8601_BASIC)); Aws::MedicalImaging::Model::SearchByAttributeValue useCase4EndDate; useCase4EndDate.SetUpdatedAt(Aws::Utils::DateTime(std::chrono::system_clock::now())); Aws::MedicalImaging::Model::SearchFilter useCase4SearchFilterBetween; useCase4SearchFilterBetween.SetValues({useCase4StartDate, useCase4EndDate}); useCase4SearchFilterBetween.SetOperator(Aws::MedicalImaging::Model::Operator::BETWEEN); Aws::MedicalImaging::Model::SearchByAttributeValue seriesInstanceUID; seriesInstanceUID.SetDICOMSeriesInstanceUID(dicomSeriesInstanceUID); Aws::MedicalImaging::Model::SearchFilter useCase4SearchFilterEqual; useCase4SearchFilterEqual.SetValues({seriesInstanceUID}); useCase4SearchFilterEqual.SetOperator(Aws::MedicalImaging::Model::Operator::EQUAL); Aws::MedicalImaging::Model::SearchCriteria useCase4SearchCriteria; useCase4SearchCriteria.SetFilters({useCase4SearchFilterBetween, useCase4SearchFilterEqual}); Aws::MedicalImaging::Model::Sort useCase4Sort; useCase4Sort.SetSortField(Aws::MedicalImaging::Model::SortField::updatedAt); useCase4Sort.SetSortOrder(Aws::MedicalImaging::Model::SortOrder::ASC); useCase4SearchCriteria.SetSort(useCase4Sort); Aws::Vector<Aws::String> usesCase4Results; result = AwsDoc::Medical_Imaging::searchImageSets(dataStoreID, useCase4SearchCriteria, usesCase4Results, clientConfig); if (result) { std::cout << usesCase4Results.size() << " image sets found for EQUAL operator " << "on DICOMSeriesInstanceUID and BETWEEN on updatedAt and sort response\n" << "in ASC order on updatedAt field." << std::endl; for (auto &imageSetResult : usesCase4Results) { std::cout << " Image set with ID '" << imageSetResult << std::endl; } }
-
Untuk API detailnya, lihat SearchImageSetsdi AWS SDK for C++ APIReferensi.
catatan
Ada lebih banyak tentang GitHub. Temukan contoh lengkapnya dan pelajari cara pengaturan dan menjalankannya di Repositori Contoh Kode AWS
. -
- CLI
-
- AWS CLI
-
Contoh 1: Untuk mencari set gambar dengan EQUAL operator
Contoh
search-image-sets
kode berikut menggunakan EQUAL operator untuk mencari set gambar berdasarkan nilai tertentu.aws medical-imaging search-image-sets \ --datastore-id
12345678901234567890123456789012
\ --search-criteriafile://search-criteria.json
Isi dari
search-criteria.json
{ "filters": [{ "values": [{"DICOMPatientId" : "SUBJECT08701"}], "operator": "EQUAL" }] }
Output:
{ "imageSetsMetadataSummaries": [{ "imageSetId": "09876543210987654321098765432109", "createdAt": "2022-12-06T21:40:59.429000+00:00", "version": 1, "DICOMTags": { "DICOMStudyId": "2011201407", "DICOMStudyDate": "19991122", "DICOMPatientSex": "F", "DICOMStudyInstanceUID": "1.2.840.99999999.84710745.943275268089", "DICOMPatientBirthDate": "19201120", "DICOMStudyDescription": "UNKNOWN", "DICOMPatientId": "SUBJECT08701", "DICOMPatientName": "Melissa844 Huel628", "DICOMNumberOfStudyRelatedInstances": 1, "DICOMStudyTime": "140728", "DICOMNumberOfStudyRelatedSeries": 1 }, "updatedAt": "2022-12-06T21:40:59.429000+00:00" }] }
Contoh 2: Untuk mencari set gambar dengan BETWEEN operator menggunakan DICOMStudyDate dan DICOMStudyTime
Contoh
search-image-sets
kode berikut mencari kumpulan gambar dengan DICOM Studi yang dihasilkan antara 1 Januari 1990 (12:00 AM) dan 1 Januari 2023 (12:00 AM).Catatan: DICOMStudyTime adalah opsional. Jika tidak ada, 12:00 AM (awal hari) adalah nilai waktu untuk tanggal yang disediakan untuk penyaringan.
aws medical-imaging search-image-sets \ --datastore-id
12345678901234567890123456789012
\ --search-criteriafile://search-criteria.json
Isi dari
search-criteria.json
{ "filters": [{ "values": [{ "DICOMStudyDateAndTime": { "DICOMStudyDate": "19900101", "DICOMStudyTime": "000000" } }, { "DICOMStudyDateAndTime": { "DICOMStudyDate": "20230101", "DICOMStudyTime": "000000" } }], "operator": "BETWEEN" }] }
Output:
{ "imageSetsMetadataSummaries": [{ "imageSetId": "09876543210987654321098765432109", "createdAt": "2022-12-06T21:40:59.429000+00:00", "version": 1, "DICOMTags": { "DICOMStudyId": "2011201407", "DICOMStudyDate": "19991122", "DICOMPatientSex": "F", "DICOMStudyInstanceUID": "1.2.840.99999999.84710745.943275268089", "DICOMPatientBirthDate": "19201120", "DICOMStudyDescription": "UNKNOWN", "DICOMPatientId": "SUBJECT08701", "DICOMPatientName": "Melissa844 Huel628", "DICOMNumberOfStudyRelatedInstances": 1, "DICOMStudyTime": "140728", "DICOMNumberOfStudyRelatedSeries": 1 }, "updatedAt": "2022-12-06T21:40:59.429000+00:00" }] }
Contoh 3: Untuk mencari set gambar dengan BETWEEN operator menggunakan createdAt (studi waktu sebelumnya dipertahankan)
Contoh
search-image-sets
kode berikut mencari kumpulan gambar dengan DICOM Studi bertahan di HealthImaging antara rentang waktu di zona UTC waktu.Catatan: Berikan createdAt dalam format contoh (ā1985-04-12T 23:20:50.52 Zā).
aws medical-imaging search-image-sets \ --datastore-id
12345678901234567890123456789012
\ --search-criteriafile://search-criteria.json
Isi dari
search-criteria.json
{ "filters": [{ "values": [{ "createdAt": "1985-04-12T23:20:50.52Z" }, { "createdAt": "2022-04-12T23:20:50.52Z" }], "operator": "BETWEEN" }] }
Output:
{ "imageSetsMetadataSummaries": [{ "imageSetId": "09876543210987654321098765432109", "createdAt": "2022-12-06T21:40:59.429000+00:00", "version": 1, "DICOMTags": { "DICOMStudyId": "2011201407", "DICOMStudyDate": "19991122", "DICOMPatientSex": "F", "DICOMStudyInstanceUID": "1.2.840.99999999.84710745.943275268089", "DICOMPatientBirthDate": "19201120", "DICOMStudyDescription": "UNKNOWN", "DICOMPatientId": "SUBJECT08701", "DICOMPatientName": "Melissa844 Huel628", "DICOMNumberOfStudyRelatedInstances": 1, "DICOMStudyTime": "140728", "DICOMNumberOfStudyRelatedSeries": 1 }, "lastUpdatedAt": "2022-12-06T21:40:59.429000+00:00" }] }
Contoh 4: Untuk mencari set gambar dengan EQUAL operator aktif DICOMSeriesInstanceUID dan aktif updatedAt dan BETWEEN mengurutkan respons secara ASC berurutan di updatedAt lapangan
Contoh
search-image-sets
kode berikut mencari kumpulan gambar dengan EQUAL operator aktif dan aktif DICOMSeriesInstanceUID updatedAt dan BETWEEN mengurutkan respons secara ASC berurutan di updatedAt lapangan.Catatan: Berikan updatedAt dalam format contoh (ā1985-04-12T 23:20:50.52 Zā).
aws medical-imaging search-image-sets \ --datastore-id
12345678901234567890123456789012
\ --search-criteriafile://search-criteria.json
Isi dari
search-criteria.json
{ "filters": [{ "values": [{ "updatedAt": "2024-03-11T15:00:05.074000-07:00" }, { "updatedAt": "2024-03-11T16:00:05.074000-07:00" }], "operator": "BETWEEN" }, { "values": [{ "DICOMSeriesInstanceUID": "1.2.840.99999999.84710745.943275268089" }], "operator": "EQUAL" }], "sort": { "sortField": "updatedAt", "sortOrder": "ASC" } }
Output:
{ "imageSetsMetadataSummaries": [{ "imageSetId": "09876543210987654321098765432109", "createdAt": "2022-12-06T21:40:59.429000+00:00", "version": 1, "DICOMTags": { "DICOMStudyId": "2011201407", "DICOMStudyDate": "19991122", "DICOMPatientSex": "F", "DICOMStudyInstanceUID": "1.2.840.99999999.84710745.943275268089", "DICOMPatientBirthDate": "19201120", "DICOMStudyDescription": "UNKNOWN", "DICOMPatientId": "SUBJECT08701", "DICOMPatientName": "Melissa844 Huel628", "DICOMNumberOfStudyRelatedInstances": 1, "DICOMStudyTime": "140728", "DICOMNumberOfStudyRelatedSeries": 1 }, "lastUpdatedAt": "2022-12-06T21:40:59.429000+00:00" }] }
Untuk informasi selengkapnya, lihat Mencari kumpulan gambar di Panduan AWS HealthImaging Pengembang.
-
Untuk API detailnya, lihat SearchImageSets
di Referensi AWS CLI Perintah.
-
- Java
-
- SDKuntuk Java 2.x
-
Fungsi utilitas untuk mencari set gambar.
public static List<ImageSetsMetadataSummary> searchMedicalImagingImageSets( MedicalImagingClient medicalImagingClient, String datastoreId, SearchCriteria searchCriteria) { try { SearchImageSetsRequest datastoreRequest = SearchImageSetsRequest.builder() .datastoreId(datastoreId) .searchCriteria(searchCriteria) .build(); SearchImageSetsIterable responses = medicalImagingClient .searchImageSetsPaginator(datastoreRequest); List<ImageSetsMetadataSummary> imageSetsMetadataSummaries = new ArrayList<>(); responses.stream().forEach(response -> imageSetsMetadataSummaries .addAll(response.imageSetsMetadataSummaries())); return imageSetsMetadataSummaries; } catch (MedicalImagingException e) { System.err.println(e.awsErrorDetails().errorMessage()); System.exit(1); } return null; }
Kasus penggunaan #1: EQUAL operator.
List<SearchFilter> searchFilters = Collections.singletonList(SearchFilter.builder() .operator(Operator.EQUAL) .values(SearchByAttributeValue.builder() .dicomPatientId(patientId) .build()) .build()); SearchCriteria searchCriteria = SearchCriteria.builder() .filters(searchFilters) .build(); List<ImageSetsMetadataSummary> imageSetsMetadataSummaries = searchMedicalImagingImageSets( medicalImagingClient, datastoreId, searchCriteria); if (imageSetsMetadataSummaries != null) { System.out.println("The image sets for patient " + patientId + " are:\n" + imageSetsMetadataSummaries); System.out.println(); }
Kasus penggunaan #2: BETWEEN operator menggunakan DICOMStudyDate danDICOMStudyTime.
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); searchFilters = Collections.singletonList(SearchFilter.builder() .operator(Operator.BETWEEN) .values(SearchByAttributeValue.builder() .dicomStudyDateAndTime(DICOMStudyDateAndTime.builder() .dicomStudyDate("19990101") .dicomStudyTime("000000.000") .build()) .build(), SearchByAttributeValue.builder() .dicomStudyDateAndTime(DICOMStudyDateAndTime.builder() .dicomStudyDate((LocalDate.now() .format(formatter))) .dicomStudyTime("000000.000") .build()) .build()) .build()); searchCriteria = SearchCriteria.builder() .filters(searchFilters) .build(); imageSetsMetadataSummaries = searchMedicalImagingImageSets(medicalImagingClient, datastoreId, searchCriteria); if (imageSetsMetadataSummaries != null) { System.out.println( "The image sets searched with BETWEEN operator using DICOMStudyDate and DICOMStudyTime are:\n" + imageSetsMetadataSummaries); System.out.println(); }
Kasus penggunaan #3: BETWEEN operator menggunakancreatedAt. Studi waktu sebelumnya bertahan.
searchFilters = Collections.singletonList(SearchFilter.builder() .operator(Operator.BETWEEN) .values(SearchByAttributeValue.builder() .createdAt(Instant.parse("1985-04-12T23:20:50.52Z")) .build(), SearchByAttributeValue.builder() .createdAt(Instant.now()) .build()) .build()); searchCriteria = SearchCriteria.builder() .filters(searchFilters) .build(); imageSetsMetadataSummaries = searchMedicalImagingImageSets(medicalImagingClient, datastoreId, searchCriteria); if (imageSetsMetadataSummaries != null) { System.out.println("The image sets searched with BETWEEN operator using createdAt are:\n " + imageSetsMetadataSummaries); System.out.println(); }
Gunakan kasus #4: EQUAL operator aktif DICOMSeriesInstanceUID dan aktif updatedAt dan BETWEEN urutkan respons secara ASC berurutan di updatedAt lapangan.
Instant startDate = Instant.parse("1985-04-12T23:20:50.52Z"); Instant endDate = Instant.now(); searchFilters = Arrays.asList( SearchFilter.builder() .operator(Operator.EQUAL) .values(SearchByAttributeValue.builder() .dicomSeriesInstanceUID(seriesInstanceUID) .build()) .build(), SearchFilter.builder() .operator(Operator.BETWEEN) .values( SearchByAttributeValue.builder().updatedAt(startDate).build(), SearchByAttributeValue.builder().updatedAt(endDate).build() ).build()); Sort sort = Sort.builder().sortOrder(SortOrder.ASC).sortField(SortField.UPDATED_AT).build(); searchCriteria = SearchCriteria.builder() .filters(searchFilters) .sort(sort) .build(); imageSetsMetadataSummaries = searchMedicalImagingImageSets(medicalImagingClient, datastoreId, searchCriteria); if (imageSetsMetadataSummaries != null) { System.out.println("The image sets searched with EQUAL operator on DICOMSeriesInstanceUID and BETWEEN on updatedAt and sort response\n" + "in ASC order on updatedAt field are:\n " + imageSetsMetadataSummaries); System.out.println(); }
-
Untuk API detailnya, lihat SearchImageSetsdi AWS SDK for Java 2.x APIReferensi.
catatan
Ada lebih banyak tentang GitHub. Temukan contoh lengkapnya dan pelajari cara pengaturan dan menjalankannya di Repositori Contoh Kode AWS
. -
- JavaScript
-
- SDKuntuk JavaScript (v3)
-
Fungsi utilitas untuk mencari set gambar.
import { paginateSearchImageSets } from "@aws-sdk/client-medical-imaging"; import { medicalImagingClient } from "../libs/medicalImagingClient.js"; /** * @param {string} datastoreId - The data store's ID. * @param { import('@aws-sdk/client-medical-imaging').SearchFilter[] } filters - The search criteria filters. * @param { import('@aws-sdk/client-medical-imaging').Sort } sort - The search criteria sort. */ export const searchImageSets = async ( datastoreId = "xxxxxxxx", searchCriteria = {}, ) => { const paginatorConfig = { client: medicalImagingClient, pageSize: 50, }; const commandParams = { datastoreId: datastoreId, searchCriteria: searchCriteria, }; const paginator = paginateSearchImageSets(paginatorConfig, commandParams); const imageSetsMetadataSummaries = []; for await (const page of paginator) { // Each page contains a list of `jobSummaries`. The list is truncated if is larger than `pageSize`. imageSetsMetadataSummaries.push(...page.imageSetsMetadataSummaries); console.log(page); } // { // '$metadata': { // httpStatusCode: 200, // requestId: 'f009ea9c-84ca-4749-b5b6-7164f00a5ada', // extendedRequestId: undefined, // cfId: undefined, // attempts: 1, // totalRetryDelay: 0 // }, // imageSetsMetadataSummaries: [ // { // DICOMTags: [Object], // createdAt: "2023-09-19T16:59:40.551Z", // imageSetId: '7f75e1b5c0f40eac2b24cf712f485f50', // updatedAt: "2023-09-19T16:59:40.551Z", // version: 1 // }] // } return imageSetsMetadataSummaries; };
Kasus penggunaan #1: EQUAL operator.
const datastoreId = "12345678901234567890123456789012"; try { const searchCriteria = { filters: [ { values: [{ DICOMPatientId: "1234567" }], operator: "EQUAL", }, ], }; await searchImageSets(datastoreId, searchCriteria); } catch (err) { console.error(err); }
Kasus penggunaan #2: BETWEEN operator menggunakan DICOMStudyDate danDICOMStudyTime.
const datastoreId = "12345678901234567890123456789012"; try { const searchCriteria = { filters: [ { values: [ { DICOMStudyDateAndTime: { DICOMStudyDate: "19900101", DICOMStudyTime: "000000", }, }, { DICOMStudyDateAndTime: { DICOMStudyDate: "20230901", DICOMStudyTime: "000000", }, }, ], operator: "BETWEEN", }, ], }; await searchImageSets(datastoreId, searchCriteria); } catch (err) { console.error(err); }
Kasus penggunaan #3: BETWEEN operator menggunakancreatedAt. Studi waktu sebelumnya bertahan.
const datastoreId = "12345678901234567890123456789012"; try { const searchCriteria = { filters: [ { values: [ { createdAt: new Date("1985-04-12T23:20:50.52Z") }, { createdAt: new Date() }, ], operator: "BETWEEN", }, ], }; await searchImageSets(datastoreId, searchCriteria); } catch (err) { console.error(err); }
Gunakan kasus #4: EQUAL operator aktif DICOMSeriesInstanceUID dan aktif updatedAt dan BETWEEN urutkan respons secara ASC berurutan di updatedAt lapangan.
const datastoreId = "12345678901234567890123456789012"; try { const searchCriteria = { filters: [ { values: [ { updatedAt: new Date("1985-04-12T23:20:50.52Z") }, { updatedAt: new Date() }, ], operator: "BETWEEN", }, { values: [ { DICOMSeriesInstanceUID: "1.1.123.123456.1.12.1.1234567890.1234.12345678.123", }, ], operator: "EQUAL", }, ], sort: { sortOrder: "ASC", sortField: "updatedAt", }, }; await searchImageSets(datastoreId, searchCriteria); } catch (err) { console.error(err); }
-
Untuk API detailnya, lihat SearchImageSetsdi AWS SDK for JavaScript APIReferensi.
catatan
Ada lebih banyak tentang GitHub. Temukan contoh lengkapnya dan pelajari cara pengaturan dan menjalankannya di Repositori Contoh Kode AWS
. -
- Python
-
- SDKuntuk Python (Boto3)
-
Fungsi utilitas untuk mencari set gambar.
class MedicalImagingWrapper: def __init__(self, health_imaging_client): self.health_imaging_client = health_imaging_client def search_image_sets(self, datastore_id, search_filter): """ Search for image sets. :param datastore_id: The ID of the data store. :param search_filter: The search filter. For example: {"filters" : [{ "operator": "EQUAL", "values": [{"DICOMPatientId": "3524578"}]}]}. :return: The list of image sets. """ try: paginator = self.health_imaging_client.get_paginator("search_image_sets") page_iterator = paginator.paginate( datastoreId=datastore_id, searchCriteria=search_filter ) metadata_summaries = [] for page in page_iterator: metadata_summaries.extend(page["imageSetsMetadataSummaries"]) except ClientError as err: logger.error( "Couldn't search image sets. Here's why: %s: %s", err.response["Error"]["Code"], err.response["Error"]["Message"], ) raise else: return metadata_summaries
Kasus penggunaan #1: EQUAL operator.
search_filter = { "filters": [ {"operator": "EQUAL", "values": [{"DICOMPatientId": patient_id}]} ] } image_sets = self.search_image_sets(data_store_id, search_filter) print(f"Image sets found with EQUAL operator\n{image_sets}")
Kasus penggunaan #2: BETWEEN operator menggunakan DICOMStudyDate danDICOMStudyTime.
search_filter = { "filters": [ { "operator": "BETWEEN", "values": [ { "DICOMStudyDateAndTime": { "DICOMStudyDate": "19900101", "DICOMStudyTime": "000000", } }, { "DICOMStudyDateAndTime": { "DICOMStudyDate": "20230101", "DICOMStudyTime": "000000", } }, ], } ] } image_sets = self.search_image_sets(data_store_id, search_filter) print( f"Image sets found with BETWEEN operator using DICOMStudyDate and DICOMStudyTime\n{image_sets}" )
Kasus penggunaan #3: BETWEEN operator menggunakancreatedAt. Studi waktu sebelumnya bertahan.
search_filter = { "filters": [ { "values": [ { "createdAt": datetime.datetime( 2021, 8, 4, 14, 49, 54, 429000 ) }, { "createdAt": datetime.datetime.now() + datetime.timedelta(days=1) }, ], "operator": "BETWEEN", } ] } recent_image_sets = self.search_image_sets(data_store_id, search_filter) print( f"Image sets found with with BETWEEN operator using createdAt\n{recent_image_sets}" )
Gunakan kasus #4: EQUAL operator aktif DICOMSeriesInstanceUID dan aktif updatedAt dan BETWEEN urutkan respons secara ASC berurutan di updatedAt lapangan.
search_filter = { "filters": [ { "values": [ { "updatedAt": datetime.datetime( 2021, 8, 4, 14, 49, 54, 429000 ) }, { "updatedAt": datetime.datetime.now() + datetime.timedelta(days=1) }, ], "operator": "BETWEEN", }, { "values": [{"DICOMSeriesInstanceUID": series_instance_uid}], "operator": "EQUAL", }, ], "sort": { "sortOrder": "ASC", "sortField": "updatedAt", }, } image_sets = self.search_image_sets(data_store_id, search_filter) print( "Image sets found with EQUAL operator on DICOMSeriesInstanceUID and BETWEEN on updatedAt and" ) print(f"sort response in ASC order on updatedAt field\n{image_sets}")
Kode berikut membuat instance objek. MedicalImagingWrapper
client = boto3.client("medical-imaging") medical_imaging_wrapper = MedicalImagingWrapper(client)
-
Untuk API detailnya, lihat SearchImageSets AWSSDKReferensi Python (Boto3). API
catatan
Ada lebih banyak tentang GitHub. Temukan contoh lengkapnya dan pelajari cara pengaturan dan menjalankannya di Repositori Contoh Kode AWS
. -
Ketersediaan contoh
Tidak dapat menemukan apa yang Anda butuhkan? Minta contoh kode menggunakan tautan Berikan umpan balik di bilah sisi kanan halaman ini.