PID|||999999^^^HOSP1~71123123X^^^DNI~XAC987654321^^^CIP||TEST^PATIENT||19780510|M||WH|STREET 1^^VALLADOLID^VA^47003|||||||20984000|||||||||||||||||||||
...
<xsl:template match="/hl7"> <dataset> <attr tag="00080005" vr="CS">ISO_IR 100</attr> <xsl:apply-templates select="PID"/> <!-- Other Patient Identification Sequence --> <attr tag="00101002" vr="SQ"> <xsl:apply-templates select="PID[1]" mode="sps"/> </attr> <xsl:apply-templates select="PV1"/> <xsl:apply-templates select="ORC[1]"/> <xsl:apply-templates select="OBR[1]"/> <!-- Scheduled Procedure Step Sequence --> <attr tag="00400100" vr="SQ"> <xsl:apply-templates select="ORC" mode="sps"/> </attr> <xsl:apply-templates select="ZDS"/> </dataset> </xsl:template> <xsl:template match="PID[1]" mode="sps"> <!-- Other patient ID --> <xsl:call-template name="attr"> <xsl:with-param name="tag" select="'00100020'"/> <xsl:with-param name="vr" select="'LO'"/> <xsl:with-param name="val" select="string(field[3]/repeat[1]/component[1]/text())"/> </xsl:call-template> <!-- Issuer of Other Patient ID --> <xsl:call-template name="attr"> <xsl:with-param name="tag" select="'00100021'"/> <xsl:with-param name="vr" select="'SH'"/> <xsl:with-param name="val" select="string(field[3]/repeat[1]/component[2]/text())"/> </xsl:call-template> </xsl:template>
<attr tag="00101002" vr="SQ">
<item>
<xsl:apply-templates select="PID[1]" mode="sps"/>
</item>
</attr>
<xsl:template match="/hl7"> <dataset> <attr tag="00080005" vr="CS">ISO_IR 100</attr> <xsl:apply-templates select="PID"/> <!-- Other Patient Identification Sequence --> <attr tag="00101002" vr="SQ">
<item> <xsl:apply-templates select="PID[1]" mode="sps"/> </item> </attr>
<xsl:apply-templates select="PV1"/> <xsl:apply-templates select="ORC[1]"/> <xsl:apply-templates select="OBR[1]"/> <!-- Scheduled Procedure Step Sequence --> <attr tag="00400100" vr="SQ"> <xsl:apply-templates select="ORC" mode="sps"/> </attr> <xsl:apply-templates select="ZDS"/> </dataset> </xsl:template> <xsl:template match="PID[1]" mode="sps"> <!-- Other patient ID --> <xsl:call-template name="attr"> <xsl:with-param name="tag" select="'00100020'"/> <xsl:with-param name="vr" select="'LO'"/> <xsl:with-param name="val" select="string(field[3]/repeat[1]/component[1]/text())"/> </xsl:call-template> <!-- Issuer of Other Patient ID --> <xsl:call-template name="attr"> <xsl:with-param name="tag" select="'00100021'"/> <xsl:with-param name="vr" select="'SH'"/>
<xsl:with-param name="val" select="string(field[3]/repeat[1]/component[4]/text())"/> </xsl:call-template> </xsl:template>
<patient> <attr tag="00080005"/> <!-- Specific Character Set --> <attr tag="00100010" case-sensitive="false"/> <!-- Patient's Name --> <attr tag="00100020"/> <!-- Patient ID --> <attr tag="00100021"/> <!-- Issuer of Patient ID --> <attr tag="00100030"/> <!-- Patient's Birth Date --> <attr tag="00100040"/> <!-- Patient's Sex --> <attr tag="00101002"/> <!-- Other Patient IDs Sequence --> <attr seq="00101002" tag="00100020"/> <!-- Patient ID --> <attr seq="00101002" tag="00100021"/> <!-- Issuer of Patient ID --> <attr tag="00104000"/> <!-- Patient Comments --> </patient>
<xsl:template match="PID[1]" mode="sps">
<xsl:call-template name="otherpid2attrs"> <xsl:with-param name="idtag" select="'00100020'"/> <xsl:with-param name="istag" select="'00100021'"/> <xsl:with-param name="cx" select="field[3]/repeat[1]"/> </xsl:call-template> </xsl:template> <xsl:template name="otherpid2attrs"> <xsl:param name="idtag"/> <xsl:param name="istag"/> <xsl:param name="cx"/> <attr tag="{$idtag}" vr="LO"> <xsl:value-of select="string($cx/component[1]/text())"/> </attr> <attr tag="{$istag}" vr="LO"> <xsl:value-of select="string($cx/component[4]/text())"/> <xsl:if test="$cx/component[4]/subcomponent[1]"> <xsl:text>&</xsl:text> <xsl:value-of select="$cx/component[4]/subcomponent[1]"/> <xsl:text>&</xsl:text> <xsl:value-of select="$cx/component[4]/subcomponent[2]"/> </xsl:if> </attr> </xsl:template>
2015-01-08 18:10:26,390 ERROR -> (TCPServer-2-1) [org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand.OtherPatientID] Could not create entity
PID|||999999^^^HOSP1~11123123X^^^DNI||PARA PRUEBAS^PACIENTE||19780510|M||WH|PASEO DE ZORRILLA 1^^VALLADOLID^VA^47003|||||||20984000|||||||||||||||||||||
<PID><field/><field/><field>999999<component/><component/><component>HOSP1</component><repeat>11123123X<component/><component/><component>DNI</component></repeat></field><field/><field>PARA PRUEBAS<component>PACIENTE</component></field><field/><field>19780510</field><field>M</field><field/><field>WH</field><field>PASEO DE ZORRILLA 1<component/><component>VALLADOLID</component><component>VA</component><component>47003</component></field><field/><field/><field/><field/><field/><field/><field>20984000</field><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/><field/></PID>
<xsl:template match="PID[1]" mode="sps"><!-- Other patient ID -->
<xsl:call-template name="otherpid2attrs"> <xsl:with-param name="idtag" select="'00100020'"/> <xsl:with-param name="istag" select="'00100021'"/> <xsl:with-param name="cx" select="field[3]/repeat[1]"/> </xsl:call-template> </xsl:template> <xsl:template name="otherpid2attrs"> <xsl:param name="idtag"/> <xsl:param name="istag"/> <xsl:param name="cx"/> <attr tag="{$idtag}" vr="LO">
<xsl:value-of select="string($cx/text())"/>
</attr> <attr tag="{$istag}" vr="LO">
<xsl:value-of select="string($cx/component[3]/text())"/> <xsl:if test="$cx/component[3]/subcomponent[1]">
<xsl:text>&</xsl:text>
<xsl:value-of select="$cx/component[3]/subcomponent[1]"/>
<xsl:text>&</xsl:text>
<xsl:value-of select="$cx/component[3]/subcomponent[2]"/>
</xsl:if> </attr> </xsl:template>
2020-01-23 15:21:27,935 INFO CNSSCRE->SUCRE (TCPServer-1-2) [org.dcm4chex.archive.ejb.entity.PatientBean] Created Patient[pk=62, pid=DR000014, issuer=null, name=ARIEL^^^^]2020-01-23 15:21:27,940 INFO CNSSCRE->SUCRE (TCPServer-1-2) [org.dcm4chex.archive.ejb.entity.StudyBean] Created Study[pk=62, uid=1.2.276.0.7230010.3.0.3.5.1.11246489.2580628240, patient->ejb/Patient:62]2020-01-23 15:21:27,949 ERROR CNSSCRE->SUCRE (TCPServer-1-2) [org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand.Code] Could not create entityorg.postgresql.util.PSQLException: ERROR: el valor null para la columna «code_value» viola la restricción not nullDetail: La fila que falla contiene (40, null, null, null, null).