iamsatyan / drugref2

Automatically exported from code.google.com/p/drugref2
0 stars 0 forks source link

Add search-by-DIN #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The drugref2 web service currently does not expose a method for searching by 
Drug Identification Number despite being technically capable of doing so.

I've attached a patch to add support for this. The patch adds a function, 
Vector<Integer> get_atcs_by_din(String), to Drugref.java, which takes a DIN and 
returns the set of ATC numbers matching that DIN.

Since all methods in Drugref.java are exposed to RPC calls, this function 
should be remotely invokable.

***

Patch by running
    patch -p1 < search_by_din.patch

Original issue reported on code.google.com by m.parker...@gmail.com on 23 Jan 2012 at 8:41

Attachments:

GoogleCodeExporter commented 8 years ago
Whoops... attached an old version of the patch (method name is wrong in 
previous patch).

Attaching new patch.

Original comment by m.parker...@gmail.com on 23 Jan 2012 at 8:49

Attachments:

GoogleCodeExporter commented 8 years ago
The patch doesn't take into account that atc codes are alphanumeric and not 
just numeric.  Fixed the patch file to remove Integer generic for Vector.

Original comment by GabrielJ...@gmail.com on 14 Feb 2012 at 5:23

Attachments:

GoogleCodeExporter commented 8 years ago
Removing the Integer generic for Vector will cause warnings in newer versions 
of Java. How about if I make it a String generic instead?

Original comment by m.parker...@gmail.com on 14 Feb 2012 at 6:27

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Fixed bug in updated patch file. Had to rewrite query to get the correct ATC 
codes.  Previously it was returning DrugCodes and not ATC codes.

Original comment by GabrielJ...@gmail.com on 15 Feb 2012 at 6:15

Attachments: