Jump to content

Template talk:Medical resources/Archive 3

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1Archive 2Archive 3

Adding a new "terminology" to the template

What is the process for adding a new item to the template? I have updated the documentation and would like to understand (lock icon). Can I kindly try to ask users like Galobtter to help. This item https://www.wikidata.org/wiki/Q178194 now has on WD the code for SNOMED CT added. I want to add a lot more links to WD but only if it is good for something. E.g., if it shows up on this infobox. So the fruits of the labor show up (by means of a generated infobox) via this template. I want to test it on Cystic Fibrosis article. Wikidata here https://www.wikidata.org/wiki/Q178194 has as of last week the code under the property https://www.wikidata.org/wiki/Property:P5806 Wuser6 How can a new terminology be added. I guess I need to specify {{{SNOMEDCT}}} thingy somehow (talk) 20:07, 21 September 2018 (UTC)

@Wuser6: It's best to test your edits before making changes to a widely used template like this. You can do your testing by making changes to Template:Medical resources/sandbox and then previewing the effects in an article that uses Template:Medical resources. I've just enabled the sandbox to fetch the ICD10 and ICD10-CM codes from Wikidata if there's no value supplied for them as local parameters. If you can make sense of those changes, you should be able to make the changes you want to implement a parameter for SNOMEDCT. Otherwise, you'll need to tell us whether it should display on the first or second line of this template if you want somebody else to help you. --RexxS (talk) 22:22, 21 September 2018 (UTC)
@Wuser6: Adding SNOMED terms has been breifly discussed here before: Template talk:Medical resources#Are SNOMED CT suitable to be added in this template ASFAIK those concerns still stand. Unless the licensing has changed, you'd need to clarify with SNOMED International whether WP and WD have a license to display the SNOMED CT identifiers. (Worth noting that WP etc is a US entity; and – because the US is a member of SNOMED International, and member states have a free license to use SNOMED CT – it could be that we have an implied license.) If SNOMED International are willing to grant the WMF a license to display SNOMED CT on WP and WD, they should ideally post that license on the talk page of their WP article and/or somewhere on their website.
Even if we have a license though; it doesn't alter my concern around the number of SNOMED CT identifiers we could end up listing. And it might be prudent to run an RfC to see if there is consensus for inclusion, as WP:NOTDIR could apply. Little pob (talk) 11:31, 22 September 2018 (UTC)

How to introduce it on a page

Consider this page on hot flashes. https://en.wikipedia.org/wiki/Hot_flash It does not use the medical resources at all now but it could and should. How do I introduce {{Medical resources.. it to the page). The content should only be taken from wikidata here https://www.wikidata.org/wiki/Q1858291 . So I would expect to only say one keyword (place generated box here) and the magic code would do the rest. Please help. EncycloABC (talk) 20:25, 28 February 2019 (UTC)

I can see the medical resources template on the page – it's at the top of the external links section.
Do you mean it is was blank, and feel it should autopopulate from WikiData? Currently, there is only consensus for using WD within infoboxes,[1] and this template isn't an infobox (though its contents did used to be in one). Little pob (talk) 09:12, 1 March 2019 (UTC)
@Little pob: It is true we have site-wide consensus to allow drawing data from Wikidata for infoboxes; and there is site-wide consensus against drawing from Wikidata for prose. However, the question of its use in templates such this and {{Authority control}} have remained a grey area, where local practice seems to be leaning toward tolerating. --RexxS (talk) 16:10, 1 March 2019 (UTC)
Thanks, @RexxS:. Interesting. It also appears my sole reason for objecting to pull classification codes from WD (mentioned in earlier discussions above) was fixed quite a while ago too. I'd be happy to support an RFC on this (if one is required). Little pob (talk) 16:40, 1 March 2019 (UTC)
@Little pob: I agree with your previous position that where the data from Wikidata is not verifiable, we are best not to try to use it. On the other hand, there are things like Patientplus ID (P1461) and Commons category (P373) that are their own verification (just follow the link!), so there's probably a spectrum of data reliability when we look at what might be used. One of the problems we've encountered over the years is that enthusiastic Wikidatans have tried to push too fast beyond what a significant proportion of the community are content to tolerate. That has generated push-back to the extent that English Wikipedia is far behind other major projects in its adoption of even uncontroversial items drawn from Wikidata. For that reason I'd still counsel erring on the side of caution – slow progress is still progress. --RexxS (talk) 17:12, 1 March 2019 (UTC)
Well, someone placed it there before I could learn how it is to be done. Please provide steps one should do when introducing this this box to a page. Don't do it for the person. Just explain a how to guide. EncycloABC (talk) 03:12, 5 March 2019 (UTC)
@EncycloABC: the box was there when you posted, it was just empty. Even though it isn't listed on WD, as a trained clinical coder, I was comfortable adding the ICD-10 code. I just copy and pasted the MeshID from WD (after checking it was valid). I see you've worked out how to do this.[2] Of note though, although it's listed in the documentation, SNOMED CT concepts are not yet parsed by the template. If you still need help, please post back. Little pob (talk) 18:39, 5 March 2019 (UTC)

Are SNOMED CT suitable to be added in this tempalte

