• 沒有找到結果。

二、 背景知識與相關研究

2.1 背景知識

2.1.3 Data Types

HL7 v3 為了在表現力(representation)及實作技術(implementation technology)上提供 開放性的特性,因此設計成抽象語意的資料型態(abstract semantic data type)[14][15]。所 有 HL7 v3 的規格都被認為是獨立於任何特定的表現及實作技術的形式。HL7 標準主要 是針對醫療照護領域的資訊,它並不會與醫療技術相依,而是獨立於技術之外去表現醫 療照護上的資訊,其目的是在於就算未來有更新穎的技術出現,這樣的資料型態定義仍 可適用於新技術上。

有別於 HL7,其他的實作技術上,在資料型態的定義方面往往太過於彼此相依,

這會導致一定程度的危險性,HL7 嘗試去克服此問題,才將資料型態定義成抽象的。

圖 2 是一張以圖形表示 Data Type 之間的相互關係的 UML 圖。Data Type 的 class 以縮寫名稱在 UML 上表示。Type 的屬性以 UML 上的 operation 表示。

圖 2 UML Overview of Data Types

資料來源:Data Types - Abstract Specification - HL7 Org UML Overview of Data Types - HL7 Org

下表 2 列出 HL7 所有 data types,大致上可分為下列七類:

1. Fundamental Data Types

(1) DataValue (ANY): 所有資料值的最基本屬性。就好像物件導向中的 object 類別。

(2) Boolean (BL): 二元值。BL 可能的內容值為 true 或 false,或者其他內容 值,但都視為 NULL

(3) BooleanNonNull (BN): BN 是限制 Boolean 不可為 NULL。

2. Quantity Data Types

(1) Physical Quantity (PQ): 量測的數量型態。

(2) Physical Quantity Representation (PQR): 量測的數量型態,但是其單位是遵 循某編碼系統。可作為 PQ 另一種表達方式。

4. Timing Specification Data Types

(1) Periodic Interval of Time (PIVL): 週期性發生的區段時間。

(2) Event-Related Periodic Interval of Time (EIVL): 基於某活動所引發之特殊性 周期性時間區間。.

(3) General Timing Specification (GTS) :概念性任意時間區間集合。(last Tuesday of each month)

5. Text and Multimedia Data Types

(1) Binary Data (BIN): BIN 一組位元之集合。

(2) Encapsulated Data (ED) :主要目的是可讓人直接解析,或者進一步讓機器 處理之。(是非常重要的資料型態)

(3) Character String (ST): 字符串資料型態是文字資料,提供給機器處理 (sorting, querying, indexing)

6. Demographic Data Types

(1) Postal Address (AD): 郵寄、住家或辦公室地址。 (1) Instance Identifier Data Types

a、 ISO Object Identifier (OID): 全域唯一辨識碼,其內容值例如:

2.16.840.1.113883.3.1。

b、 Instance Identifier (II): 用以辨識唯一的事件或物件。

c、 Unique Identifier String (UID): 一種用來標識物件的全球唯一辨識碼。

d、 Universal Unique Identifier (UUID): 讓分散式系統中的所有元素,都能 有唯一的辨識資訊。

(2) URL and TEL Data Types

a、 Universal Resource Locator (URL) : 遵從 IETF 與 W3C 之規範。

b、 Telecommunication Address (TEL): 任何可提供通訊之資料,如電話號 碼、e-mail 地址、或者其他可以定位資源的資訊。

(3) Concept Descriptor Data Types

a、 Concept Descriptor (CD) : 用以參照或引用定義於某 coding system 之 編碼。

Name Symbol Description

DataValue ANY

Defines the basic properties of every data value. This is an abstract type, meaning that no value can be just a data value without belonging to any concrete type. Every concrete type is a specialization of this general abstract DataValue type.

Boolean BL BL stands for the values of two-valued logic. A BL value can be either true or false, or, as any other value may be NULL.

BooleanNonNull BN

BN constrains the boolean type so that the value may not be NULL. This type is created for use within the data types specification where it is not appropriate for a null value to be used

Encapsulated Data ED

Data that is primarily intended for human interpretation or for further machine processing outside the scope of HL7. This includes unformatted or formatted written language, multimedia data, or structured information

Name Symbol Description

in as defined by a different standard (e.g., XML-signatures.) Instead of the data itself, an ED may contain only a reference (see TEL.) Note that ST is a specialization of the ED where the mediaType is fixed to text/plain.

Character String ST

The character string data type stands for text data, primarily intended for machine processing (e.g., sorting, querying, indexing, etc.) Used for names, symbols, and formal expressions.

Concept Descriptor CD

A CD represents any kind of concept usually by giving a code defined in a code system. A CD can contain the original text or phrase that served as the basis of the coding and one or more translations into different coding systems. A CD can also contain qualifiers to describe, e.g., the concept of a "left foot" as a postcoordinated term built from the primary code

