eXistDB查询测试04入院记录HX

xquery version "3.0";
(:查询入院记录,并并给出住院号:)
collection('/db/HX_RYJL')/DocObjContent/NewCtrl[@Id='53119AC4B15CC61B_住院号']/Content_Text
xquery version "3.0";
(:查询入院记录,并并给出个人信息:)
for $DocObjContent in collection('/db/HX_RYJL')/DocObjContent
return
    <patient>
        <patientId value='{$DocObjContent/NewCtrl[@Id='53119AC4B15CC61B_住院号']}'></patientId>
        <area value='{$DocObjContent/NewCtrl[@Id='CB608F4C0FA682EF_病区名称']}'></area>
        <patientName value='{$DocObjContent/NewCtrl[@Id='19BD50BF516552A7_患者姓名']}'></patientName>
        <breath value='{$DocObjContent/NewCtrl[@Id='77423F11443D7D11_性别中文']}'></breath>
        <patientId value='{$DocObjContent/NewCtrl[@Id='5F513A94E1DA8BD3_年龄']}'> </patientId>
    </patient>
xquery version "3.0";
(:查询入院记录,并并给出常用信息:)
for $DocObjContent in collection('/db/HX_RYJL')/DocObjContent
return
    <patient>
        <patientId value='{$DocObjContent/NewCtrl[@Id='53119AC4B15CC61B_住院号']}'></patientId>
        <area value='{$DocObjContent/NewCtrl[@Id='CB608F4C0FA682EF_病区名称']}'></area>
        <patientName value='{$DocObjContent/NewCtrl[@Id='19BD50BF516552A7_患者姓名']}'></patientName>
        <breath value='{$DocObjContent/NewCtrl[@Id='77423F11443D7D11_性别中文']}'></breath>
        <patientId value='{$DocObjContent/NewCtrl[@Id='5F513A94E1DA8BD3_年龄']}'> </patientId>
        <chiefComplaint value='{$DocObjContent/NewCtrl[@Id='主诉']}'> </chiefComplaint>
        <ethnic value='{$DocObjContent/NewCtrl[@Id='9B787211E2563732_民族']}'> </ethnic>
        <address value='{$DocObjContent/NewCtrl[@Id='BF4E1AEA9E7094D7_户口地址']}'> </address>
        <married value='{$DocObjContent/NewCtrl[@Id='AC26C755C722B756_婚否']}'> </married>
    </patient>

Leave a Reply

Your email address will not be published. Required fields are marked *

*