How to insert PN Syntex in shell command

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
abhishek.gupta
Posts: 2
Joined: Thu, 2019-12-19, 09:42

How to insert PN Syntex in shell command

#1 Post by abhishek.gupta »

I am using the following shell command to generate the PDF to DICOM but unable to see Patient Name in the DICOM
"pdf2dcm +t Amithab +cn CSD +pn Amithab-Kumar +pi 6349 +pb 19701105 +ps M 1575007974_0.pdf 1575007974_0.DCM"

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: How to insert PN Syntex in shell command

#2 Post by Michael Onken »

Did you try dcmdump to look for the patient name or a DICOM viewer? In the latter case, try using the correct syntax for DICOM Person Names and use quotes around the value, i.e. if Amithab is the given name, use:

pdf2dcm +t Amithab +cn CSD +pn "Kumar^Amithab" +pi 6349 +pb 19701105 +ps M 1575007974_0.pdf 1575007974_0.DCM

Best regards,
Michael

abhishek.gupta
Posts: 2
Joined: Thu, 2019-12-19, 09:42

Re: How to insert PN Syntex in shell command

#3 Post by abhishek.gupta »

Hi,
I am using the same shell command
Please find the link below
http://67.227.159.21/dcmtk/dicom.php
Still not able to get the PatientName

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: How to insert PN Syntex in shell command

#4 Post by Michael Onken »

Hi,

thank you; I had a closer look and found the problem in your command line: The option +cn expects 3 strings, not a single one (see help output in pdf2dcm --help):

Code: Select all

    +cn  --concept-name         [CSD] [CV] [CM]: string (default: empty)
                                coded representation of document title defined
                                scheme designator CSD,
                                CV and code meaning CM
i.e. the strings +pn "Jones^Morrison" are consumed by the +cn option, so they end up in the Concept Name Sequence like this:

Code: Select all

0040,a043) SQ (Sequence with explicit length #=1)      #  64, 1 ConceptNameCodeSequence
  (fffe,e000) na (Item with explicit length #=3)          #  56, 1 Item
    (0008,0100) SH [--patient-name]                         #  14, 1 CodeValue
    (0008,0102) SH [CSD]                                    #   4, 1 CodingSchemeDesignator
    (0008,0104) LO [Jones^Morrison]                         #  14, 1 CodeMeaning
Try to use the following (example values):

Code: Select all

pdf2dcm +t Morrison +cn "99DCMTK" "PDF" "Some PDF Document"  +pn "Jones^Morrison" +pi bt40 +pb 19900202 +ps M 1575007974_0.pdf munt.DCM
Best regards,
Michael

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest