We currently accept HL7 data through mirth and one of the field we process is date of birth, which we receive in PID.7.1 segment of HL7. Currently we just capture it like -
var vDOB = formatDate(msg['PID.7.1'].toString(),"yyyyMMdd");
How can I validate day , month and year component in the date. And also like it should be greater than today's date.
Thanks