"FOOT" and the qualifier "LEFT". In cases of an exceptional value, the CD need not contain a code but only the original text describing that concept.

Coded Simple Value CS

Coded data in its simplest form, where only the code is not predetermined.

The code system and code system version are fixed by the context in which the CS value occurs. CS is used for coded attributes that have a single HL7-defined value set.

Coded Ordinal CO

Coded data, where the coding system from which the code comes is ordered. CO adds semantics related to ordering so that models that make use of such domains may introduce model elements that involve

statements about the order of the terms in a domain.

Coded With

Equivalents CE

Coded data that consists of a coded value and, optionally, coded value(s) from other coding systems that identify the same concept. Used when alternative codes may exist.

Character String with

Code SC A character string that optionally may have a code attached. The text must always be present if a code is present. The code is often a local code.

Instance Identifier II

An identifier that uniquely identifies a thing or object. Examples are object identifier for HL7 RIM objects, medical record number, order id, service catalog item id, Vehicle Identification Number (VIN), etc. Instance identifiers are defined based on ISO object identifiers.

Telecommunication TEL A telephone number (voice or fax), e-mail address, or other locator for a

Name Symbol Description

Address resource mediated by telecommunication equipment. The address is specified as a Universal Resource Locator (URL) qualified by time specification and use codes that help in deciding which address to use for a given time and purpose.

Postal Address AD Mailing and home or office addresses. A sequence of address parts, such as street or post office Box, city, postal code, country, etc.

Entity Name EN

A name for a person, organization, place or thing. A sequence of name parts, such as given name or family name, prefix, suffix, etc. Examples for entity name values are "Jim Bob Walton, Jr.", "Health Level Seven, Inc.",

"Lake Tahoe", etc. An entity name may be as simple as a character string or may consist of several entity name parts, such as, "Jim", "Bob",

"Walton", and "Jr.", "Health Level Seven" and "Inc.", "Lake" and

"Tahoe".

Trivial Name TN A restriction of entity name that is effectively a simple string used for a simple name for things and places.

Person Name PN

An EN used when the named Entity is a Person. A sequence of name parts, such as given name or family name, prefix, suffix, etc. A name part is a restriction of entity name part that only allows those entity name parts qualifiers applicable to person names. Since the structure of entity name is mostly determined by the requirements of person name, the restriction is very minor.

Organization Name ON An EN used when the named Entity is an Organization. A sequence of name parts.

Integer Number INT

Integer numbers (-1,0,1,2, 100, 3398129, etc.) are precise numbers that are results of counting and enumerating. Integer numbers are discrete, the set of integers is infinite but countable. No arbitrary limit is imposed on the range of integer numbers. Two NULL flavors are defined for the positive and negative infinity.

Real Number REAL

Fractional numbers. Typically used whenever quantities are measured, estimated, or computed from other real numbers. The typical

representation is decimal, where the number of significant decimal digits is known as the precision.

Name Symbol Description

Ratio RTO

A quantity constructed as the quotient of a numerator quantity divided by a denominator quantity. Common factors in the numerator and

denominator are not automatically cancelled out. The RTO data type supports titers (e.g., "1:128") and other quantities produced by laboratories that truly represent ratios. Ratios are not simply "structured numerics", particularly blood pressure measurements (e.g. "120/60") are not ratios. In many cases the REAL should be used instead of the RTO.

Physical Quantity PQ A dimensioned quantity expressing the result of measuring.

Monetary Amount MO

An MO is a quantity expressing the amount of money in some currency.

Currencies are the units in which monetary amounts are denominated in different economic regions. While the monetary amount is a single kind of quantity (money) the exchange rates between the different units are variable. This is the principle difference between PQ and MO, and the reason why currency units are not physical units.

Point in Time TS A quantity specifying a point on the axis of natural time. A point in time is most often represented as a calendar expression.

Set SET A value that contains other distinct values in no particular order.

Sequence LIST A value that contains other discrete (but not necessarily distinct) values in a defined sequence.

Bag BAG An unordered collection of values, where each value can be contained more than once in the collection.

Interval IVL A set of consecutive values of an ordered base data type.

History HIST

A set of data values that have a valid-time property and thus conform to the HXIT type. The history information is not limited to the past; expected future values can also appear.

Uncertain Value -

Probabilistic UVP A generic data type extension used to specify a probability expressing the information producer's belief that the given value holds.

Periodic Interval of

Time PIVL

An interval of time that recurs periodically. PIVL has two properties, phase and period. phase specifies the "interval prototype" that is repeated every ..

Event-Related EIVL Specifies a periodic interval of time where the recurrence is based on

Name Symbol Description

Periodic Interval of Time

activities of daily living or other important events that are time-related but not fully determined by time.

General Timing

Specification GTS

A <dt-TS>, specifying the timing of events and actions and the cyclical validity-patterns that may exist for certain kinds of information, such as phone numbers (evening, daytime), addresses (so called "snowbirds,"

residing closer to the equator during winter and farther from the equator during summer) and office hours.

Parametric Probability Distribution

PPD

A generic data type extension specifying uncertainty of quantitative data using a distribution function and its parameters. Aside from the specific parameters of the distribution, a mean (expected value) and standard deviation is always given to help maintain a minimum layer of interoperability if receiving applications cannot deal with a certain probability distribution.

其中最重要的就是「Text and Multimedia Data Types」,本論文之後會大量使用此種 資料型態作為診療記錄中指向外部連結檔案的方式。Encapsulated Data(ED)依據 HL7 的 定義,主要是給人解讀的資料,或是更進一步給 HL7 範圍以外的機器處理用的資料。

它包含已格式化或未格式化的語言、多媒體資料或以不同標準定義出的結構化資訊(例 如..XML-signatures),ED 可能只是個 reference 而非資料本身;ST 即為當 ED 的 media type 為 text/plain 時的特例。它主要支援檔案類型有 jpeg、gif、DICOM、mp3、video/mpeg…

等(請參閱表 3)。

表 3 Domain media type

code name status Definition

text/plain Plain Text required For any plain text. This is the default and is equivalent to a character string (ST) data type.

text/x-hl7-ft HL7 Text recommended

For compatibility, this represents the HL7 v2.x FT data type. Its use is recommended only for backward compatibility with HL7 v2.x systems.

text/html HTML Text recommended

For marked-up text according to the Hypertext Mark-up Language. HTML markup is sufficient for

typographically marking-up most written-text

documents. HTML is platform independent and widely

code name status Definition

deployed.

application/pdf PDF recommended

The Portable Document Format is recommended for written text that is completely laid out and read-only.

PDF is a platform independent, widely deployed, and open specification with freely available creation and rendering tools.

text/xml XML Text indifferent

For structured character based data. There is a risk that general SGML/XML is too powerful to allow a sharing of general SGML/XML documents between different applications.

text/rtf RTF Text indifferent

The Rich Text Format is widely used to share word-processor documents. However, RTF does have compatibility problems, as it is quite dependent on the word processor. May be useful if word processor edit-able text should be shared.

application/msword MSWORD deprecated

This format is very prone to compatibility problems. If sharing of edit-able text is required, text/plain, text/html or text/rtf should be used instead.

audio/basic Basic Audio required

This is a format for single channel audio, encoded using 8bit ISDN mu-law [PCM] at a sample rate of 8000 Hz.

This format is standardized by: CCITT, Fascicle III.4 -Recommendation G.711. Pulse Code Modulation (PCM) of Voice Frequencies. Geneva, 1972.

audio/mpeg MPEG audio

layer 3 required

MPEG-1 Audio layer-3 is an audio compression algorithm and file format defined in ISO 11172-3 and ISO 13818-3. MP3 has an adjustable sampling frequency for highly compressed telephone to CD quality audio.

audio/k32adpcm K32ADPCM

Audio indifferent

ADPCM allows compressing audio data. It is defined in the Internet specification RFC 2421

[ftp://ftp.isi.edu/in-notes/rfc2421.txt]. Its implementation base is unclear.

code name status Definition

image/png PNG Image required

Portable Network Graphics (PNG)

[http://www.cdrom.com/pub/png] is a widely supported lossless image compression standard with open source code available.

image/gif GIF Image indifferent

GIF is a popular format that is universally well supported. However GIF is patent encumbered and should therefore be used with caution.

image/jpeg JPEG Image required

This format is required for high compression of high color photographs. It is a "lossy" compression, but the difference to lossless compression is almost

unnoticeable to the human vision.

application/dicom DICOM recommended

Digital Imaging and Communications in Medicine (DICOM) MIME type defined in RFC3240 [http://ietf.org/rfc/rfc3240.txt].

image/g3fax G3Fax

Image recommended This is recommended only for fax applications.

image/tiff TIFF Image indifferent

Although TIFF (Tag Image File Format) is an international standard it has many interoperability problems in practice. Too many different versions that are not handled by all software alike.

video/mpeg MPEG

Video required

MPEG is an international standard, widely deployed, highly efficient for high color video; open source code exists; highly interoperable.

video/x-avi X-AVI

Video deprecated

The AVI file format is just a wrapper for many different codecs; it is a source of many interoperability

problems.

model/vrml VRML

Model recommended

This is an openly standardized format for 3D models that can be useful for virtual reality applications such as anatomy or biochemical research (visualization of the steric structure of macromolecules)

相關文件