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)
_include 允许您使用当前资源中定义的 SearchParameters 进行搜索。 因此,例如,您可以说 _include=Patient:organization
_revinclude 允许您使用所需资源中定义的搜索参数进行搜索,该资源指向搜索条件中包含的资源。 因此,您可以说
_revinclude=Provenance:target:Patient
来包含指向患者的所有来源实例。
您无法使用 _revinclude 返回与患者关联的组织,因为组织没有任何可以指向患者的引用类型的 SearchParameters。 (FHIR 非常努力地确保关系仅在一个方向上表达 - 患者指向组织,但组织不指向患者。)患者搜索参数“组织”定义为基于路径 Patient.managingOrganization。 它不会搜索 Patient.contact.organization。