Is there a way to get a visibility region only be viewed within a certain date range?
So for PQRS110 states "October 1 and March 31 who received an influenza immunization OR who reported previous receipt of an influenza immunization."
I don't want to ask that question all year long because it isn't relevant or counted for that matter.
thoughts?
You probably can look the immunization table (if you are on CPS12/EMR9.8 and migrated all your immunizations). The table has immunization date/time that you may filter on it.
We did this with our temperature question on our vitals page. If the field is tied to an obs term, you can do something like the code below:
(OBSPREV("Temperature") == ""
OR DURATIONDAYS(LAST_SIGNED_OBS_DATE("Temperature"), STR(._TODAYSDATE))>=180)
Immunization is no longer an observation. Use IMMUN_GETLIST() to get patient immunization and parse it. If you build HTML form, take a look into $mdObject. It has example of parsing immunization data from IMMUN_GETLIST().
aaltotsky, I wouldn't even know where to start with that mdObject.
akoen, that's how I was thinking about setting it up, however, if someone enters in data within a date span that does not concur with the date span it gets counted for, it doesn't matter anyway.
The $mdObject.js is parsing string from IMMUN_GETLIST() mel call. The Immunization object (line 253) parses string from IMMUN_GETLIST() and parameter 30 (administeredDate) is date that you are looking for. Also use parameter 3 (vaccineName) (or 16-cvxCode) to find the influenza. Are you trying to build it in encounter form? If you build some sort of report - go directly to SQL immunization table to pull a date range and CVX code range.
To give you a better answer, I will have to spend more time with you to understand your business requirements and issue that you have. But remember: there is always a simple solution right on the corner. (LOL)
You could do a DURATIONDAYS between ._TODAYSDATE and Jan 1 of the current year (you will have to parse ._TODAYSDATE to get that. Then, when you have that number, compare it to the day of the year March 31 would be and make sure it isn't less than that and that it isn't greater than the day of the year October 1 is. If you want to get really fancy you will have to code for Leap Year.