-2
<?xml version="1.0" encoding="UTF-8"?>
<Patients>
  <patientRole>
    <id extension="996-756-495" root="2.16.840.1.113883.19.5"/>
    <id extension="775-756-495" root="2.16.840.1.113883.14.6"/>
    <patient>
      <name>
        <given>Henry</given>
        <family>Levin</family>
      </name>
      <administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1"/>
      <birthTime value="19320924"/>
    </patient>
    <providerOrganization>
      <id root="2.16.840.1.113883.19.5"/>
      <name>Good Health Clinic</name>
    </providerOrganization>
    <admissionTime value="2012030111:32"/>
  </patientRole>
  <patientRole>
    <id extension="65" root="2.16.840.1.113883.3.933"/>
    <patient>
      <name>
        <given>Paul</given>
        <family>Pappel</family>
      </name>
      <administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1"/>
      <birthTime value="19551217"/>
    </patient>
    <providerOrganization>
      <id extension="84756-11241-283-OPTD-3322" root="1.2.3.4.5.6.1.8.9.0"/>
      <name> Dr.med. Hans Topp-Glucklich</name>
    </providerOrganization>
    <admissionTime value="201201152200"/>
  </patientRole>
  <patientRole>
    <id extension="800001" root="2.16.840.1.113883.19.5"/>
    <patient>
      <name>
        <given>JEANNE</given>
        <family>PETIT</family>
      </name>
      <administrativeGenderCode code="F" codeSystem="2.16.840.1.113883.5.1"/>
      <birthTime value="19480105"/>
    </patient>
    <providerOrganization>
      <id root="2.16.840.1.113883.19.5"/>
      <name>Good Health Clinic</name>
    </providerOrganization>
    <admissionTime value="20120101T22:00"/>
  </patientRole>
</Patients>

我很难为以下两项编写 XPath 表达式:

1955 年 12 月 17 日出生的患者姓名和姓氏

2012年1月「好康诊所」收治病人数

4

1 回答 1

0

这将为您提供name提供在特定日期出生的患者的元素:

patientRole/patient[birthTime/@value="19551217"]/name

这将为您patientRole提供具有指定组织名称和入学日期的元素数量:

count(patientRole[providerOrganization/name="Good Health Clinic"][starts-with(admissionTime/@value,"201201")])
于 2013-04-08T15:32:32.180 回答