GithubHelp home page GithubHelp logo

Comments (3)

milkshakeuk avatar milkshakeuk commented on July 17, 2024

@ohr, @jamesagnew

I've done some more comparisons this time using IKVM to load the hapi-base-2.3.jar into my dotnet unit test project so I could compare the output and here are the results.

Looks like I haven't made a mistake in the porting process as they both return the same results give then example above.

image

image

from hapi-hl7v2.

milkshakeuk avatar milkshakeuk commented on July 17, 2024

@jamesagnew @ohr

I believe this will fix it, I have made the change in the nhapi port and it seems to fix it (proven with unit tests), assuming that's the expected behaviour and I am not misunderstanding it.

public boolean numbersLessThan(DatumPath other)
{
	DatumPath extendedCopyThis = new DatumPath(this);
	extendedCopyThis.setSize(s_maxSize);

	DatumPath extendedCopyOther = new DatumPath(other);
	extendedCopyOther.setSize(s_maxSize);

	boolean lessThan = false;
	for(int i=1; !lessThan && (i<s_maxSize); ++i) {
		int this_i = ((Integer)extendedCopyThis.get(i));
		int other_i = ((Integer)extendedCopyOther.get(i));
		// this following line is the fix
		// if this_i is greater than other_i then just stop iterating as the answer is clearly false.
		if(this_i > other_i) break;
		lessThan = (this_i < other_i);
	}

	return lessThan;
}

I would create a PR however I have yet been successful in actually building hapi never mind running the test suite.

from hapi-hl7v2.

milkshakeuk avatar milkshakeuk commented on July 17, 2024

@jamesagnew did you see this?

from hapi-hl7v2.

Related Issues (20)

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.