wiki:openEHR XML-schemas - Release 1.0.1

openEHR XML-schemas - Release 1.0.1


このページはopenEHR XML-schemas - Release 1.0.1の翻訳です。正確な内容については原文を参照して確認してください。

概要

Overview

このページからopenEHRの参照モデル(RM; Refference Model)とアーキタイプモデル(AM; Archetype Model)に対応するW3C XMLスキーマにアクセスできる。

This page provides access to the W3C XML schemas for the openEHR Reference Model (RM) and Archetype Model (AM).

安定版スキーマ

参照モデルに対応して分割されたスキーマが以下のように作成されている。

For the RM, separate schemas have been created, as follows:

  • Basic types - types from rm.data_types and rm.support.identification packages. (xsd file)
  • Structure - types from rm.data_structures and rm.common.generic packages. (xsd file)
  • Resource - types from the rm.common.resource package (xsd file)
  • Content - item, Section, Entry and all subtypes. (xsd file)
  • Composition - rm.composition. (xsd file)
  • Version - the Version classes from rm.common.change_control (xsd file)

AM(アーキタイプモデル; Archetype Model)のために2つのスキーマがあります。

For the AM, two schemas are provided:

  • アーキタイプ - アーキタイプオブジェクトモデル(Archetype Object Model; AOM)に収載されている型(xsdファイル)
  • OpenehrProfile - openEHRアーキタイププロフィールパッケージ収載されている型(xsdファイル)
  • Archetype - types from the Archetype Object Model (AOM) (xsd file)
  • OpenehrProfile - types from the openEHR Archetype Profile package (xsd file)

開発中のスキーマ

Schemas in Development

さらに2つのスキーマが草稿の段階であり,活発に開発が続けられている。

Two further schemas are in the draft stage, and are under active development:

  • Extract - rm.net.extractパッケージに収載されている型(xsdファイル)
  • Template - (もう少し先)
  • Extract - types from rm.extract package (xsd file)
  • Template - (coming soon)

変換規則

Transformation Rules

以下のマッピングルールは参照モデルからスキーマを作成するときに使われていた。

The following mapping rules were used in order to create the schema from the reference model.

基本タイプマッピング

Basic type mappings

基本タイプはサポートIMセクションで想定されるタイプに従ってXMLそのもののsimpleTypeを利用する。参照モデルはこの標準に適合するため若干の改変がくわえられている。

The basic types utilise the internal XML simpleTypes in accordance with the assumed types section in the Support IM. Some changes have been made to the reference model to accommodate these standards.

参照モデルタイプXMLスキーマのcomplexType
DV_DATE_TIMEIso8601DateTime型の値であり,以下の正規表現にマッチするxs:stringであるという制約を受ける \d{4}((0[1-9]|1[0-2])((0[1-9]|[12]\d|3[01])(T?([01]\d|2[0-3])([0-5]\d([0-5]\d([,.]\d+)?)?)?(Z|(![+\-]((0\d)|(1[0-2]))(00|30)?))?)?)?)?| \d{4}(\-(0[1-9]|1[0-2])(\-(0[1-9]|[12]\d|3[01])(T([01]\d|2[0-3])(:[0-5]\d(:[0-5]\d([,.]\d+)?)?)?(Z|([+\-]((0\d)|(1[0-2]))(:(00|30))?))?)?)?)?
DV_DATEIso8601Date型の値であり,以下の正規表現にマッチするxs:stringであるという制約を受ける \d{4}((((0[1-9])|(1[0-2]))((0[1-9])|([12]\d)|(3[01]))?)? |(\-(((0[1-9])|(1[0-2]))(\-((0[1-9])|([12]\d)|(3[01])))?)?)?)
DV_TIMEISO8610Time型の値であり,以下の正規表現にマッチするxs:stringであるという制約を受ける ([01]\d|2[0-3])([0-5]\d([0-5]\d([,.]\d+)?)?)?(Z|([+\-]((0\d)|(1[0-2]))(00|30)?))?|([01]\d|2[0-3])(:[0-5]\d(:[0-5]\d([,.]\d+)?)?)?(Z|([+\-]((0\d)|(1[0-2]))(:(00|30))?))?
DV_DURATIONDV_Iso8601Duration型の値であり,以下の正規表現にマッチするxs:stringであるという制約を受ける P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?

Reference model typeXML Schema complexType
DV_DATE_TIMEvalue is of type Iso8601DateTime, a restriction of xs:string, matching regular expression \d{4}((0[1-9]|1[0-2])((0[1-9]|[12]\d|3[01])(T?([01]\d|2[0-3])([0-5]\d([0-5]\d([,.]\d+)?)?)?(Z|(![+\-]((0\d)|(1[0-2]))(00|30)?))?)?)?)?| \d{4}(\-(0[1-9]|1[0-2])(\-(0[1-9]|[12]\d|3[01])(T([01]\d|2[0-3])(:[0-5]\d(:[0-5]\d([,.]\d+)?)?)?(Z|([+\-]((0\d)|(1[0-2]))(:(00|30))?))?)?)?)?
DV_DATEvalue is of type Iso8601Date, a restriction of xs:string, matching regular expression \d{4}((((0[1-9])|(1[0-2]))((0[1-9])|([12]\d)|(3[01]))?)? |(\-(((0[1-9])|(1[0-2]))(\-((0[1-9])|([12]\d)|(3[01])))?)?)?)
DV_TIMEvalue is of type Iso8601Time, a restriction of xs:string, matching regular expression ([01]\d|2[0-3])([0-5]\d([0-5]\d([,.]\d+)?)?)?(Z|([+\-]((0\d)|(1[0-2]))(00|30)?))?| ([01]\d|2[0-3])(:[0-5]\d(:[0-5]\d([,.]\d+)?)?)?(Z|([+\-]((0\d)|(1[0-2]))(:(00|30))?))?
DV_DURATIONvalue is of type DV_Iso8601Duration, a restriction of xs:string, matching regular expression P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?

Generic型

Generic types

openEHRの参照モデルによってgeneric型を使うことができる。generic型にはたとえばDV_INTERVAL<T>(IMデータ型)とVERSION<T>(IM共通)がある。generic型はC#やJavaでも利用することができるようになったので,これは実装仕様を満たす必要がある。generic型はXMLスキーマで利用することができないので,'XS_'で始まる特殊な型を精製して同じように制約を加える必要がある。

The openEHR reference model makes use of generic types - including DV_INTERVAL<T> (Data types IM) and VERSION<T> (Common IM) for example. As generic types are now available in C# and Java this is warranted for implementation specifications. Generic types are not available in XML Schema, so specific types prefixed with 'XS_' have been created to provide the same constraints.

Reference model typeXML Schema complexType
Interval<Integer>IntervalOfInteger (BaseTypes.xsd)
Interval<Real>IntervalOfReal (BaseTypes.xsd)
Interval<Date>IntervalOfDate (BaseTypes.xsd)
Interval<Time>IntervalOfTime (BaseTypes.xsd)
Interval<DateTime>IntervalOfDateTime (BaseTypes.xsd)
Interval<Duration>IntervalOfDuration (BaseTypes.xsd)
DV_INTERVAL<DV_ORDERED>DV_INTERVALただひとつだけが用いられている。昇順か降順かを決めるDV_ORDER型とともに用いられている。関連するgeneric型である(DV_INTERVAL<DV_DATE>など)のソフトウェア実装も型に応じて求められている。(BaseTypes.xsd)
VERSION<T>VERSION型のみが使われる。サブタイプであるORIGINAL_VERSIONはLOCATABLE型のデータ属性として用いられている。(Version.xsd)

Reference model typeXML Schema complexType
Interval<Integer>IntervalOfInteger (BaseTypes.xsd)
Interval<Real>IntervalOfReal (BaseTypes.xsd)
Interval<Date>IntervalOfDate (BaseTypes.xsd)
Interval<Time>IntervalOfTime (BaseTypes.xsd)
Interval<DateTime>IntervalOfDateTime (BaseTypes.xsd)
Interval<Duration>IntervalOfDuration (BaseTypes.xsd)
DV_INTERVAL<DV_ORDERED>only one type is used, namely DV_INTERVAL, with lower and upper of type DV_ORDERED. Software implementations of the relevant generic types DV_INTERVAL<DV_DATE> etc) are expected to implement further typing sensibly. (BaseTypes.xsd)
VERSION<T>only one type is used, namely VERSION. The subtype ORIGINAL_VERSION has its data attribute of type LOCATABLE (Version.xsd)

