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

TRUNK-4143 Support for mapping drugs to other terminologies #476

Closed
wants to merge 18 commits into from
Closed

TRUNK-4143 Support for mapping drugs to other terminologies #476

wants to merge 18 commits into from

Conversation

gitahinganga
Copy link
Contributor

Added support for mapping drugs to other terminologies

@wluyima
Copy link
Member

wluyima commented Dec 17, 2013

@gitahi86 did you claim the ticket? Also when you are done working on a ticket, please click the Request Code Review button

@gitahinganga
Copy link
Contributor Author

Yes. I have now claimed it and issued a request for review.

@@ -235,4 +239,21 @@ public String getDisplayName() {
return getConcept().getName().getName();
return "";
}

/**
* @return Returns the drugReferenceMaps.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add @SInCE 1.10

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

if (drugReferenceMap.getConceptMapType() == null) {
drugReferenceMap.setConceptMapType(Context.getConceptService().getDefaultConceptMapType());
}
drugReferenceMaps.add(drugReferenceMap);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get a NullPointerException here, you can use this instead:

getDrugReferenceMaps().add(drugReferenceMap);

Because getDrugReferenceMaps() always checks if null and instantiates the collection

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@wluyima
Copy link
Member

wluyima commented Dec 19, 2013

Hi @gitahi86 next time when working on a ticket, you need to create a separate branch in your fork for each ticket otherwise you will end with other dev's commits showing up in the list of commits in your pull requests like in the case of this pull request, see what i mean? Normally you name the branch the ticket number e.g if you are working on TRUNK-4143, your branch name becomes TRUNK-4143

@gitahinganga
Copy link
Contributor Author

Okay. Noted.

@wluyima
Copy link
Member

wluyima commented Jan 8, 2014

You need to use git pull --rebase upstream 1.10.x when updating your local repo instead of just git pull

@wluyima
Copy link
Member

wluyima commented Jan 8, 2014

So that you avoid commits like gitahinganga@5fa156e in the git history

* already a corresponding DrugReferenceMap object for this concept, this one will not be added.
*
* @param drugReferenceMap
* @since 1.10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some unit tests for this method? See similar tests for ConceptReferenceTerm.addConceptReferenceTermMap(...)

@wluyima
Copy link
Member

wluyima commented Jan 9, 2014

The message at the top that says 18 unique commits by 4 authors above shows that you have commits for other devs because, you need to create a separate branch for each ticket you work on and use git pull --rebase ....... otherwise it is becoming painful to merge this code

@wluyima
Copy link
Member

wluyima commented Jan 9, 2014

Code merged at 45b70e2

@wluyima wluyima closed this Jan 9, 2014
RandilaP pushed a commit to RandilaP/openmrs-core that referenced this pull request Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants