-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Milestone
Description
Currently, only supports family name and given name (first and last). However, DICOM PN also support suffixe, middle and prefix. To be able to add Dr., for example, that level of implementation would be needed.
Currently, i have written my own helper function. However, i could use the pydicom.valuerep.PersonName as documented in https://pydicom.github.io/pydicom/stable/reference/generated/pydicom.valuerep.PersonName.html . Limitation is that out of the box it doesn't support adding name attributes after having set one. So setting first name then setting last name would result in a last name only.
This is how a simple implementation could look like:
from pydicom.valuerep import PersonName
...
@ property
def patient_firstname(self):
return PersonName(self._ds.PatientName).given_name
@ patient_firstname.setter
def patient_firstname(self, firstname):
self._ds.PatientName = PersonName.from_named_components(
given_name=firstname
)
Question is: how important is this?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers