{"name": "section-text-referenced-in-a-header-row", "comment": "A procedures section whose table header has two rows, the first referenced by the originalText of the procedure's code: procedure.rq reads that text, and document-table.rq keeps the header's other row, as it keeps the body's, so the section's text has no finding.", "input": {"file": "fixtures/in/section-text-referenced-in-a-header-row.xml", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/in/section-text-referenced-in-a-header-row.xml", "text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ClinicalDocument xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n  <realmCode code=\"US\"/>\n  <typeId root=\"2.16.840.1.113883.1.3\" extension=\"POCD_HD000040\"/>\n  <templateId root=\"2.16.840.1.113883.10.20.22.1.1\" extension=\"2015-08-01\"/>\n  <templateId root=\"2.16.840.1.113883.10.20.22.1.2\" extension=\"2015-08-01\"/>\n  <id root=\"2.16.840.1.113883.19.5.99999.1\" extension=\"CCD-2026-1104-F\"/>\n  <code code=\"34133-9\" displayName=\"Summarization of Episode Note\" codeSystem=\"2.16.840.1.113883.6.1\" codeSystemName=\"LOINC\"/>\n  <title>Continuity of Care Document</title>\n  <effectiveTime value=\"20261104090000-0500\"/>\n  <confidentialityCode code=\"N\" codeSystem=\"2.16.840.1.113883.5.25\"/>\n  <languageCode code=\"en-US\"/>\n  <recordTarget>\n    <patientRole>\n      <id root=\"2.16.840.1.113883.19.5.99999.2\" extension=\"MRN-448120\"/>\n      <patient>\n        <name use=\"L\">\n          <given>Robin</given>\n          <family>Ahmadi</family>\n        </name>\n        <administrativeGenderCode code=\"F\" codeSystem=\"2.16.840.1.113883.5.1\"/>\n        <birthTime value=\"19780214\"/>\n      </patient>\n    </patientRole>\n  </recordTarget>\n  <author>\n    <time value=\"20261104090000-0500\"/>\n    <assignedAuthor>\n      <id root=\"2.16.840.1.113883.19.5.99999.3\"/>\n      <representedOrganization>\n        <name>Riverside Community Hospital</name>\n      </representedOrganization>\n    </assignedAuthor>\n  </author>\n  <custodian>\n    <assignedCustodian>\n      <representedCustodianOrganization>\n        <id root=\"2.16.840.1.113883.19.5.99999.3\"/>\n        <name>Riverside Community Hospital</name>\n      </representedCustodianOrganization>\n    </assignedCustodian>\n  </custodian>\n  <component>\n    <structuredBody>\n      <component>\n        <section>\n          <templateId root=\"2.16.840.1.113883.10.20.22.2.7.1\"/>\n          <code code=\"47519-4\" codeSystem=\"2.16.840.1.113883.6.1\"/>\n          <title>Procedures</title>\n          <text>\n            <table>\n              <thead><tr ID=\"H-PROC\"><th>Appendectomy 2010</th></tr><tr><th>Header kept</th></tr></thead>\n              <tbody>\n                <tr><td>Other kept row</td></tr>\n              </tbody>\n            </table>\n          </text>\n          <entry>\n            <procedure classCode=\"PROC\" moodCode=\"EVN\">\n              <templateId root=\"2.16.840.1.113883.10.20.22.4.14\" extension=\"2014-06-09\"/>\n              <id root=\"1.2.3\" extension=\"P-1\"/>\n              <code code=\"80146002\" codeSystem=\"2.16.840.1.113883.6.96\"><originalText><reference value=\"#H-PROC\"/></originalText></code>\n              <statusCode code=\"completed\"/>\n            </procedure>\n          </entry>\n        </section>\n      </component>\n    </structuredBody>\n  </component>\n</ClinicalDocument>\n"}, "expectedGraph": {"file": "fixtures/expected/section-text-referenced-in-a-header-row.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/expected/section-text-referenced-in-a-header-row.ttl", "text": "@prefix bridge: <https://ns.cascadeprotocol.org/bridge/v1-draft#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix cascade: <https://ns.cascadeprotocol.org/cascade#> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix prov: <http://www.w3.org/ns/prov#> .\n@prefix org: <http://www.w3.org/ns/org#> .\n@prefix oa: <http://www.w3.org/ns/oa#> .\n<urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> a cascade:Organization .\n<ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> prov:wasGeneratedBy _:a8106807533bd68a2241fdeeffd4f72e ;\n\tprov:wasAttributedTo <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> .\n_:a8106807533bd68a2241fdeeffd4f72e prov:qualifiedAssociation _:d699842ad31512a461180393faab714f .\n_:d699842ad31512a461180393faab714f prov:agent <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> ;\n\tprov:hadRole cascade:CustodianRole .\n<ni:///sha-256;grKi0ms_W2WGoIJBSajj9WqQqFYdSHTIaehKWGv5yRg> prov:specializationOf <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> .\n_:ee7da964d86dac65e9d3bef2a3b21a79 bridge:arrivedAs <ni:///sha-256;grKi0ms_W2WGoIJBSajj9WqQqFYdSHTIaehKWGv5yRg> ;\n\toa:hasSelector _:d65b9dba81be11357523c22581a3b18b .\n_:d65b9dba81be11357523c22581a3b18b a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='custodian' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='assignedCustodian' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='representedCustodianOrganization' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n<ni:///sha-256;grKi0ms_W2WGoIJBSajj9WqQqFYdSHTIaehKWGv5yRg> foaf:name \"Riverside Community Hospital\" ;\n\torg:identifier \"urn:oid:2.16.840.1.113883.19.5.99999.3\"^^<urn:ietf:rfc:3986> .\n<ni:///sha-256;boaagE02MN5T-bYOw3Fqkm-kLwC9_iRJ_L49fbxMt5s> cascade:noteOrDocumentDate \"2026-11-04T09:00:00-05:00\"^^xsd:dateTime ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTitle \"Procedures\" ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/47519-4> ;\n\tcascade:narrativeText \"Header kept\\nOther kept row\" .\n<ni:///sha-256;8OhFhApPXbNaEpnniPsDDmUOh7GZ3tQ3brvo1CVgP0c> foaf:familyName \"Ahmadi\" ;\n\tfoaf:givenName \"Robin\" ;\n\tcascade:dateOfBirth \"1978-02-14\"^^xsd:date ;\n\tcascade:administrativeGender \"female\" .\n<ni:///sha-256;dJ_RgZVyXm92f5VIO3ArDzNOTjDIxm8BH0LtkwoGcRA> cascade:procedureName \"Appendectomy 2010\" ;\n\tcascade:workflowStatus \"completed\" ;\n\tcascade:procedureCode <http://snomed.info/id/80146002> .\n<urn:uuid:ed62f5a3-7994-8c3c-9b4a-9f1f41a1aba4> a cascade:PatientProfile ;\n\tcascade:sourceUrl <urn:hl7ii:2.16.840.1.113883.19.5.99999.2:MRN-448120> ;\n\tcascade:sourceRecordId \"2.16.840.1.113883.19.5.99999.2:MRN-448120\" .\n<ni:///sha-256;8OhFhApPXbNaEpnniPsDDmUOh7GZ3tQ3brvo1CVgP0c> prov:specializationOf <urn:uuid:ed62f5a3-7994-8c3c-9b4a-9f1f41a1aba4> .\n_:bbb07e4cf139d9e2bb46f666ea7d1e7e a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='recordTarget' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='patientRole' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:2da53d8e39a4c1ceb06774fe4a2aab17 bridge:arrivedAs <ni:///sha-256;8OhFhApPXbNaEpnniPsDDmUOh7GZ3tQ3brvo1CVgP0c> ;\n\toa:hasSelector _:bbb07e4cf139d9e2bb46f666ea7d1e7e .\n<urn:uuid:0499b3a7-19de-89f0-b756-4a69d512a15f> a cascade:MedicalProcedure ;\n\tcascade:sourceUrl <urn:hl7ii:1.2.3:P-1> ;\n\tcascade:sourceRecordId \"1.2.3:P-1\" .\n<ni:///sha-256;dJ_RgZVyXm92f5VIO3ArDzNOTjDIxm8BH0LtkwoGcRA> prov:specializationOf <urn:uuid:0499b3a7-19de-89f0-b756-4a69d512a15f> ;\n\tcascade:patient <urn:uuid:ed62f5a3-7994-8c3c-9b4a-9f1f41a1aba4> .\n_:e60b40b9b2111e7a523b91e110b194c0 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='structuredBody' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='section' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='entry' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='procedure' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:831757ee480f5c5d6c4a014d1f05952a bridge:arrivedAs <ni:///sha-256;dJ_RgZVyXm92f5VIO3ArDzNOTjDIxm8BH0LtkwoGcRA> ;\n\toa:hasSelector _:e60b40b9b2111e7a523b91e110b194c0 .\n<urn:uuid:1483c584-6143-8581-b0ba-e060fce36d18> a cascade:ClinicalNoteOrDocument .\n<ni:///sha-256;boaagE02MN5T-bYOw3Fqkm-kLwC9_iRJ_L49fbxMt5s> prov:specializationOf <urn:uuid:1483c584-6143-8581-b0ba-e060fce36d18> ;\n\tcascade:patient <urn:uuid:ed62f5a3-7994-8c3c-9b4a-9f1f41a1aba4> .\n_:c5bfade5bbc61ed011afa94b664c71c a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='structuredBody' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='section' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:37ab9b638302994b2f95c9aa7d49d11a bridge:arrivedAs <ni:///sha-256;boaagE02MN5T-bYOw3Fqkm-kLwC9_iRJ_L49fbxMt5s> ;\n\toa:hasSelector _:c5bfade5bbc61ed011afa94b664c71c .\n_:831757ee480f5c5d6c4a014d1f05952a oa:hasSource <ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> ;\n\tprov:wasDerivedFrom <ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> ;\n\tprov:wasGeneratedBy _:da7da831d166c60cc01590bac835f223 .\n_:37ab9b638302994b2f95c9aa7d49d11a oa:hasSource <ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> ;\n\tprov:wasDerivedFrom <ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> ;\n\tprov:wasGeneratedBy _:da7da831d166c60cc01590bac835f223 .\n_:ee7da964d86dac65e9d3bef2a3b21a79 oa:hasSource <ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> ;\n\tprov:wasDerivedFrom <ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> ;\n\tprov:wasGeneratedBy _:da7da831d166c60cc01590bac835f223 .\n_:2da53d8e39a4c1ceb06774fe4a2aab17 oa:hasSource <ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> ;\n\tprov:wasDerivedFrom <ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> ;\n\tprov:wasGeneratedBy _:da7da831d166c60cc01590bac835f223 .\n<ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> <http://purl.org/pav/retrievedOn> \"2025-07-02T09:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:52b665b2953afe38264c22e3add29cc5 .\n_:48c9250ad8d092c9054725476f8c06a2 prov:agent _:7e7050bc945019cb162c40c6dd0b71ac ;\n\tprov:hadRole cascade:TransmitterRole .\n_:52b665b2953afe38264c22e3add29cc5 prov:qualifiedAssociation _:48c9250ad8d092c9054725476f8c06a2 .\n_:7e7050bc945019cb162c40c6dd0b71ac <http://www.w3.org/2000/01/rdf-schema#label> \"Riverside patient portal\" .\n_:da7da831d166c60cc01590bac835f223 <http://www.w3.org/2000/01/rdf-schema#label> \"C-CDA download\" ;\n\tprov:startedAtTime \"2025-07-02T09:00:04Z\"^^xsd:dateTime .\n<ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> a prov:Entity .\n_:da7da831d166c60cc01590bac835f223 a prov:Activity ;\n\tprov:used <ni:///sha-256;QSVm37qSA7Kdq_xoTymunZRBZI0vw-w-O_Hr-ij9-y4> ;\n\tprov:qualifiedAssociation _:6a6d94a00950abcce2bf0ec3b57566fd .\n_:6a6d94a00950abcce2bf0ec3b57566fd prov:hadPlan _:d9c0761329370a2a88a92c953652a0fd .\n_:d9c0761329370a2a88a92c953652a0fd a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"ccda\" ;\n\t<http://purl.org/pav/version> \"0.1.0\" .\n_:6a6d94a00950abcce2bf0ec3b57566fd prov:agent _:67951e44e6c51f1f300a63bf5a7450f8 .\n_:67951e44e6c51f1f300a63bf5a7450f8 a prov:SoftwareAgent ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"Cascade Bridge for Rust\" ;\n\t<http://purl.org/pav/version> \"0.1.0\" .\n"}, "expectedFindings": {"file": "fixtures/findings/section-text-referenced-in-a-header-row.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/findings/section-text-referenced-in-a-header-row.ttl", "text": "@prefix ccda: <https://ns.cascadeprotocol.org/adapter/ccda/v1-draft#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix sh: <http://www.w3.org/ns/shacl#> .\n@prefix oa: <http://www.w3.org/ns/oa#> .\n_:cff3c7f5321347c2f37ff1e1be43e54b a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:b8f9b06bf22fa644a19336b70716e643 a oa:XPathSelector ;\n\trdf:value \"*[local-name()='author' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:cff3c7f5321347c2f37ff1e1be43e54b oa:refinedBy _:b8f9b06bf22fa644a19336b70716e643 .\n_:eb8d96b5c25fc449b730f9723d9da6dd a oa:Annotation ;\n\toa:hasTarget _:e482742e77be3ae6ad235b69a2b65c82 .\n_:e482742e77be3ae6ad235b69a2b65c82 oa:hasSource <../in/section-text-referenced-in-a-header-row.xml> ;\n\toa:hasSelector _:cff3c7f5321347c2f37ff1e1be43e54b .\n_:eb8d96b5c25fc449b730f9723d9da6dd oa:hasBody ccda:documentAuthor ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='author' and namespace-uri()='urn:hl7-org:v3']\" ;\n\tsh:resultSeverity sh:Info .\n_:c493ee8fd6c1724bf6c095423551b926 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:e3615a0ec9868e01180e2c24c65d523 oa:hasSource <../in/section-text-referenced-in-a-header-row.xml> .\n_:c493ee8fd6c1724bf6c095423551b926 oa:refinedBy _:ecbf5e983acd7ec3bdf392c64c86fc7e .\n_:ecbf5e983acd7ec3bdf392c64c86fc7e a oa:XPathSelector ;\n\trdf:value \"*[local-name()='id' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:e3615a0ec9868e01180e2c24c65d523 oa:hasSelector _:c493ee8fd6c1724bf6c095423551b926 .\n_:d96d9f5925e5a08542f19acd36cbc902 oa:hasTarget _:e3615a0ec9868e01180e2c24c65d523 .\n_:faf0668f8d2f403db77fd170703a540d a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:b316a31c5207f99b3da50dfd143f74e0 oa:hasSource <../in/section-text-referenced-in-a-header-row.xml> .\n_:faf0668f8d2f403db77fd170703a540d oa:refinedBy _:cb47f8dc32c5b6b82f3cb607f8bd3b26 .\n_:cb47f8dc32c5b6b82f3cb607f8bd3b26 a oa:XPathSelector ;\n\trdf:value \"*[local-name()='code' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:b316a31c5207f99b3da50dfd143f74e0 oa:hasSelector _:faf0668f8d2f403db77fd170703a540d .\n_:d709be1dab437852db45011802d7aa6c oa:hasTarget _:b316a31c5207f99b3da50dfd143f74e0 .\n_:d96d9f5925e5a08542f19acd36cbc902 sh:resultSeverity sh:Info .\n_:d709be1dab437852db45011802d7aa6c sh:resultSeverity sh:Info .\n_:d96d9f5925e5a08542f19acd36cbc902 a oa:Annotation ;\n\toa:hasBody ccda:documentId ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"2.16.840.1.113883.19.5.99999.1|CCD-2026-1104-F\" .\n_:d709be1dab437852db45011802d7aa6c a oa:Annotation ;\n\toa:hasBody ccda:documentType ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"34133-9\" .\n", "empty": false}}