源查询在一个变量中返回我需要的 XML。在 SSIS 中,我如何获取 OLE 适配器返回的变量并将其拆分到每个顶级叶上的文件中。对于我的示例数据,我想为提交类型标签创建一个新文件,但文件名将是日期和患者 ID。所以每个病人都有一个新文件。
样本数据。
<submission type="HOSPITAL" data="CLINICAL" version="1.0" action-code="ADD">
<provider>
<provider-id>120129</provider-id>
<patient>
<birthdate>07-26-1925</birthdate>
<sex>F</sex>
<race>1</race>
<ethnic>N</ethnic>
<postal-code>32142</postal-code>
<episode-of-care measure-set="PN">
<admit-date>09-13-1987</admit-date>
<discharge-date>09-14-1988</discharge-date>
<pthic/>
<patient-id>7228</patient-id>
<detail answer-code="3" row-number="0" question-cd="ANOTHERINF"/>
<detail answer-code="Y" row-number="0" question-cd="ANTIALLERGY"/>
</episode-of-care>
</patient>
</provider>
</submission>
<submission type="HOSPITAL" data="CLINICAL" version="1.0" action-code="ADD">
<provider>
<provider-id>168729</provider-id>
<patient>
<birthdate>07-26-1835</birthdate>
<sex>F</sex>
<race>1</race>
<ethnic>N</ethnic>
<postal-code>39142</postal-code>
<episode-of-care measure-set="PN">
<admit-date>09-13-1986</admit-date>
<discharge-date>09-14-1987</discharge-date>
<pthic/>
<patient-id>888</patient-id>
<detail answer-code="3" row-number="0" question-cd="ANOTHERINF"/>
<detail answer-code="Y" row-number="0" question-cd="ANTIALLERGY"/>
</episode-of-care>
</patient>
</provider>
</submission>