查询患者资源以查找 BOTH/ALL 个名字
Rest Query on the Patient Resource for Finding BOTH/ALL Given Name(s)
如何搜索具有我提供的两个名字的人?
我有以下2位患者"close"。一切(在 Human Name 区域)都是相同的,除了其中一个 GivenNames 是相同的。
注意 "Apple" 与 "Banana".
{
"resourceType": "Bundle",
"id": "269caf66-0ccc-43e7-b9a5-f16f84db0149",
"meta": {
"lastUpdated": "2019-11-20T19:30:26.858917+00:00"
},
"type": "searchset",
"link": [
{
"relation": "self",
"url": "https://localhost:44348/Patient?given=Jingerheimer"
}
],
"entry": [
{
"fullUrl": "https://localhost:44348/Patient/504f6bd3-e9b4-4846-8948-97bf09c70722",
"resource": {
"resourceType": "Patient",
"id": "504f6bd3-e9b4-4846-8948-97bf09c70722",
"meta": {
"versionId": "1",
"lastUpdated": "2019-11-20T19:26:11.005+00:00"
},
"identifier": [
{
"system": "ssn",
"value": "111-11-1111"
},
{
"system": "uuid",
"value": "da55d068e0784b359fa97498a11543c5"
}
],
"name": [
{
"family": "Smith",
"given": [
"John",
"Apple",
"Jingerheimer"
]
}
]
},
"search": {
"mode": "match"
}
},
{
"fullUrl": "https://localhost:44348/Patient/10054ce9-6141-4eca-bc5b-0978f8c8afcb",
"resource": {
"resourceType": "Patient",
"id": "10054ce9-6141-4eca-bc5b-0978f8c8afcb",
"meta": {
"versionId": "1",
"lastUpdated": "2019-11-20T19:26:48.962+00:00"
},
"identifier": [
{
"system": "ssn",
"value": "222-22-2222"
},
{
"system": "uuid",
"value": "52d09f9436d44591816fd229dd139523"
}
],
"name": [
{
"family": "Smith",
"given": [
"John",
"Banana",
"Jingerheimer"
]
}
]
},
"search": {
"mode": "match"
}
}
]
}
一个人的 GivenNames 包括 "Apple"。另一个包括包含 "Banana".
的 GivenNames
此搜索工作正常:
https://localhost:44348/Patient/?given=Jingerheimer
我试过的是:
https://localhost:44348/Patient/?given=Jingerheimer&given=Apple
但这没有给我任何结果。
请注意,省略 "given=Jingerheimer" 不是一个选项....会过滤很多其他选项。
我正在尝试获取
"Has BOTH of the given names I provide"
您的语法是正确的,所以我认为服务器没有正确处理搜索。您可以检查第二次搜索的 self link 是否反映了您执行的搜索?结果 Bundle 是否有一个 OperationOutcome 详细说明出了什么问题?如果一切正常,您需要检查服务器代码。
如何搜索具有我提供的两个名字的人?
我有以下2位患者"close"。一切(在 Human Name 区域)都是相同的,除了其中一个 GivenNames 是相同的。 注意 "Apple" 与 "Banana".
{
"resourceType": "Bundle",
"id": "269caf66-0ccc-43e7-b9a5-f16f84db0149",
"meta": {
"lastUpdated": "2019-11-20T19:30:26.858917+00:00"
},
"type": "searchset",
"link": [
{
"relation": "self",
"url": "https://localhost:44348/Patient?given=Jingerheimer"
}
],
"entry": [
{
"fullUrl": "https://localhost:44348/Patient/504f6bd3-e9b4-4846-8948-97bf09c70722",
"resource": {
"resourceType": "Patient",
"id": "504f6bd3-e9b4-4846-8948-97bf09c70722",
"meta": {
"versionId": "1",
"lastUpdated": "2019-11-20T19:26:11.005+00:00"
},
"identifier": [
{
"system": "ssn",
"value": "111-11-1111"
},
{
"system": "uuid",
"value": "da55d068e0784b359fa97498a11543c5"
}
],
"name": [
{
"family": "Smith",
"given": [
"John",
"Apple",
"Jingerheimer"
]
}
]
},
"search": {
"mode": "match"
}
},
{
"fullUrl": "https://localhost:44348/Patient/10054ce9-6141-4eca-bc5b-0978f8c8afcb",
"resource": {
"resourceType": "Patient",
"id": "10054ce9-6141-4eca-bc5b-0978f8c8afcb",
"meta": {
"versionId": "1",
"lastUpdated": "2019-11-20T19:26:48.962+00:00"
},
"identifier": [
{
"system": "ssn",
"value": "222-22-2222"
},
{
"system": "uuid",
"value": "52d09f9436d44591816fd229dd139523"
}
],
"name": [
{
"family": "Smith",
"given": [
"John",
"Banana",
"Jingerheimer"
]
}
]
},
"search": {
"mode": "match"
}
}
]
}
一个人的 GivenNames 包括 "Apple"。另一个包括包含 "Banana".
的 GivenNames此搜索工作正常:
https://localhost:44348/Patient/?given=Jingerheimer
我试过的是:
https://localhost:44348/Patient/?given=Jingerheimer&given=Apple
但这没有给我任何结果。
请注意,省略 "given=Jingerheimer" 不是一个选项....会过滤很多其他选项。
我正在尝试获取
"Has BOTH of the given names I provide"
您的语法是正确的,所以我认为服务器没有正确处理搜索。您可以检查第二次搜索的 self link 是否反映了您执行的搜索?结果 Bundle 是否有一个 OperationOutcome 详细说明出了什么问题?如果一切正常,您需要检查服务器代码。