Template talk:Infobox drug/Archive 1

message: I've made significant modifications to this infobox template so it can support passed parameters, allowing a much simplified representation on pages into which it is transcluded.  I believe in most cases the current usage has been via subst: inclusion.  The first instance of using the new transcluded template is Atorvastatin.  I did take pains to try and ensure that all current functionality is supported in the revised version. Courtland 12:25, 2 September 2005 (UTC)
replies: text: Thanks Courtland. I have one problem: the image is not always under PAGENAME.png. Is there any way of automating this. Specifically, is there any way to let the template default to PAGENAME if no name is supplied? This may involve JavaScript, so I'm not sure... JFW | T@lk 20:27, 12 September 2005 (UTC)
replies: text: I don't know of wikisyntax that would accomplish this, but I'll take a look around and see what I can find. Courtland 00:00, 13 September 2005 (UTC)

text: Similarly, I can't seem to use nested templates, such as ,  etc. JFW | T@lk 09:19, 13 September 2005 (UTC)
thread_title: Support for transclusion

message: This template is well done. I will produce a german template from it. Furthermore I changed the metabolism into a link, hope thats ok,  -- E-Detailing 18:49, 3 December 2005 (UTC)
thread_title:  Well done 

message: Over the last couple of days I've added links that allow the CAS number and IUPAC name to directly link to external sites. Are there any objections to this? From the pages I've looked at so far, the use of the ATC code field was inconsistent -- some pages linked to external sites, some linked to Wikipedia subpages, and some didn't have any link at all, so I wasn't sure what standard was emerging. 
Also, I'd like to propose adding a couple more fields: specifically, links for PubChem and DrugBank codes. (Obviously PubChem is more established, but considering that congress is considering pulling the plug, it would be good to have a Canadian source as a backup. Thoughts? If anyone knows better databases, of course I'd support linking to those instead -- these were just the best I could find. --Arcadian 14:48, 14 December 2005 (UTC)
thread_title: Direct links

message: What's the best way to go about fixing structure image stretching caused by images that are smaller than the 220px specified in the template? See the Tramadol article for an example of this. Will eliminating the width in the template break other pages? --Bk0 (Talk) 21:52, 18 December 2005 (UTC)
replies: text: Some images are in a different size. Perhaps a variable should be introduced to control image scaling. JFW | T@lk 00:20, 19 December 2005 (UTC)
thread_title:  Fix image stretching? 

message: I've put in the following changes: 
* 1) Per "Fix image stretching?" above, I've added a new "width" parameter. See Tramadol for an example of how it works.  It defaults to 220 when omitted.
* 2) Per "Support for transclusion" above, I've added a new "image" parameter. See Melphalan for an example of how it works. (The person who uploaded the image used a "JPG" extension, so I used the parameter "image=Melphalan.jpg") It defaults to PAGENAME.PNG when omitted (so unless the parameter is used, it works like it used to.)
* 3) Per "Direct links" above, I've added parameters for PubChem and DrugBank.
* 4) I've directly linked the CAS number to an external source. 
* 5) I noticed that there was a lot of inconsistency on the linking of the ATC code. Some pages linked to an external source, some pages linked to an internal source, and some didn't link to anything at all. And all of the links were done by hand. So I split the ATC code into two parameters:  "ATC_prefix" (for the first three characters) and "ATC_suffix" (for the last five) to support both internal and external linking through the template. I've updated the pages using the template (about 30) to reflect this change. There was one page that had more than one ATC code, so I split out the extra codes and made a note about it in the main text. --Arcadian 21:24, 20 December 2005 (UTC)
thread_title:  Recent changes 

message: I'm considering adding two more optional fields (they'd be set up so that if there was no parameter, the field would be absent, not just empty). They are:
* Logo. The image in Atorvastatin looks clumsy, and it would be nice if those logos could be in the same box.
* "Alternate codes". This could handle cases where there was more than one ATC number, or when there was a CAS for a closely related compound. 
Any thoughts/suggestions/objections? --Arcadian 20:43, 22 December 2005 (UTC)
replies: text: I have added a code, "ATC_supplemental", that allows more than one ATC code. An example of it in use is available at Heparin. --Arcadian 18:58, 28 December 2005 (UTC)
thread_title: Proposed changes

