Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throws error on visual acuity scores that are not a multiple of 5 #1

Open
dcronkite opened this issue Dec 8, 2020 · 0 comments
Open

Comments

@dcronkite
Copy link
Contributor

These tests will show the error:

    	def test_logmar_16
		a = VAExtractor.new
		val, _ = a.logmar([20, 16, '', '', '', '', ''])
		assert(val != nil)
	end

	def test_logmar_19minus
		a = VAExtractor.new
		val, _ = a.logmar(["20", "19", "-", nil, nil, nil, nil, nil, nil, nil])
		assert(val != nil)
	end

This will cause the manual variable to be nil:

manual = @usedsnellen[va[1].to_i]

And will cause an error here since lva[0] cannot be compared to bcva['O?'][1].

if bcva["OS"] == nil or (bcva["OS"][0] <= priority and lva[0] < bcva["OS"][1])

I bypassed the error by supplying next if lva[0].nil?, but this just ignores those values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant