Template talk:Infobox drug/Archive 11

Prepared template changes
I have prepared several changes to this template. Most are code and maintenance completion & streamlining.
 * Useful links
 * Infobox drug/testcases (more testcasesN are listed there).
 * Parameter & visible changes
 * No more "?" showing for bad input.
 * Currently, some major parameters show a "?" when input is missing or not recognized: mab source, ATC, legal_status..., formula. The question mark will not show any more. In general, we should not show maintenance notes as content data. Those articles are categorized for maintenance.
 * Currently, some major parameters show a "?" when input is missing or not recognized: mab source, ATC, legal_status..., formula. The question mark will not show any more. In general, we should not show maintenance notes as content data. Those articles are categorized for maintenance.


 * Country abbreviations are explained as abbr but not linked: US. eg in legal_status_US.
 * Redlink categories removed from code. Following this 2012 CfD, some categories are removed. Interestingly, those categories do not exist (ie, were redlinkend) and were empty (no articles). Eg: Category:European Union controlled drug precursors.
 * legal_status_XX and pregnancy_category_XX input that is not by list (such as: Scheme I) is categorized to check.

CheMoBot validation: The bot checks seven identifying parameters for verification. From this, the bot may add a parameter & value like: CAS_number_Ref. This parameter adds the ✅ or notification.
 * Bot assisted validation
 * Changed: DrugBank_Ref is added to the template, so that all seven identifiers work alike (effect: now DrugBank shows its ✅/ verification quality). The bot working itself is not changed. See Chemicals validation and cascite for general bot activities and effects.
 * The set of seven bot verified identifiers now is identical with those of Chembox. Also, their maintenance categories are the same (one category is filled by the two templates).


 * Articles missing such an identifier is categorized too. This too is the same as with Chembox.


 * In code
 * Code into satellite subtemplates. Some large code blocks are separated into subtemplates: mab, ATC, legal_code_XX, pregnancy_category This way the main template is easier to overview and maintain. This split off in itself does not change the visual result.
 * The chemical formula entered by C=, H=, O=, ... is made stand-alone template for common usage, from talkpage request. This split off in itself does not change the visual result. Made it into subtemplate Infobox drug/chem styled now, to keep it under {Drugbox} control. Some issues make it unfit for general use imo: font coloring & bolding, incompleteness, limited to organic. -DePiep (talk) 09:44, 22 March 2015 (UTC)
 * Articles using non-existant parameters are categorized for maintenance check. This wrong parameter name could be a typo. In, the wrong parameter is mentioned in a red error message. See also doc/parameter list.