Are SNOMED CT suitable to be added in this tempalte? --Linforest (talk) 12:55, 26 November 2017 (UTC)

Appears to be proprietary? [3] Doc James (talk · contribs · email) 00:01, 27 November 2017 (UTC)
Yep. SNOMED CT are not issued under a license compatible with inclusion on WP. Also, some conditions (e.g. Hypertension) can have over a hundred concepts! Little pob (talk) 13:27, 20 December 2017 (UTC)
SNOMED CT license is strict when it is used for analysis of data. Reading a wikipedia article is not analysis of data. A new property for SNOMED CT now exists https://www.wikidata.org/wiki/Property:P5806 Wuser6 (talk) 17:12, 19 September 2018 (UTC)
@Wuser6: I've not read the legalese of the licensing agreement; but this is from the SNOMED International website Usage of SNOMED CT requires a license. If you are using and/or deploying SNOMED CT in a non-Member country/territory, please apply for a license through the Member Licensing & Distribution Service (MLDS). If you are deploying SNOMED CT in a Member country, please register your use with the National Release Center (NRC) of that country (emphasis mine).[4] You also mentioned on the WD proposal for having a SNOMED CT property that a license is only needed for anaylising data; could you indicate where you got that from? (FWIW this isn't about not having SNOMED CT terms listed, especially as the license would probably be free as the WMF is a US entity.) Little pob (talk) 16:03, 25 September 2018 (UTC)
(I did a mini legal review). Per https://www.snomed.org/snomed-ct/get-snomed-ct usage of SNOMED CT requires a license.

Two usage modes are defined (with identical fees). See https://www.snomed.org/resource/resource/485

  • 1. Data Analysis System = a computer system that is used to analyze records or other data that is encoded using SNOMED CT, but not if that system is also a Data Creation System;
  • 2. Data Creation System = a computer system that is used to create records or other data that is encoded using SNOMED CT;
If wikipedia user updates a wikipedia infobox (infoboxes are edited in wikidata), no patient-level records (encoded using SNOMED CT) are created as a result. Thus, this use does not satisfy the definition of use in data creation system. A reader of the infobox in wikipedia article is not performing any analysis.

Significant portion of English wikipedia readers comes from Member countries or from band-E low income countries (by World Bank).

SNOMED CT License agreement is somewhat ambiguous what happens if use does not fall under any of the enumerated uses (data analysis or data creation) (those that clearly define associated fees). One interpretation is that such use does not require fee payment. E.g., having a Personal Health Record exported from Epic MyChart that contains SNOMED CT codes. (a vision some try to achieve) - the record was exported in USA but the patient is now in Germany. Is such PHR use in Germany (viewing it on his/her phone) in violation of SNOMED CT license?
Ideally, IHTSDO would answer the question posed here (on their official confluence site): https://confluence.ihtsdotools.org/questions/73369453/tweak-license-to-allow-use-in-wikipedia Wuser6 (talk) 20:24, 1 October 2018 (UTC)
SNOMED International in May 2019 announced wider availability for interoperability and more openness to use of the identifiers. EncycloABC (talk) 15:12, 5 June 2019 (UTC)

Documentation

I've been working on improving the template's documentation. Does anyone have any comments or concerns with the changes? (Notifying on talk page because I've noticed that the documentation sub page wasn't automatically on my watchlist even though the template page is.) Little pob (talk) 14:55, 7 June 2019 (UTC)

Thanks for all that work, Little pob. I notice that "The "Patient UK" label output is not an editor definable parameter. It is always populated from Wikidata." When I checked that, I saw that the same is true for the National Cancer Institute field. It's not a good idea to have content pulled from Wikidata that can't be overwritten by a local parameter value. Shall I fix those two fields to allow a local parameter? If so, what name would you like to use for the Patient UK field parameter? --RexxS (talk) 15:57, 7 June 2019 (UTC)
Re: NCI, I hadn't spotted that it wasn't definable locally. If they need adding overridable parameters, I think PatientUK would make most sense - i.e. is comparable with most of the other parameters, and the editor doesn't have to faff about with dashes or underscores. (PUK and PatUK would work also, but are less descriptive names.) Little pob (talk) 18:45, 7 June 2019 (UTC)
@Little pob: I've updated the template. Here are some tests: osteoporosis (Q165328) has a PatientplusID, but no NCI ID; lung cancer (Q47912) has both.
  • {{Medical resources|QID=Q165328}}
  • {{Medical resources|QID=Q165328|PatientUK=XXX}}
  • {{Medical resources|QID=Q47912}}
  • {{Medical resources|QID=Q47912|PatientUK=YYY|NCI=ZZZ}}
Those all seem to be working as expected. Would you like to update the documentation? --RexxS (talk) 19:20, 7 June 2019 (UTC)
@RexxS: thanks. Document updated to reflect local override. Little pob (talk) 19:47, 7 June 2019 (UTC)
Great to see more testing and discussion. EncycloABC (talk) 17:16, 12 June 2019 (UTC)

RfC Pull classification codes from WD

edit: Revised implementation below is modified and allows WD as source and be overriden by WP.EncycloABC (talk) 15:25, 5 June 2019 (UTC)

Based on RexxS suggestion, I am proposing to only maintain knowledge in one place (WD) and pull content for classification from WD. (and not in two places, WD and on wikipedia). I need also help in making a formal RfC. This is my first. — Preceding unsigned comment added by EncycloABC (talkcontribs) 03:29, 5 March 2019 (UTC)

@EncycloABC: Guidance on starting and running an RfC can be found at Wikipedia:Requests for comment. Even if there is consensus for integrating WD into this template, I have a feeling you won't get support for WD to override locally entered information (i.e. WP). Little pob (talk) 13:34, 6 March 2019 (UTC)
@EncycloABC: This is similar to Template:Taxonbar -- there used to be a template "TaxonIds" that was manually added to every page, and it has since been superseded by one pulling data from WikiData. This could certainly be a model for this effort. MichaK (talk) 14:52, 29 April 2019 (UTC)
For procedures, and for some classifications - there is often no legacy data (manually entered) on WP. So if we pull from WD there is no conflict. Can someone please check in my attempt in Sandbox for medical resources to pull from WD from SNOMED CT is written correnctly?
@EncycloABC: This is how to do your testing:
Testing with osteoporosis (Q165328):
  • {{Medical resources|QID=Q165328}}
  • {{Medical resources/sandbox|QID=Q165328}}
As you can see by following the link, that works. If you use a local value, it should always override fetching from Wikidata:
  • {{Medical resources/sandbox|QID=Q165328|SNOMED CT=12345678}}
That is of course, a dummy value (12345678), but it proves that the local override is functioning.
Obviously, if the update is accepted, you'll also have to update the documentation. The the local parameter is |SNOMED CT=, to force the override. --RexxS (talk) 20:47, 4 June 2019 (UTC)
This solution addresses concern that WD is used but can be overriden using the "traditional" mechanism. (WP knowledge overrides WD knowledge). The next step is to move existing sandbox implementation (thank you RexxS) into "production". (after any other steps (e.g., this RfC) are also satisfied). Please help with how to move this forward. EncycloABC (talk) 15:23, 5 June 2019 (UTC)
@EncycloABC: I would treat the discussion here so far as an "informal" RfC. Now you have something working in the sandbox, perhaps you should now advertise it by making a post at WT:WPMED asking for views. You will only need a formal RfC if other editors have posted objections to what you're trying to accomplish.
If you don't get any dissenting opinions in a few days, then you could simply assume that consensus exists and make an edit request - see Wikipedia:Edit requests #Making requests. Use Template:Edit template-protected with a request something like "Please update the main template from its sandbox to include SNOMED CT links. The tests shown indicate that it works as expected." But please make sure you don't make an edit request until you're satisfied that a consensus has been reached. That requires a little patience to make sure folks have time to disagree if they want to. Cheers --RexxS (talk) 17:36, 5 June 2019 (UTC)

@EncycloABC, Doc James, and Ozzie10aaaa: As there seems no dissent, I've updated the main template from the sandbox so that it now incorporates |SNOMED CT=. We don't need a formal RfC when we have consensus in discussion. Cheers --RexxS (talk) 17:53, 12 June 2019 (UTC)

edit request

I am new to edits to protected widgets. So please be patient with me.

Start of request: Please update the main template from its sandbox to include SNOMED CT links. The tests shown indicate that it works as expected.

EncycloABC (talk) 17:55, 12 June 2019 (UTC)

Already  Done --RexxS (talk) 19:10, 12 June 2019 (UTC)

how to test sandbox version of the template

I like that I can test the code like this.

However, if I make edits to the sandbox version, is there a way to test it ? something like bracket bracket Medcal resources/SANDBOX |QID=Q47912 bracket bracket. SOrry, don't now how to escape bracket too. EncycloABC (talk) 16:35, 17 October 2019 (UTC)

LOINC code

This concept https://en.wikipedia.org/wiki/Human_height has a linked LOINC ID. I propose to add LOINC to medical resources. EncycloABC (talk) 20:00, 19 August 2019 (UTC)

Why wikidata properties are not used?

This Template does not use wikidata properties: "ICD-10"(494), "ICD-10-CM"(4229), "ICD-9"(493), "ICD-9-CM"(1692), "ICD-O"(563), "OMIM ID"(492), "MeSH ID"(486), "DiseasesDB"(557), "MedlinePlus ID"(604), "SNOMED CT" (5806) "Patientplus ID"(1461), "National Cancer Institute ID"(1395).

What the problem to connect the wikidata properties with this template? Is there any serious reason to do not use the wikidata properties? Or it is just template-coding problem? If there is no serious reason, I can make this template to use wikidata properties (in the Sandbox and request to update the template then). — Chemmalion (talk) 13:45, 20 August 2018 (UTC)

