Current Build

Переводит команда Health Samurai . Приглашаем поучаствовать в русификации стандарта FHIR: GitHub , Email.

5.6 Ресурс CompartmentDefinition - Назначение

FHIR Infrastructure Work GroupMaturity Level: 1 Trial UseSecurity Category: Anonymous Compartments: Not linked to any defined compartments

Определение логического модуля, описывающее, каким образом ресурсы доступны на сервере.

Каждый ресурс может принадлежать одному или нескольким логическим модулям. Логический модуль - это логическая группировка ресурсов, имеющих какое-то общее свойство. Логические модули играют две основные роли:

  • функционируют в качестве механизма доступа для быстрого поиска набора связанных ресурсов
  • предоставляют определительную основу для быстрого применения контроля доступа к ресурсам

Note:

At present, CompartmentDefinitions can only be defined by HL7 International. This is because their existence creates significant impact on the behavior of servers.

Определения логических модулей описывают, каким образом конкретные экземпляры логических модулей именуются и идентифицируются, и каким образом системы узнают, какие ресурсы входят в логический модуль. Следующие логические модули определены самой спецификацией:

TitleОпределениеIdentityMembership
PatientThe set of resources associated with a particular patientThere is an instance of the patient compartment for each patient resource, and the identity of the compartment is the same as the patient. When a patient is linked to another patient, all the records associated with the linked patient are in the compartment associated with the target of the link.The patient compartment includes any resources where the subject of the resource is the patient, and some other resources that are directly linked to resources in the patient compartment
EncounterThe set of resources associated with a particular encounterThere is an instance of the encounter compartment for each encounter resource, and the identity of the compartment is the same as the encounterThe encounter compartment includes any resources where the resource has an explicitly nominated encounter, and some other resources that themselves link to resources in the encounter compartment. Note that for many resources, the exact nature of the link to encounter can be ambiguous (e.g. for a DiagnosticReport, is it the encounter when it was initiated, or when it was reported?)
RelatedPersonThe set of resources associated with a particular 'related person'There is an instance of the relatedPerson compartment for each relatedPerson resource, and the identity of the compartment is the same as the relatedPersonThe relatedPerson compartment includes any resources where the resource is explicitly linked to relatedPerson (usually as author)
PractitionerThe set of resources associated with a particular practitionerThere is an instance of the practitioner compartment for each Practitioner resource, and the identity of the compartment is the same as the PractitionerThe practitioner compartment includes any resources where the resource is explicitly linked to a Practitioner (usually as author, but other kinds of linkage exist)
DeviceThe set of resources associated with a particular deviceThere is an instance of the device compartment for each Device resource, and the identity of the compartment is the same as the DeviceThe device compartment includes any resources where the resource is explicitly linked to a Device (mostly subject or performer)

Полные определения этих логических модулей публикуются в виде ресурсов CompartmentDefinition. Обычно серверы не поддерживают полное определение логического модуля и не обязаны это делать. Системы могут публиковать ресурсы CompartmentDefinition, чтобы другие системы могли ими воспользоваться должным образом.

  • Ресурсы CompartmentDefinition используются в экземплярах ресурса CapabilityStatement для описания доступа к ресурсам.

На этот ресурс ссылается CapabilityStatement

Структура

