Halaman ini menjelaskan cara melakukan de-identifikasi data sensitif dalam resource FHIR menggunakan Cloud Healthcare API pada level berikut:
- Pada tingkat set data menggunakan
datasets.deidentify
- Di tingkat toko FHIR menggunakan
fhirStores.deidentify
Halaman ini juga menjelaskan cara menerapkan filter saat melakukan de-identifikasi data di tingkat penyimpanan FHIR.
Ringkasan de-identifikasi
De-identifikasi tingkat set data
Untuk melakukan de-identifikasi data FHIR di tingkat set data, panggil
operasi
datasets.deidentify
. Panggilan API
de-identifikasi memiliki komponen berikut:
- Set data sumber: Set data yang berisi penyimpanan FHIR dengan satu atau beberapa resource yang memiliki data sensitif.
- Set data tujuan: De-identifikasi tidak memengaruhi set data asli atau datanya. Sebagai gantinya, salinan data asli yang telah dide-identifikasi akan ditulis ke set data baru, yang disebut set data tujuan.
- Yang harus dide-identifikasi: Parameter konfigurasi yang menentukan cara memproses
set data. Anda dapat mengonfigurasi parameter ini dengan menentukannya dalam
FhirConfig
dan/atauTextConfig
di dalam objekDeidentifyConfig
dan meneruskannya dengan:- Menetapkan kolom
config
dari isi permintaan - Menyimpannya di Cloud Storage dalam format JSON dan menentukan lokasi file dalam bucket menggunakan kolom
gcsConfigUri
dari isi permintaan
- Menetapkan kolom
Sebagian besar sampel dalam panduan ini menunjukkan cara melakukan de-identifikasi data FHIR di tingkat set data.
De-identifikasi tingkat toko FHIR
Dengan melakukan de-identifikasi data FHIR di tingkat penyimpanan FHIR, Anda dapat memiliki kontrol lebih besar atas data FHIR mana yang dide-identifikasi.
Untuk melakukan de-identifikasi data FHIR di penyimpanan FHIR, panggil
metode
fhirStores.deidentify
. Panggilan API de-identifikasi
memiliki komponen berikut:
- Penyimpanan FHIR sumber: Penyimpanan FHIR yang berisi satu atau beberapa resource yang memiliki data sensitif.
- Penyimpanan FHIR tujuan: De-identifikasi tidak memengaruhi penyimpanan FHIR asli atau datanya. Sebagai gantinya, salinan data asli yang telah dide-identifikasi akan ditulis ke penyimpanan FHIR tujuan. Penyimpanan FHIR tujuan harus sudah ada.
- Yang harus dide-identifikasi: Parameter konfigurasi yang menentukan cara memproses
penyimpanan FHIR. Anda dapat mengonfigurasi parameter ini dengan menentukannya dalam
FhirConfig
dan/atauTextConfig
di dalam objekDeidentifyConfig
dan meneruskannya dengan:- Menetapkan kolom
config
dari isi permintaan - Menyimpannya di Cloud Storage dalam format JSON dan menentukan lokasi file dalam bucket menggunakan kolom
gcsConfigUri
dari isi permintaan
- Menetapkan kolom
Untuk contoh cara melakukan de-identifikasi data FHIR di tingkat penyimpanan FHIR, lihat Melakukan de-identifikasi data di tingkat penyimpanan FHIR.
Filter
Anda dapat melakukan de-identifikasi subset data dalam penyimpanan FHIR dengan menentukan daftar
ID resource FHIR dalam permintaan fhirStores.deidentify
. Sebagai contoh, lihat
Melakukan de-identifikasi subset penyimpanan FHIR.
Contoh resource FHIR yang digunakan dalam panduan ini
Contoh dalam panduan ini menggunakan resource Pasien
(DSTU2,
STU3,
dan R4)
di penyimpanan FHIR. Pasien memiliki properti yang ditunjukkan dalam contoh
berikut. Nilai id
dibuat oleh server. Jika Anda membuat resource Pasien
di penyimpanan FHIR Anda sendiri, nilai id
yang ditampilkan akan berbeda dengan
nilai yang ditampilkan dalam contoh Pasien.
{
"address": [
{
"city": "Anycity",
"district": "Anydistrict",
"line": [
"123 Main Street"
],
"period": {
"start": "1990-12-05"
},
"postalCode": "12345",
"state": "CA",
"text": "123 Main Street Anycity, Anydistrict, CA 12345",
"type": "both",
"use": "home"
}
],
"birthDate": "1980-12-05",
"gender": "female",
"id": "r77433dd-dkeuc-633743nfd-383nfdsjds732",
"name": [
{
"family": "Smith",
"given": [
"Darcy"
],
"use": "official"
}
],
"resourceType": "Patient",
"text": {
"status": "generated",
"div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1980-12-05</p><p><b>Gender</b>: Female</p></div>"
}
}
De-identifikasi data FHIR default
Anda dapat melakukan de-identifikasi data FHIR menggunakan metode "default" yang menyamarkan informasi kesehatan terlindungi (PHI) umum dalam resource di penyimpanan FHIR. Metode default menyamarkan informasi berikut:
- infoTypes ditentukan dalam infoTypes FHIR default
- Jalur yang ditentukan dalam profil de-identifikasi FHIR default
Contoh berikut menunjukkan cara melakukan de-identifikasi resource Pasien menggunakan metode default FHIR. Saat menggunakan metode default, gunakan FhirConfig
kosong di dalam objek DeidentifyConfig
.
curl
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ --data "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': {} } }" "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify"
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID"
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/fhir+json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732"
{ "address": [ { "city": "", "district": "", "line": [ "" ], "period": { "start": "1990-12-05" }, "postalCode": "", "state": "CA", "text": "", "type": "both", "use": "home" } ], "birthDate": "1981-02-24", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMA" }, "name": [ { "family": "", "given": [ "" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: [PERSON_NAME][PERSON_NAME][PERSON_NAME]</p><p><b>DateOfBirth</b>: 1981-02-24</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
PowerShell
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Post ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Body "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': {} } }" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify" | Select-Object -Expand Content
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Get ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_NUMBER", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-RestMethod ` -Method Get ` -Headers $headers ` -ContentType: "application/fhir+json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732" | ConvertTo-Json
{ "address": [ { "city": "", "district": "", "line": [ "" ], "period": { "start": "1990-12-05" }, "postalCode": "", "state": "CA", "text": "", "type": "both", "use": "home" } ], "birthDate": "1981-02-24", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMA" }, "name": [ { "family": "", "given": [ "" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: [PERSON_NAME][PERSON_NAME][PERSON_NAME]</p><p><b>DateOfBirth</b>: 1981-02-24</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
Anda dapat melihat bahwa nilai berikut diubah untuk melakukan de-identifikasi resource:
- Nilai baru diberikan di kolom
birthDate
menggunakan teknik pergeseran tanggal dengan diferensial 100 hari. - Nilai di
address.city
disamarkan. - Nilai di
address.district
disamarkan. - Nilai di
address.line
disamarkan. - Nilai di
address.postalCode
disamarkan. - Nilai di
address.text
disamarkan. - Nilai di
name.family
disamarkan. - Nilai di
name.given
disamarkan. - Teks bebas di kolom
text.div
diubah untuk mengganti nama pasien dengan infoType,[PERSON_NAME]
. Nilai tanggal lahir pasien ditransformasi dengan cara yang sama seperti ketika nilai di kolombirthDate
diubah.
Melakukan de-identifikasi jalur FHIR tertentu
Untuk menentukan jalur FHIR mana yang akan dide-identifikasi dan cara mengubahnya, konfigurasikan
fieldMetadataList
dalam objek FhirConfig
.
Di dalam fieldMetadataList
, tentukan daftar nama kolom atau
nama jenis resource FHIR yang dipisahkan dengan titik dalam daftar paths
. Selanjutnya,
tentukan nilai Action
untuk diterapkan ke semua yang tercantum di paths
. Lihat dokumentasi Action
untuk mengetahui kemungkinan nilai.
Untuk
mengetahui informasi cara menetapkan kolom paths
di Cloud Healthcare API, lihat paths
.
Format nilai dalam paths
didasarkan pada FHIRPath.
Profil de-identifikasi FHIR default
Secara default, jika Anda tidak menentukan jalur FHIR di fieldMetadataList
,
Cloud Healthcare API akan menerapkan profil de-identifikasi berikut
untuk memilih dan mengubah jalur FHIR. Profil yang diterapkan bergantung pada
versi FHIR yang Anda gunakan. Anda dapat meluaskan bagian berikut guna melihat
profil untuk versi yang sedang Anda gunakan. Anda juga dapat mendownload profil
(DSTU2,
STU3,
dan R4).
Menggunakan jalur untuk melakukan de-identifikasi resource
Contoh berikut menunjukkan cara mengonfigurasi de-identifikasi resource Pasien dengan kriteria berikut:
- Nilai
HumanName
(DSTU2, STU3, dan R4) untuk resource Pasien memilikiTRANSFORM
(penyuntingan) yang diterapkan secara otomatis. Untuk pasien sampel, nilai HumanName adalah"family": "Smith"
dan"given": [ "Darcy" ]
.
Tidak ada nilai lain yang diberikan dalam daftar paths
di dalam fieldMetadataList
,
sehingga data yang tersisa tidak berubah.
Contoh berikut menunjukkan cara melakukan de-identifikasi nilai HumanName resource Pasien:
curl
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ --data "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': [ { 'paths': [ 'Patient.HumanName' ], 'action': 'TRANSFORM' } ] } } }" "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify"
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID"
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/fhir+json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732"
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "CA", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1980-12-05", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "", "given": [ "" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1980-12-05</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
PowerShell
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Post ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Body "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': [ { 'paths': [ 'Patient.HumanName' ], 'action': 'TRANSFORM' } ] } } }" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify" | Select-Object -Expand Content
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Get ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_NUMBER", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-RestMethod ` -Method Get ` -Headers $headers ` -ContentType: "application/fhir+json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732" | ConvertTo-Json
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "CA", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1980-12-05", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "", "given": [ "" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1980-12-05</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
Anda dapat melihat bahwa nilai berikut diubah untuk melakukan de-identifikasi resource:
- Nilai di
name.family
disamarkan. - Nilai di
name.given
disamarkan.
Namun, tidak seperti sampel dalam de-identifikasi FHIR default,
yang mengubah PHI umum, address
, birthDate
, dan teks bebas pasien di
text.div
tidak diubah karena
tidak ditambahkan ke daftar paths
di fieldMetadataList
.
Menggunakan infoType dan transformasi primitif dengan resource FHIR
Cloud Healthcare API dapat menggunakan jenis informasi (infoTypes) untuk menentukan data yang dipindai saat melakukan de-identifikasi pada resource FHIR. infoType adalah jenis data sensitif, seperti nama pasien, alamat email, nomor telepon, nomor identifikasi, atau nomor kartu kredit. InfoType yang digunakan dalam operasi de-identifikasi Cloud Healthcare API mencakup yang ditemukan di Cloud Data Loss Prevention.
Transformasi primitif adalah aturan yang digunakan untuk mengubah nilai input.
InfoType FHIR default
InfoType default yang digunakan saat melakukan de-identifikasi data FHIR adalah:
AGE
CREDIT_CARD_NUMBER
DATE
EMAIL_ADDRESS
IP_ADDRESS
LOCATION
MAC_ADDRESS
PASSPORT
PERSON_NAME
PHONE_NUMBER
SWIFT_CODE
US_DRIVERS_LICENSE_NUMBER
US_SOCIAL_SECURITY_NUMBER
US_VEHICLE_IDENTIFICATION_NUMBER
US_INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER
Opsi transformasi dasar
Opsi transformasi dasar Cloud Healthcare API mencakup:
RedactConfig
: Menyamarkan nilai dengan menghapusnya.CharacterMaskConfig
: Menyamarkan string, baik sepenuhnya maupun sebagian, dengan mengganti karakter input dengan karakter tetap yang ditentukan.DateShiftConfig
: Menggeser tanggal menurut jumlah hari yang acak, dengan opsi agar konsisten untuk konteks yang sama.CryptoHashConfig
: Menggunakan SHA-256 untuk mengganti nilai input dengan representasi berenkode base64 dari string output yang di-hash yang dibuat menggunakan kunci enkripsi data tertentu.ReplaceWithInfoTypeConfig
: Mengganti nilai input dengan nama infoType-nya.
Menentukan konfigurasi di TextConfig
InfoType dan transformasi dasar ditentukan dalam
InfoTypeTransformation
,
yang merupakan objek di dalam
TextConfig
.
Tentukan infoTypes di array infoTypes
sebagai nilai yang dipisahkan koma.
Menentukan infoType bersifat opsional. Jika Anda tidak menentukan setidaknya satu infoType, transformasi akan berlaku untuk semua infoType bawaan dalam data.
Jika Anda menentukan infoTypes apa pun di InfoTypeTransformation
, tentukan
setidaknya satu transformasi primitif.
Bagian berikut menunjukkan cara menggunakan transformasi dasar yang tersedia
di InfoTypeTransformation
bersama dengan infoTypes untuk menyesuaikan cara de-identifikasi resource FHIR.
RedactConfig
Menentukan redactConfig
akan menyamarkan nilai tertentu dengan menghapusnya sepenuhnya. Pesan
redactConfig
tidak memiliki argumen; menentukannya akan mengaktifkan transformasi.
Contoh berikut menunjukkan cara menyamarkan tanggal lahir resource Pasien di kolom Patient.text.div
.
Tugas ini dilakukan dengan menetapkan infoType DATE
dengan
jalur Patient.text.div
dan transformasi redactConfig
.
Setelah mengirim
permintaan de-identifikasi ke Cloud Healthcare API, tanggal lahir dalam nilai Patient.text.div
akan disamarkan.
curl
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ --data "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': { 'paths': [ 'Patient.text.div' ], 'action': 'INSPECT_AND_TRANSFORM' } }, 'text': { 'transformations': [ { 'infoTypes': [ 'DATE' ], 'redactConfig': {} } ] } } }" "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify"
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID"
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/fhir+json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732"
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "CA", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1980-12-05", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "Smith", "given": [ "Darcy" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: </p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
PowerShell
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Post ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Body "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': { 'paths': [ 'Patient.text.div' ], 'action': 'INSPECT_AND_TRANSFORM' } }, 'text': { 'transformations': [ { 'infoTypes': [ 'DATE' ], 'redactConfig': {} } ] } } }" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify" | Select-Object -Expand Content
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Get ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_NUMBER", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-RestMethod ` -Method Get ` -Headers $headers ` -ContentType: "application/fhir+json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732" | ConvertTo-Json
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "CA", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1980-12-05", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "Smith", "given": [ "Darcy" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: </p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
Output menunjukkan bahwa nilai DateOfBirth
di text.div
telah
dihapus. Hal ini berbeda dengan contoh dalam Melakukan de-identifikasi jalur FHIR
tertentu,
dengan nilai DateOfBirth
dalam text.div
tidak dihapus menggunakan konfigurasi default.
CharacterMaskConfig
Menentukan characterMaskConfig
akan mengganti string yang
sesuai dengan infoType tertentu dengan karakter tetap yang ditentukan. Misalnya, alih-alih menyamarkan nama pasien atau mengubahnya menggunakan
hashing kriptografi, Anda dapat mengganti nama dengan serangkaian tanda bintang (*
).
Tentukan karakter tetap sebagai nilai ke kolom maskingCharacter
.
Contoh berikut menunjukkan cara memperluas contoh yang digunakan dalam
Melakukan de-identifikasi jalur FHIR
tertentu,
tetapi kini menyertakan penetapan infoType PERSON_NAME
dengan
transformasi characterMaskConfig
. Tidak ada karakter tetap yang disediakan, sehingga
masking secara default menggunakan tanda bintang. Setelah mengirim permintaan de-identifikasi
ke Cloud Healthcare API, nilai dalam
name.family
dan name.given
diganti dengan tanda bintang.
curl
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ --data "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': { 'paths': [ 'Patient.HumanName' ], 'action': 'TRANSFORM' } }, 'text': { 'transformations': [ { 'infoTypes': [ 'PERSON_NAME' ], 'characterMaskConfig': { 'maskingCharacter': '' } } ] } } }" "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify"
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID"
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/fhir+json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732"
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "CA", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1980-12-05", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "*****", "given": [ "*****" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1980-12-05</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
PowerShell
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Post ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Body "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': { 'paths': [ 'Patient.HumanName' ], 'action': 'TRANSFORM' } }, 'text': { 'transformations': [ { 'infoTypes': [ 'PERSON_NAME' ], 'characterMaskConfig': { 'maskingCharacter': '' } } ] } } }" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify" | Select-Object -Expand Content
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Get ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_NUMBER", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-RestMethod ` -Method Get ` -Headers $headers ` -ContentType: "application/fhir+json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732" | ConvertTo-Json
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "CA", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1980-12-05", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "*****", "given": [ "*****" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1980-12-05</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
Output menunjukkan bahwa nilai dalam name.family
dan name.given
telah
diganti dengan tanda bintang. Hal ini berbeda dengan contoh dalam Melakukan de-identifikasi jalur FHIR
tertentu,
dengan nilai di name.family
dan name.given
disamarkan.
DateShiftConfig
Cloud Healthcare API dapat mengubah tanggal dengan menggesernya dalam
rentang yang telah ditetapkan sebelumnya. Agar transformasi tanggal tetap konsisten di seluruh
proses de-identifikasi, gunakan DateShiftConfig
dengan salah satu hal berikut:
- (Tidak digunakan lagi): Kunci berenkode 64 basis AES 128/192/256-bit.
- (Direkomendasikan): Kunci gabungan Cloud Key Management Service (Cloud KMS). Baca artikel Melakukan de-identifikasi dan mengidentifikasi ulang teks sensitif untuk mengetahui contoh cara menggunakan kunci gabungan Cloud KMS.
Anda harus memberikan peran dengan izin cloudkms.cryptoKeyVersions.useToDecrypt
ke akun layanan Cloud Healthcare Service Agent untuk mendekripsi kunci yang digabungkan Cloud KMS. Sebaiknya gunakan peran Cloud KMS Bigtable Decrypter (roles/cloudkms.cryptoKeyDecrypter
). Saat Anda menggunakan Cloud KMS untuk operasi kriptografi, biaya akan berlaku. Lihat
Harga Cloud Key Management Service untuk mengetahui informasi selengkapnya.
Cloud Healthcare API menggunakan kunci ini untuk menghitung jumlah pergeseran tanggal, seperti tanggal lahir pasien, dalam diferensial 100 hari.
Jika Anda tidak memberikan kunci, Cloud Healthcare API akan menghasilkan kuncinya sendiri setiap kali operasi de-identifikasi berjalan pada nilai tanggal. Hal ini dapat menghasilkan output tanggal yang tidak konsisten di antara operasi.
Contoh berikut menunjukkan cara menetapkan infoType DATE
dengan transformasi DateShiftConfig
pada jalur Patient.birthDate
dan Patient.text.div
. Setelah mengirimkan permintaan de-identifikasi ke Cloud Healthcare API, nilai birthDate
dan tanggal lahir di Patient.text.div
akan bergeser dalam waktu plus atau minus 100 hari sejak tanggal lahir asli, 1980-12-05
.
Cryptokey yang diberikan dalam contoh, U2FsdGVkX19bS2oZsdbK9X5zi2utBn22uY+I2Vo0zOU=
,
adalah kunci mentah berenkode base64 terenkripsi AES 256-bit yang dibuat menggunakan perintah
berikut. Jika diminta, berikan sandi pilihan Anda ke perintah:
echo -n "test" | openssl enc -e -aes-256-ofb -a -salt
curl
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ --data "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': { 'paths': [ 'Patient.birthDate', 'Patient.text.div' ], 'action': 'INSPECT_AND_TRANSFORM' } }, 'text': { 'transformations': { 'infoTypes': [ 'DATE' ], 'dateShiftConfig': { 'cryptoKey': 'U2FsdGVkX19bS2oZsdbK9X5zi2utBn22uY+I2Vo0zOU=' } } } } }" "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify"
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID"
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/fhir+json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732"
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1981-02-19", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "Smith", "given": [ "Darcy" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1981-02-19</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
PowerShell
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Post ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Body "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': { 'paths': [ 'Patient.HumanName', 'Patient.text.div' ], 'action': 'INSPECT_AND_TRANSFORM' } }, 'text': { 'transformations': { 'infoTypes': [ 'DATE' ], 'dateShiftConfig': { 'cryptoKey': 'U2FsdGVkX19bS2oZsdbK9X5zi2utBn22uY+I2Vo0zOU=' } } } } }" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify" | Select-Object -Expand Content
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Get ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_NUMBER", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-RestMethod ` -Method Get ` -Headers $headers ` -ContentType: "application/fhir+json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732" | ConvertTo-Json
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1981-02-19", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "Smith", "given": [ "Darcy" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1981-02-19</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
Output menunjukkan bahwa nilai dalam birthDate
dan tanggal lahir di
Patient.text.div
telah diubah ke nilai
baru 1981-02-19
. Transformasi ini terjadi sebagai hasil dari penggabungan
diferensial 100 hari dengan Pasien dan nilai cryptoKey
yang disediakan.
Nilai baru untuk birthDate
dan tanggal lahir di Patient.text.div
konsisten untuk Pasien ini antara de-identifikasi berjalan selama cryptoKey
yang sama diberikan.
CryptoHashConfig
Cloud Healthcare API dapat mengubah data dengan mengganti nilai dengan hash kriptografis (juga disebut nilai surrogate). Untuk melakukannya, tentukan
pesan cryptoHashConfig
.
Anda dapat mengosongkan cryptoHashConfig
, atau memberikan:
- (Tidak digunakan lagi): Kunci berenkode 64 basis AES 128/192/256-bit.
- (Direkomendasikan): Kunci gabungan Cloud Key Management Service (Cloud KMS). Baca artikel Melakukan de-identifikasi dan mengidentifikasi ulang teks sensitif untuk mengetahui contoh cara menggunakan kunci gabungan Cloud KMS.
Anda harus memberikan peran dengan izin cloudkms.cryptoKeyVersions.useToDecrypt
ke akun layanan Cloud Healthcare Service Agent untuk mendekripsi kunci yang digabungkan Cloud KMS. Sebaiknya gunakan peran Cloud KMS Bigtable Decrypter (roles/cloudkms.cryptoKeyDecrypter
). Saat Anda menggunakan Cloud KMS untuk operasi kriptografi, biaya akan berlaku. Lihat
Harga Cloud Key Management Service untuk mengetahui informasi selengkapnya.
Menyediakan kunci yang konsisten akan menghasilkan nilai surrogate yang konsisten di antara proses de-identifikasi. Jika Anda tidak memberikan kunci, Cloud Healthcare API akan membuat kunci baru setiap kali operasi berjalan. Menggunakan kunci yang berbeda akan menghasilkan nilai surrogate yang berbeda.
Contoh berikut memperluas contoh yang digunakan dalam
Mende-identifikasi jalur FHIR tertentu,
tetapi kini menyertakan penetapan PERSON_NAME
infoType dengan transformasi cryptoKey
di jalur Patient.HumanName
. Setelah mengirim permintaan de-identifikasi ke Cloud Healthcare API, nilai name.family
dan name.given
diganti dengan nilai surrogate.
Cryptokey yang diberikan dalam contoh, U2FsdGVkX19bS2oZsdbK9X5zi2utBn22uY+I2Vo0zOU=
,
adalah kunci mentah berenkode base64 terenkripsi AES 256-bit yang dibuat menggunakan perintah
berikut. Jika diminta, berikan sandi pilihan Anda ke perintah:
echo -n "test" | openssl enc -e -aes-256-ofb -a -salt
curl
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ --data "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': { 'paths': [ 'Patient.HumanName' ], 'action': 'INSPECT_AND_TRANSFORM' } }, 'text': { 'transformations': { 'infoTypes': [ 'PERSON_NAME' ], 'cryptoHashConfig': { 'cryptoKey': 'U2FsdGVkX19bS2oZsdbK9X5zi2utBn22uY+I2Vo0zOU=' } } } } }" "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify"
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID"
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/fhir+json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732"
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "CA", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1980-12-05", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "NlVBV12Hhb5DD8WNqlTpXboFxzlUSlqAmYDet/jIViQ=", "given": [ "FSH4D/IGb80a1rS0L0kqfC3DCDt6//17VPhIkOzH2pk=" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1980-12-05</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
PowerShell
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Post ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Body "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': { 'paths': [ 'Patient.HumanName' ], 'action': 'TRANSFORM' } }, 'text': { 'transformations': { 'infoTypes': [ 'PERSON_NAME' ], 'cryptoHashConfig': { 'cryptoKey': 'U2FsdGVkX19bS2oZsdbK9X5zi2utBn22uY+I2Vo0zOU=' } } } } }" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify" | Select-Object -Expand Content
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Get ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_NUMBER", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-RestMethod ` -Method Get ` -Headers $headers ` -ContentType: "application/fhir+json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732" | ConvertTo-Json
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "CA", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1980-12-05", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "NlVBV12Hhb5DD8WNqlTpXboFxzlUSlqAmYDet/jIViQ=", "given": [ "FSH4D/IGb80a1rS0L0kqfC3DCDt6//17VPhIkOzH2pk=" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1980-12-05</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
Output menunjukkan bahwa nilai untuk name.family
dan name.given
telah diubah menggunakan hashing kriptografi. Transformasi ini terjadi
sebagai hasil dari penggabungan Pasien ID dan nilai cryptoKey
yang disediakan.
Nilai name.family
dan name.given
baru konsisten untuk Pasien ini antara de-identifikasi berjalan selama cryptoKey
yang sama diberikan.
ReplaceWithInfoTypeConfig
Cloud Healthcare API dapat mengubah data dengan mengganti nilai dengan nama infoType
nilai. Anda dapat melakukannya dengan menentukan pesan replaceWithInfoTypeConfig
.
Contoh berikut memperluas contoh yang digunakan dalam
Mende-identifikasi jalur FHIR tertentu,
tetapi menentukan transformasi replaceWithInfoType
pada PERSON_NAME
dan jalur fieldMetadataList
yang ditetapkan ke Patient.HumanName
.
Setelah mengirimkan permintaan de-identifikasi ke Cloud Healthcare API, nilai name.family
dan name.given
diganti dengan infoType
nilai.
curl
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ --data "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': { 'paths': [ 'Patient.HumanName' ], 'action': 'INSPECT_AND_TRANSFORM' } }, 'text': { 'transformations': { 'infoTypes': [ 'PERSON_NAME' ], 'replaceWithInfoType': {} } } } }" "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify"
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID"
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/fhir+json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732"
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "CA", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1980-12-05", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "[PERSON_NAME]", "given": [ "[PERSON_NAME]" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1980-12-05</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
PowerShell
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Post ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Body "{ 'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID', 'config': { 'fhir': { 'fieldMetadataList': { 'paths': [ 'Patient.HumanName' ], 'action': 'TRANSFORM' } }, 'text': { 'transformations': { 'infoTypes': [ 'PERSON_NAME' ], 'replaceWithInfoTypeConfig': {} } } } }" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify" | Select-Object -Expand Content
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
get
operasi
untuk melacak status operasi:
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Get ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content
"done": true
.
{ "name": "projects/PROJECT_ID/locations/REGION/datasets/SOURCE_DATASET_ID/operations/OPERATION_NUMBER", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.dataset.DatasetService.DeidentifyDataset", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/viewer/CLOUD_LOGGING_URL" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifySummary", "successStoreCount": "1", "successResourceCount": "1" } }
$cred = gcloud auth print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-RestMethod ` -Method Get ` -Headers $headers ` -ContentType: "application/fhir+json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/datasets/DESTINATION_DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/r77433dd-dkeuc-633743nfd-383nfdsjds732" | ConvertTo-Json
{ "address": [ { "city": "Anycity", "district": "Anydistrict", "line": [ "123 Main Street" ], "period": { "start": "1990-12-05" }, "postalCode": "12345", "state": "CA", "text": "123 Main Street Anycity, Anydistrict, CA 12345", "type": "both", "use": "home" } ], "birthDate": "1980-12-05", "gender": "female", "id": "r77433dd-dkeuc-633743nfd-383nfdsjds732", "meta": { "lastUpdated": "2018-01-01T2018-01-01T00:00:00+00:00", "versionId": "MTU0MDU4NTcxNjI2MTUxNDAwMAA" }, "name": [ { "family": "[PERSON_NAME]", "given": [ "[PERSON_NAME]" ], "use": "official" } ], "resourceType": "Patient", "text": { "div": "<div><p><b>Patient</b></p><p><b>Name</b>: Smith, Darcy</p><p><b>DateOfBirth</b>: 1980-12-05</p><p><b>Gender</b>: Female</p></div>", "status": "generated" } }
Output menunjukkan bahwa nilai untuk name.family
dan name.given
telah diganti dengan infoType nilai.
Melakukan de-identifikasi data di tingkat penyimpanan FHIR
Contoh sebelumnya menunjukkan cara melakukan de-identifikasi data FHIR di tingkat set data. Untuk mengubah permintaan de-identifikasi set data ke permintaan de-identifikasi penyimpanan FHIR, buat perubahan berikut:
- Ubah
destinationDataset
dalam isi permintaan menjadidestinationStore
- Tambahkan
fhirStores/DESTINATION_FHIR_STORE_ID
di akhir nilai padadestinationStore
- Menambahkan
fhirStores/SOURCE_FHIR_STORE_ID
saat menentukan lokasi data sumber.
Contoh:
De-identifikasi tingkat set data:
'destinationDataset': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID' … "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID:deidentify"
De-identifikasi tingkat toko FHIR:
'destinationStore': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/DESTINATION_FHIR_STORE_ID' … "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/fhirStores/SOURCE_FHIR_STORE_ID:deidentify"
Contoh berikut memperluas De-identifikasi jalur FHIR tertentu, tetapi de-identifikasi terjadi di satu penyimpanan FHIR dan data yang telah dide-identifikasi akan disalin ke penyimpanan FHIR baru. Perlu diperhatikan bahwa penyimpanan FHIR yang direferensikan oleh DESTINATION_FHIR_STORE_ID harus sudah ada.
curl
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ --data "{ 'destinationStore': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/DESTINATION_FHIR_STORE_ID', 'config': { 'fhir': { 'fieldMetadataList': [ { 'paths': [ 'Patient.HumanName' ], 'action': 'TRANSFORM' } ] } } }" "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/fhirStores/SOURCE_FHIR_STORE_ID:deidentify"
Jika permintaan berhasil, server akan menampilkan respons dalam format JSON:
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
Respons berisi nama operasi. Anda dapat menggunakan
Metode get
operasi
untuk melacak status operasi:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID"
Jika permintaan berhasil, server akan menampilkan respons dalam format JSON.
Setelah proses de-identifikasi selesai,
respons akan berisi "done": true
.
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.deidentify.DeidentifyService.DeidentifyFhirStore", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/query/CLOUD_LOGGING_URL", "counter": { "success": "SUCCESS_COUNT" } }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifyFhirStoreSummary" } }
PowerShell
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Post ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Body "{ 'destinationStore': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/DESTINATION_FHIR_STORE_ID', 'config': { 'fhir': { 'fieldMetadataList': [ { 'paths': [ 'Patient.HumanName' ], 'action': 'TRANSFORM' } ] } } }" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/fhirStores/SOURCE_FHIR_STORE_ID:deidentify" | Select-Object -Expand Content
Jika permintaan berhasil, server akan menampilkan respons dalam format JSON:
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
Respons berisi ID operasi. Anda dapat menggunakan
Metode get
operasi
untuk melacak status operasi:
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Get ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content
Jika permintaan berhasil, server akan menampilkan respons dalam format JSON. Setelah proses de-identifikasi selesai, respons akan berisi "done": true
.
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.deidentify.DeidentifyService.DeidentifyFhirStore", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/query/CLOUD_LOGGING_URL", "counter": { "success": "SUCCESS_COUNT" } }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifyFhirStoreSummary" } }
Melakukan de-identifikasi subset penyimpanan FHIR
Saat melakukan de-identifikasi data FHIR di tingkat penyimpanan FHIR, Anda dapat melakukan de-identifikasi subkumpulan data dengan menentukan filter.
Filter tersebut berupa daftar ID resource FHIR. Anda menentukan ID
dalam objek Resources
di dalam objek
FhirFilter
.
Contoh berikut diperluas di Melakukan de-identifikasi data di tingkat penyimpanan FHIR, tetapi daftar yang berisi dua ID resource FHIR (satu untuk Pasien dan satu untuk Pengamatan) disediakan, yang menentukan resource mana yang dide-identifikasi.
curl
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ --data "{ 'destinationStore': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/DESTINATION_FHIR_STORE_ID', 'config': { 'fhir': { 'fieldMetadataList': [ { 'action': 'TRANSFORM', 'paths': [ 'Patient.HumanName' ] } ] } }, 'resourceFilter': { 'resources': { 'resources': [ 'Patient/PATIENT_ID', 'Observation/OBSERVATION_ID' ] } } }" "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/fhirStores/SOURCE_FHIR_STORE_ID:deidentify"
Jika permintaan berhasil, server akan menampilkan respons dalam format JSON:
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
Respons berisi nama operasi. Anda dapat menggunakan
Metode get
operasi
untuk melacak status operasi:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID"
Jika permintaan berhasil, server akan menampilkan respons dalam format JSON.
Setelah proses de-identifikasi selesai,
respons akan berisi "done": true
.
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.deidentify.DeidentifyService.DeidentifyFhirStore", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/query/CLOUD_LOGGING_URL", "counter": { "success": "SUCCESS_COUNT" } }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifyFhirStoreSummary" } }
PowerShell
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Post ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Body "{ 'destinationStore': 'projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/DESTINATION_FHIR_STORE_ID', 'resourceFilter': { 'resources': { 'resources': [ 'Patient/PATIENT_ID', 'Observation/OBSERVATION_ID' ] } }, 'config': { 'fhir': { 'fieldMetadataList': [ { 'paths': [ 'Patient.HumanName' ], 'action': 'TRANSFORM' } ] } } }" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/fhirStores/SOURCE_FHIR_STORE_ID:deidentify" | Select-Object -Expand Content
Jika permintaan berhasil, server akan menampilkan respons dalam format JSON:
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" }
Respons berisi ID operasi. Anda dapat menggunakan
Metode get
operasi
untuk melacak status operasi:
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Get ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand Content
Jika permintaan berhasil, server akan menampilkan respons dalam format JSON. Setelah proses de-identifikasi selesai, respons akan berisi "done": true
.
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.OperationMetadata", "apiMethodName": "google.cloud.healthcare.v1.deidentify.DeidentifyService.DeidentifyFhirStore", "createTime": "CREATE_TIME", "endTime": "END_TIME", "logsUrl": "https://console.cloud.google.com/logs/query/CLOUD_LOGGING_URL", "counter": { "success": "SUCCESS_COUNT" } }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.healthcare.v1.deidentify.DeidentifyFhirStoreSummary" } }
Melakukan de-identifikasi data di Konsol Google Cloud
Anda dapat melakukan de-identifikasi data di Google Cloud Console, baik untuk set data maupun penyimpanan FHIR. Konfigurasi de-identifikasi FHIR default digunakan untuk melakukan de-identifikasi pada set data dan penyimpanan FHIR. Untuk mengetahui informasi selengkapnya, lihat De-identifikasi data FHIR default.
Melakukan de-identifikasi data untuk set data
Untuk melakukan de-identifikasi data pada suatu {i>dataset<i}, selesaikan langkah-langkah berikut:
Di konsol Google Cloud, buka halaman Datasets.
Pilih De-identifikasi dari daftar Tindakan untuk set data yang Anda lakukan de-identifikasi.
Halaman De-identifikasi Dataset akan ditampilkan.
Pilih Set destination dataset dan masukkan nama untuk set data baru tersebut guna menyimpan data yang telah dide-identifikasi.
Klik De-identifikasi untuk melakukan de-identifikasi data dalam set data.
Melakukan de-identifikasi data di penyimpanan FHIR
Untuk melakukan de-identifikasi data di penyimpanan FHIR, selesaikan langkah-langkah berikut:
Di konsol Google Cloud, buka halaman Datasets.
Klik set data yang datanya ingin Anda de-identifikasi.
Dalam daftar penyimpanan FHIR, pilih De-identifikasi dari daftar Tindakan untuk toko toko FHIR yang Anda de-identifikasi.
Halaman De-identifikasi FHIR Store akan ditampilkan.
Pilih Set destination data store dan pilih set data dan penyimpanan FHIR tempat data yang dide-identifikasi disimpan.
Catatan: Jika ingin menyimpan data yang telah dide-identifikasi di penyimpanan FHIR baru, Anda harus membuat penyimpanan baru terlebih dahulu, lalu memilihnya sebagai penyimpanan FHIR tujuan.
Klik de-identifikasi untuk melakukan de-identifikasi data di penyimpanan FHIR.
Memecahkan masalah operasi de-identifikasi FHIR
Jika terjadi error selama operasi de-identifikasi FHIR, error tersebut akan dicatat dalam log ke Cloud Logging. Untuk mengetahui informasi selengkapnya, baca artikel Melihat log error di Cloud Logging.
Jika seluruh operasi menampilkan error, lihat Memecahkan masalah operasi yang berjalan lama.