(:查询文档标题:)
xquery version "3.0";
collection('/db/ZS_FrontPageBA/病案首页01')/ClinicalDocument/title
(:查询患者ID:)
xquery version "3.0";
collection('/db/ZS_FrontPageBA')/ClinicalDocument/recordTarget/patientRole/id[@assigningAuthorityName='XDS.Patientid' and @root='2.16.840.1.113883.4.487.2.1.4']
xquery version "3.0";
(:查询患者的id,并修改返回结构:)
for $anid in collection('/db/ZS_FrontPageBA')/ClinicalDocument/recordTarget/patientRole/id[@assigningAuthorityName='XDS.Patientid' and @root='2.16.840.1.113883.4.487.2.1.4']
return
<patient patientId='{$anid/@extension}' patientDomain='{$anid/@root}'> </patient>
(:查询患者入院诊断:)
xquery version "3.0";
for $diagnose in collection('/db/ZS_FrontPageBA')/ClinicalDocument/component/structuredBody/component/section[title="入院诊断"]/text
return
<indiagnose value='{$diagnose}'></indiagnose>
Continue reading eXistDB查询测试01病案首页EMR→