select * from (SELECT
m.病人Id,
m.主页Id,
x.title,
x.content.getclobval() 参考,
x.content content
--EXTRACTVALUE(x.Content, '//zlxml//document//subdoc[@antetypeid="3C38A8DAB01C473A9074A8EDD0B8553"]//utext') 主治医师,
--EXTRACTVALUE(x.Content, '//zlxml//document//subdoc[@antetypeid="F819E70B04F241EAAD11EB6DE8E1D55B"]//element[@iid="57EB4E29F07F4236BB28FA71DF752999"]/text()') 手术者,
--EXTRACTVALUE(x.Content, '//zlxml//document//subdoc[@antetypeid="F819E70B04F241EAAD11EB6DE8E1D55B"]//element[@iid="EA7FB979786F4605A6F11DEA11D016AA"]/text()') 录入日期
FROM (
SELECT DISTINCT
c.id || '' 变动id,
a.病人id,
a.主页id
FROM
病案主页@hisinterface a
JOIN 病人手麻记录@hisinterface b ON a.病人id = b.病人id AND a.主页id = b.主页id
JOIN 病人变动记录@hisinterface c ON a.病人id = c.病人id AND a.主页id = c.主页id
WHERE
c.开始原因 = 2
AND b.记录来源 = 3
AND a.出院日期 > SYSDATE - 15
AND A.病人id=1732711 and a.主页id =1
) m
LEFT JOIN BZ_ACT_LOG n ON m.变动id = SUBSTR(n.extend_tag, 4)
LEFT JOIN BZ_DOC_LOG x ON n.id = x.actlog_id AND x.title = '病程记录') a,
XMLTABLE('//zlxml//document//subdoc[@antetypeid="3C38A8DAB01C473A9074A8EDD0BB8553"]'
PASSING a.content
COLUMNS
查房者 VARCHAR2(4000) PATH '//utext[1]',
录入日期 VARCHAR2(4000) PATH '//element/text()'
) b;