Kernel 8.0 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

$$HL7TFM^XLFDT(): Convert HL7 Date to VA FileMan Date

Reference Type: Supported, Category: Date Functions, ICR#: 10103

Description

The $$HL7TFM^XLFDT extrinsic function converts an HL7 formatted input date/time into a VA FileMan formatted date/time.

Format

  $$HL7TFM^XLFDT(hl7_date_time[,local_uct][,time_flag])

Input Parameters

hl7_date_time:

(required) HL7 formatted date and time.

local_uct: (optional) This parameter controls if any time offset is applied to the time. If a time offset is included, then time offset can be applied to give Local time or Coordinated Universal Time (UTC, aka GMT, or Greenwich Mean Time) time offset from the MAILMAN TIME ZONE (#4.4) file. The default is to return Local time. Valid values are:
  • L (default)—Local time.

  • U—UTC time.
time_flag:

(optional) This parameter is set to 1 if the value in the hl7_date_time input parameter is just a time value. The default assumes that the hl7_date_time input parameter is a date and time value.

Output

returns:

Returns the converted date in VA FileMan format.

Example 1

To get date with no offset:

>S X=$$HL7TFM^XLFDT("200011271525-0700")

>W X
3001127.1525

Example 2

To get UCT time offset:

>S X=$$HL7TFM^XLFDT("200011271525-0700","U")

>W X
3001127.2225

Example 3

To get Local time in PST offset:

>S X=$$HL7TFM^XLFDT("200011271525-0700","L")

>W X
3001127.1425

Example 4

To get Local time when only providing a time (no date) as the input parameter:

>S X=$$HL7TFM^XLFDT("1525-0700","L",1)

>W X
.1525