Template talk:Drugbox
From Wikipedia, the free encyclopedia
[edit] Support for transclusion
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)
- 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)
-
- 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)
- Similarly, I can't seem to use nested templates, such as {{carbon}}, {{sub}} etc. JFW | T@lk 09:19, 13 September 2005 (UTC)
Okay, seriously. This needs to be a template and it needs to take the variables. Currently,(as of September 9th, 2005, I think) it doesn't insert the variables, so there are a bunch of ? on the pages that use this as a template. Pages that copied and pasted the template in are going to get stale and I think the only way to find them will be a link to IUPAC_nomenclature. The template from months ago was working fine. Why was it changed away from variables? Peter Bailey
- The confusion here is a matter of reversions to a state before the template was changed to support transclusion. I can understand someone coming along after months of not adding the template then finding that it has changed being caught by surprise. The pre-variable template was more boilerplate than template, which would be ok if it were labeled as such. Do you think that we should provide the old boilerplate below for use under certain circumstances? I think that User:Rmky87 should speak up here to talk to why the old version is superior to the new in his/her opinion before additional reversions. Courtland 13:52, 10 October 2005 (UTC) P.S. I've left a brief not on Rmky87's talk page asking that input be made here about what is superior about the previous version
If you are going to do what you are doing, could you at least make it look not-bizarre when not all the information is in there? The thing below this section looks much simpler and worked just fine when I copied-and-pasted it onto nordazepam (it's not just a metabolic intermediate anymore). Do we even have templates for CAS number, IUPAC name, ATC code, etc.? Because that's what the {{{blah_blah}}} would seem to imply.
[edit] Empty syntax
The following text can be copied into pages where transclusion of the template is desired.
{{drugbox | | IUPAC_name = | image = {{PAGENAME}}.png | CAS_number = | ATC_prefix = | ATC_suffix = | PubChem = | DrugBank = | chemical_formula = | molecular_weight = | bioavailability = | metabolism = | elimination_half-life = | excretion = | pregnancy_category = | legal_status = | routes_of_administration = }}
Courtland 12:25, 2 September 2005 (UTC)
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)
I have updated the template according to present use habbits. -- David Andel 12:16, 17 April 2006 (UTC)
[edit] Direct links
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)
[edit] Fix image stretching?
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)
- 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)
[edit] Recent changes
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)
[edit] Proposed changes
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)
- 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)
[edit] Issue with link
JFW says I should address this to you:
While attempting to edit the ribavirin and viramidine articles I've noticed a problem the standard drug template which includes external links for things like CAS number, Pubchem, chemID and so on. The ChemID works fine because it plugs back to the http://chem.sis.nlm.nih.gov/chemidplus/ database. However, the CAS# external links don't work because they attempt to plug the CAS# into the European ECB-ESIS database, and they naturally are not recognized. I think that the nih pubchem database would take CAS numbers, and would work fine if the link attempted that. So this CAS# external link needs to target to the NIH site. Sbharris 03:33, 6 January 2006 (UTC)
This should really be addressed to Arcadian (talk • contribs), who has modified the template to allow these functionalities. He may have more information on why the ECB-ESIS databank was chosed over Pubchem. JFW | T@lk 20:22, 8 January 2006 (UTC)
Thanks Sbharris 03:58, 13 January 2006 (UTC)
- Here is the only change I made to the CAS number. As that time, the majority of fields using the Drugbox template included dashes in their CAS number (for example, "57-92-1" for Streptomycin.) The source you are recommending is an excellent one, but it requires CAS numbers that have zero-padding and are stripped of hyphens, as shown below:
- http://chem.sis.nlm.nih.gov/chemidplus/ProxyServlet?objectHandle=DBMaint &actionHandle=default&nextPage=jsp/chemidheavy/ResultScreen.jsp &ROW_NUM=0&TXTSUPERLISTID=000057921
- I don't know how to address your concern, so I have reverted that change so the field is exactly like it was when I first found it. (The database I had linked to previously was the only one I could find that accepted a CAS number in its hyphenated form. It was missing about a quarter of the compounds we referenced, but I felt it was better than nothing. However, I recognize now that this caused some confusion, so the best answer I have is to unlink the field. But if you or someone else has a better solution, I'd have no objection to the template being altered to support it. --Arcadian 04:41, 13 January 2006 (UTC)
-
- I looked a little harder. The source you supplied was quite useful, and though we can't link to it directly, it provided other links that accept the CAS number in the URL. Sources include:
- http://toxnet.nlm.nih.gov/cgi-bin/sis/search/r?dbs+ccris:@term+@rn+57-92-1
- http://toxnet.nlm.nih.gov/cgi-bin/sis/search/r?dbs+genetox:@term+@rn+@rel+%2257-92-1%22
- http://toxnet.nlm.nih.gov/cgi-bin/sis/search/r?dbs+hsdb:@term+@rn+@rel+57-92-1
- http://www.nlm.nih.gov/cgi/mesh/2006/MB_cgi?term=57-92-1&rn=1
- http://www.ebi.ac.uk/chebi/searchFreeText.do?searchString=57-92-1
- http://oaspub.epa.gov/srs/srs_proc_qry.search_sort?P_SEARCH_CD=C&P_CHOICE_CD=CAS&P_KEYWORD_NM=57-92-1+
- http://chemdb.niaid.nih.gov/struct_search/misc/url_search.asp?cas_no=57-92-1
-
- For comparison, the database that was used through yesterday is below:
While I have no way of knowing if any of those sources would be more exhaustive than the esis-pgm database, it would be relatively easy to switch to another source later if we so desired. Would you like any of these sources hooked up? --Arcadian 12:18, 13 January 2006 (UTC)
Yes. In absense of any knowledge about which of the above are most exhaustive, let's try the last one, the chemdb.niaid.nih.gov site:
which should be pretty complete for drug stuff. Link that up if it takes hyphenated CAS #'s, if you would. THANKS for the help! Sbharris 23:11, 14 January 2006 (UTC)
-
- Apparently http://chemdb.niaid.nih.gov/struct_search/misc/url_search.asp?cas_no=57-92-1 is dead right now. If you'd like, I could hook it up to another source (try clicking on the URLs above -- most of them work for me know except the last one), or we could wait a bit and see if it's just a temporary outage. --Arcadian 03:01, 16 January 2006 (UTC)
-
-
- I tried it again, and this time the database was up, but it didn't have entries for most of the first few I spot checked. So for now, I hooked it up to the MESH database, since it was very fast and had entries for most of the ones I used for testing. However, it doesn't do a great job of linking to other databases -- the only major benefit it provides is external confirmation that the CAS is correct. So, if you (or anyone else reading this) would rather put in a different source, I'd have no objection. --Arcadian 20:36, 18 January 2006 (UTC)
-
[edit] re extraneous blank line after 'ATC code'
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]]''' <br />
[[ATC_code_{{{ATC_prefix}}}|{{{ATC_prefix}}}]][http://www.whocc.no/atcddd/indexdatabase/index.php?query={{{ATC_prefix}}}{{{ATC_suffix}}} {{{ATC_suffix}}}] {{{ATC_supplemental|}}}
to look like:
| '''[[ATC code]]''' <br /> [[ATC_code_{{{ATC_prefix}}}|{{{ATC_prefix}}}]][http://www.whocc.no/atcddd/indexdatabase/index.php?query={{{ATC_prefix}}}{{{ATC_suffix}}}
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)
- 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)
-
- Thank you. David Ruben Talk 16:25, 19 February 2006 (UTC)
[edit] Ambiguities
Copied from User talk:Fuzzform:
The bioavailability, half-life and even the metabolism and excretion will vary with the administration route and precise formulation. For example, in addition to i.v, midazolam may be swallowed as a syrup, held in the mouth to be absorbed via the buccal mucosa (largely avoiding digestion – though some may get swallowed) and even sprayed intranasally (PMID 11802661). For other drugs there are creams, suppositories, patches, soluble powders, tablets, enteric-coated capsules, etc, etc. I think that where there is a risk of confusion, the drug box should state e.g. "xx% (oral syrup)". If there is room for more than one entry in the table cell, then that would be good. Otherwise it could be moved out to be discussed in the article and the DrugBox left with "varies", or some such phrase --Colin Harkness 11:43, 21 February 2006 (UTC)
- Yeah, that is a problem, one which I hadn't thought of. Bioavailability is by definition 100% when injected intravenously. I suppose I'll have to go through all the articles and differentiate. Fuzzform 01:25, 22 February 2006 (UTC)
-
- As with all these pharmacokinetic parameters, they all have strict definitions, and the further you go into it, the more complex it becomes. In fact the bioavailability is defined as the percentage fraction of the drug that reaches the systemic circulation, incontrast to the absorption, which is the percentage reaching the portal circulation. I would suggest that bioavailability in the table should be taken to imply oral, since that is common usage and implicitly obvious where a drug is taken orally or iv (the iv is of course 100%), but where drugs are given by several routes, then that extra detail should be added. After all, i.m. BA is invariably taken to be equal to 100%, and there are few drugs given transdermally as well as oral (hyoscine, GTN, sex hormones spring to mind). So I would suggest that the table cell simply list the one value, with a comment if it has other routes. See the entry for Tramadol, which has the curious property that BA varies for repeated dosing - you could leave it to be discussed in the main article, but for quick reference, a few words in the table clarifies the detail without upsetting the conciseness of a quick reference table. bignoter
-
-
- What about chloramphenicol? intravenous chloramphenicol achieves a concentration in blood that is only 70% of that achieved when the same dose is given orally. How do you report bioavailability then? --Gak 10:50, 20 May 2006 (UTC)
-
[edit] May 2006 update
I updated the drugbox for aesthetics and readability. Probably the only issue I can think of is abbreviation/contraction of entry names: molecular weight, chemical formula, pregnancy category and routes of administration. I found that it was necessary to fit these entries on a single line. I think that if people are in doubt they can always click on the name. As a bonus, the new format seems to partially alleviate the printing problem discussed on Wikiproject Drugs. Let me know if you have any problems with the new box. -Techelf 11:48, 26 May 2006 (UTC)
- I appreciate use smaller font size to make the template box narrower (especially for long IUPAC names) and hence abbreviating the heading titles.
- 'MW' seemed unecessarily short, as 'Mol.Weight' fits and will be more obvious (especially as many articles just give a number without including the units of g/mmol).
- I liked the previous 2x2 arrangement of CAS, ATC, PubChem, DrugBank. Is there anyway to include these as just 2 rows in the table (i.e. reduce current 4 lines to 2) thus forshortening the length of what is quite a long overall template box ? David Ruben Talk 16:36, 26 May 2006 (UTC)
-
- The 2x2 arrangement (which usually took up 4+ lines anyway) always seemed a little inconsistent to me, but the main reason I changed it to four separate rows was ease of coding and because drugboxes with more than two ATC codes were a little unwieldy under the old design. I did a quick comparison of a few pages and the new box seems to be around the same length (but looks longer because it's usuallly narrower). -Techelf 01:55, 27 May 2006 (UTC)
-
-
- Ok then, I agree new arrangement looks smart & neat. As for the optical illusion, must check how long its been since my last eye check ... :-) David Ruben Talk 02:21, 27 May 2006 (UTC)
-
-
-
-
- I like the new appearance. Now that DrugBank is on its own row, we now have the option of making it an optional parameter, so the line disappears when there is no value provided. Thoughts? --Arcadian 02:43, 27 May 2006 (UTC)
-
-
-
-
-
-
- Yep, I like the idea. Might need your expertise on this one, Arcadian, because I don't know how to do this while keeping existing infoboxes compatible. -Techelf 09:24, 27 May 2006 (UTC)
-
-
-
-
-
-
-
-
- Failled attempt - not all drugs have a DrugBank entry so just leaving the details blank might just imply that the article's creator forgot to provide the value (vs that there is no value that can be supplied). So making the whole line optional is sensible. See ParserFunctions#IF: which determines if a value exists and then shows expressions if it does Else if it does not (the Else expression is optional and any '|' within an expression must be enclosed within curly brackets if it is not to be seen as the parserfuction-#IF: separator for the 'else' expression or the end of function).
- Thinking that some of the other Identifiers field require trudging around to find their values, I've used the same technique for their values (rather than the whole line for DrugBank). If the other identifer details are not provided then a '?' is shown or a link to the organisation's search page so that the details can be looked up.
- The data in the other sections (Chemical data, Pharmacokinetic data,Therapeutic considerations) does exist, whether or not an editor can find the data and so I have not added optional '?' if the data is not supplied. But let me know if this seems inconsistant. David Ruben Talk 13:25, 27 May 2006 (UTC)
- Miserable failure - I tried copying over technique from other templates, but clearly I don't understand this - for while template itself looked ok, a quick check on a drug article showed the {{|}} failled to be interpreted properly, not the rest of the conditional parameters. My past efforts in the history section will show what I was trying to achieve, but I'll leave it for someone better than I to implement correctly :-( David Ruben Talk 14:01, 27 May 2006 (UTC)
-
-
-
-
Techelf & David: it looks stunning. My compliments. A large improvement. JFW | T@lk 22:44, 27 May 2006 (UTC)
- I have made DrugBank an optional field. --Arcadian 01:13, 29 May 2006 (UTC)
[edit] Vd and Protein Binding
I hope people do not object to the fact that I have added Volume of distribution and Protein Bound fraction to the template. These can be important considerations in the use of a drug and such information may be interesting to some readers. --Copperman 17:08, 28 May 2006 (UTC)
- As a General Practitioner, I can just about recall the improtance of protein binding (low protein levels in the infirm/alcoholics will obviously have an effect), but what has volume of distribution have to do with any day-to-day decission I make about using a drug? And if I fail to see its relevance then wikipedia, as a general encyclopedia, can have little reason to include Vol.dist for the general reader (there are those lovely links to DrugBank, PubChem etc that can give pharmacological/physiological data).
- Also such additional data needs be optional fields as per previous section. David Ruben Talk 17:17, 28 May 2006 (UTC)
-
- Ah, you have a fair point there I guess with the optional fields...I guess if one starts to add such information one eventually runs out of space and arguments arise as to what info SHOULD be included. --Copperman 17:38, 28 May 2006 (UTC)
[edit] Second image & Optional fields
Some articles, such as Paracetamol, could not previously use this template as the articles used 2 images. I've added an extra optinal fields for image2. I would have prefered a more flexible system like the OMIM_mult field in template:DiseaseDisorder infobox.
With optional fields now in place, viewing the template itself will not show these options. I shall therefore try to place instructions on using this template up to the front page.David Ruben Talk 02:34, 30 May 2006 (UTC)
- Very nicely done. I took a look at Paracetamol and noticed the boxes for "Physical properties" -- do you think we should extend the Drugbox template to accomodate those values as optional parameters? --Arcadian 13:04, 30 May 2006 (UTC)
-
- As a general rule no - very few drugs for which such info useful - I suppose relevent for aspirin, and perhaps penicillin V vs penicillin G. However such info is difficult to add, as I had to force an extra table manually. Of course should this template's style change, then the manual table will also need to be hand-edited to match - the whole point of a template should be to make such tasks redundant.
- So yes, as optional extra section yes would be helpful - BUT ONLY if the absence of data in all its extra parameters results in no display of the section (i.e. the section is hidden rather than single items such as DrugBank).
- I'm not sure how the "hidden class" works (can it test multiple parameters and does it allow blanking of multiple lines). If not, then the newer #IF: system seems as if it might be more flexible (e.g. choice of side-by-side second image rather than vertical placement, and optional separate captions for images 1 & 2), however I failled to grasp how to code it correctly (see previous failled edit attempts in the edit history). David Ruben Talk 15:06, 30 May 2006 (UTC)
-
-
- During BorisTM hard work at trying to ensure red-link not shown if no image either defined or already upload as PAGENAME.png, he included a separate width2 parameter for image2. I have added this to the live template, and ensured this takes priority if defined else, as for the first image, width is used if given with a default value of 220 otherwise used - description added to teh template page. David Ruben Talk 14:29, 16 July 2006 (UTC)
-
[edit] New fields
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)
[edit] Optional Physical data section
- I contacted BorisTM and he kindly converted template from use of hiddenStructure class to hide specific parameters to the {{#if: test | then text | else text}} (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)
[edit] Legal Status
[edit] Standard Abbreviations?
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)
[edit] Proposal for standard abbreviations
In response to User:KarlHeg's comment above, I'd like to propose the following set of standard abbreviations for discussion. I think that these should be listed in alphabetical order (by jurisdiction), separated by a comma, and with only the first instance of a country abbreviation in a drugbox wikilinked – e.g. clomifene.
Abbreviation | Meaning |
Australia | |
unscheduled (Au) | Unscheduled/exempt |
S2 (Au) | Schedule 2 Pharmacy Medicine |
S3 (Au) | Schedule 3 Pharmacist Only Medicine |
S4 (Au) | Schedule 4 Prescription Only Medicine |
S8 (Au) | Schedule 8 Controlled Drug |
United Kingdom | |
GSL (UK) | General Sale List |
P (UK) | Pharmacy Medicine |
POM (UK) | Prescription Only Medicine |
CD (UK) | Controlled Drug |
United States | |
OTC (U.S.) | Over the counter |
℞-only (U.S.) | Prescription only |
This is largely based on the standardised markings and abbreviations used widely amongst doctors and pharmacists (Australia) and/or on product packaging that I've encountered (UK and U.S.). I've already been using these, and hope that these will be useful as standardised abbreviations across the drugbox templates. -Techelf 08:39, 10 June 2006 (UTC)
- Until now, I've always wikilinked the UK terms as [[prescription drug|POM]], [[Over-the-counter substance|OTC]] or [[controlled drug]]. I can, if thought useful, insert code in the template to autolink the terms.
- In essence we would have parameters legal_status_Aus, legal_status_UK, legal_status_US which are defined as alternatives to the plain legal_status. The system could then be expanded if other areas wish to be included (e.g. Canada, Ireland, NZ +...). Each parameter may take values as abbreviated above and will then show the term suitably linked and with (Aus), (UK) or (US) as a suffix.
- Hence legal_status_UK = OTC would result in OTC (UK) - have a think about this and let me know (I'll be on a wikibreak for next 10 days) David Ruben Talk 02:19, 17 June 2006 (UTC)
- I've never been a great fan of wikilinking the data content directly in certain fields of the infobox, for example I don't understand the practice of wikilinking "g/mol" when the only people who would find this information useful would already be familiar units. In this instance, I think that the regulation of therapeutic goods page (wikilinked by the "legal status" title) is more useful for people than the individual over-the-counter substance or prescription only medicine pages. But I do like the idea of making scheduling parameters if they could be all placed in the same box (like the chemical formula parameters). In terms of the actual implementation, I think it'd be preferable to use <small> for the country code only, and that we should use wikilinked two-letter ISO country codes (ISO 3166-1) within the framework of WP:MOS (i.e. Au, Ca, Ie, NZ, UK, U.S., etc). -Techelf 08:10, 20 June 2006 (UTC)
-
-
- Ok - I've had a go at this at the template sandbox Template:Add code (ignore all but the legal status items). See coding that takes optional legal_AU, legal_UK & legal_US parameters using values as listed in the table above (the coding is almost twice the length required, as it identifies values in both upper & lower case). An example of the outcome is shown at Template talk:Add code. Note if an unspecified value is attempted for a given country then an ? is shown indicating an error.
- Any additional information (i.e. for countries not specified) may still be included in the current legal_status parameter that is appended to the end.
- If people like this idea then I shall transfer it to the live template - but first please indicate preference for parameters names (UK as example):
- legal_UK
- legalUK
- legalUK_GSL_P_POM_CD - this is veryhttp://en.wikipedia.org/w/index.php?title=Template_talk:Drugbox&action=edit§ion=17 awkward I know, but clearly shows permitted values. Similar would be legalAU_Unscheduled_S2_S4_S8 and legalUS_OTC_Rx. The obvious problems would be remembering the parameter names (would have to be copied & pasted) and what happens if a country alters its license category names.
- My preference is legal_UK style. David Ruben Talk 01:58, 12 July 2006 (UTC)
-
-
- Hi Davidruben, I prefer the "legal_UK" style too. Just a minor point to consider when you incorporate the parameters into the main template – the U.S. equivalent of S4/POM is "℞-only", and also using the unicode prescription character "℞" (using Template:Unicode if necessary) would probably be better than "R<sub>x</sub>". Apart from that, it looks good. Cheers. -Techelf 10:41, 16 July 2006 (UTC)
-
-
- Ok thanks - Having only MSIE I have had to copy & paste the [] character - for future editing purposes it would be better if I could use the actual Unicode number in the Template:Unicode - do you happen to know its value ? David Ruben Talk 12:29, 16 July 2006 (UTC)
-
- Template so upgraded - is the accompanying description clear enough ?
- See this edit as example of how I modified Metronidazole. However note that the template ensures only a single permitted option for specified countries, so multiple opitions, as seen in Ibuprofen, still need to be manually coded using legal_status. David Ruben Talk 14:21, 16 July 2006 (UTC)
-
- I was about to suggest dumbing down my own additions to specifcally allow for multiple classifications per country (basic legal_XX accepts anything as valid free text and just appends (XX) to the end). But then I thought, the classification schemes in any given country are a step-wise degree of restriction and so only the most relaxed category need be specified. Hence Ibuprofen lists for UK as GSL/P/POM, but any GSL (general sales product for non-pharamcy stores) can be stocked by a Pharmacy, and similar a P drug (Pharmacy only) can be prescribed (separately in UK is whether NHS blacklists a product, eg Paracetamol allowed but not expensive Calpol brand, but legally are licensed the same and on private prescription Calpol is allowed). Think I'll therefore leave the drugbox template checking for valid values (ie not accept "Presc" for POM or "S3" in Australia) and just simplify the entry in Ibuprofen (as here). Sure there may be restrictions on quantities allowed to be sold (eg in UK 16 Paracetamol on GSL, upto 100 if a pharmacist feels special considerations, unlimited on doctor prescription) but these are specific for each drug & country and not generally approproate to include in this a general encyclopaedia. David Ruben Talk 15:28, 16 July 2006 (UTC)
-
-
- Yeah, I just noticed that on the ibuprofen page. It's a bit problematic for the Australian situation, because the scheduling system works in a step-down manner such that ibuprofen is S4 (prescription only) unless a preparation meets certain requirements where it is permitted to be included in S2 (pharmacy medicine) or be unscheduled depending on pack size, tablet strength, labelling, etc. Because of this, technically it should be listed as S4 (rather than unscheduled), but this doesn't reflect the wide OTC availability of ibuprofen. Ditto for paracetamol and many other "over the counter" medications. Perhaps the original "unscheduled/S2/S4" was the best compromise, but does anyone have any suggestions? -Techelf 10:45, 18 July 2006 (UTC)
- The choice is whether each country-specific parameter gets tested for a single valid categorisation level, or accepts free text (and just adds in the <small>([[CountryX|XX]])</small> coding). I prefer the former. Also, at least in UK, being an OTC (P or GSL) does not mean unlimited availability - pack sizes are (?always) restricted and, in case of P items, the pharmacist is restricted as to which indications they may so supply the item (eg hydrocortisone cream may not be supplied by a pharmacist for use on face or in pack size above 30g, yet on prescription no such restriction). So Simvastatin recently in UK gaining a P status from past POM, does not imply that all strengths are available OTC (only 10mg is) nor that other strengths do not remain POM (10mg 20 & 40mg). Describing the specifics for a particular drug is clearly too lengthy for inclusion in the sumarising table, and I would welcome in the main prose. I would though, for Simvastatin in the UK, now classify it in the table as P.
- If other editors feel that non-medics will not interpret such simplification in the manner I do, then should we get the template to automatically mark up all additional levels, eg. legal_UK=P is converted into P/POM and legal_UK=GSL is converted into GSL/P/POM. the problem with this is that we will lose the compactness (currently Australia, UK & US categorisations can be fitted onto a single line, expanding will require 3 lines to look neat). David Ruben Talk 12:49, 18 July 2006 (UTC)
- No worries, I see what you mean. I might adjust some of the Australian ones as necessary (particularly the special cases) as I come across them. Cheers. -Techelf 11:50, 19 July 2006 (UTC)
- Yeah, I just noticed that on the ibuprofen page. It's a bit problematic for the Australian situation, because the scheduling system works in a step-down manner such that ibuprofen is S4 (prescription only) unless a preparation meets certain requirements where it is permitted to be included in S2 (pharmacy medicine) or be unscheduled depending on pack size, tablet strength, labelling, etc. Because of this, technically it should be listed as S4 (rather than unscheduled), but this doesn't reflect the wide OTC availability of ibuprofen. Ditto for paracetamol and many other "over the counter" medications. Perhaps the original "unscheduled/S2/S4" was the best compromise, but does anyone have any suggestions? -Techelf 10:45, 18 July 2006 (UTC)
-
-
-
- Another thought I had concerns a few pages where you've put it as a blanket "prescription only". I prefer the full "S4 (AU), POM (UK), ℞-only (US)" to avoid ambiguity, but I suppose it's okay because it simplifies things for the lay audience. On the other hand, drugs that are "over the counter" shouldn't be simplified as such since the term could mean unscheduled, S2 or S3 in Australia and GSL or P in the UK. -Techelf 10:45, 18 July 2006 (UTC)
- Yes I was bold in allowing the blanket legal_status=Rx-only to be specially recognised and shown as ℞-Prescription only. It would remain true only until one country starts licensing as OTC (then the other countries would need be specifically declared as still remaining prescription-only items). I thought it might simplify things and would "give it a try", but I'll not object if other editors are unhappy at this option and wish it removed.David Ruben Talk 12:49, 18 July 2006 (UTC)
- Nah, no problem with having "prescription only" as an option. But perhaps it doesn't need the ℞ character if "prescription" is already written out in full =). -Techelf 11:50, 19 July 2006 (UTC)
- I totally agree with you re not trying to create a generalised simplified form of OTC as has various differing subdivisions between countires.David Ruben Talk 19:08, 18 July 2006 (UTC)
- Yes I was bold in allowing the blanket legal_status=Rx-only to be specially recognised and shown as ℞-Prescription only. It would remain true only until one country starts licensing as OTC (then the other countries would need be specifically declared as still remaining prescription-only items). I thought it might simplify things and would "give it a try", but I'll not object if other editors are unhappy at this option and wish it removed.David Ruben Talk 12:49, 18 July 2006 (UTC)
- Another thought I had concerns a few pages where you've put it as a blanket "prescription only". I prefer the full "S4 (AU), POM (UK), ℞-only (US)" to avoid ambiguity, but I suppose it's okay because it simplifies things for the lay audience. On the other hand, drugs that are "over the counter" shouldn't be simplified as such since the term could mean unscheduled, S2 or S3 in Australia and GSL or P in the UK. -Techelf 10:45, 18 July 2006 (UTC)
-
[edit] Same for Pregnancy status ?
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)
- 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)
- Yep, sounds like a good idea to me too. -Techelf 10:48, 18 July 2006 (UTC)
-
-
- 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)
-
-
-
-
- I've added these to the template builder. Here's an example. --David Iberri (talk) 21:40, 18 July 2006 (UTC)
-
-
-
-
-
-
- Great stuff - but its lost the | excretion = parameter line in standard & extended format. David Ruben Talk 22:03, 18 July 2006 (UTC)
-
-
-
-
-
-
-
-
- Fixed. --David Iberri (talk) 02:55, 19 July 2006 (UTC)
-
-
-
-
[edit] Automated filling of drugboxes
Hi there! I've just created a tool for automating the process of filling out the drugbox template. Given a DataBank accession number (eg, APRD00109 for indomethacin), it pulls a DataBank card and produces a filled-out drugbox template. Try it out at http://diberri.dyndns.org/wikipedia/templates/?type=dbid. Cheers, David Iberri (talk) 17:06, 15 June 2006 (UTC)
Gosh - Brilliant stuff - well done ! Some quick thoughts:
- Your tool is also automatically pulling out melting points & smiles, are they really necessary for the majority of drugs (useful where physical properties or synthesis details interesting in their own right eg aspirin, or chloroform) as I initially imaged these optional fields would only rarely be useful to the majority of readers - but thats just my own penny's worth view :-)
- You used the chemical formula option, but a recent alternative was element definition added by user BorisTM. Is this either easer or better ? (I like the look, but am undecided whether this is necessarily easier in all cases)
- Your tool produces a result on a single line, obvious advantage is more compact, would display on separate lines be easier for others to follow ? (I weakly prefer compactness to more expansive display). David Ruben Talk 18:32, 15 June 2006 (UTC)
- Thanks! Let me see if I can reply to each of your points:
- You're right -- not all fields are relevant to all drugs. I just assumed folks would remove the unnecessary ones manually. I suppose I could add a "minimal fields" option that would remove them automatically, but I don't like the arbitrary definition of "minimal".
-
- How about "Standard" (vs "Extended"), given these other ones only existed in the last week since I added them ? David Ruben Talk 22:56, 15 June 2006 (UTC)
- Element definition wouldn't be difficult to implement, but I can't think of a good reason to prefer it over specifying the formula longhand. The only advantage I can think of is that element definition avoids the <sub>s.
- There's an option to "fill template vertically" that puts each parameter on its own line. Does that do the trick?
- Cheers, David Iberri (talk) 22:41, 15 June 2006 (UTC)
-
- Oh what an idiot I am - of course - yes, thanks. For drugbox only, could vertical be the default option ? :-) David Ruben Talk 22:56, 15 June 2006 (UTC)
-
- This is wonderful - thank you so much for building this. One bit of feedback: I just tried it with Streptomycin and noticed that the ATC code(s) aren't populated (found at the bottom of the "Drug Category" field on the Drugbank page for Streptomycin). --Arcadian 11:54, 16 June 2006 (UTC)
- I made the dumb assumption that because none of my test cases (eg indomethacin's) had complete ATC codes then no DrugBank card would have a complete ATC code. Thanks for telling me otherwise. What I've done is when ATC codes are complete (ie, 7 characters long), I've included them in the template; otherwise, I've left them out. Sound about right? --David Iberri (talk) 15:53, 16 June 2006 (UTC)
- I just tried it at Aminosalicylic acid, and it worked great! --Arcadian 16:16, 16 June 2006 (UTC)
- I made the dumb assumption that because none of my test cases (eg indomethacin's) had complete ATC codes then no DrugBank card would have a complete ATC code. Thanks for telling me otherwise. What I've done is when ATC codes are complete (ie, 7 characters long), I've included them in the template; otherwise, I've left them out. Sound about right? --David Iberri (talk) 15:53, 16 June 2006 (UTC)
- Also, for fields like "pregnancy_category", which appear by default even when unpopulated but aren't populated from DrugBank, I'd recommend including the field in the output, so that it is easier to fill in the field manually later. --Arcadian 12:02, 16 June 2006 (UTC)
- Presently you can display all fields by checking the "display all template fields" box. As a more long-term solution, I'll be implementing the standard/extended fields idea that David mentioned above. --David Iberri (talk) 15:53, 16 June 2006 (UTC)
- These standard/extended fields are now implemented with the addition of the "show extended fields" checkbox. --David Iberri (talk) 01:41, 17 June 2006 (UTC)
- Thanks - can smiles and melting_point also be switched to extended only. Also "APRD00248" for amoxicillin seems to cause it to error: David Ruben Talk 01:54, 17 June 2006 (UTC)
- (Error message snipped)
Thanks for the error report -- seems DrugBank's strict XHTML wasn't so strict after all. Should be fixed now that I've added some extra filtering. Also, "smiles" and "melting_point" are now shown only if you tick the "show extended fields" checkbox. Cheers, David Iberri (talk) 05:05, 17 June 2006 (UTC)
- (Error message snipped)
- Thanks - can smiles and melting_point also be switched to extended only. Also "APRD00248" for amoxicillin seems to cause it to error: David Ruben Talk 01:54, 17 June 2006 (UTC)
- These standard/extended fields are now implemented with the addition of the "show extended fields" checkbox. --David Iberri (talk) 01:41, 17 June 2006 (UTC)
- Presently you can display all fields by checking the "display all template fields" box. As a more long-term solution, I'll be implementing the standard/extended fields idea that David mentioned above. --David Iberri (talk) 15:53, 16 June 2006 (UTC)
[edit] The names
Guys don't forget to check how the names look in Firefox or Netscape - they don't cut the long words the way Opera and Explorer do. -- Boris 01:21, 17 June 2006 (UTC)
- Can you give general method of splitting to assist for those browsers (I've just got Internet Explorer which my machine just about copes with - any other software will completely seize me) - I can't compare appearances - next computer will I'm sure with suitable attached go-faster stripes :-) David Ruben Talk 01:40, 17 June 2006 (UTC)
-
- I've had to manually add <br /> (line break) tags pretty empirically. I try to keep related chemical terms together and end lines at hyphens where possible (cf. irbesartan). Hope that helps. -Techelf 08:29, 20 June 2006 (UTC)
[edit] SVG preferred
I suggest you make SVG the preferred image type. SVG is the preferred image type on wikipedia for diagrams Nil Einne 21:51, 19 June 2006 (UTC)
- Preferred, but the implementation still seems to be quite buggy – last time I tried uploading an SVG image that I'd made in Illustrator, I had to juggle the settings repeatedly until I gave up and just used PNG. Also, most people don't have access to software that can export in SVG format. But if you have any advice on easily getting SVG structures drawn with ChemDraw (and exported via Illustrator), it'd be much appreciated. -Techelf 07:50, 20 June 2006 (UTC)
[edit] Image
Just a little reminder to all users, it's image NOT Image. Since image defaults to {{pagename}}.png, I spent ages trying to work out why my update wasn't working. Trouble is it was Image (I didn't actually insert it, I just modified an existing tag) therefore my tag had no effect! Nil Einne 21:51, 19 June 2006 (UTC)
[edit] Changes to the template
People, if you want to test for how any new change is going to affect this template, or any template in general, use {{Add code}} to do so (i don't use that template for anything but for test grounds or "template sand-box" if you want to call it) - just replace its current code with the code for {{Drugbox}} and check the changes in the "Add code" talk page by calling the template there. It would be a good idea that after saving a change to write "Testing" in the "Edit summary" and after you done with using the template to write "Done", so by checking the edit history those who want to use the template will know if they can use it or they have to wait.
Don't make numerous little changes here because this template is being used by many and its going to be used by even more articles, and any change however little it is puts presure on the serveres (recashing, etc) - the bigger the number of the articles that use the template the higher the presure. -- Boris 02:06, 21 June 2006 (UTC)
- I'm probably one of the culprits, so thanks for pointing out the Add_code template. Cheers. -Techelf 10:18, 21 June 2006 (UTC)
[edit] Table and image widths
Table's 280px, image's used to be 250px but Arcadian dropped it down to 220px. Why? What's the good of having smaller images and all that white space around them? -- Boris 23:37, 22 June 2006 (UTC)
- To get closer to Wikipedia standards. For example, Template:Album infobox, Template:Infobox Book both default to 200px. I wouldn't object to making the table smaller, though. --Arcadian 02:21, 23 June 2006 (UTC)
-
- A standart!?! Template:Album infobox sets 200px as default, Template:Infobox Book sets none, Template:Drugbox - 220px. What kind of wiki standart is that? And i don't think there is a "standart width" of the infobox image at all. Arcadian, if there is any "cross-infobox" standart that is the principles by which the templates work. The use of parser functions or standart wiki styles - is not mandatory, they just set a flexible frame for the different infobox templates, as soon as we try to make that frame rigid, say - standart image widht, the same style rules or whatever, then we got a problem because not everything will fit in that frame - the different infoboxes provide different information, and if one setup looks well for one infobox it won't look that well for a different one. I bet you know all that.
I would definately object making the table of drugbox smaller. -- Boris 05:21, 24 June 2006 (UTC)
- A standart!?! Template:Album infobox sets 200px as default, Template:Infobox Book sets none, Template:Drugbox - 220px. What kind of wiki standart is that? And i don't think there is a "standart width" of the infobox image at all. Arcadian, if there is any "cross-infobox" standart that is the principles by which the templates work. The use of parser functions or standart wiki styles - is not mandatory, they just set a flexible frame for the different infobox templates, as soon as we try to make that frame rigid, say - standart image widht, the same style rules or whatever, then we got a problem because not everything will fit in that frame - the different infoboxes provide different information, and if one setup looks well for one infobox it won't look that well for a different one. I bet you know all that.
[edit] New fields
I think I've now got most of the articles converted to the new template, at least for the drugs that have an ATC code. I've noticed that a lot of pages had ad-hoc rows added to the old manual template for indications, contraindications, and side-effects. Does anybody have an objection if I add optional fields to accomodate this information? (Currently, I've just sequestered this data into its own dedicated box, but in many cases that looks sloppy and inconsistent.) Other fields that might be useful could be "brand_name", "year_of_first_synthesis", "year_of_introduction", "medlineplus", "diseasesdb". Any thoughts? --Arcadian 14:39, 25 June 2006 (UTC)
- I think that the drugbox should only contain concise data, and that content requiring further discussion (e.g. indications, contraindications, adverse effects) should go in the main text only. If we add too many things to the drugbox, it just becomes too long and unwieldy – it's already getting quite lengthy as it is. -Techelf 11:12, 27 June 2006 (UTC)
- I generally concur with Techelf and feel side-effects. contraindications, years and disease links have no place in this infobox. I raise 3 points - please do add indented comments to each of these :-)
- An abbreviated 'Indications' field after the 'Routes' would not be unreasonable
- Similar for the purposes of classifing the drug, how about a 'Drug Class' field which would be used to specify the drug as a gluticorticoid, chemotherapy, antibiotic etc ?
- As for length of the cuirrent template, can we save one line with the drug's name? The 'Systematic name' section only currently contains the 'IUPAC name' which occupies its own separate line. Would it not be simpler to merge this into the section title as 'Systematic IUPAC name' ? David Ruben Talk 22:47, 30 June 2006 (UTC)
-
- I agree with merging "systematic name" and "IUPAC name" into a single line, but I propose that we use the label "IUPAC name" or "systematic name" (either of which would link to IUPAC name) instead of "systematic IUPAC name". All IUPAC names are systematic, thus "systematic IUPAC name" is redundant. --David Iberri (talk) 03:40, 1 July 2006 (UTC)
How about systematic (IUPAC) name? Copperman 14:01, 2 July 2006 (UTC)
- Ooh, I think I like that. --David Iberri (talk) 22:34, 3 July 2006 (UTC)
- Concur - and so changed :-) David Ruben Talk 23:23, 3 July 2006 (UTC)
[edit] Testing for image existance
I tried in last couple days to test whether image exists, as currently a red link is shown if it does not. I've reverted back and copied the code across to the template sandbox Template:Add code and displayed, as examples, the chloramphenicol & cyclophosphamide in the sandbox's talk page Template talk:Add code which shows that for some pages only image2 is shown. Nor does it seem to be exclusively whether the 1st image is derived from an explicit definition (image=X.png) or as a default (PAGENAME.png). I also seem to have a variable response on trying to locate images within wikipedia (typing Image:xxx into the search box) with some images being jumped to directly, and for others a search result page is shown indicating a single entry that I must then select as a two-part process - is this a related issue ?
I copy from my talk page a thread about this:
- Hi David, you made some changes today to the drugbox template - getting rid of the red link if no image exists. This is great, but it has had the effect that some pages employing the use of the drugbox (e.g. aspirin) only show image2 and not image. Can you fix it? Cheers Ben 15:43, 12 July 2006 (UTC).
- So it does - however I had used amoxycillin as my test page for 2 images and that works - will look into this further.David Ruben Talk 16:04, 12 July 2006 (UTC)
- Ah Image.Aspirin-skeletal.svg does not exist, which explains why only the image2 is shown ! So not problem of the template but of image name chosen, phew :-) Now whatever happened to aspirin's line drawing ? I'll trawl back through the aspirin article's history... David Ruben Talk 16:07, 12 July 2006 (UTC)
- Image:Aspirin-skeletal.svg exists! The same problem occurs at many drug pages (although not all - see cyclophosphamide for one not affected - I just checked chloramphenicol and there's a problem there.
- Sorry if I've wrongly accused you! I just noticed this problem this afternoon. I thought you'd like to know either way. Ben 16:16, 12 July 2006 (UTC).
- So it does (drats) - funny using the search box on each page acts differently for different images. For Image:Aspirin-skeletal.svg it fails to launch into the page, but offers a link to jump to it. Whereas searching for Image:Amoxicillin.png jumps directly there. Could you have a look at pages you tested to see if this is a problem with .svg files rather than .png ? David Ruben Talk 16:23, 12 July 2006 (UTC)
- I've just had a look at chloramphenicol. Its first image is a PNG, so it doesn't seem that the SVG format is the root of the problem. Ben 16:44, 12 July 2006 (UTC).
So can anyone advise on my coding error at Template:Add code ? David Ruben Talk 17:01, 12 July 2006 (UTC)
- The image that doesn't show up is on commons - of what i was able to grasp so far (i might be wrong thou) you can't use "ifexist" to check for that because the page actually does not exist on en.wiki, instead you have to use {{exists}}, according to the parser functions guide. I tried to find a solution in the small time span that i had before going to bed but i'm tired and i need to get flat. -- Boris 02:30, 13 July 2006 (UTC)
[edit] Colorized element symbols in formula
Is this really a good idea? Having colorized letters in a line of text is kind of distracting. It's especially bad that N is the same color as a hyperlink or wikilink and O is the same color as a dead wikilink. The only use I can see is to provide a color legend for the structural images, but from what I've seen, not many images used in the drugbox are colorized at all. DMacks 16:11, 28 July 2006 (UTC)
[edit] Abbreviations
Would it be OK to expand Mol. to Molecular and cat to category? Seems like they will both fit without wrapping. Rich Farmbrough 15:12 7 August 2006 (GMT).
[edit] "Formula" field
There seems to be a problem with the "Formula" field, the output is breaking awkwardly (see pancuronium, glibenclamide and paracetamol for examples). I have accessed several pages which use the extended form (ie, | C = | H = | N = etc.) on both Firefox and IE and they look the same. Fvasconcellos 21:26, 8 August 2006 (UTC)
- Yeah I've also noticed a problem in Firefox and Safari, seemingly with the display of the oxygen character. -Techelf 09:59, 9 August 2006 (UTC)
- Might be a stretch, but could it have something to do with this recent change to Template:OrganicBox atom? This could simply be ignorance on my part, as I know less than nothing about template syntax, but the time frame fits. Fvasconcellos 00:36, 10 August 2006 (UTC)
- Could not see why interwiki link within noinclude tags should - and on quick test made no difference. Clearly something has changed - also seems not to do with oxygen, but new lines after nitrogen.David Ruben Talk 02:17, 10 August 2006 (UTC)
- Seems fixed now. Maybe this did the trick? Fvasconcellos 23:00, 10 August 2006 (UTC)
- Could not see why interwiki link within noinclude tags should - and on quick test made no difference. Clearly something has changed - also seems not to do with oxygen, but new lines after nitrogen.David Ruben Talk 02:17, 10 August 2006 (UTC)
- Might be a stretch, but could it have something to do with this recent change to Template:OrganicBox atom? This could simply be ignorance on my part, as I know less than nothing about template syntax, but the time frame fits. Fvasconcellos 00:36, 10 August 2006 (UTC)
[edit] Image optional
Could someone make the image optional, so there is no ugly red link at every newly created drug article?? I am not sure how to do this... --WS 15:30, 2 September 2006 (UTC)
- Yes 1 tried misserably to do this previously, and User:BorisTM had a valient go too (see User talk:BorisTM#Template:Drugbox image and this attempt). The problem lies with the parse parameters, for which there are two, to look for existance of an article (in this case we presume an image). However images may both be in english wikipedia image space and commons wiki and each parse parameter behaves differently for the two spaces. This might not be a problem if only a specified image name were being searched for, however the template allows for the imagename not to have been specified at all, in which case a default of PAGENAME.png is to be used.
- So that's 2 possible sets of names (specified by parameter or else default name) to be tested across engish and commons wikis - we ended up being able to test for existance in any single part of this 4-way test, but not all simultaneously. Canone care to have a further go, see Template:Add code sandbox area. David Ruben Talk 16:21, 2 September 2006 (UTC)
-
- And what if the standard PAGENAME.png would be removed? So that people will be required to explicitly specify an image name? --WS 16:48, 2 September 2006 (UTC)
-
-
- A good idea if we were introducing this template afresh. However how many articles already rely upon this default for images which do exist - i.e. if we remove the default option, how many drug articles suddenly stop displaying a valid image ? I suspect the testing coding just needs to be done less elegantly, i.e. nested tests with #if and #ifexists, with english and commons, with specified or default names (ie no attempt at image|{{PAGENAME}}.png) - ie 8-levels of testing - ughhh - perhaps when the migraine has settled I'll have another go, but meanwhile anyone care to offer a simpler approach to attempt ? David Ruben Talk 17:07, 2 September 2006 (UTC)
-
-
-
-
-
- Don't personally know much about bots, but if could be done then yes probably simpler. NB caveat: need someone with advanced knowledge of the parseparameters and English/Commons subtleties to guide us here (ie if this really is going to work).
- It needs identify firstly articles using template:drugbox, select those that have no image parameter defined (either no "image =" with undefined value or no undefined parameter included at all), and then either:
- Define the image (as { {PAGENAME} }.png) - but kind of messy as implies that such asn image has been uploaded
- or search to see if a suitable image file can be located and if not then leave in place "image = " ready for the modified drugbox template to then ignore the blank parameter.
- I would though seek advice of the likes of BorisTM (or anyone else we might know of) as to whether this is really going to work, i.e. confirm that coding really can be made to work for English/Commons testing, if default parameter value issue is eliminated - no point in lots of work if it ain't going to work :-) David Ruben Talk 01:08, 3 September 2006 (UTC)
- Don't personally know much about bots, but if could be done then yes probably simpler. NB caveat: need someone with advanced knowledge of the parseparameters and English/Commons subtleties to guide us here (ie if this really is going to work).
-
-
-
[edit] New Licence field
I propose a new row in the drugbox table for the drug Licence. There are two major licensing authorities that I've found that make drug information easily accessible: The US Food and Drug Administration (FDA) and the European Medicines Agency (EMEA). Some examples:
Levetiracetam (Keppra): FDA EMEA
Trastuzumab (Herceptin): FDA EMEA
Pregabalin (Lyrica): FDA EMEA
Both sites contain a wide variety of information, some of which is very comprehensive. The FDA "Label Information" and the EMEA "Product Information", where available, are very detailed. There is material aimed at the professional and also plain-English consumer information. This is a excellent reliable source for article information but also contains much that makes it a worthwhile "External link" since there is no way you could include all the info. Both sites are kept up-to-date with the latest changes to prescribing/licensing practice.
I have found the EMEA site difficult to navigate using Firefox, though this may be due to my version of Java. It is OK on IE, and the individual drug page works fine on both browsers. Both sites work using of the brand name of the drug but the FDA site also allows searches with the generic name (active ingredient), which lists generic variants where they are licensed.
So I recommend that the parameter for the EMEA site be the brand name and the parameter for the FDA site be the generic name. The template code needs to allow the option for either or both to be missing.
Disadvantages: The EMEA is relatively new but is handling much of the new drug applications in the EU since it is cheaper/quicker than going to each country. The FDA have been around a while but old drugs aren't online. Only relatively new drugs have complete information. Both sites will, of course, improve with time.
BTW: The word "Licence" is the noun in British English, "License" is the verb.
Feedback on this proposal would be very welcome. Colin Harkness°Talk 13:38, 7 September 2006 (UTC)
- I'd support it. Navigation in the FDA website is pretty convoluted, though – I personally found it easier to navigate around the EMEA pages. Fvasconcellos 16:25, 7 September 2006 (UTC)
- Support. --Arcadian 23:21, 7 September 2006 (UTC)
- Support - better a link to regulatory authorities than drug campany websites. David Ruben Talk 02:08, 8 September 2006 (UTC)
Ok- I've added licence_EU and licence_US parameters which each take just the search word to be sought - can people just check that this works with items that are not just a single word - i.e. will we need request that editors use underscore in place of any spaces ? David Ruben Talk 02:08, 8 September 2006 (UTC)
- Before anyone gets too excited and starts applying the new parameters to loads of pages, have a look at how the coding currently formats for Levetiracetam following this edit. If people agree to styling and don't find fault on some testing ("Show Preview") in other articles, then ..... :-) David Ruben Talk 02:35, 8 September 2006 (UTC)
-
- Many thanks, David, for implementing this. I realise now that my text was contradicted by my examples: I recommend using the generic name for the FDA search; the brand name is essential for the EMEA link. The only disadvantage to using the generic name is that the FDA info for the original-brand is likely to be much greater than for the generics - and the reader may be confused as to which link in the search results to pick. What do you think?
-
- Regarding appearance: I think the word "data" is redundant and should be dropped - all the info in this table is data. I wonder if the RHS might be better with just EU US as the links. The reader can find out who the agencies are either by following the links or your wikilink for Licence. I would imagine that most folk don't recognise what the "EMEA" is. The advantage of country codes is that, should other authorities be found that are relevant, they can be added. It also makes it unnessary to include the codes in parenthesis.
-
- Here's a two word link on the FDA site: Acyclovir Sodium. The underscore is needed for the template parameter and works fine. The EMEA site uses brand names so two words are rare. When they do occur, their url is composed of the adjoined words. For example: Infanrix Penta.
-
- The easiest way to navigate the EMEA site, and the list of drugs, is from their SiteMap. For ease of reference:
-
- Colin Harkness°Talk 08:46, 8 September 2006 (UTC)
[edit] Controlled drug status in legal fields
I've noticed editors adding specific controlled drug categorisations to some drugs eg Phenobarbital, rather than just leaving a 'Px_only' or 'CD'. Given then the need to link these classifications to the relevant article in Wikipedia explaining them, I've added the categorisations to the list of terms recognised by the drugbox template. See new description of recognised terms and the simplification this allows to Phenobartical (compare here) and Heroin (compare here).
Let me know if this needs any adjustment to the formating, or indeed to teh very principle enacted here :-) David Ruben Talk 19:10, 17 September 2006 (UTC)
- re Canada
- I've added legal_CA with link to Controlled Drugs and Substances Act for Schedule I-VIII. If anyone knows of their non-scheduled scheme of classification (i.e. OTC, Pharmacy or normal prescription-only) then let me know and I can add it to the template coding. David Ruben Talk 04:00, 18 September 2006 (UTC)
[edit] Superscript formatting
I see the <sup>3</sup> way of superscripting that we've always used just got changed to the unicode "superscripted 3" character. Is unicode the way we want to be doing scientific/mathematical exponent notation now? DMacks 13:02, 21 September 2006 (UTC)
- Don't assume that bot edits (a) make sense (b) reflect consensus or (c) indicate anything other than the personal tastes of the bot user/author. Call me cynical. Colin Harkness°Talk 13:49, 21 September 2006 (UTC)
- To be fair, you are being very cynical, unicode is by far the most common way of formatting units and is easier to understand for people who are not familiar with html syntax (i.e. most people). I'm sure we all agree having a mixture of different syntaxes is not optimal. Martin 15:26, 21 September 2006 (UTC)
- If mixing is bad, then given that there are only unicode for superscript-1/2/3, chemistry articles should use the HTMLish form of sup/sub numbering exclusively.
- To be fair, you are being very cynical, unicode is by far the most common way of formatting units and is easier to understand for people who are not familiar with html syntax (i.e. most people). I'm sure we all agree having a mixture of different syntaxes is not optimal. Martin 15:26, 21 September 2006 (UTC)
-
-
-
-
Chemical formula C6H12O4 Density 1.18 g/cm³
-
-
-
-
-
- looks pretty poor. DMacks 20:44, 21 September 2006 (UTC)
- The unicode is almost always used for things like cm³, I am just cleaning up the relatively few articles that don't, I should make it clear that I am not converting all possible instances of superscipt to unicode, just things similar to cm³. Martin 08:03, 22 September 2006 (UTC)
- Also, scanning the database shows that, of the occurances I was changing, the unicode is almost 10 times as as common as the equivalent sup markup (the copy of the database used pre-dates any changes I made). Martin 08:24, 22 September 2006 (UTC)
- I have no problems with unicode in general, just with the blanket conversion of things like cm<sup>3</sup> in articles that are full of and other sup/sub formatting of numbers. Perhaps you're confusing me with the other commenter on the bot's talk page? DMacks 02:17, 25 September 2006 (UTC)
- looks pretty poor. DMacks 20:44, 21 September 2006 (UTC)
-
- OK. To answer the original question: I'm not aware of unicode symbols for superscripts other than 123 (see the symbol list the bottom of the page when you edit an article). The Wikipedia:Manual of Style (mathematics) uses the HTML formatting for its symbols and I'm not aware of a change to the MOS in this regard. I'd be happier if bots could quote MOS guidelines in their edit summaries. Colin Harkness°Talk 18:56, 21 September 2006 (UTC)¹²³123
[edit] Molecular Mass vs. Molecular Weight
Why is it that molecular weight is used instead of molecular mass? Molecular mass is more common and more technically correct. Also, the wiki page on molecular weight redirects to molecular mass anyway. Doing a quick Google reveals there results:
- molucular weight = 33 900 000 results
- molecular mass = 30 600 000 results
But if you filter out results from Wikipedia (as I would assume would be the only way to recieve an unbiased result) you get:
- molucular weight = 51 400 000 results
- molecular mass = 54 300 000 results
I'm still not sure why there are more results for both when you discount Wikipedia, bu molecular mass is more ubiquitous regardless. Every reference I have ever seen in the circles of education has used molecular mass. After all, the gram is a unit of mass, not weight.
- ☭ Zippanova 17:57, 24 September 2006 (UTC)
- "molecular weight" -wikipedia -encyclopedia gives about 140,000,000 Google hits
- "molecular mass" -wikipedia -encyclopedia gives about 34,100,000 Google hits
That's about what I would expect. While molecular mass might technically be more correct, molecular weight is the more commonly used term in labs. Cacycle 18:25, 24 September 2006 (UTC)
- I agree we should use mass, not weight, regardless of what google dictates. As stated mass is more accurate, which is surely the over riding factor for an encyclopedia. Martin 22:33, 24 September 2006 (UTC)
- In fact, I would insist we use mass, as even our own article is called Molecular mass to which Molecular weight redirects. Martin 22:35, 24 September 2006 (UTC)
[edit] #switch
Hey, I was just quickly looking at the code and there are a lot of nested #if statements, which should probably be changed over to #switch statements by someone who understands ParserFunctions and drugs, unlike me who only understands the former and would stuff it up somehow. For examples, see the source of Template:Infobox Australian Place right up the top for the {{{state}}} field. Notice also the display of an unknown value. Anyway, --TheJosh 11:23, 9 October 2006 (UTC)
- Wow - thanks TheJosh for the suggestion. That proved so much easier to code and leaves the template much easier to maintain or to add in extra options (e.g. additional uppercase/lowercase variations). Seemed to work with pages I tested - but, of course, if anyone spots a problem - let me know :-) David Ruben Talk 02:05, 12 October 2006 (UTC)
[edit] Bug with melting point
It seems that if you give the template a range for the melting point it outputs some weird result for the Fahrenheit conversion. Example: Methaqualone. Maybe this is why the 3,4-methylenedioxyamphetamine page doesn't use the template? —The preceding unsigned comment was added by Aubilenon (talk • contribs).
- There's no bug as such, the parameter just expects to receive a numeric value in centigrade. So "113" or "115" will work, but "113-115" is not a number but a text string specifying a range. I generally just use the onset of melting point, so in this case "113". Please do remind me what the range means here (is it just the start & end of melting points, or a different temp if one is heating a solid to liquid vs cooling a liquid to solid). If it is really important, then I could add additional melting_low and melting_high parameters. David Ruben Talk 23:06, 22 October 2006 (UTC)