Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
TSComponentOne |
|
| 1.0;1 |
1 | /** | |
2 | * The contents of this file are subject to the Mozilla Public License Version 1.1 | |
3 | * (the "License"); you may not use this file except in compliance with the License. | |
4 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/ | |
5 | * Software distributed under the License is distributed on an "AS IS" basis, | |
6 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the | |
7 | * specific language governing rights and limitations under the License. | |
8 | * | |
9 | * The Original Code is "TS.java". Description: | |
10 | * | |
11 | * | |
12 | * The Initial Developer of the Original Code is University Health Network. Copyright (C) | |
13 | * 2001. All Rights Reserved. | |
14 | * | |
15 | * Contributor(s): ______________________________________. | |
16 | * | |
17 | * Alternatively, the contents of this file may be used under the terms of the | |
18 | * GNU General Public License (the "GPL"), in which case the provisions of the GPL are | |
19 | * applicable instead of those above. If you wish to allow use of your version of this | |
20 | * file only under the terms of the GPL and not to allow others to use your version | |
21 | * of this file under the MPL, indicate your decision by deleting the provisions above | |
22 | * and replace them with the notice and other provisions required by the GPL License. | |
23 | * If you do not delete the provisions above, a recipient may use your version of | |
24 | * this file under either the MPL or the GPL. | |
25 | * | |
26 | */ | |
27 | ||
28 | package ca.uhn.hl7v2.model.v231.datatype; | |
29 | ||
30 | import ca.uhn.hl7v2.model.Message; | |
31 | ||
32 | /** | |
33 | * Note: The class description below has been excerpted from the Hl7 2.3.1 documentation. Sectional | |
34 | * references made below also refer to the same documentation. | |
35 | * | |
36 | * Format: YYYY[MM[DD[HHMM[SS[.S[S[S[S]]]]]]]][+/-ZZZZ]^<degree of precision> | |
37 | * Contains the exact time of an event, including the date and time. The date portion of a time stamp follows the rules of a | |
38 | * date field and the time portion follows the rules of a time field. The time zone (+/-ZZZZ) is represented as +/-HHMM | |
39 | * offset from UTC (formerly Greenwich Mean Time (GMT)), where +0000 or -0000 both represent UTC (without offset). | |
40 | * The specific data representations used in the HL7 encoding rules are compatible with ISO 8824-1987(E). | |
41 | * In prior versions of HL7, an optional second component indicates the degree of precision of the time stamp (Y = year, L | |
42 | * = month, D = day, H = hour, M = minute, S = second). This optional second component is retained only for purposes of | |
43 | * backward compatibility. | |
44 | * By site-specific agreement, YYYYMMDD[HHMM[SS[.S[S[S[S]]]]]][+/-ZZZZ]^<degree of precision> may be used | |
45 | * where backward compatibility must be maintained. | |
46 | * In the current and future versions of HL7, the precision is indicated by limiting the number of digits used, unless the | |
47 | * optional second component is present. Thus, YYYY is used to specify a precision of "year," YYYYMM specifies a | |
48 | * precision of "month," YYYYMMDD specifies a precision of "day," YYYYMMDDHH is used to specify a precision of | |
49 | * "hour," YYYYMMDDHHMM is used to specify a precision of "minute," YYYYMMDDHHMMSS is used to specify a | |
50 | * precision of seconds, and YYYYMMDDHHMMSS.SSSS is used to specify a precision of ten thousandths of a second. | |
51 | * In each of these cases, the time zone is an optional component. Also note that a TS valued field with the HHMM part set to "0000" | |
52 | * represents midnight of the night extending from the previous day to the day given by the YYYYMMDD part (see example | |
53 | * below). Maximum length of the time stamp is 26. Examples: | |
54 | * |19760704010159-0500| | |
55 | * 1:01:59 on July 4, 1976 in the Eastern Standard Time zone (USA). | |
56 | * |19760704010159-0400| | |
57 | * 1:01:59 on July 4, 1976 in the Eastern Daylight Saving Time zone (USA). | |
58 | * |198807050000| | |
59 | * Midnight of the night extending from July 4 to July 5, 1988 in the local time zone of the sender. | |
60 | * |19880705| | |
61 | * Same as prior example, but precision extends only to the day. Could be used for a birthdate, if the time of birth is | |
62 | * unknown. | |
63 | * |19981004010159+0100| | |
64 | * 1:01:59 on October 4, 1998 in Amsterdam, NL. (Time zone=+0100). | |
65 | * The HL7 Standard strongly recommends that all systems routinely send the time zone offset but does not require it. All | |
66 | * HL7 systems are required to accept the time zone offset, but its implementation is application specific. For many | |
67 | * applications the time of interest is the local time of the sender. For example, an application in the Eastern Standard Time | |
68 | * zone receiving notification of an admission that takes place at 11:00 PM in San Francisco on December 11 would prefer | |
69 | * to treat the admission as having occurred on December 11 rather than advancing the date to December 12. | |
70 | * Note: The time zone [+/-ZZZZ], when used, is restricted to legally-defined time zones and is represented in HHMM | |
71 | * format. | |
72 | * One exception to this rule would be a clinical system that processed patient data collected in a clinic and a nearby hospital | |
73 | * that happens to be in a different time zone. Such applications may choose to convert the data to a common | |
74 | * representation. Similar concerns apply to the transitions to and from daylight saving time. HL7 supports such requirements | |
75 | * by requiring that the time zone information be present when the information is sent. It does not, however, specify which of | |
76 | * the treatments discussed here will be applied by the receiving system. | |
77 | * | |
78 | * NOTE: if the time zone is not included, the timezone | |
79 | * defaults to that of the local time zone of the sender. | |
80 | * | |
81 | * @author Neal Acharya | |
82 | */ | |
83 | public class TSComponentOne extends ca.uhn.hl7v2.model.primitive.TSComponentOne { | |
84 | ||
85 | /** | |
86 | * @param theMessage message to which this Type belongs | |
87 | */ | |
88 | public TSComponentOne(Message theMessage) { | |
89 | 265 | super(theMessage); |
90 | 265 | } |
91 | ||
92 | /** | |
93 | * @return "2.3.1" | |
94 | */ | |
95 | public String getVersion() { | |
96 | 0 | return "2.3.1"; |
97 | } | |
98 | } |