message: Currently there is a blank line shown after 'ATC code' and the code number itself. There is a new line in the template code after the </br> mark-up, should this not be removed, from:
 | ATC code    
   
 to look like:
 | ATC code    [http://www.whocc.no/atcddd/indexdatabase/index.php?query= 
I'm tempted to do the edit myself, but have little (no) idea how templates work, and would hat eto mess things up over a large number of pages :-) David Ruben  Talk  02:35, 19 February 2006 (UTC)
replies: text: I've implemented this change (I think.) I spot-checked a few pages that used this template and they seemed okay, but if you see anything that looks messed up, feel free to revert. --Arcadian 14:26, 19 February 2006 (UTC)
replies: text: Thank you. David Ruben  Talk  16:25, 19 February 2006 (UTC)
thread_title: re extraneous blank line after 'ATC code'

message: For now, so the old template could be replaced in the Testosterone article, I've added three new optional fields to the existing "Chemical data" section, for Melting point ("melting_point"), Specific rotation ("specific_rotation"), and Standard enthalpy change of combustion ("sec_combustion"). An example of what it looked like before the update is available here. However, I wouldn't object to moving them to their own section, if we were able to address the concerns David mentioned above. --Arcadian 21:12, 9 June 2006 (UTC)
thread_title: New fields

message: *I contacted BorisTM and he kindly converted template from use of hiddenStructure class to hide specific parameters to the  (see ParserFunctions#IF: and other such options).
*With this he also added an optional Physical data section that only shows the section title if one or more of the parameters is definesd.
*I have extended his demonstration of the technique to include some of the other (very optional) parameters previously mentioned.
*I also added the optional parameters of Smiles and Synonyms which together with the Physical data section now allows the previous messy Aspirin and [[Paracetamol] to use Drugbox without having to mimic the template or use additional table appendages.
*Too many articles already specify the units of molecular weight to have the article add this automatically - Anyone care to edit them or use some form of bot to do this ? But also note some articles provide various weights fo r the drugs different available forms, e.g. Clomifene.
*For the new parameters, the density, melting & boiling points etc, the template will add units and convert the provided Celcius temperatures to Fahrenheit - see the template for the updated description of use David Ruben  Talk  13:38, 12 June 2006 (UTC)
thread_title: Optional Physical data section

message: On the Clomiphene page drugbox, under "legal status", it says "POD".  What is that?  Is there a set of standard abbrevations for legal status of pharaceuticals?  If so, there should be a link to it from the Template:Drugbox page, and perhaps also it should always be linked to from an instance of one of those abbreviations used in a drugbox.
Perhaps it would also be nice if the Template:Drugbox documentation contained some hints as to how one can find out what the legal status is, and where to link to as a reference to that status.
:Firstly, please sign comments and add new comments at the end of the comments page. Anyway, I had a look at the clomifene page and figured that "POD" probably stands for "prescription only drug". But I agree, there is a need for standardised abbreviations for legal status – I'll put my proposal under a separate subheading. Unfortunately, I can't tell you any easy sources (at least publicly-accesssible ones) that discuss the scheduling of medications – someone else might have a suggestion. -Techelf 08:39, 10 June 2006 (UTC)
thread_title: Standard Abbreviations?

message: Australia and US seem to have specific categorisations for drug safety in pregnancy - so would it be helpful to add pregnancy_AU and pregnancy_US. e.g. pregnancy_AU = B would show as B(AU). As for legal status, the template could ensure no rogue values are assigned (eg category = K) and automatically adds the 2-letter country code without editors manually using a variety of formats (eg US, U.S., United States, United States, (US), (US), (U.S.)  etc).
There is no specific coding for UK - our British National Formulary in an appendix gives details on problem drugs, in which trimester and why (the wording tends to be a of number of set phrases with qualify explanation but there are a lot of individual specific comments. So any UK info that is not obvious from AU & US categories (eg Promethazine is generally advised to avoid unless benefit outweighs possible harm, yet it is our recommended drug of choice for excessive vomiting of pregnancy !) is all stuff better left as free text under current parameter pregnancy_category - which of course must be kept for backwards compatability for all those articles already using this parameter.
Let me have any thoughts and I can quickly implement this.David Ruben  Talk  00:44, 17 July 2006 (UTC)
replies: text: This seems like a good idea to me. I have personally never added UK-related pregnancy information to drugboxes anyway, mostly for the reasons you outlined above. Fvasconcellos 14:25, 17 July 2006 (UTC)
replies: text: Yep, sounds like a good idea to me too. -Techelf 10:48, 18 July 2006 (UTC)
replies: text: pregnancy_AU and pregnancy_US implemented - see template for discussion on how to use. I will ask User:Diberri to implement in his tool the additional country specific parameters. David Ruben  Talk  19:09, 18 July 2006 (UTC)
replies: text: I've added these to the template builder. Here's an example. --David Iberri (talk) 21:40, 18 July 2006 (UTC)
replies: text: Great stuff - but its lost the | excretion = parameter line in standard & extended format. David Ruben  Talk  22:03, 18 July 2006 (UTC)
replies: text: Fixed. --David Iberri (talk) 02:55, 19 July 2006 (UTC)
thread_title: Same for Pregnancy status ?