I am trying to extract the NHS Number that is coming over in my HL7 ORM^O01 message into DCM4CHEE.
The PID section is as follows:
PID|||ABC123456^^^ABC02^MR~123 456 7891^^^ etc
I have edited the common.xsl file as follows:
<!-- Other Patient ID -->
<xsl:call-template name="attr">
<xsl:with-param name="tag" select="'00101000'"/>
<xsl:with-param name="vr" select="'LO'"/>
<xsl:with-param name="val" select="field[3]/component[4]/text()"/>
</xsl:call-template>
The value that is extracted is MR and not 'MR~123 456 7891'
The problem seems to be because the tilde (~) is treated as a field delimiter but editing the common.xsl file to show "field[3]/component[5]/text()" or "field[3]/component[4]/subcomponent[1]text()" doesn't return anything.
How do I get at the string after the tilde?