Coder Social home page Coder Social logo

vaextractor's People

Contributors

ayl avatar dcronkite avatar

Watchers

 avatar  avatar

Forkers

kpwhri

vaextractor's Issues

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

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.

Regex matches on non-VA causing `ErrorLateralityNotFound`

This can be replicated with the following test:

def test_scalp_does_not_error
	a = VAExtractor.new
	a.extract('SCALP ')  # the 'LP ' will be captured
end

The regular expression incorrectly identifies some text as a potential VA score. If no VA score is found, these will raise an ErrorLateralityNotFound. (E.g., "LP " is captured.)

raise ErrorLateralityNotFound

NB: Under the current code, other errors may occur before since boundary conditions aren't checked, but this is the underlying issue. (E.g.,

lat = searchpriorlines(lines[i-3..i-1].reverse)
)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.