FHIR 저장소에 익명화 작업 메타데이터 쓰기

이 페이지에서는 DICOM 데이터를 익명화하고 익명화 작업에 대한 메타데이터를 기록하는 방법과 FHIR 저장소로 익명화된 대상이 무엇인지에 대해 설명합니다. 메타데이터는 FHIR 저장소의 FHIR 출처 리소스에 저장됩니다. 그런 후 FHIR 커스텀 검색을 사용해서 데이터를 쿼리하여 다음과 같은 질문에 답변할 수 있습니다.

  • 익명화된 대상은 무엇인가요?
  • 데이터가 익명화된 방법과 이유는 무엇인가요?
  • 익명화가 언제 발생했고 시간이 얼마나 걸렸나요?

시작하기 전에

주석 대신 FHIR 사용

Cloud Healthcare API는 익명화된 데이터 주석 처리를 위해 사용할 수 있는 주석 API를 제공합니다.

FHIR 저장소에 익명화 작업 메타데이터 기록도 비슷하게 작동하며 다음과 같은 이점이 있습니다.

  • 개별 API인 주석 API를 사용할 필요가 없습니다.
  • 주석 저장소 및 주석 레코드를 만들고 관리할 필요가 없습니다.
  • FHIR 표준 및 Cloud Healthcare API, FHIR API를 계속 사용할 수 있습니다.
  • 탐색 및 분석을 위해 FHIR 리소스를 BigQuery로 내보낼 수 있습니다. 생성된 데이터는 LOSSLESS 또는 ANALYTICS_V2 SchemaType과만 호환됩니다.
  • 익명화 작업 메타데이터에 대한 추가 정보가 제공됩니다.

요구사항

익명화 작업 메타데이터가 저장된 FHIR 저장소는 다음 요구사항을 충족해야 합니다.

  • 이미 있어야 합니다.
  • 버전 R4 FHIR 저장소여야 합니다.
  • enableUpdateCreatetrue로 설정되어 있어야 합니다.

작업 메타데이터 FHIR 저장소의 출처 리소스

DICOM 익명화 작업을 실행하면 다음 출처 리소스가 작업 메타데이터 FHIR 저장소에 기록됩니다.

  • 장기 실행 작업의 이름, 작업이 수행된 시간, 사용된 구성 등의 익명화 작업을 요약하는 출처 리소스입니다. 이 출처 리소스에 있는 필드 목록은 출처 리소스의 익명화 작업 메타데이터를 참조하세요.

  • 익명화된 각 DICOM 인스턴스의 출처 리소스입니다. 이 출처 리소스의 필드 목록은 출처 리소스의 DICOM 익명화 메타데이터를 참조하세요.

    • 리소스에는 DICOM 태그 또는 DICOM 이미지 일부와 같이 익명화된 대상과 정보가 수정, 변환, 무시되었는지 여부와 같은 수행된 작업에 대한 정보가 포함됩니다.
    • 리소스에는 보호 건강 정보(PHI) 범위에 있는 광학 문자 인식(OCR)으로 처리된 익명화된 데이터가 포함될 수 있습니다.

      익명화된 텍스트 또는 quote는 정보 유형 또는 infoType과 함께 그리고 정보를 찾을 가능성 또는 confidence와 함께 제공됩니다. 예를 들어 번인된 텍스트 John Doe가 포함된 DICOM 이미지를 익명화하면 출처 리소스에 John Doe로 설정된 quote, PERSON_NAME으로 설정된 infoType, 0~1 사이의 confidence 값이 포함됩니다.

      DICOM 익명화 메타데이터는 REDACT_SENSITIVE_TEXT 또는 REDACT_SENSITIVE_TEXT_CLEAN_DESCRIPTORS로 설정된 ImageConfig.textRedactionModedicomStores.deidentify 메서드를 호출한 경우에만 생성됩니다.

출처 리소스의 익명화 작업 메타데이터

다음 표에서는 익명화 작업에서 메타데이터에 대한 설명과 출처 리소스에서 찾을 수 있는 메타데이터의 해당 필드를 보여줍니다. '출처 리소스 필드' 셀에는 데모 목적의 샘플 값이 포함되어 있습니다.

메타데이터 설명 출처 리소스 필드
출처 리소스 ID Provenance.id
익명화 작업이 시작된 시간 Provenance.occurredDateTime
출처 리소스 만들기 타임스탬프 Provenance.recorded
익명화 장기 실행 작업의 이름
    Provenance.agent.who: {
      "identifier": {
        "system": "https://g.co/healthcare/operation"
        "value": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID"
      }
    }
    
소스 DICOM 저장소
    Provenance.entity.role: "SOURCE"
    Provenance.entity.what.identifier.value: "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/SOURCE_DICOM_STORE_ID"
    
대상 DICOM 저장소 Provenance.target.type.value
사용된 DeidentifyConfig
    Provenance.entity.extension: [{
      url: 'https://g.co/deidentify-config',
      valueString: 'DEIDENTIFY_CONFIG' // Can be either a JSON configuration or a path to a Cloud Storage URI and timestamp if the configuration was provided using Cloud Storage
    }]
    

출처 리소스의 DICOM 익명화 메타데이터

다음 표에서는 DICOM 인스턴스에서 익명화된 메타데이터와 출처 리소스에 있는 메타데이터의 해당 필드에 대한 설명을 보여줍니다. '출처 리소스 필드' 셀에는 데모 목적의 샘플 값이 포함되어 있습니다.

메타데이터 설명 출처 리소스 필드
익명화 작업 리소스 링크 Provenance.agent.who: {reference: "Provenance/PROVENANCE_RESOURCE_ID"}
출처 리소스 만들기 타임스탬프 Provenance.recorded
소스 DICOM 인스턴스 REST 경로
    Provenance.entity.role: SOURCE
    Provenance.entity.what.identifier.value
    
대상 DICOM 인스턴스 REST 경로 Provenance.target.type.value
DICOM 이미지 크기
    Provenance.entity.extension: [
      {
        url: 'https://g.co/WIDTH',
        valueDecimal: WIDTH
      },
        url: 'https://g.co/HEIGHT',
        valueDecimal: HEIGHT
      }
    ]
    
구조화된 크기
    Provenance.entity.extension: [{
      url: 'https://g.co/DICOM_STRUCTURED_SIZE',
      valueDecimal: VALUE,
    }]
    
DICOM 이미지 주석
    Provenance.entity.extension: [{
      url: 'https://g.co/DICOM_IMAGES',
      extension: [
        { FRAME_0
        },
        { FRAME_1
        },
        ...
      ]
    }]
    
DICOM 프레임 주석
    Provenance.entity.extension['https://g.co/dicom-images'].extension: [
      {
        url: 'frame-index',
        valueDecimal: 0,
        extension: [
          {
            url: 'left',
            valueDecimal: LEFT_VALUE
          },
          {
            url: 'right',
            valueDecimal: RIGHT_VALUE
          },
          {
            url: 'top',
            valueDecimal: TOP_VALUE
          },
          {
            url: 'bottom',
            valueDecimal: BOTTOM_VALUE
          },
          {
            url: 'relative-left',
            valueDecimal: RELATIVE_LEFT_VALUE / WIDTH
          },
          {
            url: 'relative-right',
            valueDecimal: RELATIVE_RIGHT_VALUE / HEIGHT
          },
          {
            url: 'relative-top',
            valueDecimal: RELATIVE_TOP_VALUE / WIDTH
          },
          {
            url: 'relative-bottom',
            valueDecimal: RELATIVE_BOTTOM / HEIGHT
          }
        ]
      }
    ]
    
DICOM 프레임 주석
    // Only available if the text redaction mode is REDACT_SENSITIVE_TEXT or
    // REDACT_SENSITIVE_TEXT_CLEAN_DESCRIPTORS
    Provenance.entity.extension: [
       {
        "url": "quote", // The PHI text de-identified
        "valueString": "John Doe"
       },
      {
        "url": "infoType", // The type of the de-identified text
        "valueString": "PERSON_NAME"
       },
      {
        "url": "confidence", // The likelihood of finding this quote and its infoType
        "valueDecimal": 0.7
       }
    ]
    
모든 DICOM 태그 주석
    Provenance.entity.extension: [{
      url: 'https://g.co/dicom-tags',
      extension: [
        { // tag (0002,0000)
        },
        { // tag (0002,0001)
        },
        ...
      ]
    }]
    
DICOM 개별 태그 주석
    Provenance.entity.extension['https://g.co/dicom-tags'].extension: [
      {
        url: 'tag-id',
        valueString: '00080012',
        extension: [
          {
            url: 'byte-start',
            valueDecimal: 10
          },
          {
            url: 'byte-end',
            valueDecimal: 18
          },
          {
            url: 'finding-infotype',
            valueString: 'PERSON_NAME'
          },
          {
            url: 'text-original',
            valueString: 'John Doe'
          },
          {
            url: 'text-replaced',
            valueString: 'PERSON_NAME'
          },
          {
            url: 'deidentify-action',
            valueString: 'REMOVED'
            // Possible values are "REMOVED", "DELETED", "REGENERATED UID",
            // "RESET", "CLEANED", and "RECURSED"
          },
          {
            url: 'deidentify-reason',
            valueString: 'Matched VALUE'
            // Possible values include "ID", "VR", or "Expression",
            // for example "Matched ID: DICOM_TAG_ID"
          }
        ]
      }
    ]
    

예시

시작하기 전에

다음 예시를 실행하기 전 작업 메타데이터 FHIR 저장소에서 roles/healthcare.fhirResourceEditor 역할이 있는지 확인합니다. 작업 메타데이터 FHIR 저장소에 기록하려면 이 역할이 필요합니다.

DICOM 데이터 익명화, FHIR 저장소에 기록, 출처 리소스 검색

이 예시를 실행하기 전에 다음 단계를 완료합니다.

  1. 익명화할 DICOM 인스턴스를 최소한 하나 이상 사용하여 DICOM 저장소가 포함된 소스 데이터 세트를 만듭니다.
  2. 빈 DICOM 저장소와 빈 FHIR 저장소가 포함된 대상 데이터 세트를 만듭니다. FHIR 저장소에서 요구사항을 충족해야 합니다.

이 예시는 태그 익명화 및 번인 텍스트 수정 결합으로 확장됩니다. 이 예시에서 익명화는 단일 DICOM 저장소에서 수행되고 익명화된 데이터가 새 DICOM 저장소에 기록됩니다. 작업 메타데이터 FHIR 저장소는 새 DICOM 저장소와 동일한 데이터 세트에 있습니다.

