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>

eXistDB查询测试03入院护理评估单

xquery version "3.0";
(:查询入院护理评估单CDA,并并给出患者体温:)
collection('/db/ZS_RYHLPGD')/ClinicalDocument/component/structuredBody/component/section/text/McsDocFormList/HiupMcsDocForm/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12365']/text
xquery version "3.0";
(:查询入院护理评估单CDA,并并给出患者的体温脉搏呼吸:)
for $RecordList in collection('/db/ZS_RYHLPGD')/ClinicalDocument/component/structuredBody/component/section/text/McsDocFormList/HiupMcsDocForm/hiupMcsDocFormRecordsList
return
    <patient>
        <tempture value='{$RecordList/HiupMcsDocFormRecords[nodeId='12365']/text}摄氏度'></tempture>
        <pulse value='{$RecordList/HiupMcsDocFormRecords[nodeId='12366']/text}次每分'></pulse>
        <bloodpressure value='{$RecordList/HiupMcsDocFormRecords[nodeId='12368']/text}'></bloodpressure>
        <breath value='{$RecordList/HiupMcsDocFormRecords[nodeId='12367']/text}次每分'></breath>
        <patientId value='{$RecordList/HiupMcsDocFormRecords[nodeId='12350']/text}'> </patientId>
    </patient>
xquery version "3.0";
(:查询入院护理评估单CDA,并并给出患者常用信息:)
for $RecordList in collection('/db/ZS_RYHLPGD')/ClinicalDocument/component/structuredBody/component/section/text/McsDocFormList/HiupMcsDocForm
return
    <patient>
        <name value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12347']/text}'></name>
        <age value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12355']/text}'></age>
        <sex value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12352']/text}'></sex>
        
        <tempture value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12365']/text}摄氏度'></tempture>
        <pulse value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12366']/text}次每分'></pulse>
        <bloodpressure value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12368']/text}'></bloodpressure>
        <breath value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12367']/text}次每分'></breath>
        
        <patientId value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12350']/text}'> </patientId>
        <flowId value='{$RecordList/patientId}'> </flowId>
        <area value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12348']/text}'></area>
        <bedno value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12349']/text}'></bedno>
        <indate value='{$RecordList/hiupMcsDocFormRecordsList/HiupMcsDocFormRecords[nodeId='12370']/text}'></indate>
    </patient>

eXistDB查询测试02病案首页HT

xquery version "3.0";
(:查询病案首页CDA,并并给出患者姓名:)
collection('/db/ZS_FrontPageEMR')/ClinicalDocument/component/structuredBody/component/section/text/List/BAVisit/baidname
xquery version "3.0";
(:查询病案首页CDA,并并给出患者的基本信息:)
for $ClinicalList in collection('/db/ZS_FrontPageEMR')/ClinicalDocument/component/structuredBody/component/section/text/List
return
    <patient>
        <name value='{$ClinicalList/BAVisit/baidname}'></name>
        <sex value='{$ClinicalList/BAVisit/baidsexname}'></sex>
        <birthTime value='{$ClinicalList/BAVisit/baidbirthday}'></birthTime>
        <age value='{$ClinicalList/BAVisit/bamxage}'></age>
        <nationality value='{$ClinicalList/BAVisit/baidnative}'></nationality>
        <address value='{$ClinicalList/BAPatientRecordInfo/baidxzz}'></address>
        <ethnic value='{$ClinicalList/BAVisit/baidnation}'></ethnic>
        <phone value='{$ClinicalList/BAPatientRecordInfo/bamxlxtele}'></phone>
        
        <patientId value='{$ClinicalList/BAVisit/bamxprn}'> </patientId>
        <flowId value='{$ClinicalList/BAVisit/bamxjzh}'> </flowId>
    </patient>

Continue reading eXistDB查询测试02病案首页HT

eXistDB查询测试01病案首页EMR

(:查询文档标题:)
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