Converted PDF files only show Last Name instead of Full Patient Name...
ECG Toolkit support for: SCP-ECG, DICOM, HL7 aECG, ISHNE & MUSE-XML
Brought to you by:
mvanettinger
I hope this project is still maintained and hope you can help me out. All my efforts to compile a new release based on the source code have unfortunately failed, however that's probably more related to my shortcomings than anything being wrong with the source. I've been using the ECG to PDF conversion functionality very successfully for a project in general, however, when inspecting the resulting PDF files the Patient Name usually only shows the Last Name, so the first item within the PatientName DICOM tag instead of the full name (items 0 through 4, or at least 2 - LAST^FIRST^MIDDLE).
Any assistance with getting the full name displayed on the converted PDF files would be super appreciated.
The code was prepared for .NET5.0 so maybe this is caused by changes in dependencies, but there is another possibility. You might be using the .NET framework solutions in stead of the new (core) .NET solutions.
The PDF generated uses a hard coded textual layout. So you are on the right track by compiling it for your own format is the right track (currently at least).
Hi MJB, thank you so much for getting back to me on this!
I was able to use the latest source code and individually compile all plugoins and executables, and then manually copy the binaries into a flat folder structure, and it generally works, however the same outcome. It only ever shows the LAST (FAMILY) name, not the complete name. Would you be able to point me to the actual source file name that handles the concatenation of all the name parts into one full name so it can be added to the PDF? When I convert to a different format, like MUSE-XML, the full name is shown in the XML, so I don't believe it's a DICOM tag parsing issue, but instead somewhere within the PDF writing/conversion step that only picks up the last name and cuts off the other name parts/segments. I confirmed that the source file DICOM tags are properly formatted (LAST^FIRST^MIDDLE^PREFIX^SUFFIX).
The only references to name part setting/getting so far is within the DICOMPDFFormat.cs source file, but I don't seem to understand how it's first seems to parse for a proper DICOM tag (PatientName), but then ahs these additional get statements for the parts.. sorry if this doesn't make much sense.
And in the PDFFormat.cs file I see these lines, which seem to add "Name: " and add the value for _Demographics.LastName and then directly over to _Demographics.PatientID in the next line. Should that somehow be extanded to also include _Demographocs.FirstName and so on?
Here's the lines of code (lines 1259 through 1264):
Also, so when you, on your system, use the latest version of the ECGToolKit to convert a DICOM ECG to PDF (or DICOM encapsulated PDF /DICOM-PDF), you are getting the full patient name displayed on the converted PDF? SO, it's an issue that's specific to my implementation/environment?
Last edit: Maximilian Winkler 2024-04-17
Sorry for the back and forth. Just wanted to let you know that I seem to have fixed that issue by changing those posted lines of code within the PDFFormat.cs file with these lines below. It's not perfect, but now we at least have Last and First Name displayed as "LastName, FirstName" :
Last edit: Maximilian Winkler 2024-04-17
Actually, I modified it to be a bit more flexible around the possible "Name parts" as each patient might have a middle name, or suffix etc while others don't: