# Change SubjectHierarchy name

**URL:** <https://discourse.slicer.org/t/change-subjecthierarchy-name/35556>\
**Category:** Support\
**Created:** [April 17, 2024, 10:16am UTC](https://discourse.slicer.org/t/change-subjecthierarchy-name/35556 "2024-04-17T10:16:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SANTIAGO\_PENDON\_MING](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/santiago_pendon_ming/32/66060_2.png) [@SANTIAGO\_PENDON\_MING](https://discourse.slicer.org/u/SANTIAGO_PENDON_MING)\
**Post date:** [April 17, 2024, 10:16am UTC](https://discourse.slicer.org/t/change-subjecthierarchy-name/35556/1 "2024-04-17T10:16:17Z")

</div>

Hi to everyone. Today I’m trying to change the SubjectHierarchy name using Python code. My goal is the next one:

Actual name: VAL22^Val22(AW388…  
 ![Captura de pantalla 2024-04-17 121448](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/2/625f3701a9c9187315d3908da383c9d2f46ad990.png)

Real Name: VAL22

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 17, 2024, 11:27am UTC](https://discourse.slicer.org/t/change-subjecthierarchy-name/35556/2 "2024-04-17T11:27:26Z")

</div>

I think you will find everything you need here  
[https://slicer.readthedocs.io/en/latest/developer\_guide/script\_repository.html#manipulate-subject-hierarchy-item](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#manipulate-subject-hierarchy-item)

---

<div class="post-metadata">

**Author:** ![SANTIAGO\_PENDON\_MING](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/santiago_pendon_ming/32/66060_2.png) [@SANTIAGO\_PENDON\_MING](https://discourse.slicer.org/u/SANTIAGO_PENDON_MING)\
**Post date:** [April 17, 2024, 11:56am UTC](https://discourse.slicer.org/t/change-subjecthierarchy-name/35556/3 "2024-04-17T11:56:12Z")

</div>

Thanks for your help @cpinter. We are not very familiarized with this type of code. Could you explain a little bit more about what is dataNode?

A simple example of the implementation could help us more. 🙂

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 17, 2024, 1:29pm UTC](https://discourse.slicer.org/t/change-subjecthierarchy-name/35556/4 "2024-04-17T13:29:16Z")

</div>

The first link I provided contains the actual implementation.

The documentation of Slicer is quite extensive, and you can learn about the basics very quickly. For example, you can find out what is a node here:  
[https://slicer.readthedocs.io/en/latest/user\_guide/getting\_started.html#glossary](https://slicer.readthedocs.io/en/latest/user_guide/getting_started.html#glossary)