ИмяФлагиКард.ТипОписание и ограниченияdoco
.. CompartmentDefinition ITUDomainResourceОпределение логического модуля для ресурса
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation
Элементы, определённые в прародителе: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... url Σ1..1uriCanonical identifier for this compartment definition, represented as a URI (globally unique)
... version Σ0..1stringBusiness version of the compartment definition
... name ΣI1..1stringName for this compartment definition (computer friendly)
... status ?!Σ1..1codedraft | active | retired | unknown
PublicationStatus (Required)
... experimental Σ0..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ0..1stringName of the publisher (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 0..1markdownNatural language description of the compartment definition
... useContext Σ0..*UsageContextThe context that the content is intended to support
... purpose 0..1markdownWhy this compartment definition is defined
... code Σ1..1codePatient | Encounter | RelatedPerson | Practitioner | Device
CompartmentType (Required)
... search Σ1..1booleanПоддержан ли синтаксис поиска
... resource Σ0..*BackboneElementHow a resource is related to the compartment
.... code Σ1..1codeТип ресурса
ResourceType (Required)
.... param Σ0..*stringSearch Parameter Name, or chained parameters
.... documentation 0..1stringAdditional documentation about the resource and compartment

doco Документация по этому формату

UML-диаграмма (Legend)

CompartmentDefinition (DomainResource)An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different serversurl : uri [1..1]The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequenceversion : string [0..1]A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generationname : string [1..1]The status of this compartment definition. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements)status : code [1..1] « The lifecycle status of an artifact. (Strength=Required)PublicationStatus! »A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usageexperimental : boolean [0..1]The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changesdate : dateTime [0..1]The name of the organization or individual that published the compartment definitionpublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the compartment definition from a consumer's perspectivedescription : markdown [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instancesuseContext : UsageContext [0..*]Explanation of why this compartment definition is needed and why it has been designed as it haspurpose : markdown [0..1]Какой логический модуль это определение описываетcode : code [1..1] « Which type a compartment definition describes. (Strength=Required)CompartmentType! »Whether the search syntax is supported,search : boolean [1..1]ResourceТип ресурса, поддерживаемого серверомcode : code [1..1] « One of the resource types defined as part of this version of FHIR. (Strength=Required)ResourceType! »Имя параметра поиска, которое представляет собой ссылку на этот логический модуль. Можно указать больше одного, поскольку ресурс может быть связан с логическим модулем больше чем одним способомparam : string [0..*]Additional documentation about the resource and compartmentdocumentation : string [0..1]Информация о том, как ресурс связан с этим логическим модулемresource[0..*]

XML-шаблон

<CompartmentDefinition xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 1..1 Canonical identifier for this compartment definition, represented as a URI (globally unique) -->
 <version value="[string]"/><!-- 0..1 Business version of the compartment definition -->
 <name value="[string]"/><!-- ?? 1..1 Name for this compartment definition (computer friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the compartment definition -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext>
 <purpose value="[markdown]"/><!-- 0..1 Why this compartment definition is defined -->
 <code value="[code]"/><!-- 1..1 Patient | Encounter | RelatedPerson | Practitioner | Device -->
 <search value="[boolean]"/><!-- 1..1 Поддержан ли синтаксис поиска -->
 <resource>  <!-- 0..* How a resource is related to the compartment -->
  <code value="[code]"/><!-- 1..1 Тип ресурса -->
  <param value="[string]"/><!-- 0..* Search Parameter Name, or chained parameters -->
  <documentation value="[string]"/><!-- 0..1 Additional documentation about the resource and compartment -->
 </resource>
</CompartmentDefinition>

Turtle-шаблон

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:CompartmentDefinition;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:CompartmentDefinition.url [ uri ]; # 1..1 Canonical identifier for this compartment definition, represented as a URI (globally unique)
  fhir:CompartmentDefinition.version [ string ]; # 0..1 Business version of the compartment definition
  fhir:CompartmentDefinition.name [ string ]; # 1..1 Name for this compartment definition (computer friendly)
  fhir:CompartmentDefinition.status [ code ]; # 1..1 draft | active | retired | unknown
  fhir:CompartmentDefinition.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:CompartmentDefinition.date [ dateTime ]; # 0..1 Date last changed
  fhir:CompartmentDefinition.publisher [ string ]; # 0..1 Name of the publisher (organization or individual)
  fhir:CompartmentDefinition.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:CompartmentDefinition.description [ markdown ]; # 0..1 Natural language description of the compartment definition
  fhir:CompartmentDefinition.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support
  fhir:CompartmentDefinition.purpose [ markdown ]; # 0..1 Why this compartment definition is defined
  fhir:CompartmentDefinition.code [ code ]; # 1..1 Patient | Encounter | RelatedPerson | Practitioner | Device
  fhir:CompartmentDefinition.search [ boolean ]; # 1..1 Поддержан ли синтаксис поиска
  fhir:CompartmentDefinition.resource [ # 0..* How a resource is related to the compartment
    fhir:CompartmentDefinition.resource.code [ code ]; # 1..1 Тип ресурса
    fhir:CompartmentDefinition.resource.param [ string ], ... ; # 0..* Search Parameter Name, or chained parameters
    fhir:CompartmentDefinition.resource.documentation [ string ]; # 0..1 Additional documentation about the resource and compartment
  ], ...;
]

