A couple of questions on HL7/X12 handling
Folks
1) What's the correct way to check for an existence of a segment? So far I have been doing this by checking to see if a required field is non-null, and this seems to work but is a bit clumsy. In this case, it’s an X12 message being checked in an IF action in BPL:
request.GetValueAt("NTE(1):Description")'=""
Or in a DTL, to see if a Z segment exists:
source.{ZEF:Counter}=1
2) I have a case where I need to change from an external date format (YYYYMMDD) to internal (+$H) for a DTL to create a new object (and then persist it later). I am using: +..ConvertDateTime(source.{G62:Date},"%Y%m%d","%q(3)") Is there a cleaner way using built in utils or without writing a custom function?
3) I have a case where I need to change from an external time format (HHMM) to internal for a DTL to create a new object (and then persist it later). I am using this: $e(source.{G62:Time},1,2)*60+$e(source.{G62:Time},3,4)*60 Is there a cleaner way using built in utils or without writing a custom function?
4) PID segment is actually in a repeating group. In the real world, do you ever see more than one PIDgrp or PID segment? Or is the de facto standard a single group/segment?
Thx!