Template:GHS phrases/doc

From MOASSpedia
Jump to navigation Jump to search

The templates {{GHS phrases}} (talk) (/tests), {{H-phrases}} and {{P-phrases}} all format and present GHS hazard and precaution statements as defined by the UN.[1]

The template requires one or more phrase codes as input:

  • {{GHS phrases|H220|H230}}H220, H230
  • {{H-phrases|H220|H230}}H220, H230
  • {{P-phrases| P220 | P230}}P220, P230
  • {{H-phrases|H302 + 312}}H302+H312 -- (Predefined combination, recognised)

Pages with errors or warnings show a Preview message. Articles are then listed in Category:GHS errors (0), Category:GHS warnings (0).

Usage

While one can use {{GHS phrases}} stand-alone in text, more common use is in {{Chembox}}, section Chembox Hazards:
DDT GHS phrases
Hazards
GHS labelling:
H301, H351, H372, H410
P201, P202, P260, P264, P270, P273, P281, P301+P310, P308+P313, P314, P321, P330, P391, P405, P501
{{Chembox
| Section7 = {{Chembox Hazards
| HPhrases = {{H-phrases|H301|H351|H372|H410}}
| PPhrases = {{P-phrases|P201|P202|P260|P264|P270|P273|P281|P301+P310|P308+P313|P314|P321|P330|P391|P405|P501}}
}}
}}

Synonyms: {{HPhrases}}

For ease of working in {{Chembox}}, the templates have synonyms (redirects) same as the Chembox parameter name:

|Section3 = {{Chembox Hazards
|HPhrases={{HPhrases|H300}}
|PPhrases={{PPhrases|P300}}
 }}


Parameters

  • The number of phrase code one can enter is practically unlimited. The codes are ordered alphanumeric.
Best practice: add prefix H or P to the number: |H220, not |220.
One template call can only show one prefix set. That is, H- and P-phrases cannot be mixed.
  • |setid= (H or P) can be set to prevent ambiguity in generic {{GHS phrases}}.

For backward compatability, the code prefix "H" or "P" is not required. So {{H-phrases|220}} equals {{H-phrases|H220}}H220. However. Since {{GHS phrases}} covers both H and P, adding the prefix is better.

Code checks added

Omit Rules

|omit=true (default)
Omit Rules as applied by {{GHS phrases}} ()

Omit Rules: when the keep ID is present, do not show the omit ID phrase
• keep H314, omit H318
• keep P203, omit P103
• keep P413, omit P235
• keep H411, omit H401
• keep P411, omit P235
• keep H412, omit H402
• keep H410, omit H400
• keep P236, omit P234

  • Categorised as Category:GHS warnings (0) under "O"
  • Source: "Globally Harmonized System of Classification and Labelling of Chemicals" (pdf). 2021. Annex 3: Codification of Statements and Pictograms (pp 268–385).
  • {{GHS phrases|H314|H318}}H314

Remove Doubles

Repeated phrase codes are removed (hidden):

  • {{GHS phrases|H400|H401|H401|H401}}H400, H401

Other functions

List options

  • Using |list=, {{GHS phrases}} can be presented in various list formats:
|list=abbr, inline, bulleted, unbulleted, horizontal, ordered, horizontal_ordered
|listtype=abbr (default)
P201, P302+P334, P502
|listtype=inline
P201: "Obtain special instructions before use.", P302+P334: "IF ON SKIN: Immerse in cool water or wrap in wet bandages.", P502: "Refer to manufacturer or supplier for information on recovery or recycling."
|listtype=bulleted
  • P201: Obtain special instructions before use.
  • P302+P334: IF ON SKIN: Immerse in cool water or wrap in wet bandages.
  • P502: Refer to manufacturer or supplier for information on recovery or recycling.
|listtype=unbulleted
  • P201: Obtain special instructions before use.
  • P302+P334: IF ON SKIN: Immerse in cool water or wrap in wet bandages.
  • P502: Refer to manufacturer or supplier for information on recovery or recycling.
|listtype=horizontal
  • P201: Obtain special instructions before use.
  • P302+P334: IF ON SKIN: Immerse in cool water or wrap in wet bandages.
  • P502: Refer to manufacturer or supplier for information on recovery or recycling.
|listtype=ordered
  1. P201: Obtain special instructions before use.
  2. P302+P334: IF ON SKIN: Immerse in cool water or wrap in wet bandages.
  3. P502: Refer to manufacturer or supplier for information on recovery or recycling.
|listtype=horizontal_ordered
  1. P201: Obtain special instructions before use.
  2. P302+P334: IF ON SKIN: Immerse in cool water or wrap in wet bandages.
  3. P502: Refer to manufacturer or supplier for information on recovery or recycling.
  • Except for abbr, inline, these list formats are defined in Module:List

Errors and warnings

Phrase codes that are unknown get an inline marker like [?], give a warning in preview and are categorised in Category:GHS errors when in article space.

For example (One can see the warning when previewing this page or section):

  • {{H-phrases|H220|H999}}H220, H999[?]

Templates

H-phrases

{{H-phrases|H200|H241}}H200, H241
{{H-phrases|H302+H312}}H302+H312
Code Phrase

P-phrases

{{P-phrases|P101|P263}}P101, P263
{{P-phrases|P306+P360}}P306+P360
Code Phrase