多重継承

Multiple Inheritance

openEHRの参照モデルでは,多重継承を使っているところがいくつかある。すべての場合で,単一継承によるサブタイプで代替可能な関係(たとえば'is-a')ではあるが,機能の継承(たとえば'has-a')や多重継承が常に用いられることもある。参照モデルでは,rm.data_types.quantity.DV_INTERVALやrm.data_types.qualntity.date_timeクラスなどはこのような継承を使っている。後者ではインターフェースのみを継承してXMLスキーマでの透過性はない。ほかの(DATA_VALUEの)継承ではスキーマを処理するために可視化されていなければならないので,前者ではDV_INTERVAL<T>を使って直接包含することでInterval<T>を継承している。

There are a couple of places where multiple inheritance occurs in the openEHR reference model. In all cases, only one inheritance branch corresponds to subtyping in the substitutability (i.e. 'is-a') sense; the other branches are always 'facility' or 'mix-in' inheritance. In the RM, classes inheriting in this way include rm.data_types.quantity.DV_INTERVAL and the rm.data_types.quantity.date_time classes. The latter inherit only interface, which has no visibility in XML-schema. For the former, the inheritance of Interval<T> by DV_INTERVAL<T> is done in the schema simply by direct inclusion, since the other branch of inheritance (of DATA_VALUE) is the one which must be visible to schema processing.

包含されないクラスと属性

Non-included classes and attributes

以下の参照モデルはスキーマに含まれないが,データを参照するのに必要となる。UID,UUID,INTERNET_ID, ISO_OID, VERSION_TREE_ID

OBJECT_IDが文字列方の属性値を持ち,そのサブタイプがUIDを返す機能があるため,UIDとそのサブタイプは必要とされない。

The following RM classes are not included in the schema, as they are not needed in the data view: UID, UUID, INTERNET_ID, ISO_OID, and VERSION_TREE_ID. UID and its subtypes are not needed because OBJECT_ID has a value attribute of type string and its subtypes have a function that return a UID.

付け加えられた属性

Added attributes

現在のリリースではない。

None in the current release.

条件規則

Conditional Rules

インスタンスデータでは,(ARCHETYPED型の)LOCATABLE.archetype_detailsはtemplate_idがあるときにだけしか包含されない。。ARCHETYPEDのarchetype_id属性はデフォルトでアーキタイプのLOCATABLEインスタンス(SECTION構造やOBSERVATION構造などのトップにある)のルートポイントにあるLOCATABLE.archetype_node_idの値となるのがその理由である。

In instance data, LOCATABLE.archetype_details (of type ARCHETYPED) is only included when template_id exists, since the archetype_id attribute from ARCHETYPED is included by default as the value of LOCATABLE.archetype_node_id on archetype root-point LOCATABLE instances (top of a SECTION structure, OBSERVATION structure etc).

XML属性とエレメント

XML Attributes and Elements

XML属性は参照モデルクラスの視点では真のメタデータであるLOCATABLE.archetype_node_idの参照属性以外には使われていない。それに属性を付け加えることで,アーキタイプを容易にXPathにマップすることができる。

XML attributes are not used with the exception of the LOCATABLE.archetype_node_id RM attribute, which is, from the point of view of RM classes, true meta-data. Making it an attribute allows archetype paths to be easily mapped to Xpaths.

謝辞

Acknowledgements

この業績はOcean InformaticsによるopenEHR Foundationにより成し遂げられた。openEHRスキーマをメンテナンスしてくれたDr Chulan Ma, Heath Frankel, Lisa Thurstonに大いに感謝している。Mattias ForssやAndrew Pattersonをはじめ,これらについて改良するためにフィードバックしてくれたコミュニティの皆さんにも感謝している。

This work was carried out for the openEHR Foundation by Ocean Informatics. Many thanks to Dr Chunlan Ma, Heath Frankel and Lisa Thurston for maintaining the openEHR schemas. Thanks to the many people in the community including Mattias Forss and Andrew Patterson, who have provided feedback and improved them $LastChangedDate: 2006-02-15 05:57:48 +0930 (Wed, 15 Feb 2006) $ $LastChangedRevision$

Last modified 17 years ago Last modified on Aug 14, 2007, 1:44:46 PM
Note: See TracWiki for help on using the wiki.