이 예시에서는 2개의 DICOM 인스턴스가 사용됩니다. 인스턴스가 제공되지 않으므로, 샘플 응답은 익명화된 데이터와 정확하게 일치하지 않습니다.

  1. DICOM 데이터를 익명화합니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 소스 DICOM 저장소가 포함된 데이터 세트의 위치입니다.
    • SOURCE_DATASET_ID: 소스 DICOM 저장소의 상위 데이터 세트입니다.
    • SOURCE_DICOM_STORE_ID: 익명화하려는 데이터가 포함된 DICOM 저장소의 ID입니다.
    • DESTINATION_DATASET_ID: 메타데이터 작업 FHIR 저장소가 포함된 기존 데이터 세트이고, 익명화된 DICOM 저장소가 생성되는 위치입니다.
    • DESTINATION_DICOM_STORE_ID: 소스 DICOM 저장소에서 익명화된 데이터가 기록되는 DICOM 저장소입니다.
    • OPERATION_METADATA_FHIR_STORE_ID: 익명화 작업 메타데이터가 기록되는 FHIR 저장소입니다.

    JSON 요청 본문:

    {
      "destinationStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/dicomStores/DESTINATION_DICOM_STORE_ID",
      "config": {
        "dicom": {
          "filterProfile": "DEIDENTIFY_TAG_CONTENTS"
        },
        "image": {
          "textRedactionMode": "REDACT_ALL_TEXT"
        },
        "operationMetadata": {
          "fhirOutput": {
            "fhirStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE"
          }
        }
      }
    }
    

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    cat > request.json << 'EOF'
    {
      "destinationStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/dicomStores/DESTINATION_DICOM_STORE_ID",
      "config": {
        "dicom": {
          "filterProfile": "DEIDENTIFY_TAG_CONTENTS"
        },
        "image": {
          "textRedactionMode": "REDACT_ALL_TEXT"
        },
        "operationMetadata": {
          "fhirOutput": {
            "fhirStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE"
          }
        }
      }
    }
    EOF

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json; charset=utf-8" \
    -d @request.json \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/dicomStores/SOURCE_DICOM_STORE_ID:deidentify"

    PowerShell

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    @'
    {
      "destinationStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/dicomStores/DESTINATION_DICOM_STORE_ID",
      "config": {
        "dicom": {
          "filterProfile": "DEIDENTIFY_TAG_CONTENTS"
        },
        "image": {
          "textRedactionMode": "REDACT_ALL_TEXT"
        },
        "operationMetadata": {
          "fhirOutput": {
            "fhirStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE"
          }
        }
      }
    }
    '@  | Out-File -FilePath request.json -Encoding utf8

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method POST `
    -Headers $headers `
    -ContentType: "application/json; charset=utf-8" `
    -InFile request.json `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/dicomStores/SOURCE_DICOM_STORE_ID:deidentify" | Select-Object -Expand Content
    응답은 다음과 같습니다. 응답에는 장기 실행 작업의 식별자가 포함됩니다. 메서드 호출을 완료하는 데 상당한 시간이 걸릴 수 있는 장기 실행 작업은 반환됩니다. OPERATION_ID의 값을 확인합니다. 다음 단계에서 이 값이 필요합니다.

  2. 작업 상태를 가져옵니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 데이터 세트의 위치입니다.
    • SOURCE_DATASET_ID: 익명화 작업이 실행되는 데이터 세트입니다.
    • OPERATION_ID: 익명화 작업의 ID입니다.

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    다음 명령어를 실행합니다.

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID"

    PowerShell

    다음 명령어를 실행합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method GET `
    -Headers $headers `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content

    API 탐색기

    메서드 참조 페이지를 엽니다. 페이지 오른쪽에 API 탐색기 패널이 열립니다. 이 도구를 사용하여 요청을 보낼 수 있습니다. 모든 필수 필드를 입력하고 실행을 클릭합니다.

    다음과 비슷한 JSON 응답이 표시됩니다.

  3. DICOM 데이터를 성공적으로 익명화하고 작업 메타데이터를 FHIR 저장소에 기록한 후 FHIR 저장소에서 출처 리소스를 볼 수 있습니다.

    출처 리소스를 보려면 fhir.search 메서드를 사용합니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 상위 데이터 세트의 위치
    • DATASET_ID: FHIR 저장소의 상위 데이터 세트
    • OPERATION_METADATA_FHIR_STORE_ID: 메타데이터가 포함된 FHIR 저장소의 ID입니다.

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    다음 명령어를 실행합니다.

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance"

    PowerShell

    다음 명령어를 실행합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method GET `
    -Headers $headers `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance" | Select-Object -Expand Content
    다음 응답은 2개의 DICOM 인스턴스를 익명화한 결과입니다. 익명화 작업에 따라 다음 3개의 출처 리소스가 생성되었습니다.
    • 2개의 각 DICOM 인스턴스에 대한 하나의 출처 리소스
    • 익명화 작업을 위한 하나의 출처 리소스

샘플 데이터 저장, 상대적 x 좌표 커스텀 FHIR 검색 만들기, 쿼리

이 예시를 실행하기 전에 빈 DICOM 저장소와 빈 FHIR 저장소가 포함된 대상 데이터 세트를 만듭니다. FHIR 저장소에서 요구사항을 충족해야 합니다.

