Skip to content

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

Description

@dcronkite

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions