I am creating forms for optometrists
obs term are separated by following
Left eye - obs(sphere), obs(cylinder) obs(axis)
Right eye - obs(sphere), obs(cylinder) obs(axis)
Now the situation is, patient might have axis during the visit 2 years ago but no axis during the last visit. Is there a way I can call for axis from the same date as sphere?
If there is no in built function, ideas on creating a user defined function would be helpful.
I look these up by date using LIST_OBS(). Find the date of the observation you are looking for (either lastobsdate() or use LIST_OBS() and go back and find the value and pull the date), and then use a for loop to search the history of the one you are looking for and pull out the value when you get a match on date. LIST_OBS() also offers visdocid if you want to be more specific than date, but it sounds like for your case you don't really need to.
great I was looking for something like this.