다음 예시는 DICOM 데이터 익명화, FHIR 저장소에 기록, 출처 리소스 검색에서 만든 3개의 출처 리소스를 저장한 후 커스텀 검색을 만들 수 있습니다. 커스텀 검색은 익명화된 DICOM 인스턴스 중 하나에서 relative-x-coordinate-bottom-left를 쿼리합니다.

  1. 출처 리소스를 저장합니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 상위 데이터 세트의 위치
    • DATASET_ID: FHIR 저장소의 상위 데이터 세트
    • OPERATION_METADATA_FHIR_STORE_ID: 메타데이터가 포함된 FHIR 저장소의 ID입니다.

    JSON 요청 본문:

    {
      "resourceType": "Bundle",
      "type": "transaction",
      "entry": [
        {
          "request": {"method": "PUT", "url": "Provenance/operation-123"},
          "resource": {
            "resourceType": "Provenance",
            "id": "operation-123",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store"
                }
              }
            ],
            "occurredDateTime": "2010-11-08T08:30:00-04:00",
            "recorded": "2010-11-08T08:30:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "system": "https://g.co/healthcare/operation",
                    "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store"
                  }
                }
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0,
                        "extension": [
                          {
                            "url": "bottom",
                            "valueDecimal": 100
                          },
                          {
                            "url": "left",
                            "valueDecimal": 100
                          },
                          {
                            "url": "right",
                            "valueDecimal": 200
                          },
                          {
                            "url": "top",
                            "valueDecimal": 200
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "bottom",
                            "valueDecimal": 900
                          },
                          {
                            "url": "left",
                            "valueDecimal": 900
                          },
                          {
                            "url": "right",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "top",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.5
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.5
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00100021",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 10
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 18
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "text-original",
                            "valueString": "John Doe"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "byte-start",
                            "valueDecimal": 25
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 35
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "DATE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1900-12-31"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "DATE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00102150",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "LOCATION"
                          },
                          {
                            "url": "text-original",
                            "valueString": "US"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "LOCATION"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:25-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0
                      },
                      {
                        "url": "frame-index",
                        "valueDecimal": 1,
                        "extension": [
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00101010",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "AGE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "30"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "AGE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00100020",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 4
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "GENERIC_ID"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1234"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "GENERIC_ID"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    cat > request.json << 'EOF'
    {
      "resourceType": "Bundle",
      "type": "transaction",
      "entry": [
        {
          "request": {"method": "PUT", "url": "Provenance/operation-123"},
          "resource": {
            "resourceType": "Provenance",
            "id": "operation-123",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store"
                }
              }
            ],
            "occurredDateTime": "2010-11-08T08:30:00-04:00",
            "recorded": "2010-11-08T08:30:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "system": "https://g.co/healthcare/operation",
                    "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store"
                  }
                }
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0,
                        "extension": [
                          {
                            "url": "bottom",
                            "valueDecimal": 100
                          },
                          {
                            "url": "left",
                            "valueDecimal": 100
                          },
                          {
                            "url": "right",
                            "valueDecimal": 200
                          },
                          {
                            "url": "top",
                            "valueDecimal": 200
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "bottom",
                            "valueDecimal": 900
                          },
                          {
                            "url": "left",
                            "valueDecimal": 900
                          },
                          {
                            "url": "right",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "top",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.5
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.5
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00100021",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 10
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 18
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "text-original",
                            "valueString": "John Doe"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "byte-start",
                            "valueDecimal": 25
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 35
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "DATE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1900-12-31"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "DATE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00102150",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "LOCATION"
                          },
                          {
                            "url": "text-original",
                            "valueString": "US"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "LOCATION"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:25-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0
                      },
                      {
                        "url": "frame-index",
                        "valueDecimal": 1,
                        "extension": [
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00101010",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "AGE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "30"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "AGE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00100020",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 4
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "GENERIC_ID"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1234"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "GENERIC_ID"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    EOF

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/fhir+json" \
    -d @request.json \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir"

    PowerShell

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    @'
    {
      "resourceType": "Bundle",
      "type": "transaction",
      "entry": [
        {
          "request": {"method": "PUT", "url": "Provenance/operation-123"},
          "resource": {
            "resourceType": "Provenance",
            "id": "operation-123",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store"
                }
              }
            ],
            "occurredDateTime": "2010-11-08T08:30:00-04:00",
            "recorded": "2010-11-08T08:30:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "system": "https://g.co/healthcare/operation",
                    "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store"
                  }
                }
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0,
                        "extension": [
                          {
                            "url": "bottom",
                            "valueDecimal": 100
                          },
                          {
                            "url": "left",
                            "valueDecimal": 100
                          },
                          {
                            "url": "right",
                            "valueDecimal": 200
                          },
                          {
                            "url": "top",
                            "valueDecimal": 200
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "bottom",
                            "valueDecimal": 900
                          },
                          {
                            "url": "left",
                            "valueDecimal": 900
                          },
                          {
                            "url": "right",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "top",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.5
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.5
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00100021",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 10
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 18
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "text-original",
                            "valueString": "John Doe"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "byte-start",
                            "valueDecimal": 25
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 35
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "DATE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1900-12-31"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "DATE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00102150",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "LOCATION"
                          },
                          {
                            "url": "text-original",
                            "valueString": "US"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "LOCATION"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:25-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0
                      },
                      {
                        "url": "frame-index",
                        "valueDecimal": 1,
                        "extension": [
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00101010",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "AGE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "30"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "AGE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00100020",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 4
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "GENERIC_ID"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1234"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "GENERIC_ID"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    '@  | Out-File -FilePath request.json -Encoding utf8

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method POST `
    -Headers $headers `
    -ContentType: "application/fhir+json" `
    -InFile request.json `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir" | Select-Object -Expand Content

    다음과 비슷한 JSON 응답이 표시됩니다.

  2. DICOM 이미지의 상대적 x 좌표에 SearchParameter 리소스를 만듭니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 상위 데이터 세트의 위치
    • DATASET_ID: FHIR 저장소의 상위 데이터 세트
    • OPERATION_METADATA_FHIR_STORE_ID: 메타데이터가 포함된 FHIR 저장소의 ID입니다.

    JSON 요청 본문:

    {
      "resourceType": "SearchParameter",
      "url": "relative-x-coordinate-bottom-left",
      "base": ["Provenance"],
      "code": "relative-x-coordinate-bottom-left",
      "name": "relative x-coordinate of the bottom left corner of the bounding box",
      "type": "number",
      "expression": "Provenance.entity.extension('https://g.co/dicom-images').extension('frame-index').extension('relative-bottom').value.as(Decimal)",
      "status": "active",
      "description": "A search on bottom left relative x-coordinate of annotations generated from de-identification of a DICOM file"
    }
    

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    cat > request.json << 'EOF'
    {
      "resourceType": "SearchParameter",
      "url": "relative-x-coordinate-bottom-left",
      "base": ["Provenance"],
      "code": "relative-x-coordinate-bottom-left",
      "name": "relative x-coordinate of the bottom left corner of the bounding box",
      "type": "number",
      "expression": "Provenance.entity.extension('https://g.co/dicom-images').extension('frame-index').extension('relative-bottom').value.as(Decimal)",
      "status": "active",
      "description": "A search on bottom left relative x-coordinate of annotations generated from de-identification of a DICOM file"
    }
    EOF

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/fhir+json" \
    -d @request.json \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/SearchParameter"

    PowerShell

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    @'
    {
      "resourceType": "SearchParameter",
      "url": "relative-x-coordinate-bottom-left",
      "base": ["Provenance"],
      "code": "relative-x-coordinate-bottom-left",
      "name": "relative x-coordinate of the bottom left corner of the bounding box",
      "type": "number",
      "expression": "Provenance.entity.extension('https://g.co/dicom-images').extension('frame-index').extension('relative-bottom').value.as(Decimal)",
      "status": "active",
      "description": "A search on bottom left relative x-coordinate of annotations generated from de-identification of a DICOM file"
    }
    '@  | Out-File -FilePath request.json -Encoding utf8

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method POST `
    -Headers $headers `
    -ContentType: "application/fhir+json" `
    -InFile request.json `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/SearchParameter" | Select-Object -Expand Content

    다음과 비슷한 JSON 응답이 표시됩니다.

  3. FHIR 저장소에서 커스텀 SearchParameter 리소스를 사용 설정합니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 상위 데이터 세트의 위치
    • DATASET_ID: FHIR 저장소의 상위 데이터 세트
    • OPERATION_METADATA_FHIR_STORE_ID: 메타데이터가 포함된 FHIR 저장소의 ID입니다.

    JSON 요청 본문:

    {
      "canonicalUrls": [
        "relative-x-coordinate-bottom-left"
      ]
    }
    

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    cat > request.json << 'EOF'
    {
      "canonicalUrls": [
        "relative-x-coordinate-bottom-left"
      ]
    }
    EOF

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/fhir+json" \
    -d @request.json \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID:configureSearch"

    PowerShell

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    @'
    {
      "canonicalUrls": [
        "relative-x-coordinate-bottom-left"
      ]
    }
    '@  | Out-File -FilePath request.json -Encoding utf8

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method POST `
    -Headers $headers `
    -ContentType: "application/fhir+json" `
    -InFile request.json `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID:configureSearch" | Select-Object -Expand Content
    응답은 다음과 같습니다. 응답에는 장기 실행 작업의 식별자가 포함됩니다. 메서드 호출을 완료하는 데 상당한 시간이 걸릴 수 있는 장기 실행 작업은 반환됩니다. OPERATION_ID의 값을 확인합니다. 다음 단계에서 이 값이 필요합니다.

  4. 작업 상태를 가져옵니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 데이터 세트의 위치입니다.
    • DATASET_ID: 커스텀 검색 작업이 실행되는 위치의 데이터 세트입니다.
    • OPERATION_ID: 커스텀 검색 작업의 ID입니다.

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    다음 명령어를 실행합니다.

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID"

    PowerShell

    다음 명령어를 실행합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method GET `
    -Headers $headers `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content

    API 탐색기

    메서드 참조 페이지를 엽니다. 페이지 오른쪽에 API 탐색기 패널이 열립니다. 이 도구를 사용하여 요청을 보낼 수 있습니다. 모든 필수 필드를 입력하고 실행을 클릭합니다.

    다음과 비슷한 JSON 응답이 표시됩니다.

  5. 상대적 x 좌표 검색 매개변수를 사용하여 출처 리소스를 쿼리합니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 상위 데이터 세트의 위치
    • DATASET_ID: FHIR 저장소의 상위 데이터 세트
    • OPERATION_METADATA_FHIR_STORE_ID: 메타데이터가 포함된 FHIR 저장소의 ID입니다.

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl


    다음 샘플에서는 relative-x-coordinate-bottom-left=le0.05 쿼리를 사용하여 이미지의 5% 에지 내에서 x 좌표를 검색합니다.

    다음 명령어를 실행합니다.

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance?relative-x-coordinate-bottom-left=le0.05"

    PowerShell


    다음 샘플에서는 relative-x-coordinate-bottom-left=le0.05 쿼리를 사용하여 이미지의 5% 에지 내에서 x 좌표를 검색합니다.

    다음 명령어를 실행합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method GET `
    -Headers $headers `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance?relative-x-coordinate-bottom-left=le0.05" | Select-Object -Expand Content
    응답에는 검색어를 충족하는 하나의 DICOM 인스턴스가 반환된 것으로 표시됩니다.
    {
      "entry": [
        {
          "fullUrl": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/90062087-8ac2-499c-b952-a04999578bd0",
          "resource": {
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "extension": [
                  {
                    "extension": [
                      {
                        "extension": [
                          {
                            "url": "bottom",
                            "valueDecimal": 100
                          },
                          {
                            "url": "left",
                            "valueDecimal": 100
                          },
                          {
                            "url": "right",
                            "valueDecimal": 200
                          },
                          {
                            "url": "top",
                            "valueDecimal": 200
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "bottom",
                            "valueDecimal": 900
                          },
                          {
                            "url": "left",
                            "valueDecimal": 900
                          },
                          {
                            "url": "right",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "top",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.5
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.5
                          }
                        ],
                        "url": "frame-index",
                        "valueDecimal": 0
                      }
                    ],
                    "url": "https://g.co/dicom-images"
                  },
                  {
                    "extension": [
                      {
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 10
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 18
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "text-original",
                            "valueString": "John Doe"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "byte-start",
                            "valueDecimal": 25
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 35
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "DATE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1900-12-31"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "DATE"
                          }
                        ],
                        "url": "tag-id",
                        "valueString": "00100021"
                      },
                      {
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "LOCATION"
                          },
                          {
                            "url": "text-original",
                            "valueString": "US"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "LOCATION"
                          }
                        ],
                        "url": "tag-id",
                        "valueString": "00102150"
                      }
                    ],
                    "url": "https://g.co/dicom-tags"
                  }
                ],
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                  }
                }
              }
            ],
            "id": "90062087-8ac2-499c-b952-a04999578bd0",
            "meta": {
              "lastUpdated": "LAST_UPDATED",
              "versionId": "MTY0NjY4NDg4Nzk3MDM2MTAwMA"
            },
            "recorded": "2010-11-08T08:39:24-04:00",
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                }
              }
            ]
          },
          "search": {
            "mode": "match"
          }
        }
      ],
      "link": [
        {
          "relation": "search",
          "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?relative-x-coordinate-bottom-left=le0.05"
        },
        {
          "relation": "first",
          "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?relative-x-coordinate-bottom-left=le0.05"
        },
        {
          "relation": "self",
          "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?relative-x-coordinate-bottom-left=le0.05"
        }
      ],
      "resourceType": "Bundle",
      "total": 1,
      "type": "searchset"
    }
    

