Azure FHIR使用_include搜索资源

时间:2020-07-14 21:30:10

标签: sql azure hl7-fhir

我有一个DiagnosticReport资源,该资源具有一个遇到事件和3个观察资源引用。我正在尝试执行一个搜索查询,该查询将返回带有DiagnosticReport和所有引用资源的Bundle,以便不必执行其他4个查询。

"encounter": {
    "reference": "Encounter/8720d7d7-68cc-3575-8c79-9de39561324c"
},
"effectivePeriod": {
    "start": "2020-07-01T08:16:00.000Z",
    "end": "2020-07-01T08:16:00.000Z"
},
"issued": "2020-07-01T08:17:03+00:00",
"result": [
    {
        "reference": "Observation/89510c61-8a94-3c65-8832-3397d2a70bfd"
    },
    {
        "reference": "Observation/3d837dbf-3d4c-3742-9b6e-2638d26d8c54"
    },
    {
        "reference": "Observation/618ec246-2d98-3179-a0a2-a0094046f466"
    }
]
I have tried 
[Base]/DiagnosticReport/{id}?_include=DiagnosticReport:Encounter
[Base]/DiagnosticReport/{id}?_include=DiagnosticReport:Encounter/{id}
Is there a way to get the DiagnosticReport & Encoutner & Observation in one Bundle?

This is an SQL OSS FHIR Server, so according to Documentation _include is supported in the SQL Version of azure.


 

2 个答案:

答案 0 :(得分:1)

在指定包含内容时,您需要使用搜索参数,因此在您的情况下:

https://fhir-server-url/DiagnosticReport?_id=1234&_include=DiagnosticReport:encounter&_include=DiagnosticReport:result

将返回捆绑中的遭遇和观察资源。

答案 1 :(得分:0)

我也在使用 FHIR API 服务。我为 Encounter 遇到了这个问题,这对我有用。

https://lcavantage.azurehealthcareapis.com/Encounter?_id=f1c06cc6-be9c-e673-408e-e6e303d9924a&_include=Encounter:subject

我相信这现在有效,因为 COSMOS DB 有一些更新,提出了这个问题并且更好地处理了关系!