I have tried several variations. All results are somewhat similar. Right now I get both the previous ophthname at todays date and the new ophthname at service_date if I change it and the observation pile up related to any "eye result". I simply want the observations to clear if I clear the fields in the form and to change if I change my choice. If I remove the date of service and the condition and then assign an observation to the "eye results" My observations change when I change them and clear if I clear them. I am not sure what I am missing here. Any thoughts / suggestions are much appreciated
Best Regards
-Richard
{
if
OBSPREV("OPHTHNAME") <> ""
then OBSNOW("OPHTHNAME", OBSPREV("OPHTHNAME"), DOCUMENT.SERVICE_DATE)
else OBSNOW("OPHTHNAME", "", DOCUMENT.SERVICE_DATE)
endif
}
{
cond
case DOCUMENT.SERVICE_DATE <> "" and DOCUMENT.EYE_RESULTS <> ""
OBSNOW("DIAB EYE EX", DOCUMENT.EYE_RESULTS, DOCUMENT.SERVICE_DATE)
else
OBSNOW("DIAB EYE EX", "", DOCUMENT.SERVICE_DATE)
endcond
}