2.1.0 標準符合性 Conformance

2.1.0 標準符合性

FHIR規(guī)范提供了一套資源 和幾個不同的框架,用于在不同系統(tǒng)之間交換資源。 為了適用更廣泛場景,本規(guī)范中制定的規(guī)則相當(dāng)寬松顶岸。 因此腔彰,不同的應(yīng)用程序由于采用此規(guī)范中不同的可選項將導(dǎo)致程序間無法互操作叫编,這是FHIR規(guī)范所允許的。 符合本規(guī)范的應(yīng)用程序需要聲明所采用的特定交換框架霹抛,并詳細說明使用的框架和資源內(nèi)容搓逾。

應(yīng)用程序需聲明符合以下交換框架中的一個(或多個):

為了提供相關(guān)框架和資源內(nèi)容具體用法的詳細信息, FHIR提供了一個符合性配置層杯拐, 它提供了計算機可理解的符合性聲明,用于說明資源及其交換框架如何解決在業(yè)務(wù)場景下的具體問題纸肉。 符合性配置層是使用以下關(guān)鍵資源來實現(xiàn)的:

資源名稱 在標準符合性中起到的作用
Value Set 值域集 定義一組編碼值(有關(guān)詳細信息践美,請參閱使用編碼")
StructureDefinition 結(jié)構(gòu)定義 制定有關(guān)如何在特定上下文中使用資源(或類型)及其數(shù)據(jù)元素的規(guī)則,包括定義如何使用擴展污淋。 結(jié)構(gòu)定義資源中的編碼元素引用值集。
CapabilityStatement 能力聲明 對支持的資源和相關(guān)(增刪改查等)操作的功能性聲明余掖。能力聲明資源引用配置文件來描述程資源的特定使用場景寸爆。
Implementation Guide 實施指南 實施指南包含了能力聲明、配置文件盐欺、擴展赁豆、值集、互操作應(yīng)用程序文檔冗美。

該規(guī)范還提供了許多工具 魔种,以通過技術(shù)手段幫助實施者強制符合本規(guī)范的基本要求。

FHIR是一個封閉的規(guī)范粉洼。規(guī)范定義了對貫標者的要求,包括需提供的API服務(wù)或交換框架节预、標準資源等。 貫標系統(tǒng)可提供高于FHIR標準的功能(例如漆改,用自定義名稱添加更多的端點或服務(wù))心铃,但對那些FHIR規(guī)范沒有明確允許的新增功能,不能在符合性聲明中當(dāng)成或描述為“FHIR符合性要求”挫剑。

符合本規(guī)范并不能保證患者或數(shù)據(jù)安全去扣。但如果不符合此規(guī)范會有以下兩種額外風(fēng)險:

  • FHIR已在一定程度上進行了評審查,不會采納任何不滿足符合性要求的變更樊破,而變更可能有未知風(fēng)險愉棱。
  • 類似FHIR的解決方案(基于FHIR,但不符合)由于不滿足符合性規(guī)范哲戚,可能會向客戶承諾兌現(xiàn)一些空頭期望奔滑,沒能達到這些期望也可能導(dǎo)致風(fēng)險。

系統(tǒng)只能在能力聲明資源 CapabilityStatement中描述FHIR的功能符合性顺少。

2.1.0.1 統(tǒng)一動詞涵義

本規(guī)范使用RFC 2119中定義的動詞 SHALL朋其、SHOULD、和MAY 來統(tǒng)一描述的涵義脆炎。但與RFC 2119不同梅猿,此規(guī)范允許不同的應(yīng)用程序因使用不同的可選功能而無法交互。特別是:

  1. SHALL(必須):對所有實施者的絕對要求
  2. SHALL NOT(不能): 要求對所有實施者絕對禁止
  3. SHOULD/SHOULD NOT(應(yīng)該/不應(yīng)該):實施者在其特定實施的背景下考慮的最佳做法或建議秒裕「を荆可能由于某種原理忽略某個建議,但在換方式之前必須理解其全部含義并仔細權(quán)衡几蜻。
  4. MAY(可以): 真正的可選項; 可以使用或忽略喇潘,因為實施者的決定不會造成任何后果体斩。

2.1.0.2 標準符合性基本規(guī)范

資源的內(nèi)容和格式必須符合本標準中描述的規(guī)范,包括文字描述的規(guī)范和下述的符合性屬性規(guī)范颖低。 資源類型和數(shù)據(jù)類型中定義的數(shù)據(jù)元素有3個符合性屬性:Cardinality(基數(shù))絮吵、Is-Modifier、MustSupport(必須支持)忱屑。 它們相互作用以滿足符合性的要求源武。

2.1.0.3 Cardinality

All attributes defined in FHIR have cardinality as part of their definition - a minimum number of required appearances and a maximum number. These numbers specify the number of times the attribute may appear in any instance of the resource type. This specification only defines the following cardinalities: 0..1, 0.., 1..1, and 1... Profiles that describe specific use cases may use other values for cardinality within the limits of the cardinality defined by the base resource.

Note that when present, elements cannot be empty - they SHALL have a value attribute, child elements, or extensions. This means that setting an element to a minimum cardinality of 1 does not ensure that valid data will be present; specific FHIRPath constraints are required to ensure that the required data will be present.

In this specification, very few elements have a minimum cardinality of 1. Resources are used in many contexts, often quite removed from their primary use case, and sometimes even basic information is quite incomplete. For this reason, the only elements that have a minimum cardinality of 1 are those where they are necessary to any understanding of the resource or element that contains them. The minimum cardinalities should not be taken as a guide to what elements are expected to be present in any particular use of the resource, including their normal/primary usage purpose. In some cases, this specification publishes additional profiles that define which elements are required in particular situations. Similar profiles are published by jurisdictions, vendors, profiling organizations, or projects.

For elements that have cardinality > 1, the order in which they appear may have meaning. Unless the element definition (either in this specification or the extension) defines a meaning to the order explicitly (using ElementDefinition.orderMeaning), the meaning of the order is not defined, and implementations are allowed to reorder the elements. Note that it is not possible to define a meaning for the order of the elements in a profile using a StructureDefinition. When there is no definition of the meaning of the order, implementations that need to choose a single element from a list of elements for some use SHALL do so based on the semantics of the content of the element that repeats. Profiles and Implementation guides may often make rules about this selection process.

Clients should not depend on servers maintaining ordering of elements, unless the retrieved resource conforms to a profile which mandates maintenance of ordering. If a server cannot maintain ordering, it must strip off known profile tags which require maintenance of ordering, and strip off unknown profiles (since they might require maintenance of ordering).

2.1.0.4 Is-modifier

Is-Modifier is a boolean property that is assigned when an element is defined, either as part of the base resource contents in this specification, or when extensions are defined.

An element is a modifier if and only if it cannot be safely ignored because its value, or its meaning if missing, may cause the interpretation of the containing element or one of its descendants to no longer conform to the stated definition for the element. Typical examples of elements that are labeled "Is-Modifier" are elements such as "status", "active", "refuted", or "certainty" that invert or negate the meaning of the resource (or element) that contains them.

Modifier is not an indication of the degree of importance for a particular piece of information or whether the element ought to be ignored when the resource is used for common use-cases. It is expected that if you ignore an element you may miss an important piece of computable meaning.

For example, consider Observation:

  • Observation.status allows the entered-in-error code, which indicates that no actual Observation occurred at all. The definition of Observation indicates that it is a measurement that has been made - and doesn't allow for the possibility of a measurement that wasn't made. As a result, if the status element were ignored and an Observation were interpreted at face value based on its definition, a system or user would infer that an Observation had occurred, which would be false
  • If an application ignores the Observation.subject element, it wouldn't know who or what was observed, which would make the remaining information largely useless for most usage. However, any system that ignores the subject would not have a false understanding of the Observation as it's defined. The system would understand what type of observation was made, when and what was found, just not who it was about
  • Even something as critical as Observation.code is not a modifier element. While the Observation would have little utility without the code, the understanding when ignoring the element that “some” Observation had been made on the specified subject at the specified date and time would still be true when the element was reintroduced. The only exception would be if a value expressed in the Observation.code element could somehow convey that the Observation had not occurred or otherwise cause the instance to diverge from the defined meaning of Observation when ignoring the element

The definition of is-modifier has a corollary: any element that meets the requirement that it could cause the interpretation of the containing element or its descendants to diverge from their definition SHALL explicitly declare how such divergence could occur and must be marked as a modifier element. Any element not marked is-modifier and without that explanation SHALL NOT be used by an implementer in such a manner as to make the element behave as a modifier. For example, using a special "name" on a patient to indicate that the subject isn’t a real patient, but is instead an artificial structure used for non-patient tests would be non-conformant with FHIR because Patient.name is not a modifier element

Whether an element is a modifier cannot be changed when element usage is described in a constraining Structure Definition. When an element is labeled as Is-Modifier, the documentation must be clear about why it is a modifier.

A typical example of a modifier element is one that negates the element that contains it. For instance, in the following fragment of a resource definition:

image.png

The definition of an AllergyIntolerance is that it contains information about "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance". If the value of the 'verificationStatus' element is set to entered-in-error, the entire resource does not actually contain valid information about any risk of exposure, and it is not safe for applications to ignore this element. As a consequence, it is labeled as 'is modifier = true'. In this tabular representation of the resource, this shows as the flag '?!'. The JSON and XML representations of a resource definition have their own representation of 'is modifier = true' status, and it is defined directly in a ElementDefinition.

If a narrative summary is present, and the status is generated, Is-Modifier elements SHALL be represented in the narrative summary of the resource. If Narrative is present with some other status Is-modifier elements SHOULD be represented.

If the value of a modifier element is not explicit in the instance, or known by the context, the resource might not be able to be safely understood. Wherever possible, elements labeled "Is-Modifier = true" also have a minimum cardinality of 1, in order to introduce certainty in their handling. However, sometimes this is not possible - much legacy data is not well described. Implementations producing resources SHOULD ensure that appropriate values for isModifier elements are provided at all times.

Implementations processing the data in resources SHALL understand the impact of the element when using the data. Implementations are not required to "support" the element in any meaningful way - they may achieve this understanding by rejecting instances that contain values outside those they support (for instance, an application may refuse to accept observations with a reliability other than "ok"). Alternatively, implementations may be able to be sure that, due to their implementation environment, such values will never occur. However applications SHOULD always check the value irrespective of this.

Note that processing the data of a resource typically means copying or filtering data out of a resource for use in another context (display to a human, decision support, exchange in another format where not all information is included or storing it for this kind of use). Servers and background processes that simply move whole resources around unchanged are not "processing the data of the resource", and therefore these applications are not required to check Is-Modifier elements.

Every element in the base resource has a value of "true" or "false" for the Is-Modifier flag. The value of the flag cannot be changed by profiles on the resource, in either direction. When a StructureDefinition defines an extension, it labels the extension with the Is-Modifier flag, and this cannot be changed in other profiles. Note that extensions that have is-Modifier = true are represented differently in resource instances ("modifierExtension" instead of "extension"), and there are additional rules about how they are handled.

Most status elements are marked as modifiers because of the presence of the entered-in-error status. Other modifiers are defined:

2.1.0.5 MustSupport

Labeling an element MustSupport means that implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. Because the base FHIR specification is intended to be independent of any particular implementation context, no elements are flagged as mustSupport=true as part of the base specification. This flag is intended for use in profiles that have a defined implementation context.

For this reason, the specification itself never labels any elements as MustSupport. This is done in StructureDefinitions, where the profile labels an element as mustSupport=true. When a profile does this, it SHALL also make clear exactly what kind of "support" is required, as this could involve expectations around what a system must store, display, allow data capture of, include in decision logic, pass on to other data consumers, etc.

Note that an element that has the property IsModifier is not necessarily a "key" element (e.g. one of the important elements to make use of the resource), nor is it automatically mustSupport - however both of these things are more likely to be true for IsModifier elements than for other elements.

2.1.0.6 Constraints

All elements may have constraints attached to them (also known as 'invariants'). Constraints defined on an element have the following properties:

約束屬性 描述
Key Identifies the constraint uniquely amongst all the constraints in the context - typically, this is used to refer to the constraint in an error message
Requirements An explanation of why the constraint has been applied - what harmful conditions are being avoided
Severity The severity of the invariant - see below
Human Description A human description of the rule intended to be shown as the explanation for a message when the constraint is not met
Expression A FHIRPath expression that must evaluate to true when run on the element
XPath An XPath expression that must evaluate to true when run on the element in the XML representation

Many constraints are defined in the base specification. In addition, additional constraints may be defined in profiles that apply to resources. Systems are not required to evaluate the constraints, just as they are not required to check for conformance, or schema validity. However, systems SHOULD always ensure that all resources are valid against all applicable constraints.

Constraints have a severity level:

級別 描述
Error (rule) A rule that all resources must conform to. Validators should report it as an error if the rule is violated, and applications processing the content can reject it as an invalid resource
Warning Report this as a warning that there may be a problem with the resource, but it is considered valid and can be processed normally
Guideline A warning marked with an extension (http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice) that indicates that it should be a treated as an error if the implementation context asks a validator to enforce best practice rules. See Best Practices for a full list

Elements can also be explicitly associated with constraints defined elsewhere. This is a notification to implementers that the element is affected by the constraint. It has no meaning when the constraints are evaluated.

Profiles may define additional constraints that apply to an element, but they cannot alter or remove constraints that are already applied.

2.1.0.7 Other Metadata

In addition to the conformance metadata, each element has other metadata properties defined in the ElementDefinition:

2.1.0.8 Examples and Reference Implementations

This specification includes many examples. While every effort has been made to ensure that the examples are fully conformant to the specification, if the examples disagree with the specification, the specification is considered correct and normative, not the examples. This same rule applies to the reference implementations.

The examples reflected in this specification do not represent actual people. Any resemblance to real people - alive or dead - is entirely coincidental. In some cases, examples may be drawn from real clinical data. However, if this has occurred, the content has been scrubbed to remove any identifying information.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市想幻,隨后出現(xiàn)的幾起案子粱栖,更是在濱河造成了極大的恐慌,老刑警劉巖脏毯,帶你破解...
    沈念sama閱讀 219,039評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件闹究,死亡現(xiàn)場離奇詭異,居然都是意外死亡食店,警方通過查閱死者的電腦和手機渣淤,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,426評論 3 395
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來吉嫩,“玉大人价认,你說我怎么就攤上這事∽悦洌” “怎么了用踩?”我有些...
    開封第一講書人閱讀 165,417評論 0 356
  • 文/不壞的土叔 我叫張陵,是天一觀的道長忙迁。 經(jīng)常有香客問我脐彩,道長,這世上最難降的妖魔是什么姊扔? 我笑而不...
    開封第一講書人閱讀 58,868評論 1 295
  • 正文 為了忘掉前任惠奸,我火速辦了婚禮,結(jié)果婚禮上恰梢,老公的妹妹穿的比我還像新娘佛南。我一直安慰自己,他們只是感情好嵌言,可當(dāng)我...
    茶點故事閱讀 67,892評論 6 392
  • 文/花漫 我一把揭開白布嗅回。 她就那樣靜靜地躺著,像睡著了一般呀页。 火紅的嫁衣襯著肌膚如雪妈拌。 梳的紋絲不亂的頭發(fā)上拥坛,一...
    開封第一講書人閱讀 51,692評論 1 305
  • 那天蓬蝶,我揣著相機與錄音尘分,去河邊找鬼。 笑死丸氛,一個胖子當(dāng)著我的面吹牛培愁,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播缓窜,決...
    沈念sama閱讀 40,416評論 3 419
  • 文/蒼蘭香墨 我猛地睜開眼定续,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了禾锤?” 一聲冷哼從身側(cè)響起私股,我...
    開封第一講書人閱讀 39,326評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎恩掷,沒想到半個月后倡鲸,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體黄娘,經(jīng)...
    沈念sama閱讀 45,782評論 1 316
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,957評論 3 337
  • 正文 我和宋清朗相戀三年优床,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片誓焦。...
    茶點故事閱讀 40,102評論 1 350
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖杂伟,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情稿壁,我是刑警寧澤幽钢,帶...
    沈念sama閱讀 35,790評論 5 346
  • 正文 年R本政府宣布,位于F島的核電站傅是,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏帽驯。R本人自食惡果不足惜书闸,卻給世界環(huán)境...
    茶點故事閱讀 41,442評論 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望嫌术。 院中可真熱鬧哀澈,春花似錦度气、人聲如沸磷籍。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,996評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽比然。三九已至,卻和暖如春谈秫,著一層夾襖步出監(jiān)牢的瞬間拟烫,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,113評論 1 272
  • 我被黑心中介騙來泰國打工课竣, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留置媳,地道東北人。 一個月前我還...
    沈念sama閱讀 48,332評論 3 373
  • 正文 我出身青樓迂曲,卻偏偏與公主長得像寥袭,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子杰扫,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,044評論 2 355