在基数 0..* 上包含或 RevInclude

问题描述 投票:0回答:1
使用本教程:

https://github.com/hapifhir/fhir-tutorial/blob/master/Search_References_ChainHasIncludeRevinclude/lesson.md#reverse-include-_revinclude-1

还有这张图片

包含和反向包含图像

当是parent:child关系时,直接知道_include和_revinclude“方向”。

Specimen Include-> Patient Patient Include-> Organization Organization ReverseInclude-> Patient Patient ReverseInclude-> Specimen
当关系为“M:N”时

并且

一侧由许多FHIR-Resource-Types组成

让我们使用:

https://www.hl7.org/fhir/patent-definitions.html#Patient.generalPractitioner

举个例子:

会不会是:

Patient Include-> generalPractitioner (and all three of these come along for the ride -> Organization | Practitioner | PractitionerRole)

Patient ReverseInclude-> generalPractitioner (and all three of these come along for the ride -> Organization | Practitioner | PractitionerRole)

Patient Include-> Organization Patient Include-> Practitioner Patient Include-> PractitionerRole

Patient ReverseInclude-> Organization Patient ReverseInclude-> Practitioner Patient ReverseInclude-> PractitionerRole
或
我还差得远吗? ?

======

但我看到一个问题:

Patient Include-> Organization (as generalPractitioner)
会与“正常”相冲突

https://www.hl7.org/fhir/patent-definitions.html#Patient.contact.organization

以及管理组织

https://www.hl7.org/fhir/Patient-definitions.html#Patient.managingOrganization

====

为了方便起见,下面的“规格”。

Patient.generalPractitioner Element Id Patient.generalPractitioner Definition Patient's nominated care provider. Cardinality 0..* Type Reference(Organization | Practitioner | PractitionerRole)
    
hl7-fhir hl7
1个回答
0
投票
当您检索与搜索条件不匹配的资源时,“唯一”的方法是使用定义的 SearchParameter,该参数存在于您要搜索的资源上,或者存在于指向的其他资源上您的搜索集中包含的资源之一。

_include 允许您使用当前资源中定义的 SearchParameters 进行搜索。 因此,例如,您可以说 _include=Patient:organization

它将检索与患者关联的管理组织。

_revinclude 允许您使用所需资源中定义的搜索参数进行搜索,该资源指向搜索条件中包含的资源。  因此,您可以说 
_revinclude=Provenance:target:Patient

来包含指向患者的所有来源实例。

您无法使用 _revinclude 返回与患者关联的组织,因为组织没有任何可以指向患者的引用类型的 SearchParameters。  (FHIR 非常努力地确保关系仅在一个方向上表达 - 患者指向组织,但组织不指向患者。)

患者搜索参数“组织”定义为基于路径 Patient.managingOrganization。 它不会搜索 Patient.contact.organization。

© www.soinside.com 2019 - 2024. All rights reserved.