1.10.4 リソース記述フォーマット

logo fhir

Resource Formats 「リソース記述フォーマット」 1.10.4.0

This page documents how the content of the resources are described. In actual exchange, resources can be represented in the following formats: XMLand JSON.

このページでは、リソースのコンテンツ定義の表現方法について記述します。実際の情報交換においては、リソースは XML と JSON の 2 通りで表現できます。

Resource Definition 「リソース定義の記法」1.10.4.0.1

The resources are described in two different ways: a UML diagram that summarises the content, and an pseudo-XML syntax that provides a visual sense of what the end resource instances will look like in XML. Note that although the description of the resources is based on their XML representation, other representations such as JSON are equally valid.

リソースを定義する時には、コンテンツの概観を説明する UML 図と、リソースを XML フォーマットで記述した際に最終的にどのような形になるかを視覚的に表す、疑似 XML 記法の 2 通りで表現されます。リソースの定義は XML 表記を元にした記述になっていますが、JSON のような他の表記も同等に認められることに注意してください。

XML 「XML によるリソース定義」 1.10.4.0.1.1

The XML syntax uses the following notation:

XML によるリソース定義は以下のような記法を用います:

<name xmlns="http://hl7.org/fhir" (attrA="value")> <nameA><!-- 1..1 type description of content --><nameA> <nameB[x]><!-- 0..1 type1|type1 description --></nameB> <nameC> <!-- 1..* --> <nameD ><!-- 1..1 type>Relevant records --></nameD> </nameC> <name>

Notes: 注意:

  • Resource and Element names are case-sensitive (though duplicates that differ only in case are never defined)
    • リソースおよびエレメントの名称は大文字小文字の区別があります(ただし、大文字小文字が違うだけの重複定義は存在しません)
  • Any elements that have a primitive type will have a value attribute to contain the actual value of the element
    • プリミティブ・データタイプのエレメントはすべて、エレメントの実際の値を持つ、value アトリビュートを持ちます
  • Elements are assigned a cardinality that specifies how many times the element may or must appear. If the cardinality is shown inPink then there is an additional condition that impacts on the allowed cardinality. This is available as a mouse-over text, or in the formal definitions
    • エレメントには、そのエレメントがいくつ現れてもよいか、あるいは現れなければいけないかを指定する、カーディナリティが設定されます。カーディナリティがピンクで表示されている場合は、そこにはカーディナリティの設定に関する追加の条件があることを示しています。この条件は、マウスオーバーテキスト(訳注、この機能は未保証です)か、公式定義の中に記述されます。
  • The elements are assigned one or more types. All of the types are defined in the data types except for "Resource" and "Narrative" that are documented below. The type names are hyperlinked
    • エレメントにはひとつまたは複数のデータタイプが指定されます。"Resource" と "Narrative" 以外のデータタイプの定義は後述(訳注、実際には Data Types の項参照)されます。データタイプ名はハイパーリンクされています(訳注、この機能は未保証です)
  • When a logical element can have more than one type, its name takes the form nnn[x]. The "nnn" part of the name is constant, and the [x] is replaced with the title-cased name of the type that is actually used. The types that are allowed are listed with a "|" used to separate them. When one of the types is Resource([X]), the type name in the element name is simply "Resource"
    • ルール上、ひとつのエレメントが複数のデータタイプを取れる時には、その名前は nnn[X] という形で表されます。名前の "nnn" の部分は固定ですが、[x] の部分は、実際に使われたデータタイプの各単語の先頭を大文字にした名称で置き換えられます。使えるデータタイプは "|" で区切られて列挙されます。もしその中のデータタイプのひとつが Resource([x]) であった場合は、エレメント名に付加されるデータタイプ名は単純に "Resource" になります。
  • Each element name in the pseudo-syntax is also a hyperlink to the formal definition of the element in the data dictionary that underlies the exchange formats.
    • 疑似 XML 記法における各エレメント名も、交換フォーマットのデータディクショナリのエレメントの公式定義にハイパーリンクされています(訳注、この機能は未保証です)
  • If the element name is underlined, then applications are required to support and/or understand it
    • エレメント名に下線が引かれている場合には、アプリケーションは、そのエレメントに対応あるいは理解する必要があります。
  • The character set for a resource is always Unicode, encoded in UTF-8.
    • リソースの文字コードは常に UTF-8 エンコードされた Unicode です。
  • Any of the elements may have an id attribute to serve as the target of an internal reference. The id attribute is not shown in this format
    • エレメントはどれでも、内部リファレンスのリンク先として使える id アトリビュートを持つことができます。id アトリビュートはフォーマットに表示されていません。
  • FHIR elements are never empty. If an element is present in the resource, it must have either a value attribute, child elements as defined for its type, an id attribute that is the link target of narrative, or 1 or more extensions
    • FHIR 仕様では空のエレメントは決して存在しません。エレメントがリソースに現れた時には、value アトリビュートか、そのデータタイプで定義された下位エレメントか、ナラティブのリンク先となっている id アトリビュートか、あるいはひとつ以上のエクテンションを持たなければなりません
  • Attributes can never be empty. Either they are absent, or they are present with at least one character of non-whitespace content
    • 空のアトリビュートは決して存在しません。アトリビュートは現れないか、現れた場合はすくなくとも 1 文字以上の非空白文字を含みます。
  • In addition to this descriptive syntax, other definitional forms are available, including W3C schema and Schematron
    • 文章による記述に加えて、W3C スキーマとSchematron による定義が提供されます。

UML 「UML によるリソース定義」1.10.4.0.1.2

The UML diagrams represent the same content as a series of classes that represent the elements of a resource.

UML 図は、同じコンテンツを、リソースのエレメントを表すクラスの連なりとして表現します。

Where an element can have a choice of data types, these are represented in the choice using the same syntax as the xml syntax described above. Due to way UML works, the actual order of the elements cannot be determined from the diagram, nor is it visible whether a property is an element or an attribute. The elements and types are links to the formal definitions of the parts. The UML diagrams also show the bindings, and these are hyperlinks to the details of the binding.

エレメントがデータタイプを選べる時には、XML 記法と同じ表記で表現されます。UML の仕組み上、エレメントの実際の順番は図からは特定できませんし、プロパティがエレメントかアトリビュートかも視認できません。エレメントとデータタイプは、形式定義該当部分へのリンク(訳注、この機能は未保証です)となっています。UML 図にはバインディングも示され、バインディングの詳細記述へのハイパーリンク(訳注、この機能は未保証です)となっています。

These UML diagrams are intended to communicate the contents of the resource to a human. An alternate set of diagrams that is more suited to code generation is available as part of the UML reference platform.

これらの UML 図は、リソースのコンテンツを人が見て分かるようにする目的で提供されています。コード生成に用いるための別の図が、UML 形式の参照プラットフォームの一部として提供されています。

© HL7.org 2011 - 2013. FHIR v0.11-1712 generated on Fri, Sep 6, 2013 23:04+1000.

Warning: This version of FHIR is the DSTU ballot, and the stable version for the September/October connectathons. Implementers are welcome to experiment with the content defined here, but should note that the contents are subject to change without prior notice.

この日本語訳は、上記のバージョンの FHIR ドラフト仕様に基づいています。この内容に基づいてシステムを試作実装することは奨励されていますが、現在の仕様の性質上、事前の通知なしに内容の変更が行われることは、ご理解ください。