Any remarks? -DePiep (talk) 00:47, 14 March 2015 (UTC)
 * More on maintenance categories
 * The maintenance category tree is reorganised into a more systematic tree setup (already in effect). The category trees are set up in parallel with the.
 * Only articles will be categorized. (Note: for testing purposes, testcases now show maintenance categories readible).
 * Several maintenance categories are added or renamed (unknown legal code, no legal code by country; see also the "?" change mentioned above).


 * I will suggest to add some @@@ for maintenance (suggested at Wikipedia_talk:Chemical_infobox too) - that way its easy to see where the problem is, and normal readers doesnt see it. Like the citation template does. Christian75 (talk) 11:04, 14 March 2015 (UTC)
 * As I replied there, some reasons to postpone this. The good news is that {Drugbox} is a single template, while {Chembox} has 9 subtemplates in the SectionN structure. {Chembox} required a lot of extra maintenance for this, while {Drugbox} has not.
 * But other responses are valid here too: 1. that option better be in the core module anyway (as Cite/CS1 has). 2. error messaging is not fully perfect. errNS interacts with format and preview, which makes it complicated and the module maintainer (dewiki) has noted this might change (see my talks over there). 3. This messaging is just one of the cleanup actions I am working on. Building and of course testing this would be another chuck of serious work (don't want to spoil 8000 articles with errormessages), while it does not to add to the core maintenance job. ({Chembox} categorizes these errors too, and there is not much correcting activity). In other words, a lot of work that is not required.
 * For these reasons, I choose to postphone this (good) idea. -DePiep (talk) 09:09, 16 March 2015 (UTC)


 * Preparing to go live.
 * Most useful changes to be expected in, and some visual changes. Other changes are in template background. -DePiep (talk) 20:00, 22 March 2015 (UTC)


 * ✅. -DePiep (talk) 20:11, 22 March 2015 (UTC)

Post-edit comments

 * Useful link:

The Drugbox calls /sandbox Christian75 (talk) 20:24, 22 March 2015 (UTC)
 * Will check this, but please be more specific right away. Page? -DePiep (talk) 21:02, 22 March 2015 (UTC)
 * Template:Drugbox, just search for "sandbox" and you will find it :-) Christian75 (talk) 21:18, 22 March 2015 (UTC)
 * So I checked WLH for Template:Drugbox/sandbox: . For now, I think you saw "late changes" (wikipedia delays). If you see any page (article) that keeps using a /sandbox, please mention it. -DePiep (talk) 21:29, 22 March 2015 (UTC)
 * No, template:Infobox drug calls /sandbox - try to preview (edit and then "show preview" of the article) a drugbox article, e.g. Sodium_thiopental and you will see the error "Error in template * unknown parameter name (Template:Infobox_drug/sandbox): 'InChI; CASNo_Ref'", because the infobox calls /sandbox. Go to and search for sandbox (its in the section you call "Parameter check"). Christian75 (talk) 21:46, 22 March 2015 (UTC)
 * "No, template:Infobox drug calls /sandbox " - which /sandbox page is that? Why don't you just provide a link?
 * Sodium_thiopental opened for and then  does not mention any   page.
 * The 'InChI; CASNo_Ref'" you mention is not a /sandbox issue. It is a correct mentioning of unknown parameters. That's TemplatePar working. -DePiep (talk) 22:08, 22 March 2015 (UTC)
 * - The drugbox have --> {{#invoke:TemplatePar
 * check
 * template=Template:Infobox_drug/sandbox


 * Sandbox in bold.
 * I really thought that was a mistake, and the output I printed says /sandbox too. When you preview the article doesnt you see: "Error in template * unknown parameter name (Template:Infobox_drug/sandbox): 'InChI; CASNo_Ref'"? Christian75 (talk) 22:31, 22 March 2015 (UTC)
 * I see! Done: . You are right, please understand that it took some research & thinking to find this. Thanks for pursuing me in this ;-). -DePiep (talk) 22:40, 22 March 2015 (UTC)
 * Chris75, hat this one? -DePiep (talk) 22:50, 22 March 2015 (UTC)
 * Yes its gone now... Christian75 (talk) 12:23, 23 March 2015 (UTC)


 * Vorsetuzumab mafodotin: question mark re mab in title, expected to be in a category. -DePiep (talk) 17:10, 23 March 2015 (UTC)

{{Clear}}

Legal status

 * See legal status documentation

For all options for all countries and institutes, please take a look at the completed documentation. That is: AU, CA, NZ, UK, US, UN, EU. All have the option Unscheduled added. -DePiep (talk) 20:57, 3 April 2015 (UTC)
 * Added: Unscheduled for all. Is recognised (but not wikilinked).
 * Added: legal_AU_comment for all. Will be added, with a space prefixed, right after the listed value. A  is not edited (no brackets, no italics). -DePiep (talk) 18:00, 6 April 2015 (UTC)
 * I think it would be good to add a clarification to the coded words. For example:

That would need some text proposals. -DePiep (talk) 12:13, 7 April 2015 (UTC)
 * ✅. See also Category:Drugs with non-standard legal status (loads of "Rx-only" without country specification). DePiep (talk) 20:47, 9 April 2015 (UTC)

UK legal status
Triggerend by todays Featured Article Amphetamine, I found that we can improve the UK legal status information, by template. In the sandbox, I have prepared this new set for legal_UK.

Notes and questions:
 * Added/changed: links and more readable text for the GSL/P/POM codes.
 * Added: Class A, B, C as new option. See their links.
 * Added a link for the CD set. But I could not find what these categories actually are. Is there any good source that lists them?
 * Today, there are ~80 articles in for the UK. That is, their input is not in the live list today (eg, "Class A" is not yet in there). The additions shold reduce this number.

Any remarks? -DePiep (talk) 14:13, 3 April 2015 (UTC)
 * Would it be useful to add option "Unscheduled"? Outr drug articles use this for (other) countries sometimes. -DePiep (talk) 15:51, 3 April 2015 (UTC)
 * The also exists the "Temporary class" . -DePiep (talk) 16:00, 3 April 2015 (UTC)

US legal status
In the documentation are the options for legal_US. has ~100 under "S" (for "US"), which is rather high.

Notes
 * Todo: analyse what causes those ~100 unrecognised inputs.
 * We could add . -DePiep (talk) 16:08, 3 April 2015 (UTC)
 * Added to demo sandbox. -DePiep (talk) 19:30, 3 April 2015 (UTC)

NZ legal status
Some drug articles have added a legal_status text for New Zealand. Since this is an English-speajking country, I think we should add NZ to the list of pre-formatted coutnries (with AU, CA, UK,US, UN, EU).
 * Sources: Misuse of Drugs Act 1975
 * Options (proposals): see documentation


 * Any remarks? -DePiep (talk) 16:19, 3 April 2015 (UTC)


 * Did not find a law about presciption medicinal drugs. Are y'all healthy over there? -DePiep (talk) 16:28, 3 April 2015 (UTC)

Pregnancy category check
The pregnancy category classification (for AU and US) can use a check. The options are documented with Template:Infobox drug/pregnancy category. Newly added: pregnant_AU_comment, (for AU, US). Comments? -DePiep (talk) 19:33, 7 April 2015 (UTC)
 * ✅. See also documentation and Category:Drugs with non-standard pregnancy category. -DePiep (talk) 20:50, 9 April 2015 (UTC)

Template-protected edit request on 26 May 2015
Please change the only instance of " " to " ". The template longitem is used eight other times in this template, with the latter form being used each time. This change will not affect the functionality of the template at all; it will allow for better use of the "what links here" tool and other similar features.

Excerpt of current code (instance to be changed is in the 1st line; the 4th line shows one of the other eight instances):
 * label40 =
 * data40 =


 * label41 =
 * data41 =

Please change it to:
 * label40 = CAS Registry Number
 * data40 =


 * label41 =
 * data41 =

Jdaloner (talk) 07:11, 26 May 2015 (UTC)
 * ❌ Not done. long item redirects to longitem, so the templates behave exactly the same. The edit would have no effect on an article, so this is a cosmetic edit.
 * However, I expect to edit the template in the coming weeks for this topic of molecular weight. I've made this edit in the sandbox, and it will hitchhike with that substantial edit. -DePiep (talk) 07:31, 26 May 2015 (UTC)
 * I like to add that this edit request by is written very well. -DePiep (talk) 20:05, 26 May 2015 (UTC)

Split the formula highlighter into a separate template?
Right now the template uses a wrapper for OrganicBox_atom to element-highlight the chemical formulas. This is extremely bulky with every single element a different color, and therefore I feel the module is a good candidate to be separated into a different template. This would also make the code reusable in other pages like List of compounds with carbon number 10 which is in grave need of some colors. Please reply to me so I don't need to constantly check my watchlist. Timothy G. from CA (talk) 05:38, 9 December 2014 (UTC)
 * . I assume you mean to split the formula code into a separate template or module (so this drugbox can call something like: ). Technically this would be OK.
 * But for {drugbox}, I'd propose to do the opposite: do not color the element symbols at all (and do not bold them). First, the color distracts me. I do know what a chemical formula looks like, but I have no clue about the colors. To me it looks like there is something going on I don't know. Already the plain links in H2SO4 (as Chembox has) is a stretch in readibility & recognisability. Second, it is not clear what the color means to say (Does there exist a red oxygen?). There is no clarification (key) at hand. For accessability (and good page design), WP:COLOR says: "Ensure that color is not the only method used to convey important information". It may feel like stepping back, but preventing colors used as a form of fancy brightening the page makes good articles. -DePiep (talk) 22:57, 17 December 2014 (UTC)

Need a new field
Our drugbox currently includes a parameter for dependence liability, but not addiction liability. Since there's a definitional and induction mechanism distinction between the two, and since people often confuse the terms, it seems necessary to include an addiction liability drugbox parameter/field. Caffeine is the most obvious article that comes to mind where these are different. This covers a few more examples.  Seppi 333 (Insert 2¢ &#124; Maintained) 05:04, 8 January 2015 (UTC)


 * If this is supported, I can add it. (I can't say anything about its relevance). What would the lefthand text be? -DePiep (talk) 06:29, 8 January 2015 (UTC)
 * "Addiction liability" is adequate - might as well use the same term as used in the dependence field for consistency. Drug addiction redirects to the current dependence liability parameter's link, but the distinction between the two concepts is prominently noted in the article lead; so for the parameter wikilink, either drug addiction or addiction would be suitable.  Seppi 333 (Insert 2¢ &#124; Maintained) 12:30, 8 January 2015 (UTC)
 * All looks well based to me, the ref is in the target article. addiction_liabiliy shows below dependency now, see Testcases. Same documentation I guess. Will push it live tomorrow, if the winds don't turn. -DePiep (talk) 22:01, 8 January 2015 (UTC)

, I have read your contribution to this talk about splitting Substance_dependence. Do I understand that you would not oppose adding this second parameter addiction_liabiliy next to dependency_liabiliy, as they are distinct (however difficult to describe that in article(s))? Please note that we will not repeat that discussion here. This is just about the {drugbox} parameter. ping -DePiep (talk) 10:01, 9 January 2015 (UTC) There is too much overlap with addiction and dependence, so I don't support it (although I am open to being convinced otherwise). What I would support is a dependence liability and abuse liability parameters. If something has a high abuse potential then it also has a high behavioural addiction potential although it is possible to abuse drugs without being addicted to them - there is no perfect solution. Most authoritative sources would use such separation, think of drug package inserts that title their warnings under 'Abuse and Dependence' headers.--WholeNewJourney (talk) 20:01, 10 January 2015 (UTC)
 * ✅. Let me know if there are issues. -DePiep (talk) 02:03, 10 January 2015 (UTC)
 * hm. 'abuse' introduces a judgement (good/bad border), which complicates matters without solving. Isn't drug abuse simply another issue altogether (re LD50)? Also, might that abuse in the wrapper include (physical) dependency too? My impression is that the separation physical and behavioural liability makes sense. In general, an overlap is not prohibitive to describe two effects, as long as we understand that. (A bit like temparature outside and perceived/felt temperature). -DePiep (talk) 20:32, 10 January 2015 (UTC)
 * It does introduce a judgement issue and some recreational drug users don't like to be labelled drug abusers but that is how the majority of academics, healthcare professionals researchers etc view such use of drugs. Drug abuse is not the same as LD. Many controlled drugs have low toxicity. Abuse potential refers exclusively to the potential of a drug to induce euphoria/feelings of well-being and thus behavioural addictive potential.--WholeNewJourney (talk) 01:36, 11 January 2015 (UTC)
 * I don't see ehat that extra judgements adds, not even for these academics. Maybe "abuse" should have a third parameter, re social judgement. (you ruled out that abuse is related to toxic LD, a more rational one). So far, I still have not gotten why behaviour angle would not do. -DePiep (talk) 01:46, 11 January 2015 (UTC)
 * Granted the abuse parameter draws in more problems. My problem is that the definition of addiction and dependence overlap significantly (dependence liability covers both behavioural addiction and physical dependence) and it is confusing area even for academics and most of our readers are lay people. One solution (and perhaps the best solution?) would be to have addiction liability and change dependence liability to physical dependence liability. That would make things less confusing for our article readership. What do you think?--WholeNewJourney (talk) 05:40, 11 January 2015 (UTC)

...a behavioral addiction is literally just an addiction to a natural reward (i.e., a non-drug addiction)... it describes nothing more than the class of addictive stimulus (a "non-drug" one). I'm just going to hope you understand the issue with the current characterizations of these concepts by the DSM and other entities after reading my reply on the other talk page...  Seppi 333 (Insert 2¢ &#124; Maintained) 07:56, 11 January 2015 (UTC)
 * Thank you for correcting my mistake regarding behavioural addiction. You never passed comment on having addiction and physical dependence parameter. Good or bad idea?--WholeNewJourney (talk) 10:58, 11 January 2015 (UTC)
 * Many stimulants don't cause physical dependence, but psychological dependence instead, so it may be better to simply leave it as is; changing it to physical dependence would necessitate changing the parameter values in some articles to correctly reflect their physical dependence liability vs (general) dependence liability.  Seppi 333 (Insert 2¢ &#124; Maintained) 16:30, 12 January 2015 (UTC)

Change request
Please change vaccine = Vaccine description to vaccine = Vaccine description as a clearer wikilink. Thanks. 80.189.8.54 (talk) 16:38, 16 February 2015 (UTC)
 * ✅. Seems uncontroversial, but this change is revertible on request. Cheers &mdash; Martin (MSGJ · talk) 16:43, 16 February 2015 (UTC)
 * Undid. Since no thoughts are exchanged, I don't feel the need to add one. If TE edits are made this way, I am not invited to take care anyway. -DePiep (talk) 00:26, 17 February 2015 (UTC)
 * I don't understand the sentence above. The OP gave his/her rationale, and it is irresponsible to revert without providing a reason. This change was made in line with WP:BOLD - you are well within your rights to revert, but the next step in the BRD cycle is to "discuss". Regards &mdash; Martin (MSGJ · talk) 08:28, 17 February 2015 (UTC)
 * (As for reverting: I simply reacted to you 1st sentence "Seems ..."). I don't think this proposal is more clear. The article vaccine does not clarify the full label text, whatever the wikilabel (pipe linked) is. Also, the tempalte documentation does not hep clarifying; it does not even say which input parameter is used. So we need a better target for this one: that is the clarification needed. Until then, and practically, WP:MOSLINK (linkstyle, underlink, specific link) suggests that better link the whole term, not cut it up. (Signed days late+ping: ) -DePiep (talk) 10:21, 20 February 2015 (UTC)

What maintenance categories do we want?
At the moment, the set of maintenance categories is a bit chaotic. I am about to clean that up. My question is: how to organise? These categories have parallels with and can be used.
 * By CheMoBot, the verified and watched fields are tracked & categorised in Category:Drugboxes which contain changes to verified fields‎
 * There is Category:Drugboxes which contain changes to watched fields.
 * And Category:Chemical pages with verified fields missing.


 * Now for ATC, we can set up categories for these situations:
 * ATC = none
 * ATC = (some identifier)
 * ATC = &lt;blank&gt;


 * And, for legal issues, there is the set-list:
 * legal_US = none
 * legal_US = Schedule I
 * legal_US = &lt;blank&gt;
 * legal_US = some unknown free text

Some of these situation show a question mark in the article. The question is: which situations do we want in category('s)? All three/four options categorised? -DePiep (talk) 10:37, 20 February 2015 (UTC)
 * a lot of drugs arent chemicals, but mixture of chemicals, and IMHO the categories shouldnt be mixed with the infobox chemical's categories. Christian75 (talk) 17:52, 8 March 2015 (UTC)
 * Christian75, this is earthshaking news for my overview of and  articles (because: some Drugbox articles then can not be Chembox (=chemicals) articles). Those Drugbox articles do not allow merging with a universal Chembox. In short. (Ask if you prefer more explanation).
 * However. For this moment, and for these individual parameters, this is no issue. We can make maint cats for ATC-code and legal_US &tc without going against your statement. -DePiep (talk) 19:02, 8 March 2015 (UTC)
 * Im not really sure what you mean. But are you suggesting merging the chembox with the drugbox? Im strongly against that (I will spare the arguments if that isnt you intention). 11:06, 14 March 2015 (UTC)
 * Yes, a merge is a long term view. -DePiep (talk) 18:38, 14 March 2015 (UTC)
 * . About "drugs [that are a] mixture of chemicals". Isn't that already covered in {drugbox}, by setting combo? (See this in the /doc). So if I'm correct, that mixture must be & will be covered (handled) in any merged template. It may be a puzzle, but not a blocker. (Can't find an example article now). -DePiep (talk) 08:15, 16 March 2015 (UTC)


 * re, about mixed categories for {Drugbox} and {Chembox}. That is, a single category that has articles added by both {Chembox} and {Drugbox}. These are the backgrounds for this. The example is CAS RN. First: CheMoBot (chemicals validation) adds a category by adding CAS_number= for both boxes (see also the cascite /doc). The reason for adding is the same: verified data (the CAS RN) is changed compared to an earlier, verified article version (or, the article was never verified so far). Since the topic is the CAS RN, not the 'drug' or 'chemical' itself, the cat reason is the same. Check-the-CAS_RN is a maintenance task independent of the drug/nodrug indication. Parallel to this, the categorization "chemical/drug without CAS RN" is also fully shared, for the same reason. (However, this is done by the template not by the bot).
 * If those categories should be separated (they never were), the bot workings must change. I don't see that useful for reasons given, and because the bot validation process may be outdated (it needs re-activating, or wikidata should be involved, or something else).
 * I note that this setup is not changed by my recent edits (edits in {Chembox} and proposed edits in {Drugbox}). What I did do is bring it all in line: apply the same to all seven verified parameters for both templates (improve cat name, reorder cat tree, make all seven complete, make all seven act similar and such). I do not intend to change bot behaviour, just to make it work OK.
 * If one would want to work on "CAS RN in {Drugbox} only", we should provide an url link in that cat (eg using WP:CATSCAN, 'list all articles in this can that have {Drugbox} transcluded').
 * Infobox-specific issues (like: unknown parameter used in {Drugbox}) are kept in separate categories.


 * I add, about ATC codes. ATC is not in the list of seven bot-tracked validated parameters (see cascite for the list). At the moment, I propose to have those ATC issues categorized in Category:Drugs not assigned an ATC code, by {Drugbox} and by {Chembox} alike. (So that is a shared category too). Reasons are the same: if one wants to work or search the ATC-status for chemicals (usually but not always having {Drugbox}, today), that is you single goto page. Here too the (wiki)-difference {Drug-} or {Chem-} is not relevant. Note that the category is not hidden, because it is of readers interest. -DePiep (talk) 08:58, 16 March 2015 (UTC)

Rx-only as a general legal status

 * copy/pasted here, to talk central. Notify -DePiep (talk) 09:10, 10 April 2015 (UTC)

It says here regarding universal legal statuses "The input should be more precise (for example: "Usually prescription only in Asia". However Template:Infobox_drug says in the legal status section "if a drug is restricted everywhere to prescription-only, please set legal_status = Rx-only rather than similarly define for each and every country". It seems these need to be made consistent. Sizeofint (talk) 03:15, 10 April 2015 (UTC)
 * Conflict with drugbox recommendations
 * Yes that is a (new) contradiction. We should work this out. My point is: writing "legal status = Rx-only" without country/UN/EU specifier is not good information. There is no institute that can declare a drug Rx-only worldwide. I think it must be more specific in the drugbox articles (the maint category lists some 600 drug articles that say plain "Rx-only" this way).
 * So I propose to declare this bare notion Rx-only deprecated, and require a more descriptive text. That would be a maintenance task. The documentation (you quote) should be adjusted right away. -DePiep (talk) 09:16, 10 April 2015 (UTC)
 * I don't have a problem with that proposal. It should probably be posted to the project talk page however. Sizeofint (talk) 14:59, 10 April 2015 (UTC)
 * Which project page? -DePiep (talk) 18:41, 10 April 2015 (UTC)
 * Probably PHARM or possibly MED because the latter seems to be more active. Since there are so many articles with this usage others may have input. Sizeofint (talk) 20:35, 10 April 2015 (UTC)
 * Do invite them. I don't mind. I say: Rcx-only is bad code. -DePiep (talk)


 * Started Wikipedia_talk:WikiProject_Pharmacology. -DePiep (talk) 20:42, 11 April 2015 (UTC)

PLLR, June 2015: new US pregnancy drug labeling
By FDA. Per June 30, 2015 the US Pregnancy and Lactation Labeling Final Rule (PLLR) comes in effect. . More info. We'll have to check this out. -DePiep (talk) 19:38, 7 April 2015 (UTC)
 * Started a topic at WT:PHARM, PLLR. -DePiep (talk) 20:27, 11 April 2015 (UTC)
 * Proposal and demo, see Template_talk:Infobox_drug. -DePiep (talk) 22:53, 26 May 2015 (UTC)

Add PLLR (US, pregnancy)
Last December, the US decided to add a new law in labeling pregnancy-related drugs. It is called PLLR. I propose to add PLLR as a new parameter to and. It will appear with Pregnancy category, US.


 * PLLR = Pregnancy and Lactation Labeling Final Rule
 * PLLR is a labeling requirement for the US, controlled by FDA.
 * PLLR covers "pregnancy, lactation, females and males of reproductive potential".
 * PLLR labeling requirement depends of the date of drug registration.
 * For new medicines, it is required by 1 July 2015. Older drugs may keep the Category classification labeling. So there is an overlay period (many years both will exist).


 * Current Pregnancy categories
 * There is not simple correspondence with existing Pregnancy categories for US. Think: the medicine label must be written anew. We can not simply re-translate a US "B" category into a PLLR phrase.


 * Template relevance
 * PLLR text can not be mixed with Pregnancy categories.
 * Given the time overlap with old Category classification, we keep US's PLLR and Pregnancy Category separated.
 * Little is known about the structure of a PLLR text. We best start with a free text parameter.
 * In the future, PLLR free text input could be analysed and reformed into more structured input (-parameters).
 * Infobox should and can follow this, as it already copies Pregcat input. In this,  is leading over.


 * Resulting proposal


 * For now, we add PLLR as a separate parameter (belonging to the US Pregnancy category subtopic).
 * PLLR is shown in the larger "Pregnancy category" data block (including AU etc.), and in a separate row.
 * Old PregCat and new PLLR input do not interact. They simply are shown both.
 * PLLR can be added as plain text. It is not re-formatted. In=Out.
 * The wikilink "PLLR" now links (redirects) to a subsection. That redirect page can be changed easily.
 * Tests and Demo
 * See testcases for Drugbox and Chembox.

I propose to add PLLR this way. Comments? -DePiep (talk) 22:32, 26 May 2015 (UTC)
 * Have you seen examples of the types of wording that will be used? Doc James  (talk · contribs · email) 01:23, 27 May 2015 (UTC)
 * Really, I haven't. I did not even see simple plain examples, with or without structure. (I honestly ask: did you?). Let alone that I could discover a structure in there. Also the time line is suspicious: since the decision in December 2014, no editor Talked. So I decided best would be to keep PLLR separate, allow it as such, US-tied, unedited text right below any US-PregCat text. See what happens. If you see improvements, please say so. -DePiep (talk) 01:57, 27 May 2015 (UTC)
 * logic dictates it falls upon the poster (not those who give opinions ) to make certain they have "seen" any type of wording--Ozzie10aaaa (talk) 11:53, 27 May 2015 (UTC)
 * No. I've seen the law described, that's enough for this. And I have not seen any useful structure in there, so I've not implemented any structure. What's missing for you? -DePiep (talk) 16:52, 27 May 2015 (UTC)
 * you've answered all my questions. thank you--Ozzie10aaaa (talk) 17:55, 27 May 2015 (UTC)


 * ✅. Added Template_talk:Infobox_drug. -DePiep (talk) 12:31, 6 June 2015 (UTC)

Automating molecular weight using formula
The chemical-data section has the option of the chemical formula with the coefficient each element as its own parameter. If the template has that information, it can calculate the molecular weight automatically rather than an editor having to calculate or look up the value and pass it explicitly in a separate field. The chembox template suite already has this feature. Can we add it to drugbox? DMacks (talk) 20:07, 9 May 2015 (UTC)
 * Yes we can. Will only work when the formula is entered using the C, H, ... params, not with pre-formatted input chemical_formula (is what you already pointed at).
 * A question. When the drugbox has the mass entered by molecular_weight, which value should be shown: calculated or entered? -DePiep (talk) 20:59, 9 May 2015 (UTC)
 * The logic in Chembox Properties appears to be "if formula entered in separate parameters, use Chembox Elements to display both the formula and the calculated mass; else use unified formula field and explicitly entered mass". That is, calculated value takes priority. Both of these templates should have error checking to catch when a formula is passed both ways and when an explicit weight is passed but ignored due to calculation taking priority. DMacks (talk) 21:12, 9 May 2015 (UTC)
 * I was actually asking whether the calculate-from-formula is correct always, by chemistry. But ok.
 * Now when added to {Drugbox}, this would mean: ~every article is errormessaged because today all shown masses are entered. Maybe it is useful to maint cat those pages that show a diff between the two entered masses. -DePiep (talk) 22:00, 9 May 2015 (UTC)
 * Lots of cool physics would be possible if the mass of a chemical were based on something other than its constituent atoms. But for cases where someone had a reason to use some other value, the option of using the unified molecular_formula and then any arbitrary manually entered molecular_weight is there. DMacks (talk) 03:07, 10 May 2015 (UTC)
 * OK. I'll make the framework first, then come back here to fill in the details. -DePiep (talk) 07:58, 10 May 2015 (UTC)
 * See the next subsections. I want to do this right once and for all. -DePiep (talk) 20:09, 11 May 2015 (UTC)
 * DMacks pls note that I changed the priority (entered value overwrites), see below. -DePiep (talk) 20:19, 11 May 2015 (UTC)

The setup

 * This section might change following improvements (like a documentation). It does not follow common talkpage habit of adding comments and versions. Such regular discussions are in subsections below..

I am building Chem molar mass for this. It will be a general available template so it can be used in article texts too, and it will be build into Drugbox. It simply takes the molecular input by symbols. For example :
 * &rarr;

Build in, the symbol inputs are passed-through.
 * molecular_weight in allows a quantity to be entered by the article-editor (SI: quantity=number&times;unit). It overwrites a possibly calculated mass, to give the editor control over the value shown. It is passed through to fixed in.
 * This opens the possibility that a has two values for one data point: entered and calculated. These articles will be categorized for maintenance. The maintenance task is to remove the parameter input (and let the calculated quantity show), unless there is a reason to use that overwriting exception. With ~6000 {Drugbox}s in use, there could be thousands in this category. However, these are not in error and maintenance (emptying the category) can be done at ease (& with AWB).


 * Parameters unit, round, ref, comment are described in the documentation.
 * Once this template and its application is stable and satisfying, the same setup will be introduced in.
 * In the articles, no parameter changes are required, but the maintenance category might be emptied. Some parameters will be added (to use functionality of the calculator).
 * Issues are discussed below. -DePiep (talk) 20:09, 11 May 2015 (UTC)
 * Later descriptions are in the template /documentation. -DePiep (talk) 11:22, 26 May 2015 (UTC)

Issues
These issues have resulted in the Proposal. Please open/reopen new issues below.

Number handling

 * The output of is (text) " → 18 g·mol−1" (from template if fixed:). It miss some decimals. One of the problems with molar mass are the numbers of decimals, but every element could have a precision of two decimals (except some of the last ones) Christian75 (talk) 20:34, 11 May 2015 (UTC)
 * The number in the demo is not exact or correct. I am going to ask about this shortly. -DePiep (talk) 20:44, 11 May 2015 (UTC)
 * Why round to 2 decimals always? -DePiep (talk) 21:23, 11 May 2015 (UTC)
 * Answer: explained in Molar_mass: it's lab habit, not the more theoretical perfection. Maybe full precision could be an extra option. Important: rounding should never add zero's.
 * There is not a theoretical perfection. It all depends on the distrubution of the isotopes, and as you can read at the section you linked to, it depends on a alot thing, e.g. destillation. Maybe the samples you buy from a chemical supplier would have 6 decimals, but you cant really be sure unless its a monoisotope you buy. Christian75 (talk) 08:09, 12 May 2015 (UTC)
 * OK, I get it. I meant to say: using and showing all decimals as defined by our source (could be IUPAC/CIAAW), pre-rounding=no laboratory rounding). If I understand this well: this same notion you make applies to elements with two published decimals (which are just as well sample-dependent). So, if we add the option none the calculation uses & shows all decimals, handled correctly wrt precision (e.g. three for NaCl, see example below). -DePiep (talk) 08:24, 12 May 2015 (UTC)
 * Molar_mass has an illustrating example, about rounding too:
 * M(NaCl) = [22.989 769 28(2) + 35.453(2)] × 1 g/mol = 58.443(2) g/mol
 * Let's forget about the bracketed uncertainities for now. It is clear that Cl has a lower precision (fewer decimals) than Na: 3 vs 8. So the result must use that lower number, because the precision of decimal 5, 6, ... in Na is not known for Cl. Adding them would suggest a precision not present. So decimal 4 is used for rounding decimal 3 (result being the .xx3), and next decimals are not used. A general rule thus would be: the result shows the lowest number of decimals in any of the base numbers. The discarded decimals ... Rounding is done as the final step, in the calculation (multiplying and adding) all decimals are used. (This is the way to round correctly: once, in the end). -DePiep (talk) 21:23, 11 May 2015 (UTC) -DePiep (talk) 08:40, 12 May 2015 (UTC)

Naming
From this start let's get the naming right. What to use?
 * molecular mass
 * molecular weight
 * molar mass

I disapprove of the word "weight" (for the same). I do not fully grasp the diff between "molecular" and "molar" in this, and there is also the (omitted?) prefix "relative" showing up. Note that we add the unit (g/mol). Any wisdom in this? -DePiep (talk) 20:15, 11 May 2015 (UTC)


 * Moleculur mass are for molecules, molar mass are more genereal and can be used for ions and ionic compounds too. Christian75 (talk) 20:36, 11 May 2015 (UTC)
 * Supports using "molar mass" then. Could/should we extend this to the infobox label (change lefthand-column text or wikilink)? btw I discovered there is a long standing unresolved scientific dispute in there, so we might not be able to find a final conclusion here. -DePiep (talk) 08:00, 12 May 2015 (UTC)

Atomic weights numbers to check
We should check the relative atomic mass (atomic weight) numbers in Chem molar mass. Which list to use? -DePiep (talk) 20:39, 11 May 2015 (UTC)
 * List of chemical elements
 * CIAAW

For elements 84 (Po) and higher they are predictions. Does that require different treatment? -DePiep (talk) 20:39, 11 May 2015 (UTC)
 * I used the CIAAW (2013) numbers when available. For most radioactive elements (no stable isotopes), I've used the mass of the longest-living isotope (and so no decimals needed). See the Chem molar mass documentation. -DePiep (talk) 13:49, 25 May 2015 (UTC)

Uncertainty
Standard atomic weight is usually expressed with an uncertainty, as in 20.1797(6) for neon. It is possible to calculate the accumulated uncertainties for a compound correctly, and to show that in the result. However, at this moment there seems to be no use or need for this in wiki (no encyclopedic use). So for now, this feature will not be added. Come the need, we can add it. -DePiep (talk) 13:53, 16 May 2015 (UTC)

Proposal
I've prepared the Chem molar mass subtemplate to have molecular weight calculated from formula input. Basically, articles now will use existing input like   to calculate the molecular mass (result: ).

See the new subtemplate's documentation for details, including the standard atomic weights used (CIAAW sourced). Main points:
 * Existing hardcoded input like 18.04 g/mol will overwrite that calculation. This way the editor stays in control. These pages will be categorized for maintenance check (keep or remove overwriting input?) in.


 * Element symbols and additional parameters will be available in for the editor to use: wrt calculation: molecular_weight_round ('no' or number; default=2), molecular_weight_unit, molecular_weight_ref; will show always: molecular_weight, molecular_weight_comment.


 * See Testcases.
 * When acceptable and stable, the same template will be added to Chembox.

I propose to add this to. Comments? ping. -DePiep (talk) 13:43, 26 May 2015 (UTC)
 * Defer briefly pending coordination with Chembox regarding if there is something gained by having a separate parameter for each element vs just parsing the whole formula in existing single-parameter string using Module:MolarMass. DMacks (talk) 19:39, 26 May 2015 (UTC)
 * What the fuck . Thanks for telling me this so timely. -DePiep (talk) 20:09, 26 May 2015 (UTC)
 * Huh? DMacks (talk) 20:14, 26 May 2015 (UTC)
 * Let me spell it out/spit it out: 9 May 2015 you ask this, I deliver into viable and tested and talked demos ready for deployment, and then you pop up with an immature trial? (labeled alpha by yourself no less within one day). I bet you'll steal the data I sourced and analysed too. (By the way, synchronising with I already cover, and is no reason to postpone this change). Why didn't you Talk? -DePiep (talk) 20:39, 26 May 2015 (UTC)
 * This reflects my initial responses to this surprising new development, my moments of frustration. After a good sleep, I look forward. I see that DMacks's module can have benefits, and so can be used when it is stable &tc. -DePiep (talk) 22:36, 30 May 2015 (UTC)
 * Question to DMacks. We do agree that this question is independent of the module discussion, I hope (or else please explain). Can you explain why or how this change should be deferred (=postponed) to be synchronised with a introduction? -DePiep (talk) 20:55, 26 May 2015 (UTC)
 * Yes, the module you are working on seems like a reasonable solution for "given each element in its own parameter, generate its mw", no objection to its use as such. But it requires passing formulas that way. I currently object to converting existing uses of chemical_formula because the alternative might be able to happen entirely "under the hood" without changes to existing uses. That's why (as I originally explicitly said) my concern was with the parameter-passing. DMacks (talk) 17:01, 27 May 2015 (UTC)
 * I align. For we currently have two input options for the molecular formula (mf):
 * chemical_formula mf "hardcoded"
 * mf "[chemical] symbol coded"
 * As we know, my new 'module' subtemplate Chem molar mass only calculates those symbol-entered mf's. The hardcoded ones are "fixed". I claim this is an improvement. In a future improvement (this is wiki), we could apply that function to deduct-mw-from-a-mf. So I say: let's do this, and improve later (possibly by the module you are working on).
 * Back to the core point: this change truly is an improvement. I mean to say: see your OP concern in the first place. -DePiep (talk) 21:44, 27 May 2015 (UTC)
 * I read in your opening post here that you suggest to calculate from symbol-input just as does. It does not say (to me) that the symbol-input is an issue in itself. Now adding the calculation this way (calculate from symbol-input only) would be an improvement always, coming from today's no-calculation. It does not require to change formula-input into symbol-input (but I agree it is there as an invitation). I find this no blocking reason, because symbol-input is still legal. If in the future we want formula-input only (as you aim at I understand), then we must edit articles anyway. Such a future requirement is not tied to this calculation introduction, but to that change of policy/documentation (deprecation of symbol-input). And so it must be handled when that topic arises. -DePiep (talk) 15:21, 28 May 2015 (UTC)


 * ✅. Added Template_talk:Infobox_drug. Note that maintenance category lists articles to check whether the earlier, manually-entered molar weight can be removed (to show the calculated one). -DePiep (talk) 12:34, 6 June 2015 (UTC)

Molar weights: calculated or overwritten
Today was introduced (systematically filled by ). It lists articles that have molar weight input (=entered by article editor), so the infobox won't show calculated molar weight. As of now: solely lists 5160 articles (out of 5900=87%). -DePiep (talk) 00:20, 7 June 2015 (UTC)

Template edits 6 June 2015
Edits made to Infobox drug:
 * Added PLLR, PLLR.
 * Talk: Template_talk:Infobox_drug


 * Added calulation of molar mass, using new Chem molar mass
 * Request: Template_talk:Infobox_drug by
 * Proposal finalised: Template_talk:Infobox_drug
 * Several parameters added, following subtemplate documentation
 * Maintenance:


 * When data page exists, a link is added, eg Apomorphine (data page) for Apomorphine. Can also be entered manually by data_page.
 * Data pages are listed in under " " (distinct from Chembox listings under ABC).
 * Today five pages apply: Apomorphine (data page), Caffeine (data page), Cocaine (data page), Morphine (data page), Phencyclidine (data page)


 * Minor: PubChem data now shows linktext "CID: 4091" not "CID 4091" ('CID' is not part of the id number).
 * The first three are towards alignment with Chembox when possible.
 * processing. -DePiep (talk) 12:22, 6 June 2015 (UTC)
 * ✅. -DePiep (talk) 12:34, 6 June 2015 (UTC)

Great! Real Life will (continue to) consume me for the next two days (sorry for suddenly dropping off). DMacks (talk) 06:52, 7 June 2015 (UTC)
 * Thanks. IMO you did not promise any activity to me, so nothing is dropped. This being wiki, edit when you like. -DePiep (talk) 21:03, 7 June 2015 (UTC)

Discussion about data pages
A discussion was started at WP:Chemistry#Data_pages about what to do with data pages like Ammonia (data page) for Ammonia (more listed ). -DePiep (talk) 10:27, 8 June 2015 (UTC)

Morphine (data page) listed at Redirects for discussion
An editor has asked for a discussion to address the redirect Morphine (data page). Please participate in the redirect discussion if you have not already done so.


 * Also nominated, . -DePiep (talk) 11:25, 8 June 2015 (UTC)

Duration of effect
Currently we have "onset of action" and "half life". Duration of effect would also be useful. For example the duration of effect of cocaine is 5 to 90 minutes depending on how it is used. This information is very useful for many substances. Doc James (talk · contribs · email) 11:11, 15 June 2015 (UTC)
 * That would be (I suggest) duration_of_effect showing like:
 * Duration of effect5 to 90 minutes
 * Positioned right below onset and elimination_half-life. What should the LH text link to? See testcases10. I have no opinion on usefulness of this param. -DePiep (talk) 08:03, 16 June 2015 (UTC)
 * How about to Duration_of_action? We can call it "duration of action"


 * This is of great importance for opioid overdoses as one need to take into account the duration of the opioid taken versus that of naloxone. Doc James  (talk · contribs · email) 12:41, 16 June 2015 (UTC)
 * Duration of action is OK with me, done, see tests. Parameter name follows? (I'd say yes to help fellow editors). -DePiep (talk) 12:58, 16 June 2015 (UTC)
 * What exactly do you mean by "Parameter name follows"? Doc James  (talk · contribs · email) 13:36, 16 June 2015 (UTC)
 * If the visible text is "Duration of action", the parameter name should preferably be duration_of_action to help any article editor looking to edit that value. Less searching, ease of mental steps. The parameter spelling is alike other {Drugbox} parameter spellings (use lowercase, underscore). -DePiep (talk) 13:45, 16 June 2015 (UTC)
 * I suspect the duration of effect would require clarifications, like dose, age, empty/full stomach, possibly body mass. If this is indeed so, then better to give that in the article's body. Brandmeistertalk  17:11, 16 June 2015 (UTC)
 * , do you mean the parameter should no be in the infobox at all? If so, isn't that argument valid for many more drug parameters?. I thought we had a general disclaimer like "data is not exact in medicine"? And, usually those details are in the source. -DePiep (talk) 09:20, 17 June 2015 (UTC)
 * Basically I don't object, my concern was possible vagueness. Ranged average values, like 5-10 minutes, have their own merits. Brandmeistertalk  09:28, 17 June 2015 (UTC)
 * So for cocaine it is 5 to 90 minutes. Morphine is 3 to 7 hours. Etc. The same applies to half life and that is in the infobox and not presented as a range. There are well sources ranges for duration of action. Warfarin is longer than dabigatran for example (thus more problems with forgetting a dose). Doc James  (talk · contribs · email) 09:30, 17 June 2015 (UTC)
 * I think Brandmeister means "imprecision" for "vagueness" (which I think makes it a correct statement). Again, that may be true for many medical and biological parameters. But I don't think we should remove them for that reason (or prevent this one parameter). Interesting is the dewiki option, to add a specifier template to enter all data systematically (from this talk): Infobox input
 * &rarr; 16 mg·kg−1 (LD50, Ratte, i.v.)[4]
 * However, that is available in our future only.
 * Meanwhile, I 'abuse' the latest opening statement by Brandmeister to mean support addition by a milimeter ;-). Note that this duration_of_action has free text, reproduced unedited by {Drugbox}, so one can add any info as desired. -DePiep (talk) 10:58, 18 June 2015 (UTC)
 * Meanwhile, I 'abuse' the latest opening statement by Brandmeister to mean support addition by a milimeter ;-). Note that this duration_of_action has free text, reproduced unedited by {Drugbox}, so one can add any info as desired. -DePiep (talk) 10:58, 18 June 2015 (UTC)


 * ✅ duration_of_action (free text) added. -DePiep (talk) 11:36, 18 June 2015 (UTC)
 * Is this worth adding to Chembox as well? Sizeofint (talk) 14:45, 18 June 2015 (UTC)
 * Few {Chembox} articles dive into pharmacology. Maybe add the whole set of 7? -DePiep (talk) 17:16, 18 June 2015 (UTC)
 * That isn't a bad idea. I think {Chembox} is only missing duration_of_action and onset. Also, {Chembox} has metabolites but {Drugbox} does not. Can this be added to {Drugbox} as well? Incidentally, duration of action is showing up fine but when previewing an edit Error in template * unknown parameter name (Template:Infobox_drug): 'duration_of_action shows at the top of the page.
 * Quick re's: 1. just added, see Chembox/doc bottom navbox: top row has link to "All parameters" for easy param search.
 * 2. That red line says you entred an unknown param in the outer param list (not within a |SectionN= subtemplate).
 * 3. I meant the set of

| bioavailability  = | protein_bound    = | metabolism       = | onset            = | elimination_half-life = | duration_of_effect = | excretion        = | routes_of_administration =
 * into Chembox Pharmacology (I'd expect)
 * 4. Metabolites is in there btw. In general, please start a new thread here for any new (set) of requests/proposals. CAnnot mix this all together. End of quick reply. -DePiep (talk) 18:40, 18 June 2015 (UTC)
 * The red line is problem with {Drugbox} not {Chembox}. Try previewing an edit on Cocaine and you will see the error. Sizeofint (talk) 19:20, 18 June 2015 (UTC)
 * That My quickness was useless! You can ignore that red message and, it shows all right. Would you propose the Chembox changes at that talkpage? -DePiep (talk) 19:46, 18 June 2015 (UTC)