샘플 데이터 저장, 소스 DICOM 커스텀 FHIR 검색 만들기, 쿼리

이 예시를 실행하기 전에 빈 DICOM 저장소와 빈 FHIR 저장소가 포함된 대상 데이터 세트를 만듭니다. FHIR 저장소에서 요구사항을 충족해야 합니다.

다음 예시는 DICOM 데이터 익명화, FHIR 저장소에 기록, 출처 리소스 검색에서 만든 3개의 출처 리소스를 저장한 후 커스텀 검색을 만들 수 있습니다. 커스텀 검색이 2개의 소스 DICOM 이미지 중 하나에 대해 정보를 쿼리합니다.

  1. 출처 리소스를 저장합니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 상위 데이터 세트의 위치
    • DATASET_ID: FHIR 저장소의 상위 데이터 세트
    • OPERATION_METADATA_FHIR_STORE_ID: 메타데이터가 포함된 FHIR 저장소의 ID입니다.

    JSON 요청 본문:

    {
      "resourceType": "Bundle",
      "type": "transaction",
      "entry": [
        {
          "request": {"method": "PUT", "url": "Provenance/operation-123"},
          "resource": {
            "resourceType": "Provenance",
            "id": "operation-123",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store"
                }
              }
            ],
            "occurredDateTime": "2010-11-08T08:30:00-04:00",
            "recorded": "2010-11-08T08:30:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "system": "https://g.co/healthcare/operation",
                    "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store"
                  }
                }
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0,
                        "extension": [
                          {
                            "url": "bottom",
                            "valueDecimal": 100
                          },
                          {
                            "url": "left",
                            "valueDecimal": 100
                          },
                          {
                            "url": "right",
                            "valueDecimal": 200
                          },
                          {
                            "url": "top",
                            "valueDecimal": 200
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "bottom",
                            "valueDecimal": 900
                          },
                          {
                            "url": "left",
                            "valueDecimal": 900
                          },
                          {
                            "url": "right",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "top",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.5
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.5
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00100021",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 10
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 18
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "text-original",
                            "valueString": "John Doe"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "byte-start",
                            "valueDecimal": 25
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 35
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "DATE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1900-12-31"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "DATE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00102150",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "LOCATION"
                          },
                          {
                            "url": "text-original",
                            "valueString": "US"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "LOCATION"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:25-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0
                      },
                      {
                        "url": "frame-index",
                        "valueDecimal": 1,
                        "extension": [
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00101010",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "AGE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "30"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "AGE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00100020",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 4
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "GENERIC_ID"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1234"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "GENERIC_ID"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    cat > request.json << 'EOF'
    {
      "resourceType": "Bundle",
      "type": "transaction",
      "entry": [
        {
          "request": {"method": "PUT", "url": "Provenance/operation-123"},
          "resource": {
            "resourceType": "Provenance",
            "id": "operation-123",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store"
                }
              }
            ],
            "occurredDateTime": "2010-11-08T08:30:00-04:00",
            "recorded": "2010-11-08T08:30:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "system": "https://g.co/healthcare/operation",
                    "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store"
                  }
                }
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0,
                        "extension": [
                          {
                            "url": "bottom",
                            "valueDecimal": 100
                          },
                          {
                            "url": "left",
                            "valueDecimal": 100
                          },
                          {
                            "url": "right",
                            "valueDecimal": 200
                          },
                          {
                            "url": "top",
                            "valueDecimal": 200
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "bottom",
                            "valueDecimal": 900
                          },
                          {
                            "url": "left",
                            "valueDecimal": 900
                          },
                          {
                            "url": "right",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "top",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.5
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.5
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00100021",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 10
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 18
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "text-original",
                            "valueString": "John Doe"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "byte-start",
                            "valueDecimal": 25
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 35
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "DATE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1900-12-31"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "DATE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00102150",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "LOCATION"
                          },
                          {
                            "url": "text-original",
                            "valueString": "US"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "LOCATION"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:25-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0
                      },
                      {
                        "url": "frame-index",
                        "valueDecimal": 1,
                        "extension": [
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00101010",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "AGE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "30"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "AGE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00100020",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 4
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "GENERIC_ID"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1234"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "GENERIC_ID"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    EOF

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/fhir+json" \
    -d @request.json \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir"

    PowerShell

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    @'
    {
      "resourceType": "Bundle",
      "type": "transaction",
      "entry": [
        {
          "request": {"method": "PUT", "url": "Provenance/operation-123"},
          "resource": {
            "resourceType": "Provenance",
            "id": "operation-123",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store"
                }
              }
            ],
            "occurredDateTime": "2010-11-08T08:30:00-04:00",
            "recorded": "2010-11-08T08:30:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "system": "https://g.co/healthcare/operation",
                    "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store"
                  }
                }
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:24-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0,
                        "extension": [
                          {
                            "url": "bottom",
                            "valueDecimal": 100
                          },
                          {
                            "url": "left",
                            "valueDecimal": 100
                          },
                          {
                            "url": "right",
                            "valueDecimal": 200
                          },
                          {
                            "url": "top",
                            "valueDecimal": 200
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.05
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.1
                          },
                          {
                            "url": "bottom",
                            "valueDecimal": 900
                          },
                          {
                            "url": "left",
                            "valueDecimal": 900
                          },
                          {
                            "url": "right",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "top",
                            "valueDecimal": 1000
                          },
                          {
                            "url": "relative-bottom",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-left",
                            "valueDecimal": 0.45
                          },
                          {
                            "url": "relative-right",
                            "valueDecimal": 0.5
                          },
                          {
                            "url": "relative-top",
                            "valueDecimal": 0.5
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00100021",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 10
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 18
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "text-original",
                            "valueString": "John Doe"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "PERSON_NAME"
                          },
                          {
                            "url": "byte-start",
                            "valueDecimal": 25
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 35
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "DATE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1900-12-31"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "DATE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00102150",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "LOCATION"
                          },
                          {
                            "url": "text-original",
                            "valueString": "US"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "LOCATION"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        },
        {
          "request": {"method": "POST", "url": "Provenance"},
          "resource": {
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                }
              }
            ],
            "recorded": "2010-11-08T08:39:25-04:00",
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                  }
                },
                "extension": [
                  {
                    "url": "https://g.co/dicom-images",
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0
                      },
                      {
                        "url": "frame-index",
                        "valueDecimal": 1,
                        "extension": [
                        ]
                      }
                    ]
                  },
                  {
                    "url": "https://g.co/dicom-tags",
                    "extension": [
                      {
                        "url": "tag-id",
                        "valueString": "00101010",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "AGE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "30"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "AGE"
                          }
                        ]
                      },
                      {
                        "url": "tag-id",
                        "valueString": "00100020",
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 4
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "GENERIC_ID"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1234"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "GENERIC_ID"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    '@  | Out-File -FilePath request.json -Encoding utf8

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method POST `
    -Headers $headers `
    -ContentType: "application/fhir+json" `
    -InFile request.json `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir" | Select-Object -Expand Content

    다음과 비슷한 JSON 응답이 표시됩니다.

  2. 소스 DICOM 이미지에 SearchParameter 리소스를 만듭니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 상위 데이터 세트의 위치
    • DATASET_ID: FHIR 저장소의 상위 데이터 세트
    • OPERATION_METADATA_FHIR_STORE_ID: 메타데이터가 포함된 FHIR 저장소의 ID입니다.

    JSON 요청 본문:

    {
      "resourceType": "SearchParameter",
      "url": "lookup-source-instance",
      "base": ["Provenance"],
      "code": "lookup-source-instance",
      "name": "look up the source DICOM instance",
      "type": "string",
      "expression": "Provenance.entity.what.identifier.value",
      "status": "active",
      "description": "A search on the source DICOM instance"
    }
    

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    cat > request.json << 'EOF'
    {
      "resourceType": "SearchParameter",
      "url": "lookup-source-instance",
      "base": ["Provenance"],
      "code": "lookup-source-instance",
      "name": "look up the source DICOM instance",
      "type": "string",
      "expression": "Provenance.entity.what.identifier.value",
      "status": "active",
      "description": "A search on the source DICOM instance"
    }
    EOF

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/fhir+json" \
    -d @request.json \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/SearchParameter"

    PowerShell

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    @'
    {
      "resourceType": "SearchParameter",
      "url": "lookup-source-instance",
      "base": ["Provenance"],
      "code": "lookup-source-instance",
      "name": "look up the source DICOM instance",
      "type": "string",
      "expression": "Provenance.entity.what.identifier.value",
      "status": "active",
      "description": "A search on the source DICOM instance"
    }
    '@  | Out-File -FilePath request.json -Encoding utf8

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method POST `
    -Headers $headers `
    -ContentType: "application/fhir+json" `
    -InFile request.json `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/SearchParameter" | Select-Object -Expand Content

    다음과 비슷한 JSON 응답이 표시됩니다.

  3. FHIR 저장소에서 커스텀 SearchParameter 리소스를 사용 설정합니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 상위 데이터 세트의 위치
    • DATASET_ID: FHIR 저장소의 상위 데이터 세트
    • OPERATION_METADATA_FHIR_STORE_ID: 메타데이터가 포함된 FHIR 저장소의 ID입니다.

    JSON 요청 본문:

    {
      "canonicalUrls": [
        "lookup-source-instance"
      ]
    }
    

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    cat > request.json << 'EOF'
    {
      "canonicalUrls": [
        "lookup-source-instance"
      ]
    }
    EOF

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/fhir+json" \
    -d @request.json \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID:configureSearch"

    PowerShell

    요청 본문을 request.json 파일에 저장합니다. 터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.

    @'
    {
      "canonicalUrls": [
        "lookup-source-instance"
      ]
    }
    '@  | Out-File -FilePath request.json -Encoding utf8

    그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method POST `
    -Headers $headers `
    -ContentType: "application/fhir+json" `
    -InFile request.json `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID:configureSearch" | Select-Object -Expand Content
    응답은 다음과 같습니다. 응답에는 장기 실행 작업의 식별자가 포함됩니다. 메서드 호출을 완료하는 데 상당한 시간이 걸릴 수 있는 장기 실행 작업은 반환됩니다. OPERATION_ID의 값을 확인합니다. 다음 단계에서 이 값이 필요합니다.

  4. 작업 상태를 가져옵니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 데이터 세트의 위치입니다.
    • DATASET_ID: 커스텀 검색 작업이 실행되는 위치의 데이터 세트입니다.
    • OPERATION_ID: 커스텀 검색 작업의 ID입니다.

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl

    다음 명령어를 실행합니다.

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID"

    PowerShell

    다음 명령어를 실행합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method GET `
    -Headers $headers `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content

    API 탐색기

    메서드 참조 페이지를 엽니다. 페이지 오른쪽에 API 탐색기 패널이 열립니다. 이 도구를 사용하여 요청을 보낼 수 있습니다. 모든 필수 필드를 입력하고 실행을 클릭합니다.

    다음과 비슷한 JSON 응답이 표시됩니다.

  5. 소스 DICOM 이미지 검색 매개변수를 사용하여 출처 리소스를 쿼리합니다.

    요청 데이터를 사용하기 전에 다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • LOCATION: 상위 데이터 세트의 위치
    • DATASET_ID: FHIR 저장소의 상위 데이터 세트
    • OPERATION_METADATA_FHIR_STORE_ID: 메타데이터가 포함된 FHIR 저장소의 ID입니다.

    요청을 보내려면 다음 옵션 중 하나를 선택합니다.

    curl


    다음 샘플에서는 lookup-source-instance:contains=studies/1/series/2/instances/4 쿼리를 사용하여 해당 식별자에 studies/1/series/2/instances/4가 포함된 인스턴스에 대한 정보를 반환합니다.

    다음 명령어를 실행합니다.

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance?lookup-source-instance:contains=studies/1/series/2/instances/4"

    PowerShell


    다음 샘플에서는 lookup-source-instance:contains=studies/1/series/2/instances/4 쿼리를 사용하여 해당 식별자에 studies/1/series/2/instances/4가 포함된 인스턴스에 대한 정보를 반환합니다.

    다음 명령어를 실행합니다.

    $cred = gcloud auth print-access-token
    $headers = @{ "Authorization" = "Bearer $cred" }

    Invoke-WebRequest `
    -Method GET `
    -Headers $headers `
    -Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance?lookup-source-instance:contains=studies/1/series/2/instances/4" | Select-Object -Expand Content
    응답에는 검색어를 충족하는 하나의 DICOM 인스턴스가 반환된 것으로 표시됩니다.
    {
      "entry": [
        {
          "fullUrl": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/d82007a1-6481-4793-b17c-ae152051ee9f",
          "resource": {
            "agent": [
              {
                "who": {
                  "identifier": {
                    "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123"
                  }
                }
              }
            ],
            "entity": [
              {
                "extension": [
                  {
                    "extension": [
                      {
                        "url": "frame-index",
                        "valueDecimal": 0
                      },
                      {
                        "url": "frame-index",
                        "valueDecimal": 1
                      }
                    ],
                    "url": "https://g.co/dicom-images"
                  },
                  {
                    "extension": [
                      {
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 2
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "AGE"
                          },
                          {
                            "url": "text-original",
                            "valueString": "30"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "AGE"
                          }
                        ],
                        "url": "tag-id",
                        "valueString": "00101010"
                      },
                      {
                        "extension": [
                          {
                            "url": "byte-start",
                            "valueDecimal": 0
                          },
                          {
                            "url": "byte-end",
                            "valueDecimal": 4
                          },
                          {
                            "url": "finding-infotype",
                            "valueString": "GENERIC_ID"
                          },
                          {
                            "url": "text-original",
                            "valueString": "1234"
                          },
                          {
                            "url": "text-replaced",
                            "valueString": "GENERIC_ID"
                          }
                        ],
                        "url": "tag-id",
                        "valueString": "00100020"
                      }
                    ],
                    "url": "https://g.co/dicom-tags"
                  }
                ],
                "role": "source",
                "what": {
                  "identifier": {
                    "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                  }
                }
              }
            ],
            "id": "d82007a1-6481-4793-b17c-ae152051ee9f",
            "meta": {
              "lastUpdated": "2022-03-07T20:28:07.970361+00:00",
              "versionId": "MTY0NjY4NDg4Nzk3MDM2MTAwMA"
            },
            "recorded": "2010-11-08T08:39:25-04:00",
            "resourceType": "Provenance",
            "target": [
              {
                "identifier": {
                  "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4"
                }
              }
            ]
          },
          "search": {
            "mode": "match"
          }
        }
      ],
      "link": [
        {
          "relation": "search",
          "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?lookup-source-instance%3Acontains=studies%2F1%2Fseries%2F2%2Finstances%2F4"
        },
        {
          "relation": "first",
          "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?lookup-source-instance%3Acontains=studies%2F1%2Fseries%2F2%2Finstances%2F4"
        },
        {
          "relation": "self",
          "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?lookup-source-instance%3Acontains=studies%2F1%2Fseries%2F2%2Finstances%2F4"
        }
      ],
      "resourceType": "Bundle",
      "total": 1,
      "type": "searchset"
    }
    

작업 메타데이터 FHIR 저장소 내보내기 및 쿼리

다음 예시에서는 FHIR 저장소에서 익명화 작업 메타데이터를 BigQuery로 내보내고 OCR로 처리된 PHI 데이터에 대해 내보낸 데이터를 쿼리하는 방법을 보여줍니다. 생성된 데이터는 LOSSLESS 또는 ANALYTICS_V2 SchemaType과만 호환됩니다.

  1. FHIR 저장소의 메타데이터를 BigQuery 데이터 세트로 내보냅니다.

    선택한 BigQuery 데이터 세트에서 Provenance라는 테이블로 메타데이터를 내보냅니다.

  2. BigQuery 페이지로 이동합니다.

    BigQuery로 이동

  3. 탐색기 창에서 다음 단계를 완료합니다.

    1. Google Cloud 프로젝트를 선택합니다.
    2. DICOM 메타데이터를 내보낸 BigQuery 데이터 세트를 선택합니다.
    3. 출처 테이블을 선택합니다.
  4. 새 쿼리 작성을 클릭합니다.

  5. 다음 쿼리를 실행합니다.

    SELECT
      what.identifier.value AS Source,
      target[OFFSET(0)].identifier.value AS Destination,
      `left` AS `Left`,
      `right` AS `Right`,
      top AS Top,
      bottom AS Bottom,
      quote AS Quote,
      infoType AS InfoType,
      confidence AS Confidence
    FROM
      `PROJECT_ID.BIGQUERY_DATASET.Provenance`, UNNEST(entity), UNNEST(dicom_images), UNNEST(frame_index)
    LIMIT
      10
    

    다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트의 ID
    • BIGQUERY_DATASET: FHIR 저장소에서 메타데이터를 내보낸 BigQuery 데이터 세트입니다.
  6. 실행을 클릭합니다.

    쿼리 결과에는 익명화된 PHI 데이터의 메타데이터가 테이블 형식으로 표시됩니다. 대상 테이블을 지정하지 않으면 쿼리 작업은 출력을 임시(캐시) 테이블에 씁니다.

할당량

FHIR 저장소에 익명화 작업 메타데이터를 기록하면 작업 메타데이터가 기록된 프로젝트에서 fhir_write_ops 할당량이 소비됩니다. 각 DICOM 인스턴스에 대해 하나의 FHIR 리소스가 생성되므로, 익명화 작업의 처리량은 FHIR 할당량으로 허용되는 것보다 클 수 없습니다.

청구

작업 메타데이터 FHIR 저장소에서 생성된 각 출처 리소스는 fhir.update 호출에 따른 비용을 발생시킵니다. fhir.update에 대한 API 호출 수는 Total number of DICOM instances de-identified + 1과 같이 계산될 수 있습니다.

다음 단계