Changes since R3

CompartmentDefinition
CompartmentDefinition
  • Min Cardinality changed from 1 to 0
  • Max Cardinality changed from 1 to *
CompartmentDefinition.version
  • Added Element
CompartmentDefinition.experimental
  • No longer marked as Modifier
CompartmentDefinition.resource.code
  • Remove Codes BodySite, DataElement, DeviceComponent, EligibilityRequest, EligibilityResponse, ExpansionProfile, ImagingManifest, ProcedureRequest, ProcessRequest, ProcessResponse, ReferralRequest, Sequence, ServiceDefinition
  • Add Codes BiologicallyDerivedProduct, BodyStructure, CatalogEntry, ChargeItemDefinition, CoverageEligibilityRequest, CoverageEligibilityResponse, DeviceDefinition, EffectEvidenceSynthesis, EventDefinition, Evidence, EvidenceVariable, ExampleScenario, ImmunizationEvaluation, InsurancePlan, Invoice, ItemInstance, MedicationKnowledge, MedicinalProduct, MedicinalProductAuthorization, MedicinalProductContraindication, MedicinalProductIndication, MedicinalProductIngredient, MedicinalProductInteraction, MedicinalProductManufactured, MedicinalProductPackaged, MedicinalProductPharmaceutical, MedicinalProductUndesirableEffect, MolecularSequence, ObservationDefinition, OrganizationAffiliation, ResearchDefinition, ResearchElementDefinition, RiskEvidenceSynthesis, ServiceRequest, SpecimenDefinition, SubstanceNucleicAcid, SubstancePolymer, SubstanceProtein, SubstanceReferenceInformation, SubstanceSourceMaterial, SubstanceSpecification, TerminologyCapabilities, VerificationResult
CompartmentDefinition.title
  • deleted
CompartmentDefinition.jurisdiction
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON.

See R3 <--> R4 Conversion Maps (status = 6 tests that all execute ok. 1 fail round-trip testing and 5 r3 resources are invalid (0 errors).)

Структура

ИмяФлагиКард.ТипОписание и ограниченияdoco
.. CompartmentDefinition ITUDomainResourceОпределение логического модуля для ресурса
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation
Элементы, определённые в прародителе: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... url Σ1..1uriCanonical identifier for this compartment definition, represented as a URI (globally unique)
... version Σ0..1stringBusiness version of the compartment definition
... name ΣI1..1stringName for this compartment definition (computer friendly)
... status ?!Σ1..1codedraft | active | retired | unknown
PublicationStatus (Required)
... experimental Σ0..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ0..1stringName of the publisher (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 0..1markdownNatural language description of the compartment definition
... useContext Σ0..*UsageContextThe context that the content is intended to support
... purpose 0..1markdownWhy this compartment definition is defined
... code Σ1..1codePatient | Encounter | RelatedPerson | Practitioner | Device
CompartmentType (Required)
... search Σ1..1booleanПоддержан ли синтаксис поиска
... resource Σ0..*BackboneElementHow a resource is related to the compartment
.... code Σ1..1codeТип ресурса
ResourceType (Required)
.... param Σ0..*stringSearch Parameter Name, or chained parameters
.... documentation 0..1stringAdditional documentation about the resource and compartment

doco Документация по этому формату

UML-диаграмма (Legend)

CompartmentDefinition (DomainResource)An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different serversurl : uri [1..1]The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequenceversion : string [0..1]A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generationname : string [1..1]The status of this compartment definition. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements)status : code [1..1] « The lifecycle status of an artifact. (Strength=Required)PublicationStatus! »A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usageexperimental : boolean [0..1]The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changesdate : dateTime [0..1]The name of the organization or individual that published the compartment definitionpublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the compartment definition from a consumer's perspectivedescription : markdown [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instancesuseContext : UsageContext [0..*]Explanation of why this compartment definition is needed and why it has been designed as it haspurpose : markdown [0..1]Какой логический модуль это определение описываетcode : code [1..1] « Which type a compartment definition describes. (Strength=Required)CompartmentType! »Whether the search syntax is supported,search : boolean [1..1]ResourceТип ресурса, поддерживаемого серверомcode : code [1..1] « One of the resource types defined as part of this version of FHIR. (Strength=Required)ResourceType! »Имя параметра поиска, которое представляет собой ссылку на этот логический модуль. Можно указать больше одного, поскольку ресурс может быть связан с логическим модулем больше чем одним способомparam : string [0..*]Additional documentation about the resource and compartmentdocumentation : string [0..1]Информация о том, как ресурс связан с этим логическим модулемresource[0..*]