GHS phrases

  • {{GHS phrases|H220}}H220
  • {{GHS phrases|P220}}P220

GHS inline

  • {{GHS inline}} lists the phrases inline, to be used in regular sentences.
{{GHS inline|H220|H401}}H220: "Extremely flammable gas", H401: "Toxic to aquatic life"
{{GHS inline|P220|P501}}P220: "Keep/Store away from clothing/.../combustible materials.", P501: "Dispose of contents/container to ..."
See also § List options.


Errors and warnings

Unknown phrase code
  • {{GHS phrases|H220|H999}}H220, H999[?]
Set id missing
Set id is entered as |setid=<H, P>, (default in {{H-phrases}}, {{P-phrases}}), or when |setid= is absent, is sought in the code list entered: H from {{GHS phrases|310|H341}}H310, H341
  • {{GHS phrases|321|310|H341}}H310, H321[?], H341
Could not find a set id
  • {{GHS phrases|302+312}}-- (missing prefix H/P may leave undecided results (ambiguity))


Overview

Some settings are available to present an overview of the phrases. They are article-ready.

Number of phrases

  • {{GHS phrases/number of phrases|setid=P}} → GHS P-phrases (160)
  • {{GHS phrases/number of phrases|setid=H}} → GHS H-phrases (110)

Complete list (table)

|setid=H, P. Required.
|title= Optional. Default is: see § Number of phrases.
|state=collapsed Optional. Default is: uncollapsed.

Tracking

Help/documentation page: Template:GHS phrases
Category:GHS errors (0)
Category:GHS warnings (0)

Template data

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.

TemplateData for GHS phrases

Template Data

Formats and presents predefined GHS hazard statements.

Template parameters

ParameterDescriptionTypeStatus
11

Phrase code

Example
H220, P431
Stringsuggested
22

no description

Unknownoptional
33

no description

Unknownoptional
44

no description

Unknownoptional
55

no description

Unknownoptional
66

no description

Unknownoptional
77

no description

Unknownoptional
88

no description

Unknownoptional
99

no description

Unknownoptional
1010

no description

Unknownoptional
set IDsetid

Defined plain numbers to be "H" or "P"; better add prefix to number: "H220"

Suggested values
H, P
Stringoptional
Omit Rulesomit

Apply Omit Rules like "omit (remove) P203 when P103 is present"

Default
true
Example
yes
Booleanoptional
List typelisttype

List format of the result

Suggested values
abbr, inline, bulleted, unbulleted, horizontal, ordered, horizontal ordered
Default
abbr
Example
listtype=bulleted
Stringoptional

See also

Development

Errors and warnings (newdoc)

Errors
All errors show a preview-message in Preview.
Categorisation is in Category:GHS errors (0), articles only (mainspace).
  • |setid=H, P, <blank> missing
  • |setid=XYZ not recognised
When entered: in {{GHS phrases}}, a setid check is enforced. Is present by default in {{H-phrases}} etc.
When setid is missing, any first setid in the codes-list is used. So |310 |3220 |H333H.
This also occurs when setid=H and a P-phrase is entered.
In certain listings, like {{GHS phrases/list all}}, a blank setid returns the full list (all H- and P-phrases). No error.
Catsort: H, P,
  • Phase codes that are not in the list (like |H999) generate an error → error
  • Parameter unknown |foo=: catsort under U
Warnings
All warnings show a preview-message in Preview.
Categorisation in Category:GHS warnings (0), articles only (mainspace).
  • When § Omit Rules is applied, a warning is made mentioning the two involved phrase codes. Catsort=O
  • When § Redundancy is present, a warning is made mentioning the involved phrase code. Catsort=D

dev links

Subtempaltes
Source: "Globally Harmonized System of Classification and Labelling of Chemicals" (pdf). 2021. Annex 3: Codification of Statements and Pictograms (pp 268–385).
Chembox
Definition of phrases

Developments

Category:Chembox templates (24)
Category:Chembox tracking categories (0)
| GHSPictograms = 
| GHSSignalWord = 
| HPhrases      = {{HPhrases|}}
| PPhrases      = {{PPhrases|}}
| GHS_ref       = 
Pictogram Code Symbol description Image link
GHS01: Explosive GHS01 {{GHS exploding bomb}} Image:GHS-pictogram-explos.svg Explosive
GHS02: Flammable GHS02 {{GHS flame}} Image:GHS-pictogram-flamme.svg
GHS03: Oxidizing GHS03 {{GHS flame over circle}} Image:GHS-pictogram-rondflam.svg
GHS04: Compressed Gas GHS04 {{GHS gas cylinder}} Image:GHS-pictogram-bottle.svg
GHS05: Corrosive GHS05 {{GHS corrosion}} Image:GHS-pictogram-acid.svg Corrosive
GHS06: Toxic GHS06 {{GHS skull and crossbones}} Image:GHS-pictogram-skull.svg Accute Toxic
GHS07: Exclamation mark GHS07 {{GHS exclamation mark}} Image:GHS-pictogram-exclam.svg Irritant
GHS08: Health hazard GHS08 {{GHS health hazard}} Image:GHS-pictogram-silhouette.svg Health Hazard
GHS09: Environmental hazard GHS09 {{GHS environment}} Image:GHS-pictogram-pollu.svg Environment
See also
{{H-phrases}}, {{P-phrases}}, Category:GHS templates

References

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