I've been tasked with
creating a requisition form for lab orders that are sent to a third party.
Using the Stand-alone Report Designer, the form itself I had no trouble with
creating, but the third party has specified criteria that must be met on this
form. The main item is a required PDF417 barcode. I cannot figure out the
syntax required to build this barcode. I'm completely guessing at every step
since there doesn't appear to be any documentation on this.
I have a blank report with the PDF417 Barcode Report
Item added.
The Third Party requires the barcode have a structure
like the following:
H||||^^||
P|||||||||^^|||||||||||^^|||||||||^^|||||||^|||||||||^|||||||||^^^^^^^^^^^^^^|^^^^^^^|||||||||||||||||^^|^^|^^|^^||||^||||||^^|^^^^|||^||
C|||||||||||||||||||^||||||||
A|||||||||||||||||||||^^|^|^||||||^^|^^^^^|||
M||||||
T|||||||||||||||||||||||||||||||||||||||||
S|^^^^^^|
D|||
L||
E||
Between the Pipe or Caret characters I'll need to
populate my fixed values or data fields like the following 'P' segment:
P|Fields.P1_PtChartno||||||Fields.P7_Account_clientNo|Fields.P8_RequisitionNo|Fields.P9_PtNameLast^Fields.P9_PtNameFirst^Fields.P9_PtNameMiddle|Fields.P10_PtDOB
So in the Expression I put in this.
='P|'Fields.P1_PtChartno + '||||||' +
Fields.P7_Account_clientNo + '|' + Fields.P8_RequisitionNo + '|' +
Fields.P9_PtNameLast + '^' + Fields.P9_PtNameFirst + '^' +
Fields.P9_PtNameMiddle + '|' + Fields.P10_PtDOB
This didn't work, but it didn't error. Just no results
when scanned. I found a post on the forum stating that if any field returns a
NULL nothing will be displayed. So, I tried the suggested fix.
='P|'+isnull(fields.p1_ptchartno,"")+'||||||'+isnull(fields.p7_account_clientno,"")+'|'+isnull(fields.p57_externalsystemaccessionno,"")+'|'+isnull(fields.p9_ptnamelast,"")+'^'+isnull(fields.p9_ptnamefirst,"")+'^'+isnull(fields.p9_ptnamemiddle,"")+'|'+isnull(fields.p10_ptdob,"")+'|'
Progress! Although not
entirely correct data, I got results:
P|44555|||||||JBF|JONES^JOHNNY^|CAAAAIAE|
Issue here is the value ‘JBF’
should be ‘915’ and ‘CAAAAIAE’ should ‘20000804’
If I add another segment
the issue shifts fields:
='H|EDIFECS|'+
IsNull(Fields.H2_reqdate,"")+'|'+IsNull(Fields.H3_ediident,"")+'|^^||'
+'P|'+isnull(fields.p1_ptchartno,"")+'||||||'+isnull(fields.p7_account_clientno,"")+'|'+isnull(fields.p57_externalsystemaccessionno,"")+'|'+isnull(fields.p9_ptnamelast,"")+'^'+isnull(fields.p9_ptnamefirst,"")+'^'+isnull(fields.p9_ptnamemiddle,"")+'|'+isnull(fields.p10_ptdobconvert,"")+'|'
Returns,
H|EDIFECS|20160927|e|^^||
#|EEFFF|||||||915|9:,4$Y9:7,,^Y|20000804|
P returns as #, 44555 as EEFFF,
and JONES^JOHNNY^ as 9:,4$Y9:7,,^Y
I know I’m doing it wrong, but I can’t find the correct way to format the expression.