XML-шаблон

<CompartmentDefinition xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 1..1 Canonical identifier for this compartment definition, represented as a URI (globally unique) -->
 <version value="[string]"/><!-- 0..1 Business version of the compartment definition -->
 <name value="[string]"/><!-- ?? 1..1 Name for this compartment definition (computer friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the compartment definition -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext>
 <purpose value="[markdown]"/><!-- 0..1 Why this compartment definition is defined -->
 <code value="[code]"/><!-- 1..1 Patient | Encounter | RelatedPerson | Practitioner | Device -->
 <search value="[boolean]"/><!-- 1..1 Поддержан ли синтаксис поиска -->
 <resource>  <!-- 0..* How a resource is related to the compartment -->
  <code value="[code]"/><!-- 1..1 Тип ресурса -->
  <param value="[string]"/><!-- 0..* Search Parameter Name, or chained parameters -->
  <documentation value="[string]"/><!-- 0..1 Additional documentation about the resource and compartment -->
 </resource>
</CompartmentDefinition>

Turtle-шаблон

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:CompartmentDefinition;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:CompartmentDefinition.url [ uri ]; # 1..1 Canonical identifier for this compartment definition, represented as a URI (globally unique)
  fhir:CompartmentDefinition.version [ string ]; # 0..1 Business version of the compartment definition
  fhir:CompartmentDefinition.name [ string ]; # 1..1 Name for this compartment definition (computer friendly)
  fhir:CompartmentDefinition.status [ code ]; # 1..1 draft | active | retired | unknown
  fhir:CompartmentDefinition.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:CompartmentDefinition.date [ dateTime ]; # 0..1 Date last changed
  fhir:CompartmentDefinition.publisher [ string ]; # 0..1 Name of the publisher (organization or individual)
  fhir:CompartmentDefinition.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:CompartmentDefinition.description [ markdown ]; # 0..1 Natural language description of the compartment definition
  fhir:CompartmentDefinition.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support
  fhir:CompartmentDefinition.purpose [ markdown ]; # 0..1 Why this compartment definition is defined
  fhir:CompartmentDefinition.code [ code ]; # 1..1 Patient | Encounter | RelatedPerson | Practitioner | Device
  fhir:CompartmentDefinition.search [ boolean ]; # 1..1 Поддержан ли синтаксис поиска
  fhir:CompartmentDefinition.resource [ # 0..* How a resource is related to the compartment
    fhir:CompartmentDefinition.resource.code [ code ]; # 1..1 Тип ресурса
    fhir:CompartmentDefinition.resource.param [ string ], ... ; # 0..* Search Parameter Name, or chained parameters
    fhir:CompartmentDefinition.resource.documentation [ string ]; # 0..1 Additional documentation about the resource and compartment
  ], ...;
]

Changes since Release 3

CompartmentDefinition
CompartmentDefinition
  • Min Cardinality changed from 1 to 0
  • Max Cardinality changed from 1 to *
CompartmentDefinition.version
  • Added Element
CompartmentDefinition.experimental
  • No longer marked as Modifier
