Halaman ini menjelaskan cara menelusuri resource FHIR menggunakan fungsi kueri
lanjutan yang tersedia melalui metode
projects.locations.datasets.fhirStores.fhir.search
. Panduan ini mengasumsikan bahwa Anda sudah memahami konten
Menelusuri resource FHIR.
Contoh paket FHIR
Contoh di halaman ini menggunakan paket JSON FHIR yang disediakan untuk menampilkan hasil fitur penelusuran FHIR lanjutan. Simpan file r4_bundle.json
ke komputer Anda untuk digunakan dalam sampel.
Menjalankan paket FHIR sampel
Untuk menjalankan contoh paket FHIR di penyimpanan FHIR, lihat Mengeksekusi paket. Penyimpanan FHIR harus memiliki setelan berikut:
- Setel
enableUpdateCreate
ketrue
. - Setel
version
ke R4.
Pengubah penelusuran string
Penelusuran string secara default akan menggunakan pencocokan awalan, yaitu kapitalisasi dan aksen tidak peka melalui pelipatan ke bentuk NFC Unicode standar. Tanda baca dan spasi kosong tambahan akan diabaikan.
Pengubah berikut tersedia:
:contains
mencocokkan resource dengan nilai yang ditentukan di mana pun dalam string, misalnya,name:contains=eve
cocok denganEvelyn
danSeverine
.:exact
cocok dengan seluruh string, termasuk kapitalisasi dan aksen, misalnyaname:exact=Eve
tidak cocok denganeve
atauEvelyn
.
Luaskan bagian berikut untuk melihat contoh penggunaan pengubah string penelusuran:
Contoh pengubah penelusuran string
REST
Sebelum menggunakan salah satu data permintaan, lakukan penggantian berikut:
- PROJECT_ID: project ID Google Cloud Anda
- LOCATION: lokasi set data induk
- DATASET_ID: set data induk penyimpanan FHIR
- FHIR_STORE_ID: ID penyimpanan FHIR
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
curl
Contoh berikut menggunakan kueri
Patient?name:contains=eve
.
Jalankan perintah berikut:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?name:contains=eve"
PowerShell
Contoh berikut menggunakan kueri
Patient?name:contains=eve
.
Jalankan perintah berikut:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?name:contains=eve" | Select-Object -Expand Content
Anda akan melihat respons JSON seperti berikut:
{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient2", "resource": { "active": false, "address": [ { "city": "Mountain View", "district": "KW", "line": [ "1800 Amphibious Blvd" ], "period": { "start": "2000-01-01" }, "text": "1800 Amphibious Blvd", "type": "both", "use": "home" } ], "birthDate": "1989-03-11", "communication": [ { "language": { "coding": [ { "code": "FR", "display": "jkl", "system": "123" }, { "code": "french", "display": "mno", "system": "456" } ], "text": "pqr" } } ], "deceasedBoolean": false, "gender": "female", "id": "patient2", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "tag2", "display": "Tag Two", "system": "tag-system" }, { "code": "tag|tag3", "display": "Tag Three", "system": "other" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "name": [ { "family": "Lee", "given": [ "Jane", "Evelyne" ], "use": "usual" } ], "resourceType": "Patient", "telecom": [ { "rank": 1, "system": "phone", "use": "home", "value": "0982344522" }, { "rank": 2, "system": "email", "use": "home", "value": "jane@example.com" } ] }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient1", "resource": { "active": false, "address": [ { "city": "Mountain View", "district": "KW", "line": [ "1800 Amphibious Blvd" ], "period": { "start": "1974-12-25" }, "text": "1800 Amphibious Blvd", "type": "both", "use": "home" } ], "birthDate": "1974-12-25", "communication": [ { "language": { "coding": [ { "code": "ENG", "display": "def", "system": "123" }, { "code": "english", "display": "ghi", "system": "456" } ], "text": "abc" } } ], "deceasedBoolean": false, "gender": "male", "id": "patient1", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "tag1", "display": "Tag One", "system": "tag-system" }, { "code": "tag2", "display": "Tag Two", "system": "other-system" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "name": [ { "family": "Lee", "given": [ "Alex", "Cleve" ], "text": "Alex Lee", "use": "usual" }, { "given": [ "Joe" ], "use": "nickname" } ], "resourceType": "Patient", "telecom": [ { "rank": 1, "system": "phone", "use": "home", "value": "0982344522" }, { "rank": 2, "system": "email", "use": "home", "value": "alex@example.com" } ] }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?name%3Acontains=eve" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?name%3Acontains=eve" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?name%3Acontains=eve" } ], "resourceType": "Bundle", "total": 2, "type": "searchset" }
Pembanding dan presisi untuk angka, tanggal, dan kuantitas
Nilai yang digunakan dalam penelusuran numerik atau tanggal bergantung pada ketepatan nilai parameter. Misalnya, angka 7.00
memiliki rentang implisit 6.995
inklusif
hingga 7.005
eksklusif. Tanggal 2015-08-12
memiliki rentang
2015-08-12T00:00:00
inklusif hingga 2015-08-13T00:00:00
eksklusif.
Presisi memengaruhi hasil yang ditampilkan untuk perbandingan kesetaraan. Misalnya,
nilai 7.03
dalam resource akan cocok dengan penelusuran untuk value=7.0
,
tetapi tidak akan cocok dengan penelusuran untuk value=7.00
.
Semua nilai floating point yang signifikan secara klinis dalam FHIR direpresentasikan oleh jenis seperti Desimal dan Jumlah yang mencatat presisi nilai yang disimpan. Sebagai pengecualian, ada beberapa kolom yang menggunakan bilangan bulat sederhana, misalnya untuk mewakili posisi dalam urutan, dan penelusuran pada kolom tersebut adalah pencocokan numerik yang persis.
Awalan berikut berlaku untuk perbandingan numerik terhadap nilai singleton.
Jika tidak ada awalan yang ditentukan, nilai defaultnya adalah eq
.
eq
: sama dengan, nilai pasti yang tersimpan berada dalam rentang yang ditentukan oleh presisi nilai parameterne
: tidak sama dengan, kebalikan darieq
gt
: nilai persis yang disimpan lebih besar daripada nilai parameter yang tepatlt
: nilai persis yang tersimpan kurang dari nilai parameter yang tepatge
: nilai persis yang disimpan lebih besar dari atau sama dengan parameter value yang tepatle
: nilai persis yang tersimpan kurang dari atau sama dengan parameter value persis
Nilai tanggal memiliki rentang implisit berdasarkan tingkat kekhususan nilai (satu tahun, satu bulan, satu hari). Jenis data lain seperti Rentang
dan Periode
berisi batas atas dan bawah eksplisit. Awalan berikut berlaku untuk perbandingan rentang. Jika tidak ada awalan yang ditentukan, nilai defaultnya adalah eq
.
eq
: sama dengan, rentang nilai parameter sepenuhnya berisi rentang targetne
: tidak sama dengan, kebalikan darieq
gt
: lebih besar dari, rentang di atas parameter value tumpang-tindih dengan rentang targetlt
: kurang dari, rentang di bawah parameter value tumpang-tindih dengan rentang targetge
: lebih besar dari atau sama denganle
: kurang dari atau sama dengansa
: rentang nilai parameter dimulai setelah rentang targeteb
: rentang nilai parameter berakhir sebelum rentang target
Pembanding dan presisi untuk sampel angka, tanggal, dan kuantitas
REST
Sebelum menggunakan salah satu data permintaan, lakukan penggantian berikut:
- PROJECT_ID: project ID Google Cloud Anda
- LOCATION: lokasi set data induk
- DATASET_ID: set data induk penyimpanan FHIR
- FHIR_STORE_ID: ID penyimpanan FHIR
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
curl
Contoh berikut menggunakan kueri
_lastUpdated=gt2018-01-01
untuk menelusuri resource Pasien dengan nilai _lastUpdated
lebih besar dari (gt
)
2018-01-01
.
Jalankan perintah berikut:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?_lastUpdated=gt2018-01-01"
PowerShell
Contoh berikut menggunakan kueri
_lastUpdated=gt2018-01-01
untuk menelusuri resource Pasien dengan nilai _lastUpdated
lebih besar dari (gt
)
2018-01-01
.
Jalankan perintah berikut:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?_lastUpdated=gt2018-01-01" | Select-Object -Expand Content
Kueri _lastUpdated=gt2018-01-01
menampilkan resource Pasien yang diperbarui sejak 01-01-2018. Jika Anda membuat semua resource di penyimpanan FHIR setelah tanggal tersebut, server akan menampilkan semua resource. Untuk melihat sebagian resource, ubah tanggal ke waktu setelah beberapa resource terakhir diperbarui.
{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient3", "resource": { "active": false, "address": [ { "city": "Lisbon", "district": "KW", "line": [ "Avenida da Pastelaria, 1903" ], "period": { "start": "1980-01-01" }, "text": "Avenida da Pastelaria, 1903", "type": "both", "use": "home" } ], "birthDate": "1980-01-01", "deceasedBoolean": false, "id": "patient3", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "tag3", "display": "Tag $3", "system": "other|tag" }, { "code": "code,4", "display": "Tag 4", "system": "system" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "name": [ { "family": "Smith", "given": [ "Mary" ], "text": "Smith, Mary", "use": "usual" } ], "resourceType": "Patient", "telecom": [ { "rank": 1, "system": "phone", "use": "home", "value": "1110891111" }, { "rank": 2, "system": "email", "use": "home", "value": "mary@example.com" } ] }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient2", "resource": { "active": false, "address": [ { "city": "Mountain View", "district": "KW", "line": [ "1800 Amphibious Blvd" ], "period": { "start": "2000-01-01" }, "text": "1800 Amphibious Blvd", "type": "both", "use": "home" } ], "birthDate": "1989-03-11", "communication": [ { "language": { "coding": [ { "code": "FR", "display": "jkl", "system": "123" }, { "code": "french", "display": "mno", "system": "456" } ], "text": "pqr" } } ], "deceasedBoolean": false, "gender": "female", "id": "patient2", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "tag2", "display": "Tag Two", "system": "tag-system" }, { "code": "tag|tag3", "display": "Tag Three", "system": "other" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "name": [ { "family": "Lee", "given": [ "Jane", "Evelyne" ], "use": "usual" } ], "resourceType": "Patient", "telecom": [ { "rank": 1, "system": "phone", "use": "home", "value": "0982344522" }, { "rank": 2, "system": "email", "use": "home", "value": "jane@example.com" } ] }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a", "resource": { "address": [ { "country": "US", "line": [ "907 Arlo Cliffs", "Suite 984" ], "postalCode": "XXXXX" } ], "birthDate": "1940-12-01", "communication": [ { "language": { "coding": [ { "code": "en-US", "display": "English (United States)", "system": "urn:ietf:bcp:47" } ] } } ], "deceasedDateTime": "2009-07-26T12:01:23-05:00", "extension": [ { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "valueCodeableConcept": { "coding": [ { "code": "2106-3", "display": "White", "system": "http://hl7.org/fhir/v3/Race" } ], "text": "race" } }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "valueCodeableConcept": { "coding": [ { "code": "2186-5", "display": "Nonhispanic", "system": "http://hl7.org/fhir/v3/Ethnicity" } ], "text": "ethnicity" } }, { "url": "http://hl7.org/fhir/StructureDefinition/birthPlace", "valueAddress": { "city": "Tama", "country": "US", "postalCode": "52339", "state": "Iowa" } }, { "url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName", "valueString": "Farrah Feeney" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "M" }, { "url": "http://hl7.org/fhir/StructureDefinition/patient-interpreterRequired", "valueBoolean": false }, { "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-actor-FictionalPerson-extension", "valueBoolean": true }, { "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-demographics-FathersName-extension", "valueHumanName": { "text": "Christopher Diaz" } }, { "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-demographics-SocialSecurityNumber-extension", "valueString": "999-16-9041" } ], "gender": "male", "generalPractitioner": [ { "reference": "Organization/9fb51c89-1453-406c-8357-578311b43a91" } ], "id": "8ac08aa9-63d2-4e81-8647-3a138d7f9f5a", "identifier": [ { "system": "https://github.com/synthetichealth/synthea", "value": "c1ee4b49-3194-4b39-91ed-4d1393a780c6" }, { "system": "http://hl7.org/fhir/sid/us-ssn", "type": { "coding": [ { "code": "SB", "system": "http://hl7.org/fhir/identifier-type" } ] }, "value": "999169041" }, { "system": "urn:oid:2.16.840.1.113883.4.3.25", "type": { "coding": [ { "code": "DL", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "S99992205" }, { "system": "http://standardhealthrecord.org/fhir/StructureDefinition/passportNumber", "type": { "coding": [ { "code": "PPN", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "X12551631X" }, { "system": "http://hospital.smarthealthit.org", "type": { "coding": [ { "code": "MR", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "c1ee4b49-3194-4b39-91ed-4d1393a780c6" } ], "maritalStatus": { "coding": [ { "code": "S", "system": "http://hl7.org/fhir/v3/MaritalStatus" } ], "text": "S" }, "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-demographics-PersonOfRecord" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "multipleBirthBoolean": false, "name": [ { "family": "Diaz", "given": [ "Christopher" ], "prefix": [ "Mr." ], "use": "official" } ], "resourceType": "Patient", "telecom": [ { "system": "phone", "use": "home", "value": "434-100-2918 x800" } ], "text": { "div": "Generated by Synthea. Version identifier: 2dd4c1c37e2743d14e5073c7b5e42899a3e51531", "status": "generated" } }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient1", "resource": { "active": false, "address": [ { "city": "Mountain View", "district": "KW", "line": [ "1800 Amphibious Blvd" ], "period": { "start": "1974-12-25" }, "text": "1800 Amphibious Blvd", "type": "both", "use": "home" } ], "birthDate": "1974-12-25", "communication": [ { "language": { "coding": [ { "code": "ENG", "display": "def", "system": "123" }, { "code": "english", "display": "ghi", "system": "456" } ], "text": "abc" } } ], "deceasedBoolean": false, "gender": "male", "id": "patient1", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "tag1", "display": "Tag One", "system": "tag-system" }, { "code": "tag2", "display": "Tag Two", "system": "other-system" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "name": [ { "family": "Lee", "given": [ "Alex", "Cleve" ], "text": "Alex Lee", "use": "usual" }, { "given": [ "Joe" ], "use": "nickname" } ], "resourceType": "Patient", "telecom": [ { "rank": 1, "system": "phone", "use": "home", "value": "0982344522" }, { "rank": 2, "system": "email", "use": "home", "value": "alex@example.com" } ] }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_lastUpdated=gt2018-01-01" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_lastUpdated=gt2018-01-01" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_lastUpdated=gt2018-01-01" } ], "resourceType": "Bundle", "total": 4, "type": "searchset" }
Penelusuran token
Parameter penelusuran token berlaku untuk kasus ketika nilai bukan string arbitrer, melainkan entity dalam sistem penamaan. Pencocokan string pada parameter token sudah tepat.
Sebagian besar penelusuran token berlaku untuk jenis data kompleks yang berisi system
dan merupakan URI yang menunjukkan sistem penamaan tempat nilai code
diambil. Penelusuran
ini mendukung sintaksis nilai berikut:
[parameter]=[code]
cocok dengan nilaicode
terlepas darisystem
[parameter]=[system]|[code]
harus cocok dengansystem
dancode
yang ditentukan[parameter]=|[code]
cocok dengancode
jika nilaisystem
kosong[parameter]=[system]|
cocok dengancode
apa pun dengan nilaisystem
yang diberikan
Ada beberapa pengubah yang memicu fungsi penelusuran token alternatif:
:not
meniadakan kondisi pencocokan dari penelusuran token:text
melakukan penelusuran string (bukan pencocokan persis) pada kolomtext
ataudisplay
yang terkait dengan kode, bukan nilai kode itu sendiri:above
hanya mengambil parameter berformat[system]|[code]
dan cocok dengan resource tempat kode dalam resource menambahkan parameter kueri. Untuk menggunakan pengubah ini,system
yang ditentukan harus ada di penyimpanan FHIR sebagai resourceCodeSystem
.:below
seperti:above
, tetapi cocok jika kode dalam resource disertakan oleh parameter kueri.:in
mengambil satu parameter menggunakan sintaksis parameter referensi, misalnyacode:in=ValueSet/1234
. Referensi ini harus merujuk ke resourceValueSet
dalam penyimpanan FHIR yang sama. Pengubah cocok dengan kode apa pun yang ada dalamValueSet
yang direferensikan.:not-in
meniadakan kondisi:in
Penelusuran token juga berlaku untuk kolom boolean dan URI serta kolom string tertentu yang hanya mengizinkan pencocokan persis. Dalam kasus ini, satu-satunya format parameter
adalah [parameter]=[value]
.
Contoh penelusuran token
REST
Sebelum menggunakan salah satu data permintaan, lakukan penggantian berikut:
- PROJECT_ID: project ID Google Cloud Anda
- LOCATION: lokasi set data induk
- DATASET_ID: set data induk penyimpanan FHIR
- FHIR_STORE_ID: ID penyimpanan FHIR
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
curl
Contoh berikut menggunakan kueri
Patient?_tag=tag-system|tag2
untuk menelusuri resource Pasien dengan system
dan code
yang ditentukan.
Jalankan perintah berikut:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?_tag=tag-system|tag2"
PowerShell
Contoh berikut menggunakan kueri
Patient?_tag=tag-system|tag2
untuk menelusuri resource Pasien dengan system
dan code
yang ditentukan.
Jalankan perintah berikut:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?_tag=tag-system|tag2" | Select-Object -Expand Content
Anda akan melihat respons JSON seperti berikut:
{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient2", "resource": { "active": false, "address": [ { "city": "Mountain View", "district": "KW", "line": [ "1800 Amphibious Blvd" ], "period": { "start": "2000-01-01" }, "text": "1800 Amphibious Blvd", "type": "both", "use": "home" } ], "birthDate": "1989-03-11", "communication": [ { "language": { "coding": [ { "code": "FR", "display": "jkl", "system": "123" }, { "code": "french", "display": "mno", "system": "456" } ], "text": "pqr" } } ], "deceasedBoolean": false, "gender": "female", "id": "patient2", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "tag2", "display": "Tag Two", "system": "tag-system" }, { "code": "tag|tag3", "display": "Tag Three", "system": "other" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "name": [ { "family": "Lee", "given": [ "Jane", "Evelyne" ], "use": "usual" } ], "resourceType": "Patient", "telecom": [ { "rank": 1, "system": "phone", "use": "home", "value": "0982344522" }, { "rank": 2, "system": "email", "use": "home", "value": "jane@example.com" } ] }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_tag=tag-system%7Ctag2" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_tag=tag-system%7Ctag2" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_tag=tag-system%7Ctag2" } ], "resourceType": "Bundle", "total": 1, "type": "searchset" }
Menelusuri nilai yang tidak ada
Pengubah penelusuran :missing
dapat digunakan pada parameter penelusuran apa pun untuk dicocokkan
berdasarkan ada atau tidak adanya nilai di kolom yang ditentukan. Misalnya,
Patient?gender=unknown
cocok dengan resource yang secara eksplisit berisi
nilai enum unknown
untuk gender, tetapi karena kolom ini tidak diperlukan, mungkin ada
resource lain yang tidak mengisi kolom sama sekali. Resource tersebut dapat
dicocokkan dengan Patient?gender:missing=true
. Sebaliknya, Patient?gender:missing=false
cocok dengan resource apa pun yang secara eksplisit mengisi kolom ini.
Contoh nilai tidak ada
REST
Sebelum menggunakan salah satu data permintaan, lakukan penggantian berikut:
- PROJECT_ID: project ID Google Cloud Anda
- LOCATION: lokasi set data induk
- DATASET_ID: set data induk penyimpanan FHIR
- FHIR_STORE_ID: ID penyimpanan FHIR
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
curl
Contoh berikut menggunakan kueri
gender:missing=false
:
Jalankan perintah berikut:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?gender:missing=false"
PowerShell
Contoh berikut menggunakan kueri
gender:missing=false
:
Jalankan perintah berikut:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?gender:missing=false" | Select-Object -Expand Content
patient3
tidak memiliki nilai gender
:
{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/mydataset/fhirStores/FHIR_STORE_ID/fhir/Patient/patient3", "resource": { "active": false, "address": [ { "city": "Lisbon", "district": "KW", "line": [ "Avenida da Pastelaria, 1903" ], "period": { "start": "1980-01-01" }, "text": "Avenida da Pastelaria, 1903", "type": "both", "use": "home" } ], "birthDate": "1980-01-01", "deceasedBoolean": false, "id": "patient3", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "tag3", "display": "Tag $3", "system": "other|tag" }, { "code": "code,4", "display": "Tag 4", "system": "system" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "name": [ { "family": "Smith", "given": [ "Mary" ], "text": "Smith, Mary", "use": "usual" } ], "resourceType": "Patient", "telecom": [ { "rank": 1, "system": "phone", "use": "home", "value": "1110891111" }, { "rank": 2, "system": "email", "use": "home", "value": "mary@example.com" } ] }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/mydataset/fhirStores/FHIR_STORE_ID/fhir/Patient/?gender%3Amissing=true" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/mydataset/fhirStores/FHIR_STORE_ID/fhir/Patient/?gender%3Amissing=true" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/mydataset/fhirStores/FHIR_STORE_ID/fhir/Patient/?gender%3Amissing=true" } ], "resourceType": "Bundle", "total": 1, "type": "searchset" }
Penelusuran teks
Parameter penelusuran khusus _content
melakukan pencocokan teks pada kolom berbasis string (tidak termasuk kolom angka, tanggal, atau enum) jika kolom tersebut adalah target dari parameter penelusuran apa pun di resource. Secara default, _content
cocok dengan resource yang
berisi semua kata dalam kueri, dengan dukungan untuk operator tambahan:
|
adalah operator OR, misalnya,abc | def | ghi xyz
akan cocok dengan resource yang berisixyz
dan satu atau beberapa dariabc
def
ghi
.-
adalah operator NOT, misalnya,abc -def
akan cocok dengan resource yang berisiabc
, tetapi tidak berisidef
.
Pencocokan didasarkan pada kata lengkap dan tidak cocok dengan substring atau karakter non-alfanumerik. Urutan kata tidak menjadi masalah. Kata yang cocok dapat tersebar di beberapa kolom pada resource.
Parameter _text
melakukan jenis pencocokan yang sama hanya di kolom Narasi, yang dimaksudkan untuk berisi ringkasan konten resource yang dapat dibaca manusia. Cloud Healthcare API tidak membuat ringkasan
ini secara otomatis, tetapi mendukung parameter penelusuran _text
jika data ini diisi oleh
klien saat membuat atau memperbarui resource.
Contoh penelusuran teks
REST
Sebelum menggunakan salah satu data permintaan, lakukan penggantian berikut:
- PROJECT_ID: project ID Google Cloud Anda
- LOCATION: lokasi set data induk
- DATASET_ID: set data induk penyimpanan FHIR
- FHIR_STORE_ID: ID penyimpanan FHIR
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
curl
Contoh berikut menggunakan kueri
_content=Smith%20|%20Mountain%20View
:
Jalankan perintah berikut:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?_content=Smith%20|%20Mountain%20View"
PowerShell
Contoh berikut menggunakan kueri
_content=Smith%20|%20Mountain%20View
:
Jalankan perintah berikut:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?_content=Smith%20|%20Mountain%20View" | Select-Object -Expand Content
Anda akan melihat respons JSON seperti berikut:
{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient1", "resource": { "active": false, "address": [ { "city": "Mountain View", "district": "KW", "line": [ "1800 Amphibious Blvd" ], "period": { "start": "1974-12-25" }, "text": "1800 Amphibious Blvd", "type": "both", "use": "home" } ], "birthDate": "1974-12-25", "communication": [ { "language": { "coding": [ { "code": "ENG", "display": "def", "system": "123" }, { "code": "english", "display": "ghi", "system": "456" } ], "text": "abc" } } ], "deceasedBoolean": false, "gender": "male", "id": "patient1", "meta": { "lastUpdated": "2021-10-21T16:41:47.211939+00:00", "tag": [ { "code": "tag1", "display": "Tag One", "system": "tag-system" }, { "code": "tag2", "display": "Tag Two", "system": "other-system" } ], "versionId": "MTYzNDgzNDUwNzIxMTkzOTAwMA" }, "name": [ { "family": "Lee", "given": [ "Alex", "Cleve" ], "text": "Alex Lee", "use": "usual" }, { "given": [ "Joe" ], "use": "nickname" } ], "resourceType": "Patient", "telecom": [ { "rank": 1, "system": "phone", "use": "home", "value": "0982344522" }, { "rank": 2, "system": "email", "use": "home", "value": "alex@example.com" } ] }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient2", "resource": { "active": false, "address": [ { "city": "Mountain View", "district": "KW", "line": [ "1800 Amphibious Blvd" ], "period": { "start": "2000-01-01" }, "text": "1800 Amphibious Blvd", "type": "both", "use": "home" } ], "birthDate": "1989-03-11", "communication": [ { "language": { "coding": [ { "code": "FR", "display": "jkl", "system": "123" }, { "code": "french", "display": "mno", "system": "456" } ], "text": "pqr" } } ], "deceasedBoolean": false, "gender": "female", "id": "patient2", "meta": { "lastUpdated": "2021-10-21T16:41:47.211939+00:00", "tag": [ { "code": "tag2", "display": "Tag Two", "system": "tag-system" }, { "code": "tag|tag3", "display": "Tag Three", "system": "other" } ], "versionId": "MTYzNDgzNDUwNzIxMTkzOTAwMA" }, "name": [ { "family": "Lee", "given": [ "Jane", "Evelyne" ], "use": "usual" } ], "resourceType": "Patient", "telecom": [ { "rank": 1, "system": "phone", "use": "home", "value": "0982344522" }, { "rank": 2, "system": "email", "use": "home", "value": "jane@example.com" } ] }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_content=Smith%7CMountain+View" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_content=Smith%7CMountain+View" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_content=Smith%7CMountain+View" } ], "resourceType": "Bundle", "total": 2, "type": "searchset" }
Parameter penelusuran gabungan
Saat melakukan penelusuran menggunakan beberapa parameter kueri, ada kasus ketika parameter penelusuran individual yang digabungkan dengan DAN akan cocok dengan hasil yang tidak diinginkan. Parameter penelusuran gabungan adalah jenis parameter penelusuran khusus yang mengatasi masalah ini.
Misalnya, resource Observation
dapat berisi beberapa nilai di
kolom component
yang masing-masing berisi pasangan code
dan value
. Penelusuran
untuk Observation?component-code=8867-4&component-value-quantity=lt50
akan
cocok dengan resource yang memiliki satu komponen yang berisi code
8867-4 dan
komponen berbeda yang berisi value
kurang dari 50. Penelusuran ini tidak dapat
digunakan untuk membatasi kecocokan antara kedua nilai ini dalam komponen yang sama.
Parameter penelusuran gabungan menentukan parameter baru yang menggabungkan dua parameter penelusuran lainnya dan menentukan tingkat penyusunan bertingkat di mana keduanya harus cocok. Dalam kueri, kedua nilai tersebut digabungkan oleh $
. Misalnya,
Observation
memiliki parameter komposit component-code-value-quantity
yang dapat
membatasi contoh sebelumnya ke satu komponen dengan menelusuri
Observation?component-code-value-quantity=8867-4$lt50
. Parameter ini
ditentukan oleh spesifikasi FHIR dan tidak ada untuk semua kombinasi
parameter penelusuran.
Parameter penelusuran gabungan tidak mengizinkan pengubah.
Seperti semua parameter penelusuran, informasi mengenai parameter komposit yang didukung oleh Cloud Healthcare API dapat ditemukan di pernyataan kemampuan atau Pernyataan Kesesuaian FHIR.
Contoh penelusuran gabungan
REST
Sebelum menggunakan salah satu data permintaan, lakukan penggantian berikut:
- PROJECT_ID: project ID Google Cloud Anda
- LOCATION: lokasi set data induk
- DATASET_ID: set data induk penyimpanan FHIR
- FHIR_STORE_ID: ID penyimpanan FHIR
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
curl
Contoh berikut menggunakan kueri
Observation?component-code-value-quantity=8480-6$lt150
.
Jalankan perintah berikut:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation?component-code-value-quantity=8480-6\$lt150"
PowerShell
Contoh berikut menggunakan kueri
Observation?component-code-value-quantity=8480-6$lt150
.
Jalankan perintah berikut:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation?component-code-value-quantity=8480-6\$lt150" | Select-Object -Expand Content
component-code=8480-6
dan component-value-quantity
dari 133, yang memenuhi kriteria untuk lt150
.
{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/a35bf421-1f00-4897-a94d-4d47c3bb306b", "resource": { "category": [ { "coding": [ { "code": "vital-signs", "system": "http://hl7.org/fhir/observation-category" } ] } ], "code": { "coding": [ { "code": "55284-4", "display": "Blood Pressure", "system": "http://loinc.org" } ] }, "component": [ { "code": { "coding": [ { "code": "8480-6", "display": "Systolic Blood Pressure", "system": "http://loinc.org" } ], "text": "Systolic Blood Pressure" }, "valueQuantity": { "code": "mmHg", "system": "http://unitsofmeasure.org", "unit": "mmHg", "value": 133 } }, { "code": { "coding": [ { "code": "8462-4", "display": "Diastolic Blood Pressure", "system": "http://loinc.org" } ], "text": "Diastolic Blood Pressure" }, "valueQuantity": { "code": "mmHg", "system": "http://unitsofmeasure.org", "unit": "mmHg", "value": 84 } } ], "effectiveDateTime": "2008-03-07T17:47:02-05:00", "encounter": { "reference": "Encounter/0e9d631c-4407-45e5-bfbe-689806caaf7b" }, "id": "a35bf421-1f00-4897-a94d-4d47c3bb306b", "issued": "2008-03-07T17:47:02-05:00", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-observation-Observation", "http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BloodPressure" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Observation", "status": "final", "subject": { "reference": "Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a" } }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/?component-code-value-quantity=8480-6%24lt150" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/?component-code-value-quantity=8480-6%24lt150" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/?component-code-value-quantity=8480-6%24lt150" } ], "resourceType": "Bundle", "total": 1, "type": "searchset" }
Penelusuran berantai
Penelusuran berantai memungkinkan penelusuran melintasi referensi dalam konteks kueri. Sintaksis dasar untuk penelusuran berantai adalah:
[reference parameter]:[resource type].[inner search parameter]=[inner value]
Jika parameter referensi hanya merujuk ke satu jenis resource, :[resource
type]
dapat dihilangkan, sehingga mengakibatkan:
[reference parameter].[inner search parameter]=[inner value]
Misalnya, Observation
memiliki parameter penelusuran referensi subject
yang dapat
mengarah ke Group
, Device
, Patient
, atau Location
. Untuk menemukan Observations
yang memiliki subject
yang merupakan Patient
yang memiliki nama yang diawali dengan "Joe",
Anda dapat menelusuri Observation?subject:Patient.name=Joe
.
Jika kueri memiliki beberapa parameter berantai, setiap rantai akan dievaluasi secara terpisah. Misalnya, Patient?general-practitioner.name=Joe&general-practitioner.address-country=Canada
akan cocok dengan Patient
yang memiliki dua
referensi general-practitioner
, satu bernama "Joe" dan satunya lagi memiliki
alamat di Kanada. Tidak ada sintaksis untuk mengelompokkan klausa ini agar cocok hanya dengan Joe dari Kanada.
Penelusuran berantai dapat bersifat rekursif dengan rantai lain atau rantai terbalik, misalnya
Observation?subject:Patient.organization.name=Acme
akan cocok dengan
Observation
yang mengacu pada subject
yang mengacu pada organization
yang
memiliki name
dari Acme
.
Contoh penelusuran berantai
REST
Sebelum menggunakan salah satu data permintaan, lakukan penggantian berikut:
- PROJECT_ID: project ID Google Cloud Anda
- LOCATION: lokasi set data induk
- DATASET_ID: set data induk penyimpanan FHIR
- FHIR_STORE_ID: ID penyimpanan FHIR
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
curl
Contoh berikut menggunakan kueri
Observation?subject:Patient.name=Christopher
untuk menampilkan semua Pengamatan yang memiliki subject
dan merupakan Patient
yang memiliki nama yang diawali dengan Christopher
.
Jalankan perintah berikut:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation?subject:Patient.name=Christopher"
PowerShell
Contoh berikut menggunakan kueri
Observation?subject:Patient.name=Christopher
untuk menampilkan semua Pengamatan yang memiliki subject
dan merupakan Patient
yang memiliki nama yang diawali dengan Christopher
.
Jalankan perintah berikut:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation?subject:Patient.name=Christopher" | Select-Object -Expand Content
Anda akan melihat respons JSON seperti berikut:
{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/85652a63-09ba-4a5b-ac5b-b690c6972eb5", "resource": { "category": [ { "coding": [ { "code": "laboratory", "system": "http://hl7.org/fhir/observation-category" } ] } ], "code": { "coding": [ { "code": "2093-3", "display": "Total Cholesterol", "system": "http://loinc.org" } ], "text": "Total Cholesterol" }, "effectiveDateTime": "2008-03-07T17:47:02-05:00", "encounter": { "reference": "Encounter/0e9d631c-4407-45e5-bfbe-689806caaf7b" }, "id": "85652a63-09ba-4a5b-ac5b-b690c6972eb5", "issued": "2008-03-07T17:47:02-05:00", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-observation-Observation" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Observation", "status": "final", "subject": { "reference": "Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a" }, "valueQuantity": { "code": "mg/dL", "system": "http://unitsofmeasure.org", "unit": "mg/dL", "value": 191 } }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/e7aea507-61af-4290-9323-0b3daed0b7a9", "resource": { "category": [ { "coding": [ { "code": "laboratory", "system": "http://hl7.org/fhir/observation-category" } ] } ], "code": { "coding": [ { "code": "2571-8", "display": "Triglycerides", "system": "http://loinc.org" } ], "text": "Triglycerides" }, "effectiveDateTime": "2008-03-07T17:47:02-05:00", "encounter": { "reference": "Encounter/0e9d631c-4407-45e5-bfbe-689806caaf7b" }, "id": "e7aea507-61af-4290-9323-0b3daed0b7a9", "issued": "2008-03-07T17:47:02-05:00", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-observation-Observation" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Observation", "status": "final", "subject": { "reference": "Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a" }, "valueQuantity": { "code": "mg/dL", "system": "http://unitsofmeasure.org", "unit": "mg/dL", "value": 143 } }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/a35bf421-1f00-4897-a94d-4d47c3bb306b", "resource": { "category": [ { "coding": [ { "code": "vital-signs", "system": "http://hl7.org/fhir/observation-category" } ] } ], "code": { "coding": [ { "code": "55284-4", "display": "Blood Pressure", "system": "http://loinc.org" } ] }, "component": [ { "code": { "coding": [ { "code": "8480-6", "display": "Systolic Blood Pressure", "system": "http://loinc.org" } ], "text": "Systolic Blood Pressure" }, "valueQuantity": { "code": "mmHg", "system": "http://unitsofmeasure.org", "unit": "mmHg", "value": 133 } }, { "code": { "coding": [ { "code": "8462-4", "display": "Diastolic Blood Pressure", "system": "http://loinc.org" } ], "text": "Diastolic Blood Pressure" }, "valueQuantity": { "code": "mmHg", "system": "http://unitsofmeasure.org", "unit": "mmHg", "value": 84 } } ], "effectiveDateTime": "2008-03-07T17:47:02-05:00", "encounter": { "reference": "Encounter/0e9d631c-4407-45e5-bfbe-689806caaf7b" }, "id": "a35bf421-1f00-4897-a94d-4d47c3bb306b", "issued": "2008-03-07T17:47:02-05:00", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-observation-Observation", "http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BloodPressure" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Observation", "status": "final", "subject": { "reference": "Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a" } }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/14df9701-2dd4-4538-8fac-776c40dec22d", "resource": { "category": [ { "coding": [ { "code": "vital-signs", "system": "http://hl7.org/fhir/observation-category" } ] } ], "code": { "coding": [ { "code": "8302-2", "display": "Body Height", "system": "http://loinc.org" } ], "text": "Body Height" }, "effectiveDateTime": "2008-03-07T17:47:02-05:00", "encounter": { "reference": "Encounter/0e9d631c-4407-45e5-bfbe-689806caaf7b" }, "id": "14df9701-2dd4-4538-8fac-776c40dec22d", "issued": "2008-03-07T17:47:02-05:00", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-observation-Observation", "http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-VitalSign", "http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BodyHeight" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Observation", "status": "final", "subject": { "reference": "Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a" }, "valueQuantity": { "code": "cm", "system": "http://unitsofmeasure.org", "unit": "centimeters", "value": 177.72961711703704 } }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/1e2fdce6-4c79-4ef8-a5a9-2326cddbc8b3", "resource": { "category": [ { "coding": [ { "code": "vital-signs", "system": "http://hl7.org/fhir/observation-category" } ] } ], "code": { "coding": [ { "code": "39156-5", "display": "Body Mass Index", "system": "http://loinc.org" } ], "text": "Body Mass Index" }, "effectiveDateTime": "2008-03-07T17:47:02-05:00", "encounter": { "reference": "Encounter/0e9d631c-4407-45e5-bfbe-689806caaf7b" }, "id": "1e2fdce6-4c79-4ef8-a5a9-2326cddbc8b3", "issued": "2008-03-07T17:47:02-05:00", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-observation-Observation", "http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-VitalSign", "http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BodyMassIndex" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Observation", "status": "final", "subject": { "reference": "Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a" }, "valueQuantity": { "code": "kg/m2", "system": "http://unitsofmeasure.org", "unit": "kg/m2", "value": 38.34566163709526 } }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/58357362-6f18-438a-8479-3289ebab1617", "resource": { "category": [ { "coding": [ { "code": "laboratory", "system": "http://hl7.org/fhir/observation-category" } ] } ], "code": { "coding": [ { "code": "18262-6", "display": "Low Density Lipoprotein Cholesterol", "system": "http://loinc.org" } ], "text": "Low Density Lipoprotein Cholesterol" }, "effectiveDateTime": "2008-03-07T17:47:02-05:00", "encounter": { "reference": "Encounter/0e9d631c-4407-45e5-bfbe-689806caaf7b" }, "id": "58357362-6f18-438a-8479-3289ebab1617", "issued": "2008-03-07T17:47:02-05:00", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-observation-Observation" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Observation", "status": "final", "subject": { "reference": "Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a" }, "valueQuantity": { "code": "mg/dL", "system": "http://unitsofmeasure.org", "unit": "mg/dL", "value": 102 } }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/c6f1b042-a0fc-4bbc-9cd5-7a8a924c00e7", "resource": { "category": [ { "coding": [ { "code": "laboratory", "system": "http://hl7.org/fhir/observation-category" } ] } ], "code": { "coding": [ { "code": "2085-9", "display": "High Density Lipoprotein Cholesterol", "system": "http://loinc.org" } ], "text": "High Density Lipoprotein Cholesterol" }, "effectiveDateTime": "2008-03-07T17:47:02-05:00", "encounter": { "reference": "Encounter/0e9d631c-4407-45e5-bfbe-689806caaf7b" }, "id": "c6f1b042-a0fc-4bbc-9cd5-7a8a924c00e7", "issued": "2008-03-07T17:47:02-05:00", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-observation-Observation" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Observation", "status": "final", "subject": { "reference": "Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a" }, "valueQuantity": { "code": "mg/dL", "system": "http://unitsofmeasure.org", "unit": "mg/dL", "value": 60 } }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/ac57b908-2804-4d67-a7ad-1e4a4c3225a1", "resource": { "category": [ { "coding": [ { "code": "vital-signs", "system": "http://hl7.org/fhir/observation-category" } ] } ], "code": { "coding": [ { "code": "29463-7", "display": "Body Weight", "system": "http://loinc.org" } ], "text": "Body Weight" }, "effectiveDateTime": "2008-03-07T17:47:02-05:00", "encounter": { "reference": "Encounter/0e9d631c-4407-45e5-bfbe-689806caaf7b" }, "id": "ac57b908-2804-4d67-a7ad-1e4a4c3225a1", "issued": "2008-03-07T17:47:02-05:00", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-observation-Observation", "http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-VitalSign", "http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BodyWeight" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Observation", "status": "final", "subject": { "reference": "Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a" }, "valueQuantity": { "code": "kg", "system": "http://unitsofmeasure.org", "unit": "kg", "value": 121.12557348891558 } }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/?subject%3APatient.name=Christopher" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/?subject%3APatient.name=Christopher" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation/?subject%3APatient.name=Christopher" } ], "resourceType": "Bundle", "total": 8, "type": "searchset" }
Penelusuran berantai terbalik
Penelusuran berantai terbalik mencocokkan resource berdasarkan kriteria pada resource lain yang merujuknya. Sintaksis untuk penelusuran berantai terbalik adalah:
_has:[resource type]:[reference parameter]:[search parameter]=[value]
Misalnya, resource Appointment
memiliki parameter penelusuran patient
yang merujuk pada resource Patient
. Untuk menemukan semua resource Patient
yang
direferensikan oleh resource Appointment
dengan tanggal 2020-04-01
, gunakan
Patient?_has:Appointment:patient:date=eq2020-04-01
.
Rantai terbalik dapat bersifat rekursif dengan rantai atau rantai terbalik lain, misalnya
Practitioner?_has:Encounter:practitioner:_has:Claim:encounter:created=eq2020-04-01
akan cocok dengan Practitioner
P jika ada Encounter
E dan Claim
C sedemikian rupa
sehingga C memiliki tanggal pembuatan 2020-04-01
, C merujuk ke E melalui referensi encounter
, dan E mengacu ke P melalui referensi practitioner
-nya.
Contoh penelusuran berantai terbalik
REST
Sebelum menggunakan salah satu data permintaan, lakukan penggantian berikut:
- PROJECT_ID: project ID Google Cloud Anda
- LOCATION: lokasi set data induk
- DATASET_ID: set data induk penyimpanan FHIR
- FHIR_STORE_ID: ID penyimpanan FHIR
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
curl
Contoh berikut menggunakan kueri
Patient?_has:Procedure:patient:date=eq2008-03-07
.
Jalankan perintah berikut:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?_has:Procedure:patient:date=eq2008-03-07"
PowerShell
Contoh berikut menggunakan kueri
Patient?_has:Procedure:patient:date=eq2008-03-07
.
Jalankan perintah berikut:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?_has:Procedure:patient:date=eq2008-03-07" | Select-Object -Expand Content
Anda akan melihat respons JSON seperti berikut:
{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a", "resource": { "address": [ { "country": "US", "line": [ "907 Arlo Cliffs", "Suite 984" ], "postalCode": "XXXXX" } ], "birthDate": "1940-12-01", "communication": [ { "language": { "coding": [ { "code": "en-US", "display": "English (United States)", "system": "urn:ietf:bcp:47" } ] } } ], "deceasedDateTime": "2009-07-26T12:01:23-05:00", "extension": [ { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "valueCodeableConcept": { "coding": [ { "code": "2106-3", "display": "White", "system": "http://hl7.org/fhir/v3/Race" } ], "text": "race" } }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "valueCodeableConcept": { "coding": [ { "code": "2186-5", "display": "Nonhispanic", "system": "http://hl7.org/fhir/v3/Ethnicity" } ], "text": "ethnicity" } }, { "url": "http://hl7.org/fhir/StructureDefinition/birthPlace", "valueAddress": { "city": "Tama", "country": "US", "postalCode": "52339", "state": "Iowa" } }, { "url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName", "valueString": "Farrah Feeney" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "M" }, { "url": "http://hl7.org/fhir/StructureDefinition/patient-interpreterRequired", "valueBoolean": false }, { "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-actor-FictionalPerson-extension", "valueBoolean": true }, { "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-demographics-FathersName-extension", "valueHumanName": { "text": "Christopher Diaz" } }, { "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-demographics-SocialSecurityNumber-extension", "valueString": "999-16-9041" } ], "gender": "male", "generalPractitioner": [ { "reference": "Organization/9fb51c89-1453-406c-8357-578311b43a91" } ], "id": "8ac08aa9-63d2-4e81-8647-3a138d7f9f5a", "identifier": [ { "system": "https://github.com/synthetichealth/synthea", "value": "c1ee4b49-3194-4b39-91ed-4d1393a780c6" }, { "system": "http://hl7.org/fhir/sid/us-ssn", "type": { "coding": [ { "code": "SB", "system": "http://hl7.org/fhir/identifier-type" } ] }, "value": "999169041" }, { "system": "urn:oid:2.16.840.1.113883.4.3.25", "type": { "coding": [ { "code": "DL", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "S99992205" }, { "system": "http://standardhealthrecord.org/fhir/StructureDefinition/passportNumber", "type": { "coding": [ { "code": "PPN", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "X12551631X" }, { "system": "http://hospital.smarthealthit.org", "type": { "coding": [ { "code": "MR", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "c1ee4b49-3194-4b39-91ed-4d1393a780c6" } ], "maritalStatus": { "coding": [ { "code": "S", "system": "http://hl7.org/fhir/v3/MaritalStatus" } ], "text": "S" }, "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-demographics-PersonOfRecord" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "multipleBirthBoolean": false, "name": [ { "family": "Diaz", "given": [ "Christopher" ], "prefix": [ "Mr." ], "use": "official" } ], "resourceType": "Patient", "telecom": [ { "system": "phone", "use": "home", "value": "434-100-2918 x800" } ], "text": { "div": "Generated by Synthea. Version identifier: 2dd4c1c37e2743d14e5073c7b5e42899a3e51531", "status": "generated" } }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_has%3AProcedure%3Apatient%3Adate=eq2008-03-07" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_has%3AProcedure%3Apatient%3Adate=eq2008-03-07" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_has%3AProcedure%3Apatient%3Adate=eq2008-03-07" } ], "resourceType": "Bundle", "total": 1, "type": "searchset" }
Menyertakan sumber daya tambahan dalam hasil penelusuran
Parameter _include
dan _revinclude
meminta hasil penelusuran
menyertakan resource tambahan ("resource yang disertakan") yang terkait dengan resource
yang langsung cocok dengan kueri ("hasil utama"). Menggunakan parameter ini lebih
efisien daripada membuat serangkaian permintaan untuk mengambil
resource tambahan ini secara terpisah. Dalam paket searchset
yang ditampilkan dari penelusuran,
resource yang ditambahkan oleh parameter ini akan ditandai dengan
entry.search.mode = include
untuk membedakannya dari hasil utama yang
akan memiliki entry.search.mode = match
.
Penyertaan maju dengan _include
akan menambahkan resource dan versi resource
yang dirujuk oleh hasil utama, dan penyertaan terbalik dengan _revinclude
akan menambahkan
resource yang mereferensikan hasil utama. Referensi yang akan diikuti ditentukan oleh nama parameter penelusuran, dan hanya kolom referensi yang tersedia sebagai parameter penelusuran yang dapat digunakan dengan cara ini.
Format parameter untuk _include
dan _revinclude
adalah sama, mengambil dua atau tiga nilai yang dipisahkan oleh :
. Nilai pertama adalah jenis resource asal
referensi, nilai kedua adalah nama parameter penelusuran, dan
nilai ketiga yang opsional membatasi jenis resource ke satu jenis ketika
referensi dapat menunjuk ke lebih dari satu jenis.
Contoh:
MedicationRequest?_include=MedicationRequest:subject
menelusuri resourceMedicationRequest
, dan untuk setiap resource yang ditampilkan juga menampilkan target referensisubject
yang mungkin berupaGroup
atauPatient
seperti yang ditentukan dalam spesifikasi FHIR.MedicationRequest?_include=MedicationRequest:subject:Patient
serupa, tetapi hanya menampilkan referensisubject
ke resourcePatient
.MedicationRequest?_revinclude=Provenance:target
menelusuri resourceMedicationRequest
, dan untuk setiap resource yang ditampilkan juga akan menampilkan resourceProvenance
apa pun yang referensitarget
padaProvenance
merujuk ke resource yang cocok.
_include
contoh penelusuran
REST
Sebelum menggunakan salah satu data permintaan, lakukan penggantian berikut:
- PROJECT_ID: project ID Google Cloud Anda
- LOCATION: lokasi set data induk
- DATASET_ID: set data induk penyimpanan FHIR
- FHIR_STORE_ID: ID penyimpanan FHIR
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
curl
Contoh berikut menggunakan kueri
Observation?code=http://loinc.org|2571-8&_include=*
.
Jalankan perintah berikut:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation?code=http://loinc.org|2571-8&_include=*"
PowerShell
Contoh berikut menggunakan kueri
Observation?code=http://loinc.org|2571-8&_include=*
.
Jalankan perintah berikut:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Observation?code=http://loinc.org|2571-8&_include=*" | Select-Object -Expand Content
Anda akan melihat respons JSON seperti berikut:
{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a", "resource": { "address": [ { "country": "US", "line": [ "907 Arlo Cliffs", "Suite 984" ], "postalCode": "XXXXX" } ], "birthDate": "1940-12-01", "communication": [ { "language": { "coding": [ { "code": "en-US", "display": "English (United States)", "system": "urn:ietf:bcp:47" } ] } } ], "deceasedDateTime": "2009-07-26T12:01:23-05:00", "extension": [ { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "valueCodeableConcept": { "coding": [ { "code": "2106-3", "display": "White", "system": "http://hl7.org/fhir/v3/Race" } ], "text": "race" } }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "valueCodeableConcept": { "coding": [ { "code": "2186-5", "display": "Nonhispanic", "system": "http://hl7.org/fhir/v3/Ethnicity" } ], "text": "ethnicity" } }, { "url": "http://hl7.org/fhir/StructureDefinition/birthPlace", "valueAddress": { "city": "Tama", "country": "US", "postalCode": "52339", "state": "Iowa" } }, { "url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName", "valueString": "Farrah Feeney" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "M" }, { "url": "http://hl7.org/fhir/StructureDefinition/patient-interpreterRequired", "valueBoolean": false }, { "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-actor-FictionalPerson-extension", "valueBoolean": true }, { "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-demographics-FathersName-extension", "valueHumanName": { "text": "Christopher Diaz" } }, { "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-demographics-SocialSecurityNumber-extension", "valueString": "999-16-9041" } ], "gender": "male", "generalPractitioner": [ { "reference": "Organization/9fb51c89-1453-406c-8357-578311b43a91" } ], "id": "8ac08aa9-63d2-4e81-8647-3a138d7f9f5a", "identifier": [ { "system": "https://github.com/synthetichealth/synthea", "value": "c1ee4b49-3194-4b39-91ed-4d1393a780c6" }, { "system": "http://hl7.org/fhir/sid/us-ssn", "type": { "coding": [ { "code": "SB", "system": "http://hl7.org/fhir/identifier-type" } ] }, "value": "999169041" }, { "system": "urn:oid:2.16.840.1.113883.4.3.25", "type": { "coding": [ { "code": "DL", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "S99992205" }, { "system": "http://standardhealthrecord.org/fhir/StructureDefinition/passportNumber", "type": { "coding": [ { "code": "PPN", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "X12551631X" }, { "system": "http://hospital.smarthealthit.org", "type": { "coding": [ { "code": "MR", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "c1ee4b49-3194-4b39-91ed-4d1393a780c6" } ], "maritalStatus": { "coding": [ { "code": "S", "system": "http://hl7.org/fhir/v3/MaritalStatus" } ], "text": "S" }, "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "profile": [ "http://standardhealthrecord.org/fhir/StructureDefinition/shr-demographics-PersonOfRecord" ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "multipleBirthBoolean": false, "name": [ { "family": "Diaz", "given": [ "Christopher" ], "prefix": [ "Mr." ], "use": "official" } ], "resourceType": "Patient", "telecom": [ { "system": "phone", "use": "home", "value": "434-100-2918 x800" } ], "text": { "div": "Generated by Synthea. Version identifier: 2dd4c1c37e2743d14e5073c7b5e42899a3e51531", "status": "generated" } }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_has%3AProcedure%3Apatient%3Adate=eq2008-03-07" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_has%3AProcedure%3Apatient%3Adate=eq2008-03-07" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_has%3AProcedure%3Apatient%3Adate=eq2008-03-07" } ], "resourceType": "Bundle", "total": 1, "type": "searchset" }
Pengubah :iterate
menyebabkan _include
dievaluasi secara iteratif.
Pengubah ini dapat mengikuti lapisan referensi tambahan dari hasil yang disertakan,
atau mengikuti struktur rekursif seperti Observation:derived-from
yang merujuk
ke Observation
lain. Kedalaman rekursi terbatas.
Contoh:
Observation?_include:iterate=Observation:derived-from:Observation
menelusuri resourceObservation
dan secara berulang mengikuti referensi turunan dari pencocokan resourceObservation
, lalu dari resource yang disertakan, dan seterusnya.MedicationRequest?_revinclude=Provenance:target&_include:iterate=Provenance:agent
akan menelusuriMedicationRequest
, menyertakan resourceProvenance
dengantarget
yang ada dalam kumpulan hasil ini, lalu menyertakan juga resource yang direferensikan melalui parameteragent
dari resourceProvenance
tersebut.
Karakter pengganti, *
, menunjukkan bahwa semua referensi yang tersedia sebagai parameter penelusuran harus disertakan. Anda dapat menggunakan karakter pengganti *
sebagai argumen pertama dan satu-satunya
di _include
, atau sebagai pengganti nama parameter penelusuran dari
_include
standar, dengan nilai ketiga opsional membatasi jenis resource ke jenis
tunggal seperti perilaku asli.
Contoh:
Observation?_include=*
menelusuri resourceObservation
, dan untuk setiap resource juga menampilkan semua resource yang direferensikan.Observation?_include=Observation:*
setara dengan yang sebelumnya.MedicationRequest?_include=MedicationRequest:*:Patient
menampilkan semua referensi ke resourcePatient
untuk setiap resourceMedicationRequest
.
Server menghapus duplikat resource sehingga setiap halaman hasil hanya menyertakan satu salinan resource, meskipun resource muncul dalam beberapa referensi. Sumber daya disertakan yang sama muncul di setiap halaman hasil jika hasil utama berkaitan dengan hasil tersebut.
Perhatikan hal-hal berikut tentang resource tambahan yang disertakan menggunakan parameter _include
dan _revinclude
:
Resource yang disertakan tidak diperhitungkan dalam ukuran halaman. Parameter ini tidak dihitung dalam
Bundle.total
, dan dapat menyebabkan jumlah resource yang ditampilkan lebih besar dari parameter_count
yang ditentukan.Karena resource yang disertakan tidak diperhitungkan dalam ukuran halaman, berhati-hatilah saat menggunakan parameter
_include
dan_revinclude
yang mungkin memberikan banyak hasil. Ukuran hasil yang besar dapat menyebabkan waktu tunggu habis atau error. Sebaiknya gunakan nilai_count
yang lebih kecil untuk membatasi jumlah hasil utama jika Anda mengharapkan banyak hasil yang disertakan. Hindari mengikuti hubungan one-to-many yang tidak membatasi banyak sisi hubungan.Satu parameter
_revinclude
menambahkan maksimal 100 resource tambahan. Untuk kasus penggunaan ketika mungkin ada lebih dari 100 resource yang merujuk ke hasil utama, gunakan permintaan kueri penelusuran terpisah yang menggunakan ukuran halaman dan parameter penomoran halaman untuk mengambil lebih banyak hasil.
Membatasi kolom yang ditampilkan di hasil penelusuran
Parameter _elements
memungkinkan klien meminta hanya sebagian kolom yang ditampilkan untuk setiap hasil penelusuran guna mengurangi ukuran respons dengan menghapus data yang tidak diperlukan. Parameter ini menerima daftar nama elemen dasar yang dipisahkan koma dalam resource, misalnya Patient?_elements=identifier,contact,link
. Hanya kolom ini dan turunannya yang akan disertakan dalam resource yang ditampilkan. Resource dalam respons
yang telah diubah oleh parameter ini akan berisi nilai meta.tag
SUBSETTED
untuk menunjukkan bahwa resource tersebut tidak lengkap.
_elements
contoh penelusuran
REST
Sebelum menggunakan salah satu data permintaan, lakukan penggantian berikut:
- PROJECT_ID: project ID Google Cloud Anda
- LOCATION: lokasi set data induk
- DATASET_ID: set data induk penyimpanan FHIR
- FHIR_STORE_ID: ID penyimpanan FHIR
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
curl
Contoh berikut menggunakan kueri
Patient?_elements=identifier,contact,link
.
Jalankan perintah berikut:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?_elements=identifier,contact,link"
PowerShell
Contoh berikut menggunakan kueri
Patient?_elements=identifier,contact,link
.
Jalankan perintah berikut:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient?_elements=identifier,contact,link" | Select-Object -Expand Content
Anda akan melihat respons JSON seperti berikut:
{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient3", "resource": { "id": "patient3", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "SUBSETTED", "system": "http://hl7.org/fhir/v3/ObservationValue" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Patient" }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient2", "resource": { "id": "patient2", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "SUBSETTED", "system": "http://hl7.org/fhir/v3/ObservationValue" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Patient" }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/8ac08aa9-63d2-4e81-8647-3a138d7f9f5a", "resource": { "id": "8ac08aa9-63d2-4e81-8647-3a138d7f9f5a", "identifier": [ { "system": "https://github.com/synthetichealth/synthea", "value": "c1ee4b49-3194-4b39-91ed-4d1393a780c6" }, { "system": "http://hl7.org/fhir/sid/us-ssn", "type": { "coding": [ { "code": "SB", "system": "http://hl7.org/fhir/identifier-type" } ] }, "value": "999169041" }, { "system": "urn:oid:2.16.840.1.113883.4.3.25", "type": { "coding": [ { "code": "DL", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "S99992205" }, { "system": "http://standardhealthrecord.org/fhir/StructureDefinition/passportNumber", "type": { "coding": [ { "code": "PPN", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "X12551631X" }, { "system": "http://hospital.smarthealthit.org", "type": { "coding": [ { "code": "MR", "system": "http://hl7.org/fhir/v2/0203" } ] }, "value": "c1ee4b49-3194-4b39-91ed-4d1393a780c6" } ], "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "SUBSETTED", "system": "http://hl7.org/fhir/v3/ObservationValue" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Patient" }, "search": { "mode": "match" } }, { "fullUrl": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/patient1", "resource": { "id": "patient1", "meta": { "lastUpdated": "YYYY-MM-DDTHH:MM:SS+ZZ:ZZ", "tag": [ { "code": "SUBSETTED", "system": "http://hl7.org/fhir/v3/ObservationValue" } ], "versionId": "MTYzMTgyMTExMDIyMDk5ODAwMA" }, "resourceType": "Patient" }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_elements=identifier%2Ccontact%2Clink" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_elements=identifier%2Ccontact%2Clink" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID/fhir/Patient/?_elements=identifier%2Ccontact%2Clink" } ], "resourceType": "Bundle", "total": 4, "type": "searchset" }
Cloud Healthcare API memiliki dukungan terbatas untuk parameter _summary
,
yang menyediakan subset kolom resource yang telah ditetapkan, mirip dengan _elements
:
_summary=text
hanya menampilkan kolom tingkat teratastext
,id
, danmeta
_summary=data
menghapus kolomtext
dan menampilkan semua kolom lainnya