Template talk:ICD10

message: :NB See the template page itself for current explanation of use
This template is a little more complicated than others, so an explanation of its use is provided below.
The goal of the template is to directly link to the World Health Organization's ICD-10 website. Unfortunately, the design of that website and the design of MediaWiki mean that certain compromises had to be made in the template.
===Capitalization===
The ICD10 code R03 is for "Abnormal blood-pressure reading, without diagnosis". The WHO website uses lowercase letters for the chapter, as follows:
* http://www3.who.int/icd/vol1htm2003/gr00.htm#r03
Attempts to see if upper case letters succeeded yielded the following results
* http://www3.who.int/icd/vol1htm2003/gR00.htm#r03 -- worked OK
* http://www3.who.int/icd/vol1htm2003/gr00.htm#R03 -- got to correct page, but not correct anchor
* http://www3.who.int/icd/vol1htm2003/gR00.htm#R03 -- got to correct page, but not correct anchor
So we need to present lower-case letters to the WHO website. But we have to present upper-cases letters to the wikipedia page, and there is no "upper(x)" function available. So, for now, the parameters are presented redundantly, with both a lower and upper-case version passed. The lower-case version is the second-to-last parameter, so that if someone else can solve this technical challenge, the final parameter could be eliminated in future use without breaking already deployed uses of the template. 
===Determining the page===
To add further complexity, compare the following three entries:
* A03: http://www3.who.int/icd/vol1htm2003/ga00.htm#a03
* A38: http://www3.who.int/icd/vol1htm2003/ga30.htm#a38
* A60: http://www3.who.int/icd/vol1htm2003/ga50.htm#a60
From this, we know that there is an additional parameter that needs to be passed, to identify which page the code is on. There isn't any predictable relationship, but if you go to the WHO site and search on the condition, and then scroll to the top, you can identify what the first code on the page is, and use that to identify the last parameter.
===Examples of use===
All of the above may seem confusing, but examples should make it clearer:
* A03: : 
* A38: : 
* A60: : 
* G08: : 
* M83.2: : 
* P04.1: : 
* R03: : 
Note that there is no period inside "P04.1" when presented by the template. There doesn't appear to be any way to make the period optional. However, the presentation of the ICD code without the period is also commonly found on the web (for example, at this site) so the confusion caused by the omission of the period should be minimal.
Suggestions and feedback are welcome. Despite the limitations of the template, it still should be useful in making the classification of medical articles easier to validate against external sources. --Arcadian 20:15, 22 December 2005 (UTC)
thread_title: Explanation of template prior to Oct'06

message: All of the above may seem confusing, but examples should make it clearer:
* A03: : 
* A38: : 
* A60: : 
* G08: : 
* M83.2: : 
* P04.1: : 
* R03: : 
Note that there is no period inside "P04.1" when presented by the template. There doesn't appear to be any way to make the period optional. However, the presentation of the ICD code without the period is also commonly found on the web (for example, at this site) so the confusion caused by the omission of the period should be minimal.
Suggestions and feedback are welcome. Despite the limitations of the template, it still should be useful in making the classification of medical articles easier to validate against external sources. --Arcadian 20:15, 22 December 2005 (UTC)
thread_title: Examples of use

message: (for reference, this is a copy of this message left at User talk:Cwray:)
Per your recent changes to the template at Template:ICD10 -- I understand your goals, but your changes are breaking a lot of links. Your first change broke the links completely, which is why I reverted. Your second change appears intended to support a new format, where a decimal is included explicitly in the third parameter. Unfortunately, that is breaking the decimal-level linking for the thousands of pages where the template is already used.
I'm not opposed to changes to the template as long as they don't harm the existing links. It appears that your goal is to get the decimal to be optionally visible, depending upon the parameters provided. Perhaps there is a way to achieve that in MediaWiki, or if there isn't today, there may be a way to do so in the future as the software improves. But I ask that you please be more careful when editing these templates. Also, please leave a Edit summary when making changes. Thanks!
I know there are a lot of technical challenges when working with these templates, so if you have any questions, feel free to ask me questions on my talk page, and I'll be happy to answer the best I can. 
Happy editing, and thank you for your contributions to Wikipedia. --Arcadian 10:55, 29 June 2006 (UTC)
thread_title: Updates

message: ICD10 codes links nolonger seem to work today because the WHO has reconfigured its web site.
Hence K22.7 for Barrett's oesophagus previously marked up as () was converted by this template to the URL http://www3.who.int/icd/currentversion/gk20.htm#k227
Now however the template needs to point to http://www.who.int/classifications/apps/icd/icd10online/?gk20.htm+k227
Note I initially tried using the link provided by the WHO's own search page  http://www.who.int/classifications/apps/icd/icd10online/gK20.htm#k227 but this fails to work. Whilst one is initially taken to the top of the right web page, one is then immediately jumped to a bad link within the page, thus showing just an error message - presumably due to some programming action within the web page? So for now I've changed the template to be the URL that searches for the ICD10 code, rather than being a true URL address - still it seems to work well enough for now. David Ruben  Talk  14:17, 24 October 2006 (UTC)
replies: text: Thanks for fixing it. --Arcadian 02:28, 25 October 2006 (UTC)
thread_title: Oct 2006 changes to WHO website

message: I'd like to add the Finnish template to the interwiki: :fi:Malline:ICD10. Thank you. -Yupik 07:01, 4 May 2007 (UTC)
replies: text: but it is worth noting that the link was added to the doc page, which was not protected.  --Selket Talk 07:53, 4 May 2007 (UTC)
thread_title: Editprotect

message: Please remove the  from this template; it already has a category.--Old Hoss 18:58, 6 August 2007 (UTC)
replies: text: This template is not categorized, and  is on the /doc subpage, which is editable by anyone. --MZMcBride 19:11, 6 August 2007 (UTC)
thread_title:  Remove uncategorized tag 

message: 
Apparently the WHO reorganized their website again. Please change www.who.int to apps.who.int in the template, as was done in the sandbox. The old domain still works, but it causes extra network traffic and extra work in the user's browser and the WHO websites. Thanks. Eubulides (talk) 17:22, 7 July 2009 (UTC)
replies: text: Done. --- RockMFR 02:47, 8 July 2009 (UTC)
thread_title:  www.who.int → apps.who.int 

message: WHO's urls have changed again. This time simplified, making the 4th and 5th obscure parameter obsolete ;-)  I've changed the template on wiki-nl but since it's protected here... - Bemoeial (talk) 13:46, 27 October 2011 (UTC)
replies: text: Hmm, I left a message on the talk page of ICD-10 Chapter V: Mental and behavioural disorders, but now I see it's this template which is the culprit. Apparently no one is watching this page and it's protected, so I will see if I can get it unprotected or fixed somehow. Jane (talk) 09:03, 30 October 2011 (UTC)

text: Done I'll leave it to you to update the documentation; editing Template:ICD10/doc needs no special rights. Anomie⚔ 17:26, 31 October 2011 (UTC)
thread_title:  Changed again 

message: I've tried to use the template to link to G47.23 ...which doesn't work. The site that is linked to, is simply not good enough.--ZarlanTheGreen (talk) 05:09, 7 June 2014 (UTC)
thread_title:  Template doesn't really work 

message: I'd like to propose simplifying this template such that it only takes one parameter - the complete ICD-10 code. This can then be passed to the WHO URL and work just as it works now. No existing template links would need to be changed, as the existing parameters could still be used in the current way, just depreciated. The only functional change would be that the entire ICD-10 code would link to the WHO page, rather than the first letter linking to the Wikipedia page. (And one could argue that having 2 separate links within the same word is against WP guidelines.) I propose this since  is moving towards utilizing Wikidata, and the Wikidata parameter for ICD-10 codes will contain only the entire code not broken down into its components. While the string function templates could be used to replicate what this template is currently doing, it is entirely unnecessary and adds to the load time. --Scott Alter (talk) 04:41, 21 October 2014 (UTC)
replies: text: What in the template would need to be changed to implement this?  Blue Rasberry (talk) 19:04, 21 October 2014 (UTC)
replies: text: I'm not exactly sure what you're asking. There would be changes to the coding and how it is displayed. The template would end up looking like , both in the coding and on the front end. (But it would still keep legacy support for the additional 2nd and 3rd parameters.) No need for any conditional statements. Functionally, the only loss would be the link to the ICD 10 group code Wikipedia page, which can be reached by clicking on the "ICD-10" link displayed in the column to the left in infoboxes. For example, H05.5 currently is coded as  and displayed as . After the change, it would be coded as  and displayed as H05.5. But the using the 3 separate parameters would still function. --Scott Alter (talk) 19:22, 21 October 2014 (UTC)
replies: text: I updated the Template:ICD10/sandbox. I'll update the template tomorrow if I don't hear any objections. --Scott Alter (talk) 03:15, 24 October 2014 (UTC)
thread_title:  Parameter simplification 

message: At Attention deficit hyperactivity disorder I was about to change the infobox, boldly to icd10data from WHO, and then saw that the link is done with a template.
I'm not sure there's any policy that says you should use this template. But as it seems to link to outdated info (Hyperkinetic disorders vs. ADHD, even icd9data.com says ADHD, is this a question of international ICD vs. American ICD?). I think I'll do this. I just thought, maybe the template should be changed (or given an option of pointing to a/the other page?). comp.arch (talk) 19:57, 8 August 2015 (UTC)
replies: text: Apologies, , I misread what you were asking. There is a proposal at Template talk:Medical resources#REQ: ICD-10-CM for ICD-10-CM to have it's own field in the classification section of template:infobox medical condition and template:medical resources. Any comments/support/opposition is welcome. Little pob (talk) 12:46, 28 March 2018 (UTC)
thread_title:  icd10data.com vs. WHO 

message: Hi, how does one use  to specify a range of ICD10 codes. Such as in Audiometry, the audiometry tests are a range of F13Z1 - F13Z6. Should I just make a list of the 6 codes? Thanks, Waddie96 (talk) 10:53, 7 April 2018 (UTC)
replies: text: Please use  for codes from ICD-10-PCS - noting that the EL/verification links generated by the PCS template do appear to be broken at this time. With that said, WP:MEDMOS has no preference for how to list classification codes. Unless it's possible to link to a block or category level,  tend to list each code. However,  without the guidance from MEDMOS, it's ultimately up to you. (Though I'd recommend taking a consistent approach.) Little pob (talk) 15:07, 7 April 2018 (UTC)
thread_title:  Range of ICD10 codes 

message: Hi, can someone update the URL to look at the 2019 version of ICD-10 please? The URL should be: https://icd.who.int/browse10/2019/en#/ (i.e. switch 2016 to 2019) I'll update the documentation page once done. Little pob (talk) 09:08, 11 March 2020 (UTC)
replies: text:  Done Please update the documentation. :d:Q45127 may need some attention too. Cabayi (talk) 07:30, 12 March 2020 (UTC)
replies: text: Thanks. Documentation updated. Little pob (talk) 08:50, 12 March 2020 (UTC)
replies: text:  Can you also change the rest of the url? Currently, it is apps.who.int/classifications/icd10/browse/2019/[code], but this automatically redirects the user to icd.who.int/browse10/2019/en#/[code], which the WHO apparently prefers. It is advised to link directly, as the redirect might stop working someday. Cheers, Manifestation (talk) 20:35, 14 March 2020 (UTC)
replies: text:  I hadn't spotted that. Unfortunately, I don't have template editing privileges (I don't feel WP:COMPETENT enough to request them either). Instead I've changed the ans= back to "no", but will update the documentation. Little pob (talk) 16:59, 15 March 2020 (UTC)

text: Done Izno (talk) 17:59, 15 March 2020 (UTC)
thread_title:  ICD-10 2019 

message: Applying the manual of style's guidance on ranges to the template currently causes the link generated to send the reader to a "Not Found" page when they click through. Examples: 
*Hyphen  
*Endash  
*Emdash  
There's an argument to be made to ignore the MOS's super-consensus in this instance. Is there a way the template can be made to convert an endash or emdash to a hyphen when sending the reader to the WHO website, however, so that we don't have to? Little pob (talk) 10:18, 29 August 2023 (UTC)
thread_title:  Linking to ranges within the template currently incompatible with [[MOS:RANGE]]