CompartmentDefinition.resource.code
  • Remove Codes BodySite, DataElement, DeviceComponent, EligibilityRequest, EligibilityResponse, ExpansionProfile, ImagingManifest, ProcedureRequest, ProcessRequest, ProcessResponse, ReferralRequest, Sequence, ServiceDefinition
  • Add Codes BiologicallyDerivedProduct, BodyStructure, CatalogEntry, ChargeItemDefinition, CoverageEligibilityRequest, CoverageEligibilityResponse, DeviceDefinition, EffectEvidenceSynthesis, EventDefinition, Evidence, EvidenceVariable, ExampleScenario, ImmunizationEvaluation, InsurancePlan, Invoice, ItemInstance, MedicationKnowledge, MedicinalProduct, MedicinalProductAuthorization, MedicinalProductContraindication, MedicinalProductIndication, MedicinalProductIngredient, MedicinalProductInteraction, MedicinalProductManufactured, MedicinalProductPackaged, MedicinalProductPharmaceutical, MedicinalProductUndesirableEffect, MolecularSequence, ObservationDefinition, OrganizationAffiliation, ResearchDefinition, ResearchElementDefinition, RiskEvidenceSynthesis, ServiceRequest, SpecimenDefinition, SubstanceNucleicAcid, SubstancePolymer, SubstanceProtein, SubstanceReferenceInformation, SubstanceSourceMaterial, SubstanceSpecification, TerminologyCapabilities, VerificationResult
CompartmentDefinition.title
  • deleted
CompartmentDefinition.jurisdiction
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON.

See R3 <--> R4 Conversion Maps (status = 6 tests that all execute ok. 1 fail round-trip testing and 5 r3 resources are invalid (0 errors).)

 

See the Profiles & Extensions and the Альтернативные определения: Основное определение XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions & the Анализ зависимостей

PathОписаниеТипСсылка
CompartmentDefinition.status The lifecycle status of an artifact.RequiredPublicationStatus
CompartmentDefinition.code Which type a compartment definition describes.RequiredCompartmentType
CompartmentDefinition.resource.code One of the resource types defined as part of this version of FHIR.RequiredResource Types

idLevelLocationОпределениеExpression
cpd-0Warning (base)Name should be usable as an identifier for the module by machine processing applications such as code generationname.matches('[A-Z]([A-Za-z0-9_]){0,254}')

В качестве примера использования логического модуля, извлеките список проблем пациента с помощью такого URL:

  GET [base]/Patient/[id]/Condition

Можно задавать дополнительные параметры поиска, например такой гипотетический поиск острых клинических состояний:

  GET [base]/Patient/[id]/Condition?code:in=http://hspc.org/ValueSet/acute-concerns

Отметьте, что эти два URL ниже являются синтаксическими вариациями двух предыдущих примеров поиска, соответственно:

  GET [base]/Condition?patient=[id]
  GET [base]/Condition?patient=[id]&code:in=http://hspc.org/ValueSet/acute-concerns

The outcome of a compartment search is the same as the equivalent normal search. For example, both these searches return the same outcome if there is no patient 333:

  GET [base]/Patient/333/Condition
  GET [base]/Condition?patient=333

Whether the patient doesn't exist, or the user has no access to the patient, both these searches return an empty bundle with no matches. Some systems will include an operation outcome warning that there is no matching patient.

Однако есть ключевое различие в функциональности между поиском на основе логических модулей и прямым поиском с параметрами. Рассмотрим следующий пример поиска:

  GET [base]/Patient/[id]/Communication

Поскольку определение логического модуля "пациент" для ресурса Communication говорит о том, что ресурс Communication входит в логический модуль "пациент", если объектом, отправителем или получателем является пациент, то поиск по логическому модулю фактически совпадает с объединением следующих трёх поисковых запросов:

  GET [base]/Communication?subject=[id]
  GET [base]/Communication?sender=[id]
  GET [base]/Communication?recipient=[id]

Сделать это в одном запросе невозможно, если только не использовать _filter:

  GET [base]/Communication?_filter=subject re [id] or sender re [id] or recipient re [id]

Более подробная информация о поиске по логическим модулям описана в разделе Операция поиска. Как связанная с поиском операция, отнесение ресурсов к логическому модулю основывается только на текущей версии всех входящих в него ресурсов. Отметьте, что вложенные ресурсы patient не могут образовывать логический модуль "пациент" сами из себя.

Note that while this specification describes how to use the compartment syntax to find resources that are logically associated with the compartment, the compartment is not part of the identity of the resource. E.g. the response to the following is not defined by this specification:

  GET [base]/Patient/[patient-id]/Condition/[resource-id]

The response for write operations (PUT/DELETE/PATCH) are also not defined by this specification. Nor is the response to a POST defined:

  POST [base]/Patient/[patient-id]/Condition

There is no expectation for servers to support either read or write to such URLs.

