001    /**
002     * The contents of this file are subject to the Mozilla Public License Version 1.1
003     * (the "License"); you may not use this file except in compliance with the License.
004     * You may obtain a copy of the License at http://www.mozilla.org/MPL/
005     * Software distributed under the License is distributed on an "AS IS" basis,
006     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
007     * specific language governing rights and limitations under the License.
008     *
009     * The Original Code is "DTM.java".  Description:
010     * 
011     *
012     * The Initial Developer of the Original Code is University Health Network. Copyright (C)
013     * 2001.  All Rights Reserved.
014     *
015     * Contributor(s): ______________________________________.
016     *
017     * Alternatively, the contents of this file may be used under the terms of the
018     * GNU General Public License (the  ???GPL???), in which case the provisions of the GPL are
019     * applicable instead of those above.  If you wish to allow use of your version of this
020     * file only under the terms of the GPL and not to allow others to use your version
021     * of this file under the MPL, indicate your decision by deleting  the provisions above
022     * and replace  them with the notice and other provisions required by the GPL License.
023     * If you do not delete the provisions above, a recipient may use your version of
024     * this file under either the MPL or the GPL.
025     *
026     */
027    
028    package ca.uhn.hl7v2.model.v251.datatype;
029    
030    import ca.uhn.hl7v2.model.Message;
031    
032    /**
033     * Note: The class description below has been excerpted from the Hl7 2.4 documentation. Sectional
034     * references made below also refer to the same documentation.
035     *
036     * Format: YYYY[MM[DD[HHMM[SS[.S[S[S[S]]]]]]]][+/-ZZZZ]^<degree of precision>
037     * Contains the exact time of an event, including the date and time. The date portion of a time stamp follows the rules of a
038     * date field and the time portion follows the rules of a time field. The time zone (+/-ZZZZ) is represented as +/-HHMM
039     * offset from UTC (formerly Greenwich Mean Time (GMT)), where +0000 or -0000 both represent UTC (without offset).
040     * The specific data representations used in the HL7 encoding rules are compatible with ISO 8824-1987(E).
041     * In prior versions of HL7, an optional second component indicates the degree of precision of the time stamp (Y = year, L
042     * = month, D = day, H = hour, M = minute, S = second). This optional second component is retained only for purposes of
043     * backward compatibility.
044     * By site-specific agreement, YYYYMMDD[HHMM[SS[.S[S[S[S]]]]]][+/-ZZZZ]^<degree of precision> may be used
045     * where backward compatibility must be maintained.
046     * In the current and future versions of HL7, the precision is indicated by limiting the number of digits used, unless the
047     * optional second component is present. Thus, YYYY is used to specify a precision of "year," YYYYMM specifies a
048     * precision of "month," YYYYMMDD specifies a precision of "day," YYYYMMDDHH is used to specify a precision of
049     * "hour," YYYYMMDDHHMM is used to specify a precision of "minute," YYYYMMDDHHMMSS is used to specify a
050     * precision of seconds, and YYYYMMDDHHMMSS.SSSS is used to specify a precision of ten thousandths of a second.
051     * In each of these cases, the time zone is an optional component. Note that if the time zone is not included, the timezone
052     * defaults to that of the local time zone of the sender. Also note that a TS valued field with the HHMM part set to "0000"
053     * represents midnight of the night extending from the previous day to the day given by the YYYYMMDD part (see example
054     * below). Maximum length of the time stamp is 26. Examples:
055     * |19760704010159-0500|
056     * 1:01:59 on July 4, 1976 in the Eastern Standard Time zone (USA).
057     * |19760704010159-0400|
058     * 1:01:59 on July 4, 1976 in the Eastern Daylight Saving Time zone (USA).
059     * |198807050000|
060     * Midnight of the night extending from July 4 to July 5, 1988 in the local time zone of the sender.
061     * |19880705|
062     * Same as prior example, but precision extends only to the day. Could be used for a birthdate, if the time of birth is
063     * unknown.
064     * |19981004010159+0100|
065     * 1:01:59 on October 4, 1998 in Amsterdam, NL. (Time zone=+0100).
066     * The HL7 Standard strongly recommends that all systems routinely send the time zone offset but does not require it. All
067     * HL7 systems are required to accept the time zone offset, but its implementation is application specific. For many
068     * applications the time of interest is the local time of the sender. For example, an application in the Eastern Standard Time
069     * zone receiving notification of an admission that takes place at 11:00 PM in San Francisco on December 11 would prefer
070     * to treat the admission as having occurred on December 11 rather than advancing the date to December 12.
071     * Note: The time zone [+/-ZZZZ], when used, is restricted to legally-defined time zones and is represented in HHMM
072     * format.
073     * One exception to this rule would be a clinical system that processed patient data collected in a clinic and a nearby hospital
074     * that happens to be in a different time zone. Such applications may choose to convert the data to a common
075     * representation. Similar concerns apply to the transitions to and from daylight saving time. HL7 supports such requirements
076     * by requiring that the time zone information be present when the information is sent. It does not, however, specify which of
077     * the treatments discussed here will be applied by the receiving system.
078     * @author Neal Acharya
079     */
080    public class DTM extends ca.uhn.hl7v2.model.primitive.TSComponentOne {
081        
082        /**
083         * @param theMessage message to which this Type belongs
084         */
085        public DTM(Message theMessage) {
086            super(theMessage);
087        }
088    
089        /**
090         * @return "2.5"
091         */
092        public String getVersion() {
093            return "2.5.1";
094        }
095    }