@Chemmalion: Just to clarify; are you offering to have template auto-populate any missing codes/identifiers from Wikidata? If so, I'm reluctant for this to happen. This is because I don't trust the ICD-10 codes listed on WD. The reason behind that is there was a bot adding ICD-10-CM codes to the ICD-10 property. I know the bot was fixed after the creation of the ICD-10-CM property; but I don't know if the erroneous codes were ever reverted? I'll notify WP:MED though for more voices. Little pob (talk) 12:55, 21 August 2018 (UTC)
"I'll notify WP:MED though for more voices."  Done[7] Little pob (talk) 13:01, 21 August 2018 (UTC)
There is no consensus to allow the use of Wikidata to populate templates like this. See Wikipedia:Requests for comment/Wikidata Phase 2. The problem is that many editors don't trust the information stored on Wikidata because most of it is unsourced and the Wikidata community does not enforce any policy on verifiability, nor does it have a sufficient editor base to effectively combat petty vandalism. --RexxS (talk) 16:49, 21 August 2018 (UTC)
Thank you, @Little pob: and @RexxS:. The reasons are really serious. — Chemmalion (talk) 17:20, 21 August 2018 (UTC)
I would agree w/ RexxS assessment--Ozzie10aaaa (talk) 20:06, 21 August 2018 (UTC)
Well we nearly have the ability to ONLY see changes to Wikidata that occur to properties used within EN WP articles on our watchlist, it is not working fully yet. Plus the above. Doc James (talk · contribs · email) 03:21, 22 August 2018 (UTC)
I am confused. Assuming we are not using wikidata properties. If someone wants to provide their edit (extend the mapping) - should they do it on wikidata or on page source? (e.g., in Disease infobox, specialty is imported from wikidata. So we trust WD for that but not for other things? Just because one bad bot, we should not discount the value of WD edits (winning over other edits). Wuser6 (talk) 17:26, 19 September 2018 (UTC)
@Wuser6: It's best to put your signature at the end of your comment as most folks will expect to see it there. We are clearly allowed to import from Wikidata into infoboxes because the RfC I mentioned earlier specifically agreed that it would be allowed, but specifically disallowed it in the normal prose of an article. The status of other types of display such as this template is unclear. Perhaps we could fetch Wikidata into this box and nobody would complain. But that is probably wishful thinking. --RexxS (talk) 18:54, 19 September 2018 (UTC)
I would like to re-open the problem of import from WD. There are pages, where no manual entry exist, yet on WD there are linked resources. I would like to help with that import feature specifically on pages where no non-WD info exists. There is no case for complaining in this instance. For example on page https://en.wikipedia.org/wiki/Vasectomy_reversal, there are WD links but on wikipedia, no manual links to resources exist.EncycloABC (talk) 19:20, 31 May 2019 (UTC)
This template should use values from Wikidata, just as {{Authority control}} does. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:55, 14 August 2019 (UTC)
@Andy, Little pob, EncycloABC, and Wuser6: Given that nobody has complained about the last addition which drew from Wikidata, I'm more optimistic about upgrading the remaining items without attracting more arguments. The sandbox Template:Medical resources/sandbox is now synchronised with the main template, so perhaps someone would like to make the changes in the sandbox ready for testing? --RexxS (talk) 18:20, 18 August 2019 (UTC)
I've grabbed some of the WD property IDs. (Any marked with a ??? are those I couldn't find on a quick search. Those more familiar with WD might have more luck.)
  • ICD10 = P494
  • ICD10CM = P4229
  • ICD9 = P493
  • ICDO = P563
  • OMIM = P492
  • DiseasesDB = P557
  • Curlie = P998
  • MedlinePlus = P604
  • eMedicineSubj = ???
  • eMedicineTopic = P673
  • PatientUK = P1461
  • MeshID = P486
  • GeneReviewsNBK = P668
  • GeneReviewsName = ???
  • NORD = ???
  • GARDNum = P4317
  • GARDName = ???
  • Orphanet = P1550
  • AO = ???
  • RP = ???
  • WO = ???
  • OrthoInfo = ???
  • NCI = P1395
  • Scholia = ???
  • SNOMED CT = P5806
  • ICD10PCS = P1690
Of note; the way the template currently handles the eMedicine paramaters appears to be partially broken (see Hypertension as an example). Little pob (talk) 12:49, 19 August 2019 (UTC)
@Little pob: That's because the site designers at eMedicine thought that it would be fun to "integrate the site more fully" into Medscape by scrapping all the old ids and making new ones. Hypertension is now at https://emedicine.medscape.com/article/241381-overview  – ironically, Wikidata has the correct id:
while the English Wikipedia doesn't. That indicates the value of keeping this sort of changeable information in a central database. --RexxS (talk) 13:33, 19 August 2019 (UTC)
Thank you for making the change. I think WD is indeed the future of keeping things organized.EncycloABC (talk) 14:22, 19 August 2019 (UTC)
LOINC property should be added https://www.wikidata.org/wiki/Property:P4338 EncycloABC (talk) 20:02, 19 August 2019 (UTC)

Extra carriage return at the top of the template?

Greetings and felicitations. There seems to be an extra carriage return at the top of the template, e.g., in Takotsubo cardiomyopathy#External links below "Death by voodoo: truth or tale?". Would someone try deleting the carriage return after the </noinclude> to see if this fixes the problem? Otherwise I don't have a clue as to what is causing it. (I'm assuming others can see it at all.)

@DocWatson42: That fixed it (clear your cache to see the change). Thanks for spotting the issue. --RexxS (talk) 23:17, 25 September 2019 (UTC)
@RexxS: It did, you're welcome, and thank you (in turn) for fixing it. ^_^ (I apologize for forgetting to sign my comment above.) —DocWatson42 (talk) 23:42, 25 September 2019 (UTC)

Adding ICD-10

@Little pob: Start by retrieving the ICD-10 from pneumonia (Q12192), for example, and see what it looks like:

  • {{wdib |ps=1 |qid={{{QID|Q12192}}} |P494 |{{{ICD10|}}}}} → J18.9

Note that: (1) you have to use {{{ICD10|}}} not {{{ICD10}}}; (2) there are multiple values, so you can't just append it to http://apps.who.int/classifications/icd10/browse/2016/en#/ The current link for viral pneumonia's ICD-10 ends up at https://icd.who.int/browse10/2016/en#/J12 so we can use https://icd.who.int/browse10/2016/en#/ to generate the link. Because we have multiple values, we need to use the |linkprefix= parameter which prefixes each link with the ICD-10 website path:

  • {{wdib |ps=1 |qid={{{QID|Q12192}}} |P494 |linkprefix=https://icd.who.int/browse10/2016/en#/ |{{{ICD10|}}}}}J18.9

So the complete entry would be:

  | {{#if: {{wdib |ps=1 |qid={{{QID|}}} |P494 |{{{ICD10|<noinclude>x</noinclude>}}} }}
    | '''[[International Statistical Classification of Diseases and Related Health Problems|ICD]]-[[ICD-10|10]]''': {{wdib |ps=1 |qid={{{QID|}}} |P494 |linkprefix=https://icd.who.int/browse10/2016/en#/ |{{{ICD10|<noinclude>x</noinclude>}}}}}
    }}

The <noinclude>x</noinclude> is just there to create a parameter 'x' only for the template page, so that something shows up. If a value for the parameter |ICD10= is supplied locally, then it will be used instead of whatever is present on Wikidata. Would you be willing to try again to implement the Wikidata fetch in the template and check it on some pages? I'm happy to sort any problems that you may find, but I'd really like to get more editors involved in upgrading templates to be Wikidata-aware. Cheers --RexxS (talk) 15:55, 26 August 2019 (UTC)

@RexxS: thanks. I'll have another play in the sandbox one evening this week (hopefully tonight). Little pob (talk) 11:05, 27 August 2019 (UTC)
Have copy & pasted the above updated code to the sandbox as I'm hoping to have time this week to start getting a better understanding of template markup. Little pob (talk) 19:25, 9 September 2019 (UTC)
I am happy to help and get involved. I have to learn the syntax though. As moral support and discussion support , that is much easier.EncycloABC (talk) 14:40, 11 September 2019 (UTC)
so the link prefix is already stored in WD in an attribute for a property. Can it be fetched from there. I am trying to learn the syntax.EncycloABC (talk) 16:20, 17 October 2019 (UTC)
@EncycloABC: It can indeed be fetched from Wikidata, but the question is should we fetch it every time or hard-code it into the template? For stable link prefixes that may not change very often, it's a bit pointless to incur the overhead of fetching the same information every time; whereas for changeable links, adding the extra fetch ensures that our templates remain as up-to-date as Wikidata is. It's just a judgement call in each case. --RexxS (talk) 16:43, 17 October 2019 (UTC)

Template-protected edit request on 22 October 2019

Please add ICD11[8]. Signimu (talk) 20:43, 22 October 2019 (UTC)

 Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. Sceptre (talk) 19:42, 24 October 2019 (UTC)
it is quite clear to me. Add linking to ICD11 terminologyEncycloABC (talk) 17:33, 2 December 2019 (UTC)
Just as a marker, there's a debate on how to use ICD11 at Wikipedia talk:WikiProject Medicine/Archive 128 #ICD11. To implement ICD11 codes, there is a template {{ICD11}} that can take an ICD11 code and return the linked entry in the ICD-11 website, like this for Obesity:
  • {{ICD11|5B81}}5B81
That shouldn't be too difficult to add to this template if we get consensus. --RexxS (talk) 18:08, 2 December 2019 (UTC)
I just saw that discussion. In order to contribute it, I am now learning how to bring it from archive to current. Yeah, it has to do with foundation codes vs. linearization codes.EncycloABC (talk) 18:20, 2 December 2019 (UTC)

Out of beta

Does it still need to be in beta mode? EncycloABC (talk) 18:06, 2 December 2019 (UTC)

I agree, so have boldly changed the tag on the documentation page.[9] Little pob (talk) 12:25, 3 December 2019 (UTC)

this template: author/owner and how to robo-add it

This template is very valuable and better than previous approach via infobox. How do I find the current maintainer of it (is there such a thing - owner of a tempalate (like for a bot). How do I find the first creator of the template? How one creates a template (if I want to create one?) My other question is: Is there a mechanism where I am looking at a page that is not currently using a template and with single click, it would be added to the page (in the right place). Via WD SPARQL query I also want to create a list of pages that have ICD terminology links and currently are NOT using this template. (and ideally place the template on all of such pages). What are super advanced tools (for a programmer) for editing a page "semi-automaticaly" (e.g., from command line).EncycloABC (talk) 14:15, 5 December 2019 (UTC)

Petscan can do a NOT query for use of template. And SPARQL can be used to feed the list of pages to be evaluated. (per answer on WD chat) EncycloABC (talk) 05:24, 9 December 2019 (UTC)

I must be missing something simple, can someone show me how the Patient UK links work? I'm looking at example like in the Hypervitaminosis article where there's a link but I'm not seeing an attribute populated for it in the template. - Scarpy (talk) 17:36, 9 December 2019 (UTC)

Scarpy, Wikidata - d:Q423927, it's accessible from "Wikidata item" on the article's left hand menu. Cabayi (talk) 09:18, 10 December 2019 (UTC)
@Cabayi: thank you. :) - Scarpy (talk) 04:45, 11 December 2019 (UTC)

Adding ICD10-PCS

The new infoboxes are now favoring using medical resources for links. For procedures, we need a link to ICD10-PCS

I edited the sandbox and added it. I need help testing it and making it final.

e.g., liver tranplantation

Testing it. (not having luck)

Some notes on how to do it - so, template talk for real template and its sandbox is the same. Also test cases are same for sandbox and production version. I want to test that on Q1368191 liver transplantation (Q1368191) After I learn it, I promise to also do ICD11 as requested above. EncycloABC (talk) 17:33, 2 December 2019 (UTC)

it is now ready to go in sandbox.EncycloABC (talk) 18:18, 2 December 2019 (UTC)

Template-protected edit request on 3 December 2019

I improved the template. (added a new link to ICD10-PCS. See sandbox and talk page section icd10pcs. I want an admin to take the sandbox added code and move it to production. EncycloABC (talk) 14:29, 3 December 2019 (UTC)

@EncycloABC: there seem to be a lot of changes in the sandbox, not just the ICD10-PCS, but also ICD9, ICDO, OMIM, etc. Did you mean to request all of these? I think it would be better to move slowly and make sure each incremental change is error-free and accepted by editors before making wholesale changes. I was also a bit confused with the test case. Can we see the current and proposed version of the template on Liver transplantation in order to compare? Finally what does |ps=1 do? — Martin (MSGJ · talk) 20:49, 4 December 2019 (UTC)
Not a solution yet. Just a response. I am new to template editing. My sandbox edits were all done in Dec 2019. Indeed, the sandbox shows edits on Oct 25. (yet last commit for production template seems to be on Oct 23). I want to submit only my edits. It is hard to be responsible for edits done by someone experimenting but not truly commiting to production template. Can there be multiple sandboxes and I isolate my edits only in sandbox 2. What do you suggest I should do?EncycloABC (talk) 21:03, 4 December 2019 (UTC)
I don't know what ps=1 does. It may be handling the testing if it is in WD. And also if there are multiple linked codes in WD. But I truly don't know. In terms of what I did - I only did the icd10PCS edits. The other edits were most likely done by @Little pob: (pinging here, maybe s/he can chime in.EncycloABC (talk) 21:10, 4 December 2019 (UTC)
All I know about templates I learned from prior advice by @RexxS:EncycloABC (talk) 21:29, 4 December 2019 (UTC)
We might as well batch review all the changes in sandbox. I agree with the intend of the edits to icd9,icdo, and OMIM.EncycloABC (talk) 21:31, 4 December 2019 (UTC)
@MSGJ and EncycloABC: the parameter |ps=1 stands for parameter set 1. Because there are so many commonly used parameters, I implemented a short-cut to set values for common combinations when using getValue (or its wrapper {{wdib}}). So |ps=1 is short for:
  • rank = "best"
  • fetchwikidata = "ALL"
  • onlysourced = "no"
  • noicon = "true"
There's another set defined for |ps=2, which returns a sort of "raw" value. So |ps=2 is short for:
  • rank = "best"
  • fetchwikidata = "ALL"
  • onlysourced = "no"
  • noicon = "true"
  • linked = "no"
  • plaindate = "true"
If anybody feels like adding some documentation, please feel free. Cheers --RexxS (talk) 00:46, 5 December 2019 (UTC)
@MSGJ: I agree changes need to be tested, but I was under the impression consensus for linking this template to WD had already been established here? As such, I was working under the assumption "we" were getting the sandbox version prepped, i.e. linked to WD and tested as working, and then an editor with template permissions would copy-pasted en bloc over the live template. Anyway, all my test edits in the sandbox were previewed against a mainspace article (IIRC usually hypertension or gout) and a userspace page I put together: User:Little pob/sandbox2 I've now added liver transplantation to the bottom.
@EncycloABC: of the WD-linked parameters, I think I did all but two or three. Only stopped as I didn't want to do all of them after you'd expressed an interest in also having a try. What I have just noticed is that the ICD-10-PCS parameter is being returned on diagnoses (when local override is being used). Not sure if that's a problem with my test page, the property being erroneously added to WD, or the sandboxed template. I'll look when I've more time (hopefully later today).
Thanks, @RexxS: I'll look at adding those to the template's documentation as soon as possible.
Little pob (talk) 10:04, 5 December 2019 (UTC)
Nice to see responses. I think there is definitely consensus to have it pulled from WD for all terminologies. (or as many as possible). So the only question I have is who will do the commit to production (msgj or rexxs) and if they are now happy with the code as it is in sandbox. To be honest, I don't fully understand when the template param is fetched (populated from WD). So the error littlepob describes may be my true error in coding it.EncycloABC (talk) 13:38, 5 December 2019 (UTC)

I am quite happy to make the changes as Little pob has stated that the changes have been fully tested and have consensus. I will just wait for him/her to clarify if there is an error with ICD-10-PCS or not. — Martin (MSGJ · talk) 22:52, 5 December 2019 (UTC)

Little pob has not been online the last few days. I was hoping they could confirm if there is an error in the proposed code or not. @EncycloABC: can you comment on this? — Martin (MSGJ · talk) 06:35, 8 December 2019 (UTC)
Sorry, I've been watching the drug price discussion unfold over at WP:MED. Anyway, I think I've fixed it from returning a null value when the property in WD is blank.[10] But will await confirmation from EncycloABC that the codes being pulled are displaying correctly against procedure articles (as a UK-based clinical coder, I've no experience with the US-specific ICD-10-PCS). I'll also add the ps1 and ps2 info to the documentation. Little pob (talk) 17:51, 8 December 2019 (UTC)
Thank you for the fix (little pob) and the documentation. I tested it with few more codes (one of them I added to the test case on sandbox). All is displaying correctly. Please implement. EncycloABC (talk) 05:22, 9 December 2019 (UTC)
It's not quite ready. I restructured the testcases so it shows sandbox v live rather than just one or the other, and added section titles for comparison. The first section title displays OK, but all subsequent headers are suppressed. I suspect there may be some unclosed brackets or formatting in the template? Cabayi (talk) 09:27, 10 December 2019 (UTC)

I have disabled the request as there has been no response to Cabayi's note above — Martin (MSGJ · talk) 10:11, 16 December 2019 (UTC)

Interestingly this behaviour occurs with the live version of the template as well as the sandboxed one. It only affects section headings after the template. Whilst it does need fixing; this template is intended to sit in the external links section, which is supposed to be the bottom-most appendix section of an article. The footer sections after the appendices don't have section headers, at least that I'm aware of, which is probably why it's not been spotted until now. Little pob (talk) 13:24, 16 December 2019 (UTC)

GARD: "syndrome <Name> syndrome"

Why does this happen? https://prnt.sc/qmk3zn. The inputs are correct (I think): https://prnt.sc/qmk4n8.

The template also only links to "/13209/Pituitary" instead of "/13209/pituitary-stalk-interruption-syndrome" (though the link still works).

SUM1 (talk) 10:54, 12 January 2020 (UTC)

@SUM1: The template is outputting this:
Instead of this:
In other words, the first space in the name causes the MediaWiki parser to terminate the url at that point. I'll amend the template to convert spaces into hyphens when it's used in the url.
That should work now. --RexxS (talk) 12:25, 12 January 2020 (UTC)
Thanks. SUM1 (talk) 12:34, 12 January 2020 (UTC)

Show HCPCS codes in medical resources

in USA, a code was assigned to COVID19 testing. Using HCPCS terminology. See https://en.wikipedia.org/wiki/COVID-19_testing Currently medical resources do not support displaying HCPCS. Can this be added? — Preceding unsigned comment added by EncycloABC (talkcontribs) 20:55, 5 March 2020 (UTC)

Template-protected edit request on 6 December 2021

Change MeSH ID link format to match the current NLM format (https://meshb.nlm.nih.gov/record/ui?ui=) The line in the template should look like below (tested at Template:Drug links):

| '''[[Medical Subject Headings|MeSH]]''': [https://meshb.nlm.nih.gov/record/ui?ui={{wdib|ps=1|qid={{{QID|}}}|P486|{{{MeshID|<noinclude>x</noinclude>}}}}} {{wdib|ps=1|qid={{{QID|}}}|P486|{{{MeshID|<noinclude>x</noinclude>}}}}}]}} Aeffenberger (talk) 01:04, 6 December 2021 (UTC)

 Done. P.I. Ellsworth - ed. put'r there 13:58, 6 December 2021 (UTC)

Use for drugs

The template would be a great match to also display relevant terminology links for clinical drugs. E.g., https://en.wikipedia.org/wiki/Remdesivir . This overlaps with Infobox drug but I think medical resources as a unified mechanism to refer to medical terminologies is more consistent. What do people think? EncycloABC (talk) 15:11, 29 April 2020 (UTC)

Hi! I have removed the empty Medical resources template which had been erroneously added to that page linked above for a talk page discussion, instead of using your personal sandbox, linked to at the top of every page alongside your username.
In the future, please make such examples by copying an article, placing it in your sandbox and then making your example edit there instead of in an article. Thanks! —Geekdiva (talk) 20:42, 30 May 2022 (UTC)

Interferes with display of stub tags?

In Progressive cardiac conduction defect, the stub template doesn't display when it's in the right place, after this {{Medical resources}}. But if I move it in front of that template, it displays. I've tested it with a different stub template and get the same effect, so it looks as if it's caused by this template rather than by the stub template. Any ideas? PamD 20:02, 18 January 2022 (UTC)

I've looked at this a few different ways, and I'll be honest I'm a bit flummoxed. Everything that is "opened" (templates, divs, links, etc) is closed, so it's not like there's an unclosed div messing about with what follows. That being said, I did some tests; if you add text before the stub template, it works as normal. If you have two stub templates, only the second one shows, and as mentioned just a stub shows nothing, even if there is text after it. I can't see why {{asbox}} (which runs stub templates) would be the cause of this, but I can't find what in this template is causing any of these oddities. Primefac (talk) 13:24, 19 January 2022 (UTC)
But with two, Timeless eats one of them. Izno (talk) 18:52, 19 January 2022 (UTC)
This is fun: It's not an issue in Timeless or Minerva, but is in Vector and Monobook. :) Izno (talk) 18:50, 19 January 2022 (UTC)
So, the stub is still taking up space, it's just not displaying the way it should. Izno (talk) 19:15, 19 January 2022 (UTC)
Template_talk:Asbox#Interaction_between_Asbox_and_Infobox is why.
In short, it's because medical resources uses infobox class. Don't do that with what is a navbox. Izno (talk) 19:23, 19 January 2022 (UTC)
Nice find. Primefac (talk) 19:36, 19 January 2022 (UTC)
A little further info courtesy TheDJ and stjn, it's because the infobox is floating right at width 100%, which causes the width of the overflow: hidden element to become 0.
Either you can remove the float from medical resources by using float:none in the appropriate style parameter or as I suggested before, not use an infobox for something that is not an infobox. Izno (talk) 19:40, 19 January 2022 (UTC)
I'll see if I can convert to a navbox while still keeping the same general design. I think taxobar has a similar setup to steal from.... Primefac (talk) 12:42, 20 January 2022 (UTC)
 Done, converted to a navbox. Should hopefully fix the issue! Primefac (talk) 12:48, 20 January 2022 (UTC)
To editors PamD, Izno and Primefac:Should this box be somewhat treated stylistically as a navbox? That is, if the External links section has no bulleted entries, and one of these boxes follows it immediately, should the External links section be treated as empty and therefore its header should be deleted as usual? I hope so, because keeping the header, as is implied by the current documentation, looks like a clunky mistake. (The navboxes are stylistically divorced from the See also header, after all.)
If so, the documentation should state that this box should be placed right below any External links entries and above the navboxes, and mmmayyyybe-I-dunno the navbox documentation should state that they are placed below this box when present. Thank you for your consideration! —Geekdiva (talk) 19:24, 30 May 2022 (UTC)
It looks as if this template is what is called a "Metadata template", although that term isn't in WP:GLOSSARY. It doesn't appear in the specified order at WP:ORDER, though {{taxonbar}}, which seems similar, gets a mention. The documentation for {{taxonbar}} has a "Position" section which is precise and detailed: pasting it here:
Please place Taxonbar correctly. As a metadata template, Taxonbar should be placed:
(Note the use of that term "metadata template").
Two other "metadata templates" (one and a variant) come to mind: {{Authority control}} and {{Authority control (arts)}}. They each have a "Position" section in the documentation which says:
As a metadata template, the Authority control template should be placed after the external links section and navigation templates, right before the categories.
(And similary for "Authority control (arts)".
{{Authority control}} is mentioned in WP:ORDER, just after {{taxonbar}}.
So it looks as if we need (a) the concept of "Metadata template" to be included in WP:GLOSSARY, (b) {{medical resources}} to be included in WP:ORDER (perhaps by expansion of the element "{{taxonbar}}", to specify "Metadata templates" and give these two examples, distinct from "Authority control" which is already included in the list), and (c) be used in describing the position of this {{medical resources}}. That's if there is general agreement that this template is the same kind of beast as those others which already call themselves "metadata templates"! Any thoughts? (And thanks, @Primefac:, for fixing the original problem, in case I forgot to thank you at the time!) PamD 20:57, 30 May 2022 (UTC)

FWIW; the positioning of {{medical resources}} was established through an RfC. I don't know if a new RfC is needed; but discussion on it's positioning should probably be in new talk topic with notifications at WP:MED and WP:VPR... Little pob (talk) 11:00, 31 May 2022 (UTC)

I'll back off - I'm not a regular medical editor, just a stub-sorter and general wikignome. But I suggest that the documentation for this template ought to include a "Position" section, identifying where in the article the template should be placed (as established by the RfC, if that is generally agreed), and also it should be added to the listing at WP:ORDER as this template, according to the RfC, should be placed above "Other navigation footer templates" (currently item 4.2 in the list). This means it is treated differently from {{taxonbar}} which looks, to an outsider, to be pretty similar in function. Over to you. PamD 12:21, 31 May 2022 (UTC)
I apologise if I came off as WP:rude. The intent was only to highlight the 2017 RfC, not an attempt to quash the idea. I think the positioning of {{medical resources}} is very much worth re-discussing. The way {{taxonbar}} nests between navbars and authority control looks very clean. The closest the 2017 RfC had to that was in options 4-7. However, because of the thin lines of empty space in between, those don't look anywhere near as tidy (IMHO).
My medical editing is pretty much limited to adding ICD-10 codes to articles (and add this template if it's not already there when doing so). I have gone ahead and changed the opening of the documentation, using that for taxonbar as a basis. Little pob (talk) 13:42, 31 May 2022 (UTC)
@Little pob: No, not rude at all, just informative - but made me feel I was perhaps getting into deep waters and needed to leave it to the locals! Thanks. PamD 14:00, 31 May 2022 (UTC)