I am trying to find a way to add a historical vaccine to the immunization clinical list after the user enters a date into a document variable that I call DOCUMENT.HEPBDATE1. Here's what I have:
{IMMUN_ADD("Hepatitis B"^^^"1"^"Y"^^"Y"^^"U"^^^^^^"45"^^^^^^^^^^^^^"str(DOCUMENT.HEPBDATE1)"^^)}
Do I need quotation marks around each item? One reference showed quotations; another did not.
The help reference in VFE says to list the VFC code in the VFC Eligibility field (9). Is this a state-specific code or is there a list of GE codes?
I'm not sure exactly how many fields are in this array, so I'm not sure how many carets to include at the end or does it matter if they're blank anyway?
Is using "str(DOCUMENT.HEPDATE1)" the correct way to pull in the date entered by the user?
I built a button on a form for our MA's to gather historical flu immunizations.
Before clicking, the MA fills in two fields on the form:
(1) a drop-down list for where the patient received the flu vax (stored to 'FLU VAX') and typically CVS, Wallgreens, workplace.
(2) a calendar function to capture the date, sorted to 'FLU VAXHX'
Then, the MA can click. The USEROK function either gives a message that it was added, or a code. (I never got around to coding for the error codes.)
The 'run process' action is as follows:
local immunmsg1
local immunmsg2
local immunmsg3
local immunmsg
immunmsg1 = "Influenza^Flu Vax^^1^Y^^Y^"
immunmsg2 = "^V01^^^^^^^^^^^^^^^^^^^"
immunmsg3 = "^^^^^^^^^^"
immunmsg = immunmsg1 + obsnow("FLU VAX") + immunmsg2 + str(obsnow("FLU VAXHX")) + immunmsg3
result = IMMUN_ADD(immunmsg)
if (result>0) then
USEROK("Historical Flu added")
else
USEROK(result)
endif
As for the VFC codes, they come from federal standards:
https://phinvads.cdc.gov/vads/ViewValueSet.action?id=1553768E-88BA-DF11-9BDD-0015173D1785
Thank you so much! I tried it and it worked. Where and when are you getting error codes?
Thank you!
Error codes would occur if the date or location are blank, or if the your vaccination group has a different name.
I could have added a pre-check (prior to doing the add) to make sure that both date and location are not blank, I suppose.