Template talk:GHS phrases/Archive 1

Archive 1

Semi-protected edit request on 2 November 2020

Hi! I need to add 3 precautonary statement responses for the nitric oxide (NO) article. (Note: sorry if I'm doing something wrong.)

  • P304+P340+P315 IF INHALED: Remove victim to fresh air and keep at rest in a position comfortable for breathing. Get immediate medical advice/attention.
  • P303+P361+P353+P315 IF ON SKIN (or hair): Remove / Take off immediately all contaminated clothes. Rinse skin with water/shower. Get immediate medical advice/attention.
  • P305+P351+P338+P315 IF IN EYES: Rinse cautiously with water for several minutes. Remove contact lenses, if present and easy to do. Continue rinsing. Get immediate medical advice/attention.[1]

Thanks. Andrew the humanoid (talk) 11:12, 2 November 2020 (UTC) Andrew the humanoid (talk) 11:12, 2 November 2020 (UTC)

References

  Not done This isn't how it is done. Those things have already been added to the NO page. (sign added late) User:BJackJS - 20:59, 11 November 2020
  • That's nitric oxide then. However, the problem is: number combination is not recognised in this template (like 'P304+340+315', while well sourced here). The sepatate numbers are P304, P315, P340. Question: is this combination, sourced and reasonable, to be added? -DePiep (talk) 22:32, 11 November 2020 (UTC)

Remove Duplicates

  Resolved
  • "Remove Duplicates" is a process that removes repeated codes from an input list. As of 26 November 2021, this task is not (yet) available in Module:GHS phrases.
For example:
{{GHS phrases|P201|P260|P260}}P201, P260, P260  N
{{GHS phrases|P201|P260|P260}}P201, P260  Y
The task is being developed in the sandbox. To have Preview warning + categorisation.
I see no need to make this optionable (ie, will always be active).
-DePiep (talk) 12:00, 26 November 2021 (UTC)
I agree. In addition, such articles should get listed in Category:GHS errors, as there is a need to manually check the GHS source. The duplicate H or P phrase may be due to a typo. --Leyo 12:50, 26 November 2021 (UTC)
OK then. I'd say cat:Warning, as it is not an enwiki error. And no wrong information is displayed/no good info hidden: no harm done. Also, to check the source (and warn them...), or correct enwiki typostypos, a laid back category is fine. Errors are for the fire department. -DePiep (talk) 14:43, 26 November 2021 (UTC)

New version 2021-11-27

  Resolved

I expect to install a new version for the module and its /data.

Changes:
  • Add new function to remove duplicates
{{GHS phrases|H300|H300}}H300
+preview warning; articles in Category:GHS warnings (catsort under D)
The function has no option (will always be active)
Other functions remain undisturbed (omit rules; code not found)
  • Remove errormessage when 0 codes entered (not an error)
  • lua code reduction & cleanup, use mw.text.decode (to resolve  ),
-DePiep (talk) 10:07, 27 November 2021 (UTC)

  Done -DePiep (talk) 13:57, 27 November 2021 (UTC)

Initially 29 articles have doubles removed (D). (O) is 447 initially, today. -DePiep (talk) 17:03, 27 November 2021 (UTC)

GHS2021 source & ref

  Resolved
  • {{GHS2021}} is the new source template, generally available as full citation and as <ref>...</ref> reference.

Features:

(1) Basically it is a full {{Cite web|...}} citation for the Rev 9 (2021) →
"Globally Harmonized System of Classification and Labelling of Chemicals" (pdf). 2021.
(2) By default, that source is wrapped in a tag <ref name="GHS2021">{{Cite web|...}}</ref>[1]
(3) Ref name can be reused as expected: {{GHS2021|ref=name}} → XYZ[1]
(4) Ref names are shown in Preview (try this section).
(5) Document chapters (here, 'part' and 'annex') can be specified: {{GHS2021|annex=3}} → ABC[2]
They get their own ref name for reuse: PQR[2]
Todo: add other parts and annexes info; handle other CS1 parameters like |access-date=.
-DePiep (talk) 13:33, 29 November 2021 (UTC)

References

  1. ^ a b "Globally Harmonized System of Classification and Labelling of Chemicals" (pdf). 2021.
  2. ^ a b "Globally Harmonized System of Classification and Labelling of Chemicals" (pdf). 2021. Annex 3: Codification of Statements and Pictograms (pp 268–385).

Add ref

  Resolved

Leyo (talk · contribs) has proposed that the reference be incorporatend into the template.

Today:
{{GHS phrases|P201|P260}} (none)
{{GHS phrases|P201|P260}}<'GESTIS'/>
{{GHS phrases|P201|P260}}<ref>{{cite web|...}}</ref>
Could be:
{{GHS phrases|P201|P260|ref=<'GESTIS'/>}}
{{GHS phrases|P201|P260|ref=<ref>{{cite web|...}}</ref>}}
Thoughts:
Input should always be <ref>-tagged.
Must also work inline & outside of Chembox.
There are tools (eg WP:TPU) that list parameter usage.
Not required (me re Feyo).
Would make a nice cleanup in the infobox code I guess.
Counter thoughts:
Invites to enter the same ref 3 or 4 times next to each other: GHS images, Signal word, H-phrases, P-phrases ...
({{Chembox}} could use a subsubheader for GHS. Like "Lethal dose" and "NIOSH" in ammonia. Then: ref once).
(this last issue makes me doubt tbh) -DePiep (talk) 15:04, 26 November 2021 (UTC)
  • Related: Graeme Bartlett, since you are editing in this topic. Could you make sure that when you edit the GHS, there is at least one GHS source in the four GHS data points (pic, word, H, P)? So, if none is present, add one (yours)? (however crude and unpolished it is, like <ref>[https:// ...]</ref>). Would make a strong, high grade GHS block. Thanks. -DePiep (talk) 16:30, 26 November 2021 (UTC)
If you are interested in how this is done in de-WP, you may click here and scroll down to the GHS block starting with CLH:
  • There is a specific parameter for a reference to the ECHA C&L inventory for substances that have a harmonised classification (list).
  • There is a general parameter for a reference to the GHS labelling (except for the P phrases).
  • There is a specific parameter for a reference for P phrases (the reason is that certain sources/databases of labelling information do not provide P phrases, i.e. another source is needed).
I need to say that a long-standing de-WP user was an expert in classification and labelling (his company offered a full range of solutions on that matter to clients). This is one reason why the GHS system in de-WP is quite well developped (e.g. there is no single article with unreferences GHS information). The most heavily used GHS reference is the GESTIS Substance Database. --Leyo 17:22, 26 November 2021 (UTC)
Will check de-wiki anyway, but for now there is a lot of work to be done here ;-). BTW, I don't do the edits, I try to make the Chembox & templates showing better. I myself am not that familiar with GHS or its substance sources. In this case I asked GB just to add a source, "while you are working in the neighborhood", for quality. If you have other Vorlage-features that migh be useful, just mention and I can todo-list them. -DePiep (talk) 18:42, 26 November 2021 (UTC)
  •   Intermediate conclusion: not done as originally proposed (add |ref= to template)
Considerations:
  1. would invite repetition in {{Chembox}} for the four GHS label elements pictogram, signal word, H- and P-phrases.
  2. the label elements could be from different references with different coverings (as Leyo pointed out, from dewiki)
After-template references can be added as usual.
The discussion can continue, as there might be other improvements in this area.
-DePiep (talk) 08:14, 27 November 2021 (UTC)
There is already Hazards_ref in the parameters for Chembox Hazards. If I do add a reference, I put it there. But I have only been using it for things that are not from ECHA or pubchem, as they will already have links in the chembox. Graeme Bartlett (talk) 10:27, 30 November 2021 (UTC)

New dedicated parameter |GHS_ref=

  Resolved
  • I have added |GHS_ref= to {{Chembox Hazards}} (edit request pending). It shows its link in the Hazards header, next to and same as |Hazards_ref=. A <ref>-tag is expected (not added by the template). In the future, this ref can be moved to show in a new subheader "GHS".
This is to allow a dedicated GHS reference for the four GHS parameters pictograms, signal word, H-phrases, P-phrases. At the moment, Graeme Bartlett is using the more generic parameter for lack of this option [1], [2]. The only difference is its targeted preciseness.
I propose to use this parameter as intended. There is no need to edit GHS references into this one, but it would be nice to do so. @Leyo: -DePiep (talk) 06:45, 2 December 2021 (UTC)
We could use --and a Chembox lefthand-label requires-- an article or section on this.
In general, from the articles some reader (on this side of the screen) could not get an insight in the involved instutes (UN, ECHA, ...), regulations (GHS, CLH, CLP, ...), their relationships and a glossary. There is GHS labeling (pics, GHS hazard statements, other)label & infobox element, CLP, and now Harmonised classification and labelling (CLH).
Do the articles need a reorganisation? -DePiep (talk) 08:08, 13 December 2021 (UTC)

Ready for Module

see also: Template talk:Chembox § GHS statements: H-phrases, P-phrases templates
Wikipedia talk:WikiProject Chemicals § Redundant H phrases

In recent weeks, following the Chembox talk (linked above), I have been developing new Module:GHS phrases. It should replace earlier wikitext templates (including /text subpages). New features are added, like list all phrases.

Gone live.
-DePiep (talk) 06:14, 25 November 2021 (UTC)

Ideas

some quick notes to keep the ideas. See also the two talk links above.
  • Check and update /doc pages
  • Do we need old "-" option? {{P-phrases|-}} → no precautionary statements.  Y developing (Nonene, 12-Crown-4)
  • Use local-specific codes, Like EUP123 (Project Osprey)  Y developing
  • Module to cover SignalWords (danger, warning)
  • Module to cover GHS pictograms
  • Grouping: grouping of codes (200-299 = ,...300-399 = ... etc); "H300-399" subset is formal
More code grouping properties? needed? what base?
dewiki does categorise articles (as content not maintenance) by phrase: :de:H-Sätze/...
  • as listAll for the overview table, but then subsections ("H200-H299") RANGE
  • use various list options  Y developing
-DePiep (talk) 18:46, 27 November 2021 (UTC) / -DePiep (talk) 06:14, 15 December 2021 (UTC)

Redundant codes

 Y Proposal accepted, to be developed 06:53, 15 December 2021 (UTC)
  • "Redundant codes" (enwiki wording) are codes that have similar or overlapping meaning and scope, and so reasonably should not appear together on a label. As of 26 November 2021, detection & action is not (yet) built in the Module.
They are distinct from "§ Omit Rules" codes, which are handled through rules explcitly set in the formal GHS source. -DePiep (talk) 11:15, 26 November 2021 (UTC)
Leyo, who pointed to this issue, lists these examples:
  • H410: Very toxic to aquatic life with long lasting effects
  • H411: Toxic to aquatic life with long lasting effects
  • H412: Harmful to aquatic life with long lasting effects
  • H413: May cause long lasting harmful effects to aquatic life
When multiple such redundant codes appear in a label source (ie, individual substance label), the question is,
Which one shoud be seleted to be presented? And also: by what ground is it correct for enwiki to change a substance-source in this?
-DePiep (talk) 11:15, 26 November 2021 (UTC)

Redundancy chains

This is a place to gather initial code lists that are eligible for redundancy-removal. First interst is, to get the list sets more or less complete. Later on we can go into specify preferred order of importance. Within each list, the Priority chain: "in which order to remove codes until just one is left?". Notation A > B means B will be removed. (See wikitext on how to keep the page format). Discussions could be forked out to another thread I prefer. -DePiep (talk) 13:23, 26 November 2021 (UTC)

A manual inspection and correction of the affected articles is needed. --Leyo 14:28, 26 November 2021 (UTC)
what is the status & goal of the as yet undefined codes? -DePiep (talk) 15:31, 26 November 2021 (UTC)
They are in GHS rev. 9, i.e. just missing in the template. --Leyo 15:57, 26 November 2021 (UTC)
per Leyo @13:13: they need manual check, cannot automate priorites. So I struck the programmable ordering suggestion. -DePiep (talk) 08:18, 27 November 2021 (UTC)
    • H206: Fire, blast or projection hazard: increased risk of explosion if desensitizing agent is reduced
    • H207: Fire or projection hazard; increased risk of explosion if desensitizing agent is reduced
    • H208: Fire hazard; increased risk of explosion if desensitizing agent is reduced
    • H209: Explosive
    • H210: Very explosive
    • H211: May be sensitive
    • H220: Extremely flammable gas
    • H221: Flammable gas
    • H222: Extremely flammable material
    • H223: Flammable material
    • H224: Extremely flammable liquid and vapour
    • H225: Highly flammable liquid and vapour
    • H226: Flammable liquid and vapour
    • H227: Combustible liquid
    • H230: May react explosively even in the absence of air
    • H231: May react explosively even in the absence of air at elevated pressure and/or temperature
    • H240: Heating may cause an explosion
    • H241: Heating may cause a fire or explosion
    • H242: Heating may cause a fire
    • H251: Self-heating: may catch fire
    • H252: Self-heating in large quantities: may catch fire
    • H260: In contact with water releases flammable gases which may ignite spontaneously
    • H261: In contact with water releases flammable gas
    • H270: May cause or intensify fire: oxidizer
    • H271: May cause fire or explosion: strong oxidizer
    • H272: May intensify fire: oxidizer
    • H282: Extremely flammable chemical under pressure: May explode if heated
    • H283: Flammable chemical under pressure: May explode if heated
    • H284: Chemical under pressure: May explode if heated
    • H300: Fatal if swallowed
    • H301: Toxic if swallowed
    • H302: Harmful if swallowed
    • H303: May be harmful if swallowed
    • H304: May be fatal if swallowed and enters airways
    • H305: May be harmful if swallowed and enters airways
    • H310: Fatal in contact with skin
    • H311: Toxic in contact with skin
    • H312: Harmful in contact with skin
    • H313: May be harmful in contact with skin
    • H314: Causes severe skin burns and eye damage
    • H315: Causes skin irritation
    • H316: Causes mild skin irritation
    • H318: Causes serious eye damage
    • H319: Causes serious eye irritation
    • H320: Causes eye irritation
    • H330: Fatal if inhaled
    • H331: Toxic if inhaled
    • H332: Harmful if inhaled
    • H333: May be harmful if inhaled
    • H340: May cause genetic defects
    • H341: Suspected of causing genetic defects
    • H350: May cause cancer
    • H351: Suspected of causing cancer
    • H360: May damage fertility or the unborn child
    • H361: Suspected of damaging fertility or the unborn child
    • H370: Causes damage to organs
    • H371: May cause damage to organs
    • H372: Causes damage to organs through prolonged or repeated exposure
    • H373: May cause damage to organs through prolonged or repeated exposure
    • H410: Very toxic to aquatic life with long lasting effects
    • H411: Toxic to aquatic life with long lasting effects
    • H412: Harmful to aquatic life with long lasting effects
    • H413: May cause long lasting harmful effects to aquatic life

Issue (1-Pentadecanol example)

I noticed that in e.g. 1-Pentadecanol that contains the incorrect combination of H410 and H411, the error message does not match: Preview warning: Omit Rules: keep H410, omit H400
Furthermore, as this is clearly an error (two different hazard categories of the same hazard class), affected articles should be listed in Category:GHS errors (not Category:GHS warnings). Just to be clear: Category:GHS warnings is fine for articles with e.g. H400 and H410.

— User:Leyo, WT:CHEMICALS: [3] 09:22, 26 November 2021 (UTC)
(c/p by -DePiep (talk) 12:21, 26 November 2021 (UTC))
The message displayed does match the situation as there is both an H400 and H410 in addition to H411. There is not an omit rule for 410 and 411, but perhaps there should be a rule to only use the smallest out of H410 H411 H412 H413, but it will be tedious to write out 6 rules for this. Since I am the perpetrator of this sorry list of H phrases I should fix it, but perhaps the display code can take care of it too. Graeme Bartlett (talk) 11:41, 26 November 2021 (UTC)
(c/p by -DePiep (talk) 12:32, 26 November 2021 (UTC))

Continuation:

As GB writes (except for the "perpetrator" self-condemonation ;-). This is the current input:

{{H-phrases|315|319|400|410|411}}H315, H319, H410, H411
1. Omit Rules is active, so H400 is omitted, page is in Category:GHS warnings, Preview warning text echos the action: all correct and as documented.
2. Redundancy Removal is not active (of course not, is not even present). Redundancy is easy to see:
  • H410: Very toxic to aquatic life with long lasting effects
  • H411: Toxic to aquatic life with long lasting effects

What to do?

First of all, do not mix this with Omit Rules. Omittance is explicitly written in the Source.[1]

We could add a function that does remove redundants. It requires some listings of priority in a chain (within each range, like for H410-H413).

With this comes the responsibility of wiki: by what authority can we make such a statement & claim & action (removal)? How much "obvious" redundancy can we claim to exist for changing the source (that is, the individual compounds label source)? Is this equal to an editor who edits out H410 in the article itself (which es expected)? Or should we show the wrong/nonoptimal source as it is? -DePiep (talk) 12:58, 26 November 2021 (UTC)

  • @Leyo: About the bare redundancy sets (before introducing class/category & pubchem complications). There are some 25 now. Do I understand that I could build a function that does:
Per Redundancy set, when 2 or more codes are used, categorise the article for a check (maintenance/attention/warning-level).
For catsort, we can use a letter A-Z for each of the sets ("A = H206-set").
Would that be useful? It does take some effort, so some need for it is needed ;-) -DePiep (talk) 08:36, 27 November 2021 (UTC)
Yes, articles with 2 or more H phrases from the same set above should get listed into Category:GHS errors for manual inspection and correction.
I am unsure whether a specific catsort is needed. A specific error message in preview mode would be more helpful in my view. --Leyo 12:27, 29 November 2021 (UTC)
It's on my todo-list now (quite near the bottom; up-!votes will be considered). Since these are not enwiki-errors, don't belong in Category:GHS errors. The error --if an error at all-- is in the label source, or maybe that source's authority. Anyway, we cannot instruct a wiki editor straightforward on how to fix it, because outside judgement (non-enwiki) is involved, if I understand this right. That said, it will be in the warning cat, or a dedicated one (to explore the issues at ease; topic is quite intricate IMO).
About alphabetical sorting. The preview-warning will be there. I'd say alphabet grouping/sorting for the sets helps when one is solving all the "C:" H209... "explosive" ones in a session: easier to find likewise issues. No big deal. We'll see. -DePiep (talk) 13:11, 29 November 2021 (UTC)
When the error is indeed in the source (PubChem), a switch to another source is needed. On the other hand, an error might have occurred when typing the information available in the source to the Wikipedia article. --Leyo 14:08, 29 November 2021 (UTC)
A typo when entering sourced data? Will also require checking the source to detect. Not good to classify that as 'error'. -DePiep (talk) 10:37, 30 November 2021 (UTC)
Since it's clearly incorrect, it's an error in my view. --Leyo 21:36, 1 December 2021 (UTC)
  • What with multiples? For example, Redundancy set H310, H311, H312, H313 has H310, which also appears in multi-code H300+H310: "Fatal if swallowed or in contact with skin". When listing (catgorising) articles for this Redundancy check, I assume these multi-codes are part of the set-to-check (iow, H300+H310 is part of the H310-set). Can be automated, no manual inclusion needed. -DePiep (talk) 10:37, 30 November 2021 (UTC)

wider issues: class, category, source quality

(EC) I overlooked that the source text of 1-Pentadecanol also contains H400 (in addition to the mentioned error). Sorry for that.
In cases with multiple hazard categories within the same hazard class, a manual inspection and correction is needed (→ no omission, only maintenance category). PubChem is the only website I am aware of that provides such incorrect data. The reason is that they aggregate multiple notifications (Aggregated GHS information provided by 115 companies from 6 notifications to the ECHA C&L Inventory.). An extreme example is this one. Therefore, I strongly recommend not to use PubChem as a source of GHS information for WP articles. --Leyo 13:13, 26 November 2021 (UTC)
You mention Hazard Class and Category, which are unused in enwiki/{{GHS phrases}} (AFAIK). To introduce into this topic (say, the module)? Also, the PubChem issue looks worrisome. Shouldn't this be a separate section? Meanwhile, we can develop Redundancy issues here. -DePiep (talk) 13:40, 26 November 2021 (UTC)
There is {{GHS category}}. If this module should/could use it, pls let me know. -DePiep (talk) 14:51, 26 November 2021 (UTC)
I also incorporated redundancies by combining ECHA entries. It is not just PubChem. The problem is with aggregating different valid combinations. Graeme Bartlett (talk) 20:12, 26 November 2021 (UTC)
Aggregating different valid GHS classifications or labellings just by taking together all H phrases gives invalid results in most cases. This would need to be done in a more sophisticated way, but would therefore by original research. Therefore, we need to choose one set only, from a credible source.
The combination of a hazard class (e.g. Hazardous to the aquatic environment, long-term) and a hazard category (in the present example: Chronic 1 or Chronic 2 or Chronic 3 or Chronic 4) yields hazard statement codes (here: H410 or H411 or H412 or H413). Hence, the H phrases cover everything we need here, i.e. they contain a hazard class and a hazard category. --Leyo 21:39, 26 November 2021 (UTC)

References

  1. ^ "Globally Harmonized System of Classification and Labelling of Chemicals" (pdf). 2021. Annex 3: Codification of Statements and Pictograms (pp 268–385).

Deleted codes

 Y Proposal accepted, to be developed 06:53, 15 December 2021 (UTC)

In the source (9th rev, 2021, p.272 of 556 in pdf), I found codes saying [Deleted]:

  • H200: Unstable explosive
  • H201: Explosive: mass explosion hazard
  • H202: Explosive: severe projection hazard
  • H203: Explosive: fire, blast or projection hazard
  • H205: May mass explode in fire
H204: "Fire or projection hazard" is kept. There may be more [Deleted] codes.

What does this say? Do we have to mark them deprecated? -DePiep (talk) 08:02, 28 November 2021 (UTC)

They should probably be marked deprecated. How many articles contain such phrases? --Leyo 21:47, 28 November 2021 (UTC)
I don't know (WP:TPU not active yet; listings available after Dec 5 I expect).
Anyway, categorisation on its way. -DePiep (talk) 10:00, 29 November 2021 (UTC)
According to hastemplate:H-phrases insource:/\{\{[Hh]-phrases[^\}]+20[01235]/, there are currently 28 articles. However, please note that these H phrases are present in the current version of the CLP Regulation (Table 2.1.2). Hence, I would suggest leaving the articles for now as they are. --Leyo 12:10, 29 November 2021 (UTC)
As you say. In that case, won't categorise them either, no action to be done. (We could add a note like "[Deleted]" to the phrase?). -DePiep (talk) 12:58, 29 November 2021 (UTC)

Option "explicitly no phrases"

 Y Proposal accepted, being developed 06:53, 15 December 2021 (UTC)

Previous version (Oct 2021) had input option {{P-phrase|-}} (hyphen), which would show text "no precautionary statements". (sole usage: 12-Crown-4, nonene).

Question: should we reintroduce this option? Can a substance be positively sourced (confirmed) to have this status? Also, to what label elements can it pertain (hazard statements, prec. statements, signal word, GHS pics)? -DePiep (talk) 08:50, 4 December 2021 (UTC)

Yes, substances that aren't dangerous ccording to GHS may be positively sources, e.g. [4] for glucose. If there is no H-phrase, there are no other GHS labelling elements, either. There are > 1000 such cases in de-WP. --Leyo 11:02, 6 December 2021 (UTC)
Great! So, H and P can have input "-": "no [prec/haz] statements" (this text OK?). I'd say this must be sourced. What mechanism to program for situation "No H statements so no GHS statements at all"? Blank these automatically? -DePiep (talk) 12:54, 6 December 2021 (UTC)
It could say something like "Not a dangerous substance according to GHS." for the whole section on GHS. --Leyo 13:11, 6 December 2021 (UTC)
Demo: Succinimide (from GESTIS and de:Succinimid). Current sandbox: {{GHS phrases/sandbox|-}} → . -DePiep (talk) 14:04, 10 December 2021 (UTC)
Oxygen difluoride has in GESTIS: "Es wurden keine P-Sätze angegeben.", and a "?"in dewiki (not "-"). -DePiep (talk) 19:01, 10 December 2021 (UTC)
The sentence above ("Not a dangerous substance according to GHS.") might be shown in the chembox. No warning category is needed. --Leyo 20:29, 10 December 2021 (UTC)
H270, H280, H314, H330 would of course trigger several P phrases. However, P phrases missing in the original source (making the GHS labeling incomplete). The option "?" is correct in this case. --Leyo 20:16, 10 December 2021 (UTC)
I guessed it would be like this (difference in statement strength "-" vs. "?"). Now you want this option here too I'm afraid ... ;-) -DePiep (talk) 20:20, 10 December 2021 (UTC)
"?" in de-WP means that there is no citable source. It's not a rare case that there are H phrases but no P phrases. For instance, ECHA's C&L Inventory does not contain P phrases. --Leyo 20:29, 10 December 2021 (UTC)
Yes, the "-" option would be good as it would distinguish non-hazardous from non-yet-added entries. I am not convinced that "?" is so useful. It sort of indicates that someone looked and didn't find the info. Very likely the information is somewhere out there though. There are many obscure, or unstable substances that have no phrases, as no one ever sold them, and so phrases are inappropriate. I could imagine that an unstable explosive, or an obscure poison, could just have a mention in main_hazards, and no GHS info. Where ECHA's C&L Inventory does not contain P phrases, but does have H phrases, probably some manufacturer has P phrases available. Graeme Bartlett (talk) 22:24, 10 December 2021 (UTC)
Yes, this is sometimes the case. However, there are currently 629 articles with missing P phrases in de-WP, whereas all articles have GHS information or were marked as substances with no GHS data available after checking a range of possible sources. --Leyo 21:27, 11 December 2021 (UTC)
Today I met a few times: Pamoic acid [5], Propylene glycol: explicitly no GHS label elements. That is where "-" is good for. I'll scrap the ? option, too hard to do that right or useful. -DePiep (talk) 22:06, 11 December 2021 (UTC)

Roundup: options "-" and "?"

 Y Proposal partially accepted, being developed 06:53, 15 December 2021 (UTC)
Propose to add options
  • A. |1=- will be available: {{P-phrases|-}} → "". Meaning: "sourced no phrases". Will be categorised (warning or a just-noting-category).
In /sandbox now. text tbd. Can be added to articles. Not yet implemented live, so does Category:GHS errors listing; acceptable for now IMO.
For now, the function ' "-" applies to all 4 GHS parameters' is not implemented (complicated; easier in a Lua chembox)
  • B |1=? I suggest to make this one available too. To mean "unsourced, not found" (=[citation needed] status). As Leyo says, rare occasions (like when only one of H/P is unknown). Categorised as GHS warning; to keep an eye on (for quality reasons, no bloating/crufting).
-DePiep (talk) 08:44, 11 December 2021 (UTC)
"?" not done. -DePiep (talk) 22:06, 11 December 2021 (UTC)

local codes (EUH032)

 Y Proposal accepted, to be developed 06:53, 15 December 2021 (UTC)
demo Mercury(II) thiocyanate EUH032 (from dewiki); Indium(III) sulfide. -DePiep (talk) 18:45, 10 December 2021 (UTC)
Well EUH032 would not be part of the "global" in GHS, so it probably does not belong in GHS H phrases. But it could go elsewhere in the hazards section. Though maybe plain text is better, "Contact with acids liberates very toxic gas.". We may as well say what gas. And is it even true? Graeme Bartlett (talk) 23:06, 10 December 2021 (UTC)
added |localPhrases=EUH032 (preliminary new parameter) in Indium(III) sulfide. Handling TBD. -DePiep (talk) 08:11, 11 December 2021 (UTC)
de:Vorlage:EUH-Sätze, de:Vorlage:EUH-Sätze/Texte lists 27 EUH phrases. -DePiep (talk) 17:18, 11 December 2021 (UTC)

I would prefer to treat EUH phrases in a similar way as H phrases. If e.g. ECHA, GESTIS or another European SDS are used as a source for the GHS information, it may contain EUH phrases, too. Without them, the GHS information would be incomplete. --Leyo 21:04, 11 December 2021 (UTC)

  • Preparing: will add |EUPhrases= to {{Chembox Hazards}}, but no show now. (next update, together with the GHS-(set) change).
Handling & showing to be decided. But good to be able to add |EUPhrases=EUH032 &tc. to the infobox while one is editing GHS. -DePiep (talk) 08:34, 12 December 2021 (UTC)
 Y parameter allowed, no show yet; edit request made. -DePiep (talk) 08:58, 12 December 2021 (UTC)
Having {{EUH-phrases}}: Indium(III) sulfide, Mercury(II) thiocyanate, Octadecyltrichlorosilane, Rhodium(III) oxide. -DePiep (talk) 09:23, 12 December 2021 (UTC)

Harmonised classification (EU)

 Y Proposal to be developed 06:53, 15 December 2021 (UTC)

An attempt could be made to consider the labelling from the harmonised classification (see Excel list) for the concerned articles. --Leyo 22:49, 12 December 2021 (UTC)

If we use it, we should also indicate that it is the ECHA harmonised classification. Graeme Bartlett (talk) 03:17, 13 December 2021 (UTC)
That's Harmonised classification and labelling (CLH) then. Added to our todo list. -DePiep (talk) 08:08, 13 December 2021 (UTC)
Expanding CLP Regulation should do. --Leyo 08:17, 13 December 2021 (UTC)
CLP Regulation#Harmonised classification and labelling --Leyo 20:24, 14 December 2021 (UTC)

Show full phrase texts in article

  Idea:

Demo 01
P201, P235+P410[a]
(§ Notelist (Demo 01))

I have bene pondering on how to show the full phrase texts in the article: make them readable for readers. To be honest, the abbr form (P201) is correct but not very informative. (It also scratches the limits of correct abbreviation-usage).

First thought is to add a show/hide full text box in the infobox. However, this could not look good because of infobox width. And, more importantly, it is sort of forbidden to use hidden text in the article. It would be bad page design, first of all for not-fullblown-featured readers/screens. See WP:DONTHIDE. There are some exceptions mentioned but not suitable for this quest here. So I dropped this option.  N

Second thought: Put the full text in a footnote. That is, not exactly a <ref> reference, but a Note (using similar technique), see H:NOTES. The demo is based on

{{efn-la|{{PPhrases|...}}}}, template-internal coded
{{notelist|group=infobox}}, to be added to the article ...

==Notelist (Demo 01)==
  1. ^ P-phrases:
    • P201: Obtain special instructions before use.
    • P235+P410: Keep cool. Protect from sunlight.
-DePiep (talk) 08:02, 15 December 2021 (UTC)

Comments

I'm just leaving the idea here for now, not sure when there will be time to develop. Also, there are more features waiting, on this page ;-) -DePiep (talk) 08:02, 15 December 2021 (UTC)

GHS (set) in chembox

  Resolved

In the sandbox: the four GHS values showing in one subheader (= a subsection in Hazards).

See ../testcases/GHS (set) for demos/tests. No parameter changes (all changes in the backoffice).

Test a live article? Just change

|Section3 = {{Chembox Hazards/sandbox

and do Preview. Comments? @Leyo and Graeme Bartlett: -DePiep (talk) 22:28, 10 December 2021 (UTC)

Looks OK, and interacts OK with other hazards parameters. Graeme Bartlett (talk) 22:41, 10 December 2021 (UTC)
I remember: other subsets (NIOSH, lethal amounts) are at bottom. GHS still near top. This way, old regular single-line data (NFPA, LD50) look awkward in between. GHS to bottom? NIOSH to top?
Order: 1. main hazards, 2. GHS (set), 3. NIOSH (set), lethal doses (set) 4. NFPA, 5... rest? -DePiep (talk) 22:52, 10 December 2021 (UTC)
  • subsets: NIOSH, Lethal Doses, GHS.
  • graph: NFPA
  • Lines: main hazards, 'hazards', temps (flash)
First, NFPA diamond right below GHS (for visual reason)
then maybe: lines in top, bottom: GHS, Firediamond, lethals, NIOSH?
(could do: crteate more subsets) -DePiep (talk) 23:17, 10 December 2021 (UTC)
In my view, GHS should be on top, because it is globally valid, whereas e.g. NFPA or NIOSH are not. --Leyo 21:10, 11 December 2021 (UTC)
GHS now almost in top by sandbox; more changes deferred to seaprate subthread (below). -DePiep (talk) 08:44, 12 December 2021 (UTC)
 Y tests look ok, will write edit request. -DePiep (talk) 08:44, 12 December 2021 (UTC)
  Done {{Chemnbox GHS (set)}} -DePiep (talk) 13:19, 13 December 2021 (UTC)

More reordering in Hazards

  Discussion ongoing...
Current order (see /testcases (set))

Main hazards
SDS
|GHS (set)= 4x
|NFPA diamond=
Ingestion hazard
Inhalation hazard
Eye hazard
Skin hazard
Flash point
Autoignition temperature
Threshold limit value (TLV)
|Lethal doses (set)= 4x
|NIOSH (set)= 4x
  • Question: how to improve order? Group the 5 verbose hazards, including Main? Then GHS could go in top? Group Flash T and Autoignit T? Can SDS and TLV be grouped with any, or get a nice position?
-DePiep (talk) 11:38, 12 December 2021 (UTC)
issues to consider
A. the verbose "OSH" hazards in a set (Main, eyes, skin, inhalation, ingestion). Note: Main has 1200 uses, the others ~25-30 each
B. try HFPA diamond in a set (visual effect?)
C. problematic to order, more or less: SDS (external link), TVL (isolated value; can group with OSH?)
D. Flash point, Autoignition point temperatures: group? or with/nearby other data?
Order ideas in Hazards
1. OSH verbose set (because of "Main"); new as set
2. GHS set
3. NFPA diamond (strong image)
4? Flash & Autoignition (make set?)
5. Lethal doses set
6. NIOSH set
7. (bottom) SDS aka MSDS
Just noting this here. Don't know when there is time to expand & demo on this. -DePiep (talk) 06:34, 15 December 2021 (UTC)

New demo (more reordering)

First shot: see /testcases (set).
(1) grouped occupation safety items (OSH); new |OSH_ref=
(2) Reordered; SDS at bottom
(3) looks right: Flash, Autoignition T points and Explo Limits below the diamond, as is
Questions:
? labeltexts in the new {{Chembox OHS (set)}} (definitely not linking to "eye" &tc.)
? TLVvalues also in OSH set
-DePiep (talk) 17:27, 16 December 2021 (UTC)

Shorter notation

I would suggest to shorten the standard notation, e.g.

| HPhrases = {{H-phrases|H226|H301|H314|H412}}
| PPhrases = {{P-phrases|P210|P273|P280|P303+P361+P353|P304+P340+P310|P305+P351+P338}}

to e.g.

| HPhrases = {{H-phrases|226|301|314|412}}
| PPhrases = {{P-phrases|210|273|280|303+361+353|304+340+310|305+351+338}}

--Leyo 22:37, 1 January 2022 (UTC)

I strongly oppose. Use full ID is recommended, no gain in promoting incomplete half IDs, numbers possible ambiguouis.
In the new module, the unidentified numbers are only covered for backward compatability (but: when using universal {{GHS phrases}} the ID is required, of course. -DePiep (talk) 05:43, 2 January 2022 (UTC)

Updated statements from GHS rev. 9

Hello all! I was editing Mercury(II) oxide and I noticed that not all of the current GHS statements listed on PubChem were found here, so I took a crack at updating the statement lists to match the latest revision of GHS. My updates are in Module:Sandbox/IAmTheSpaghetti/GHS phrases/data. I did comment out the two omit rules that only partially apply, but it's fine if those stay as-is, I don't have a strong opinion on that. There aren't really any other interesting changes, just updates and additions to the statements. I created a sandbox page pointed at my sandbox module and it looks to be working as expected: User:IAmTheSpaghetti/sandbox/Mercury(II) oxide. Let me know if I can do anything else to help.

IAmTheSpaghetti (talk) 03:11, 25 May 2022 (UTC)

Your changes generally look good. I noticed that you moved several H-phrases under the heading The following are not included in the current revision of GHS. At least some of them are frequently used under EU CLP. --Leyo 19:41, 25 May 2022 (UTC)
@Leyo: Can you give an example, if this is still true? I'm not sure how to check which H-phrases are used on the CLP system, but I'm seeing the updated P-codes on PubChem, (for example P302+P361+P354) so I think it would be helpful to merge @IAmTheSpaghetti:'s updates. We could keep the old codes active for backward compatibility if sources like the EU CLP are still using statement codes from a previous revision of the GHS. 〈 Forbes72 | Talk 〉 21:13, 3 September 2022 (UTC)
@IAmTheSpaghetti: "the latest revision of GHS" - which one do you refer to? The data used is defined in [1] (Template:GHS phrases § References). So please specify (list) all "updates" you found, and its source, especially new publication(?). Is there any other source than GHS_Rev9E_0.pdf (2021)?
re GHS statements listed on PubChem - I note that PubChem usage is not a definition (-change).
With adding combinded codes (like "P302+P361+P354") as used in PubChem we could be more lax, provided that good sense is applied (motivated). -DePiep (talk) 06:47, 4 September 2022 (UTC)
@DePiep I am indeed referring to GHS_Rev9E_0.pdf (2021). I actually tried to make the citation clearer by moving it to the top of the page, using the full version string from the document, and adding a link to the official site.
Maybe it will help to add a little more explanation of what I did here. When editing Mercury(II) oxide, I saw that some of the codes were unrecognized (P301+P316, P316, and P319; the first two have since been added). I followed the references to see if these codes are listed in the original sources, and it turns out that they are. I also noticed that some of the citations here didn't quite line up, for example the H omit rules aren't on page 286, that page is in the P statements section. I was guessing that the version here had just missed some updates, but the backstory wasn't all that important. I thought I could help out by updating the data here to match the official version wherever it differed. So I actually went through the GHS rev. 9 PDF and copy-pasted all of the codes and phrases to create Module:Sandbox/IAmTheSpaghetti/GHS phrases/data/rev9, and I used that as the basis for my updates to the existing data module.
I very intentionally did not delete any of the codes that are included here but not listed in the GHS rev. 9 document. I assume those codes are in use in the real world so their definitions should still be available. (I'm kind of surprised the GHS itself doesn't include a section of previously used codes, but I digress.) So I only grouped them together and added the comment that they are not listed in the current GHS document. Of course that could be expanded upon, say by adding citations to previous revisions or to other standards like CLP, but that was a bit beyond what I was trying to do. I was just trying to get all of the data from the current revision of GHS included here.
So that's where I'm coming from. I was just trying to be helpful by updating our data to match the source document. I hope that the changes are incorporated somehow, since by my count there are 2 H-phrases, 21 P-phrases, and 4 omit rules that are in the GHS but not included here, and quite a few more that are in both but with different wording. But that is a decision for y'all to make.
IAmTheSpaghetti (talk) 04:57, 30 September 2022 (UTC)
I copied IAmTheSpaghetti the data sandbox page into regular Module:GHS phrases/data/sandbox (diff).
  • Oppose proposed changes, not fit for going live. As described above: not listed in proposal, not sourced/wrong source, not specified. Test/demo required. -DePiep (talk) 07:01, 4 September 2022 (UTC)
IAmTheSpaghetti removed source references from code, without replacement (see sandbox diff). This is unacceptible.
-- Current as of GHS ST/SG/AC.10/30/Rev.9 (2021)
-- https://unece.org/transport/standards/transport/dangerous-goods/ghs-rev9-2021
-- per source (2021): one may "omit phrase X when phrase Y is present".
...
-- listed as: tOmitRules{ ['keep'] = 'omit' }
-- source: 9th rev ed., 2021
I've re-added a comment in the code pointing to the source of the omission rule in the sandbox version of the template, does that address your concerns here? 〈 Forbes72 | Talk 〉 01:26, 5 September 2022 (UTC)
@DePiep The first two lines of this snippet ("Current as of ..." and the link) are lines that I added to replace the existing citation ("source: 9th rev ed., 2021"). I did remove the line "per source (2021): one may "omit phrase X when phrase Y is present".", because the quoted portion does not appear in the source document (at least AFAICT). Each omit rule has its own citation in the section immediately below these comments, and I think that's probably the best way to go because there are several variations on the phrasing of these rules in the source document. IAmTheSpaghetti (talk) 05:16, 30 September 2022 (UTC)
Reply to the question asked on 3 September:
H350i, H360D, H360Df, H360F, H360FD, H360Fd, H361d, H361f and H361fd are used in harmonised entries in Annex VI to CLP (see table). --Leyo 08:48, 5 September 2022 (UTC)
OK, that's a start. Looks like it does not cover all changes. Waiting for a complete proposal including list of changes, sources, what-to-do-with will be broken input, etc. DePiep (talk) 15:08, 5 September 2022 (UTC)

Framework for updated proposal

Looks like most of the codes mentioned by Leyo which are used by the CLP are codes with extra letters at the end, for example H361d, H361f and H361fd are all variations of H361. GHS v9 section A1.25 description of H361: "Suspected of damaging fertility or the unborn child (state specific effect if known) (state route of exposure if known) So presumably "d", "f", and "fd" refer to specific effects and/or routes of exposure.

However, according to GHS v9, these letters are not part of the code itself: GHS v9 section A.3.1.2.1 "Hazard statements are assigned a unique alphanumerical code which consists of one letter and three numbers, as follows:" section A.3.2.2.1 "Precautionary statements are assigned a unique alphanumeric code which consists of one letter and three numbers as follows:" I checked v8 and v7, which contain the same language.

Looking through the items in the "Hazard statement Code(s)" column in the ECHA CLP in Table of harmonised entries in Annex VI to CLP there are other additions, such as "H373 (blood)" and "H373 (thyroid, nervous system)". These appear to be added by the ECHA in ad-hoc way in order to explain the specific effect and/or route of exposure and are not systematic as far as I can tell. ~The current Wikipedia template also does not support the use of the trailing letters in the codes. Based on all this I propose two things:

  • The template only support Hazard codes and Precautionary statements of the form "PXXX" and "HXXX" where X is a digit from 0 to 9, and combinations of these codes with "+" sign in between, provided those codes or combination codes appear in any version of the GHS and are properly cited.
  • Obsolete codes, marked [Deleted] in the the latest version of GHS (GHS v9), should be supported, but placed in the template under a note: "The following are not included in the current revision of GHS (see GHS v9 pages 266-271,278-301)"

In this way, we can update the template without losing any current functionality or sourcing. If this sounds reasonable in principle, I (or anyone else) can update the sandbox template with a complete list of the specific codes to be added/marked as depreciated with all the necessary citations to the GHS itself for final approval before we implement the changes to the template itself. 〈 Forbes72 | Talk 〉 23:14, 17 September 2022 (UTC)

This templates needs to continue supporting the phrases defined in the CLP regulation, such as H350i, H360D, H360Df, H360F, H360FD, H360Fd, H361d, H361f and H361fd. Hence, I clearly oppose restricting it to "HXXX". --Leyo 21:12, 20 September 2022 (UTC)
Those CLP-style phrases are not included in the GHS definitions as given by the UN. If we are going to maintain functionality for those codes, we need to update the scope of the template, and add sourcing, since those codes are currently unsourced. Are you also implying the goal is ultimately to include support for all codes as they appear in the CLP tables, including "H370 (nervous system)", ""H372 (lungs)", "H372 (respiratory and haematopoietic systems)" or narrowly just to grandfather in the ones already supported? I'm not against keeping additional functionality, just looking for clarity.〈 Forbes72 | Talk 〉 02:17, 21 September 2022 (UTC)
The UN is the basis to CLP, but CLP is what matters in real life (in the EU, but also other regions). For this reason, this template needs to support for all codes defined in the CLP regulation. --Leyo 09:05, 21 September 2022 (UTC)
re "The current Wikipedia template also does not support the use of the trailing letters in the codes" -- it does: H360Df; see {{GHS phrases/list all}}. Anyway, we can adjust technically anyway. Status "deprecated" to be added.
Are there defining sources for the irregular ones? Is there a mechanism published that treats "H373 (blood)" by ellipsis, like "P422 Store contents under ..."? -DePiep (talk) 11:26, 21 September 2022 (UTC)
Only the ones in Annex III to the CLP regulation (latest consolidated version) are needed, i.e., e.g. H373, but not H373 (blood). --Leyo 12:18, 21 September 2022 (UTC)
DePiep, you're right. I stand corrected on the current support for letter codes. Thanks for the link Leyo, I see the codes are on page 486-487 of your link: "1.1.2.1.2. Hazard statement codes". I'll work on a sandbox edit to update the template along these lines in the next few days. 〈 Forbes72 | Talk 〉 04:28, 27 September 2022 (UTC)
@Forbes72: But still, what are the changes asked for? AFAK: (1) changes in the list must be documented by recent lists (not a 'go saearch yourself'), /documentation-fit. (2) If there are deprecated codes, what will happen to them at this wiki? I expect: dedicated category (if categorised art all). Note that, when deprecated code is published for a substance, enwiki may not omit them. We are not to do the effectuation of politics ourselves; it is the source (publicing company?) that should act. IOW: the substances source be followed not redacted. (3) What to do with H373 (blood) situations? -DePiep (talk) 06:23, 30 September 2022 (UTC)
@Forbes72: my thoughts: for certain codes, we could signal "Deprecated code" in the module (e.g, a footnote in the article when "H987"[9]?). Anyway, if you have Lua code question you can ping me (don't know if you're coder yourself ;-) -DePiep (talk) 05:07, 2 October 2022 (UTC)
That sounds like a good thing to add, but I don't know how to write something like that. I have some basic coding knowledge (i.e. I've compiled density functional theory programs on Linux by following specific directions, can write basic Python programs) and I've added functionality to Wikipedia templates by pattern-matching, but honestly I don't know what Lua is. I've spent a couple hours getting Module:GHS phrases/data/sandbox in a reasonably well-sourced state, so I'd like to start testing, but Template:GHS phrases/sandbox is throws errors when I use it, so I think it needs to be fixed before we can test Module:GHS phrases/data/sandbox. 〈 Forbes72 | Talk 〉 05:47, 2 October 2022 (UTC)
I will give it a try later (this week?), but not while you are editing, shouldn't interfere. Or maybe me doing /sandbox2, but that could be disturbing too. Let me know. (you /data work looks good btw). DePiep (talk) 06:09, 2 October 2022 (UTC)
Thanks. It seems the issue was with Module:GHS phrases/sandbox, which I reverted to Module:GHS phrases and then pointed it towards Module:GHS phrases/data/sandbox. The sandbox template now appears to be working as expected. I'm finished with what the changes I was trying to make. If it looks ok, we can copy Module:GHS phrases/data/sandbox to Module:GHS phrases/data.
One caveat, I did end up removing support for a few GHS phrases that were found in neither the EU CLP nor the UN GHS (examples: "H441", only invoked once on Wikipedia (Cumene), "P301+P310+P330" which is invoked on 16 mainspace pages). I found at least one chemical supplier that is using the codes I removed (based on data from December 1997 apparently), but they all contain obsolete codes and they are not supported by the CLP. I can go through Category:GHS errors and update broken pages individually. 〈 Forbes72 | Talk 〉 21:05, 2 October 2022 (UTC)