function lttoxml(value) return string.gsub(value, '<', '&lt;') end out = '' if ( getValue('visus.manifest_refraktion.mangler.odxt') == '' or getValue('visus.manifest_refraktion.mangler.osin') == '' or getValue('visus.manifest_refraktion.ou') ~= '' ) then out = out .. 'Visus optimal refraktion:\n' end if ( getValue('visus.manifest_refraktion.mangler.odxt') == '' ) then out = out .. 'o.dxt: ' if ( getValue('visus.manifest_refraktion.snellen.odxt') ~= '' ) then out = out .. lttoxml(getValue('visus.manifest_refraktion.snellen.odxt')) if ( getValue('visus.manifest_refraktion.etdrs.odxt') == '' ) then out = out .. ', ' end end if ( getValue('visus.manifest_refraktion.etdrs.odxt') ~= '' ) then if ( getValue('visus.manifest_refraktion.snellen.odxt') ~= '' ) then out = out .. ', ' end out = out .. getValue('visus.manifest_refraktion.etdrs.odxt') .. ' ETDRS, ' end if ( getValue('visus.manifest_refraktion.kontrast.odxt') ~= '' ) then out = out .. getValue('visus.manifest_refraktion.kontrast.odxt') .. ' kontrast, ' end out = out .. 'cc ' .. getValue('visus.manifest_refraktion.korr.sf.odxt') .. ' sf' if ( getValue('visus.manifest_refraktion.korr.cyl.odxt') ~= '' ) then out = out .. ', ' .. getValue('visus.manifest_refraktion.korr.cyl.odxt') .. ' cyl' end if ( getValue('visus.manifest_refraktion.korr.grader.odxt') ~= '' ) then out = out .. ', ' .. getValue('visus.manifest_refraktion.korr.grader.odxt') .. ' grader' end if ( getValue('visus.manifest_refraktion.st_hul.odxt') ~= '' ) then if ( getValue('visus.manifest_refraktion.st_hul.snellen.odxt') ~= '' ) then out = out .. ', ' .. lttoxml(getValue('visus.manifest_refraktion.st_hul.snellen.odxt')) end if ( getValue('visus.manifest_refraktion.st_hul.etdrs.odxt') ~= '' ) then out = out .. ', ' .. getValue('visus.manifest_refraktion.st_hul.etdrs.odxt') .. ' ETDRS' end out = out .. ' st.h.' end out = out .. '\n' end if ( getValue('visus.manifest_refraktion.mangler.osin') == '' ) then out = out .. 'o.sin: ' if ( getValue('visus.manifest_refraktion.snellen.osin') ~= '' ) then out = out .. lttoxml(getValue('visus.manifest_refraktion.snellen.osin')) if ( getValue('visus.manifest_refraktion.etdrs.osin') == '' ) then out = out .. ', ' end end if ( getValue('visus.manifest_refraktion.etdrs.osin') ~= '' ) then if ( getValue('visus.manifest_refraktion.snellen.osin') ~= '' ) then out = out .. ', ' end out = out .. getValue('visus.manifest_refraktion.etdrs.osin') .. ' ETDRS, ' end if ( getValue('visus.manifest_refraktion.kontrast.osin') ~= '' ) then out = out .. getValue('visus.manifest_refraktion.kontrast.osin') .. ' kontrast, ' end out = out .. 'cc ' .. getValue('visus.manifest_refraktion.korr.sf.osin') .. ' sf' if ( getValue('visus.manifest_refraktion.korr.cyl.osin') ~= '' ) then out = out .. ', ' .. getValue('visus.manifest_refraktion.korr.cyl.osin') .. ' cyl' end if ( getValue('visus.manifest_refraktion.korr.grader.osin') ~= '' ) then out = out .. ', ' .. getValue('visus.manifest_refraktion.korr.grader.osin') .. ' grader' end if ( getValue('visus.manifest_refraktion.st_hul.osin') ~= '' ) then if ( getValue('visus.manifest_refraktion.st_hul.snellen.osin') ~= '' ) then out = out .. ', ' .. lttoxml(getValue('visus.manifest_refraktion.st_hul.snellen.osin')) end if ( getValue('visus.manifest_refraktion.st_hul.etdrs.osin') ~= '' ) then out = out .. ', ' .. getValue('visus.manifest_refraktion.st_hul.etdrs.osin') .. ' ETDRS' end out = out .. ' st.h.' end out = out .. '\n' end if ( getValue('visus.manifest_refraktion.ou') ~= '' ) then out = out .. 'o.u: ' if ( getValue('visus.manifest_refraktion.snellen.ou') ~= '' ) then out = out .. lttoxml(getValue('visus.manifest_refraktion.snellen.ou')) end if ( getValue('visus.manifest_refraktion.etdrs.ou') ~= '' ) then if ( getValue('visus.manifest_refraktion.snellen.ou') ~= '' ) then out = out .. ', ' end out = out .. getValue('visus.manifest_refraktion.etdrs.ou') .. ' ETDRS' end if ( getValue('visus.manifest_refraktion.kontrast.ou') ~= '' ) then out = out .. ', ' .. getValue('visus.manifest_refraktion.kontrast.ou') .. ' kontrast' end end return out value = 0 timestamp = 0 source = '' if( missing_eye_odxt ) then if( missing_eye_odxt.value and missing_eye_odxt.value == '' ) then value = '' timestamp = missing_eye_odxt.timestamp source = missing_eye_odxt.source else value = 'mangler' timestamp = missing_eye_odxt.timestamp source = missing_eye_odxt.source end end return value, timestamp, source value = 0 timestamp = 0 source = '' if( missing_eye_osin ) then if( missing_eye_osin.value and missing_eye_osin.value == '' ) then value = '' timestamp = missing_eye_osin.timestamp source = missing_eye_osin.source else value = 'mangler' timestamp = missing_eye_osin.timestamp source = missing_eye_osin.source end end return value, timestamp, source