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>

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/BAPatientRecordInfo/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>
        <hospital value='{$ClinicalList/custodian/assignedCustodian/representedCustodianOrganization/name}'></hospital>
        <inDate value='{$ClinicalList/BAVisit/bamxrydate}'></inDate>
        <inDepartment value='{$ClinicalList/BAVisit/bamxrydeptcode}'></inDepartment>
        <inDiagnose value='{$ClinicalList/BAVisit/bamxryzd10name}'></inDiagnose>
        <inStatus value='{$ClinicalList/BAVisit/bamxryinfoname}'></inStatus>
        <outDate value='{$ClinicalList/BAVisit/bamxcydate}'></outDate>
        <outDepartment value='{$ClinicalList/BAVisit/bamxcynumcode}'></outDepartment>
        <outDiagnose value='{$ClinicalList/BADiagosis/*[contains(@name, "诊断")]}'></outDiagnose>
    </patient>


Leave a Reply

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

*