为什么mapper不想在xslt-Dokument中进行否则查询?
它应该是: 如果script-functoid返回“true” - >它应该复制“MRG_5”-Segment中“PVG_5”-Segment的值。 否则它应该将MRG1-Segment从左侧复制到右侧 - >即如果左侧的MRG_1-Sement存在,则将其复制;如果没有,它应该不存在消息中的MRG段。
此图显示了我如何制作它:
这是映射器中的xslt-Code:
- <xsl:for-each select="ZBE_BewegungsdatenSegment">
<xsl:variable name="var:v6" select="userCSharp:ChangeEventToA42(string(ZBE_5_SAPEVENT/text()) , string(ZBE_6_FAL_CASEPATNO/text()) , string(../MSH_MessageHeaderSegment/MSH.9_MessageType/CM_MSG.1_TriggerEvent/text()))" />
<xsl:variable name="var:v7" select="userCSharp:StringConcat("A42")" />
<xsl:variable name="var:v8" select="userCSharp:LogicalEq(string($var:v6) , string($var:v7))" />
- <xsl:if test="$var:v8">
<xsl:variable name="var:v9" select="string(ZBE_5_SAPEVENT/text())" />
<xsl:variable name="var:v10" select="string(ZBE_6_FAL_CASEPATNO/text())" />
<xsl:variable name="var:v11" select="string(../MSH_MessageHeaderSegment/MSH.9_MessageType/CM_MSG.1_TriggerEvent/text())" />
- <MRG_MergePatientInformation>
- <MRG_1_PriorPatientIdentifierList>
<xsl:variable name="var:v12" select="userCSharp:ChangeEventToA42($var:v9 , $var:v10 , $var:v11)" />
<xsl:variable name="var:v13" select="userCSharp:LogicalNe(string($var:v7) , string($var:v12))" />
- <xsl:if test="string($var:v13)='true'">
<xsl:variable name="var:v14" select="../MRG_MergePatientInformation/MRG_1_PriorPatientIdentifierList/CX_0_Id/text()" />
- <CX_0_Id>
<xsl:value-of select="$var:v14" />
</CX_0_Id>
</xsl:if>
<xsl:variable name="var:v15" select="userCSharp:LogicalEq(string($var:v12) , string($var:v7))" />
- <xsl:if test="string($var:v15)='true'">
<xsl:variable name="var:v16" select="""" />
- <CX_0_Id>
<xsl:value-of select="$var:v16" />
</CX_0_Id>
</xsl:if>
</MRG_1_PriorPatientIdentifierList>
- <MRG_2_PriorAlternatePatientId>
<xsl:variable name="var:v17" select="userCSharp:ChangeEventToA42($var:v9 , $var:v10 , $var:v11)" />
<xsl:variable name="var:v18" select="userCSharp:LogicalEq(string($var:v17) , string($var:v7))" />
- <xsl:if test="string($var:v18)='true'">
<xsl:variable name="var:v19" select="""" />
- <CX_0_Id>
<xsl:value-of select="$var:v19" />
</CX_0_Id>
</xsl:if>
</MRG_2_PriorAlternatePatientId>
- <MRG_3_PriorPatientAccountNumber>
<xsl:variable name="var:v20" select="userCSharp:ChangeEventToA42($var:v9 , $var:v10 , $var:v11)" />
<xsl:variable name="var:v21" select="userCSharp:LogicalEq(string($var:v20) , string($var:v7))" />
- <xsl:if test="string($var:v21)='true'">
<xsl:variable name="var:v22" select="""" />
- <CX_0_Id>
<xsl:value-of select="$var:v22" />
</CX_0_Id>
</xsl:if>
</MRG_3_PriorPatientAccountNumber>
- <MRG_4_PriorPatientId>
<xsl:variable name="var:v23" select="userCSharp:ChangeEventToA42($var:v9 , $var:v10 , $var:v11)" />
<xsl:variable name="var:v24" select="userCSharp:LogicalEq(string($var:v23) , string($var:v7))" />
- <xsl:if test="string($var:v24)='true'">
<xsl:variable name="var:v25" select="""" />
- <CX_0_Id>
<xsl:value-of select="$var:v25" />
</CX_0_Id>
</xsl:if>
</MRG_4_PriorPatientId>
- <MRG_5_PriorVisitNumber>
<xsl:variable name="var:v26" select="userCSharp:ChangeEventToA42($var:v9 , $var:v10 , $var:v11)" />
<xsl:variable name="var:v27" select="userCSharp:LogicalEq(string($var:v26) , string($var:v7))" />
- <xsl:if test="string($var:v27)='true'">
<xsl:variable name="var:v28" select="../PV1_PatientVisitSegment/PV1_19_VisitNumber/CX_0_Id/text()" />
- <CX_0_Id>
<xsl:value-of select="$var:v28" />
</CX_0_Id>
</xsl:if>
</MRG_5_PriorVisitNumber>
</MRG_MergePatientInformation>
</xsl:if>
</xsl:for-each>
你知道为什么Mapper没有做出“否则查询”(if(是)和if(not(yes)))?
答案 0 :(得分:0)
我发现可视化映射器不适用于复杂的映射。 我切换到外部xslt映射,用于任何非常复杂的事情。