Hello
We recently added a new form with buttons that calculate the due date for the patients next colonoscopy. This new form enters the date due as "mm/dd/yyyy". Previously, the value was entered manually as "mm-yyyy"
Our nurses have a saved inquiry that searches for the obs term COLONNXTDUE that contains mm-yyyy, so patients that have been entered on the new form are not coming up as they are not the correct formatted date.
There are 2,819 patients that need to be corrected.
Is there an easy way to change each patient to the current format (i.e. mm/dd/yyyy) to make it so that only one query has to be run? We are using Oracle db.
This would be so much easier than having to run two inquiries... One the old way, and one the new way... Any help would be greatly appreciated!!!
Thanks,
Mike
Southwestern Vermont Medical Center
Hi, I'm sure you could write a query to do the work. I could do it in SQL but it's been so long since I used Oracle I've forgot how to ride that bike.
Easiest thing would be to first pull the existing data, summarizing the volume by all the MM-YYYY combinations. select hdid,obsvalue,count(*) from ml.obs where hdid = ??; if the volume is not unreasonable then > update ml.obs set obsvalue = '01/01/2016' where hdid = ?? and obsvalue = '01-2016' > commit; For a relatively few number of combinations, it's simpler (and safer) to just update them month-by-month rather than go all-in converting everything at once.