Логические модули могут использоваться явным образом, как это, однако также могут использоваться и неявно. К примеру, если FHIR-сервер предоставляет попациентный просмотр медкарты, авторизованный пользователь, ассоциированный с использованием FHIR RESTful API, может быть ограничен в доступе к картам из экземпляров логического модуля, логически ассоциированных со своими идентификаторами. Независимо от того, используются ли логические модули явно или неявно, серверам могут требоваться дополнительные действия, чтобы сделать некоторые ресурсы без прямой ссылки на пациента доступными клиенту (медикаменты, вещества и др.).

Отметьте, что ресурсы могут входить в несколько логических модулей или связывать их. Примером может быть Diagnostic Report, когда он определяет один объект (пациента, группу, устройство или местонахождение), а Observation, на который он ссылается, определяет другой объект, или когда ресурс List ссылается на элементы, которые идентифицируют другие объекты. Такое кросс-связывание может возникать по вполне законным причинам, включая:

  • случаи, когда объекты записей взаимосвязаны - трансплантация, перинатология, семейная терапия и т. д.
  • управление рабочими процессами, когда списки действий связывают несколько пациентов и/или медспециалистов

Учитывая широкое разнообразие сценариев и контекстов использования FHIR, логические модули на определяют, каким образом обрабатываются перекрёстные связи. Системы могут отклонять ресурсы, удалить их из или помещать их в оба логических модуля, либо действовать ещё каким-то другим образом.

The graph definition resource provides a method by which rules about cross-linking may be made and enforced.

Решение о том, включать ли ресурсы в логический модуль, когда ссылка на ресурс, который образует логический модуль, находится в расширении, принимается на стороне сервера.

Некоторые ресурсы не входят ни в какие логические модули, например Medication, Substance, Location. Эти ресурсы не привязаны непосредственно к пациенту или составителю записи и иногда называются "мастер-файлами". Серверам потребуются дополнительные действия, чтобы сделать такие ресурсы доступными для клиентов, ограниченных конкретными логическими модулями. Например ресурс Medication описывает непосредственно сам медикамент и не привязан к пациенту; однако ресурс MedicationAdministration связывает этот ресурс Medication (детали о том, что было введено) с пациентом (которому этот медикамент был назначен), и поэтому требуется для интерпретации этого назначения.

Логические модули задаются и добавляются в список выше, когда сообщества реализаторов определяют их точки общего доступа к данным. Как описано ниже, логические модули имеют и синтаксические, и логические выводы (последствия), и оба этих аспекта их функциональности оцениваются при принятии решения, определять ли [новые] логические модули.

Параметры поиска для этого ресурса. Также к нему применяются общие параметры. Более подробную информацию о поиске в REST, обмене сообщениями и сервисах см. в разделе Поиск.

ИмяТипОпределениеВыражениеIn Common
codetokenPatient | Encounter | RelatedPerson | Practitioner | DeviceCompartmentDefinition.code
contexttokenA use context assigned to the compartment definition(CompartmentDefinition.useContext.value as CodeableConcept)
context-quantityquantityA quantity- or range-valued use context assigned to the compartment definition(CompartmentDefinition.useContext.value as Quantity) | (CompartmentDefinition.useContext.value as Range)
context-typetokenA type of use context assigned to the compartment definitionCompartmentDefinition.useContext.code
context-type-quantitycompositeA use context type and quantity- or range-based value assigned to the compartment definitionOn CompartmentDefinition.useContext:
  context-type: code
  context-quantity: value.as(Quantity) | value.as(Range)
context-type-valuecompositeA use context type and value assigned to the compartment definitionOn CompartmentDefinition.useContext:
  context-type: code
  context: value.as(CodeableConcept)
datedateThe compartment definition publication dateCompartmentDefinition.date
descriptionstringThe description of the compartment definitionCompartmentDefinition.description
namestringComputationally friendly name of the compartment definitionCompartmentDefinition.name
publisherstringName of the publisher of the compartment definitionCompartmentDefinition.publisher
resourcetokenТип ресурсаCompartmentDefinition.resource.code
statustokenThe current status of the compartment definitionCompartmentDefinition.status
urluriThe uri that identifies the compartment definitionCompartmentDefinition.url
versiontokenThe business version of the compartment definitionCompartmentDefinition.version