xlate check part of Seg value

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf xlate check part of Seg value

  • Creator
    Topic
  • #49162
    Daniel Bantaa
    Participant

    I’m trying to check for a blank time in the Observation Date/Time seg, OBR 7.  The date and time are stored together and in certain cases, the date has a value but the time is blank.  How do I check just the last four positions of that seg?

    Thanks in advance.

Viewing 0 reply threads
  • Author
    Replies
    • #60939
      Jim Kosloskey
      Participant

      Daniel,

      Does the field really have blanks at the end (unususal in HL/7) or does it just have the date and no time?

      If the time is just missing, one way would be to check the length of the field (or component).

      That would require Tcl.

      I have a proc which returns (in a destination field of your choosing) the length of a Source field of your choosing.

      You could then check the length for the size of the field/component against the length when just the date is present.

      If the time is really blank, the way I would do that is to use a proc I already have and the IF Action. The proc will extract a specified number of characters (4 in your example) and place them in a field of my choosing (probably a temp variable) and then I would use the IF Action to check the temp variable populated by the proc to see if it is equal to 4 spaces (use == not eq) and take appropriate action.

      Jim Kosloskey

      Thanks,

      Jim Kosloskey

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

Viewing 0 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10