{"name": "unstructured-document-pdf", "comment": "An Unstructured Document whose nonXMLBody holds a base64 PDF: one note with its attachment, application/pdf, and no text, and the finding ccda:noteDataNotRead.", "input": {"file": "fixtures/in/unstructured-document-pdf.xml", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/in/unstructured-document-pdf.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.10\" extension=\"2015-08-01\"/>\n  <id root=\"2.16.840.1.113883.19.5.99999.1\" extension=\"UD-2026-1030-P\"/>\n  <code code=\"18842-5\" displayName=\"Discharge summary\" codeSystem=\"2.16.840.1.113883.6.1\" codeSystemName=\"LOINC\"/>\n  <title>Discharge Summary</title>\n  <effectiveTime value=\"20261030090000-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=\"20261030090000-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    <nonXMLBody>\n      <text mediaType=\"application/pdf\" representation=\"B64\">JVBERi0xLjQK</text>\n    </nonXMLBody>\n  </component>\n</ClinicalDocument>\n"}, "expectedGraph": {"file": "fixtures/expected/unstructured-document-pdf.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/expected/unstructured-document-pdf.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;9k0PKOPqJefnZU3NPi-ZIvkFrhRSAF_gmqZYUT7axpo> prov:wasGeneratedBy _:e29acb716525e8d18e200efdf87ceba ;\n\tprov:wasAttributedTo <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> .\n_:e29acb716525e8d18e200efdf87ceba prov:qualifiedAssociation _:e6accd7ad97028d82cefb7a26c56b6b3 .\n_:e6accd7ad97028d82cefb7a26c56b6b3 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_:accd4ff83273ca073db2bf15ee64eaa7 bridge:arrivedAs <ni:///sha-256;grKi0ms_W2WGoIJBSajj9WqQqFYdSHTIaehKWGv5yRg> ;\n\toa:hasSelector _:f7bbb7783360e437f93f543d868be883 .\n_:f7bbb7783360e437f93f543d868be883 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;RdLuUBlXuh2-7NBOsIVnYODoG3HGu_aOnodT_NoTCGk> cascade:noteOrDocumentTypeName \"Discharge summary\" ;\n\tcascade:noteOrDocumentDate \"2026-10-30T09:00:00-05:00\"^^xsd:dateTime ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/18842-5> ;\n\tcascade:noteOrDocumentMasterIdentifier \"UD-2026-1030-P\"^^<urn:oid:2.16.840.1.113883.19.5.99999.1> ;\n\tcascade:attachment <ni:///sha-256;RdLuUBlXuh2-7NBOsIVnYODoG3HGu_aOnodT_NoTCGk#attachment-1> .\n<ni:///sha-256;RdLuUBlXuh2-7NBOsIVnYODoG3HGu_aOnodT_NoTCGk#attachment-1> cascade:attachmentContentType \"application/pdf\" .\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<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_:b14dd16c94e69fcadaef2893fd90ddb4 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_:664af99c1168aface2db2808725478f3 bridge:arrivedAs <ni:///sha-256;8OhFhApPXbNaEpnniPsDDmUOh7GZ3tQ3brvo1CVgP0c> ;\n\toa:hasSelector _:b14dd16c94e69fcadaef2893fd90ddb4 .\n<urn:uuid:3b6edf9e-a0de-838c-9e03-81c5a19af9d7> a cascade:ClinicalNoteOrDocument ;\n\tcascade:sourceUrl <urn:hl7ii:2.16.840.1.113883.19.5.99999.1:UD-2026-1030-P> ;\n\tcascade:sourceRecordId \"2.16.840.1.113883.19.5.99999.1:UD-2026-1030-P\" .\n<ni:///sha-256;RdLuUBlXuh2-7NBOsIVnYODoG3HGu_aOnodT_NoTCGk> prov:specializationOf <urn:uuid:3b6edf9e-a0de-838c-9e03-81c5a19af9d7> ;\n\tcascade:patient <urn:uuid:ed62f5a3-7994-8c3c-9b4a-9f1f41a1aba4> .\n_:b29efb22773a57295368b069f7311245 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()='nonXMLBody' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:3f1f3d62f26ea4fe0070d346ecd860c8 bridge:arrivedAs <ni:///sha-256;RdLuUBlXuh2-7NBOsIVnYODoG3HGu_aOnodT_NoTCGk> ;\n\toa:hasSelector _:b29efb22773a57295368b069f7311245 ;\n\toa:hasSource <ni:///sha-256;9k0PKOPqJefnZU3NPi-ZIvkFrhRSAF_gmqZYUT7axpo> ;\n\tprov:wasDerivedFrom <ni:///sha-256;9k0PKOPqJefnZU3NPi-ZIvkFrhRSAF_gmqZYUT7axpo> ;\n\tprov:wasGeneratedBy _:8c061ed3c80475a5ae773abfc6580081 .\n_:accd4ff83273ca073db2bf15ee64eaa7 oa:hasSource <ni:///sha-256;9k0PKOPqJefnZU3NPi-ZIvkFrhRSAF_gmqZYUT7axpo> ;\n\tprov:wasDerivedFrom <ni:///sha-256;9k0PKOPqJefnZU3NPi-ZIvkFrhRSAF_gmqZYUT7axpo> ;\n\tprov:wasGeneratedBy _:8c061ed3c80475a5ae773abfc6580081 .\n_:664af99c1168aface2db2808725478f3 oa:hasSource <ni:///sha-256;9k0PKOPqJefnZU3NPi-ZIvkFrhRSAF_gmqZYUT7axpo> ;\n\tprov:wasDerivedFrom <ni:///sha-256;9k0PKOPqJefnZU3NPi-ZIvkFrhRSAF_gmqZYUT7axpo> ;\n\tprov:wasGeneratedBy _:8c061ed3c80475a5ae773abfc6580081 .\n<ni:///sha-256;9k0PKOPqJefnZU3NPi-ZIvkFrhRSAF_gmqZYUT7axpo> <http://purl.org/pav/retrievedOn> \"2025-07-02T09:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:991048bdf71ef4a3bf2bebed8ddcc5e .\n_:14f1ab13f35e75161277ff82ce771841 prov:agent _:3fb6d2d0ea3c0c4b1090bd0ad4437c34 ;\n\tprov:hadRole cascade:TransmitterRole .\n_:991048bdf71ef4a3bf2bebed8ddcc5e prov:qualifiedAssociation _:14f1ab13f35e75161277ff82ce771841 .\n_:3fb6d2d0ea3c0c4b1090bd0ad4437c34 <http://www.w3.org/2000/01/rdf-schema#label> \"Riverside patient portal\" .\n_:8c061ed3c80475a5ae773abfc6580081 <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;9k0PKOPqJefnZU3NPi-ZIvkFrhRSAF_gmqZYUT7axpo> a prov:Entity .\n_:8c061ed3c80475a5ae773abfc6580081 a prov:Activity ;\n\tprov:used <ni:///sha-256;9k0PKOPqJefnZU3NPi-ZIvkFrhRSAF_gmqZYUT7axpo> ;\n\tprov:qualifiedAssociation _:5c9d060f01e59190f7b7b56d687030f5 .\n_:5c9d060f01e59190f7b7b56d687030f5 prov:hadPlan _:c0d6d94bc4c2f4ada7b7cc56b63a6f77 .\n_:c0d6d94bc4c2f4ada7b7cc56b63a6f77 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_:5c9d060f01e59190f7b7b56d687030f5 prov:agent _:8615badf69567d428371410d8124d28c .\n_:8615badf69567d428371410d8124d28c 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/unstructured-document-pdf.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/findings/unstructured-document-pdf.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_:f33319219babb53bfb8c6ec930deef24 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:dce007392135e08e288df3738eb96b8c a oa:XPathSelector ;\n\trdf:value \"*[local-name()='author' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:f33319219babb53bfb8c6ec930deef24 oa:refinedBy _:dce007392135e08e288df3738eb96b8c .\n_:f20bb325bcb4fdecd02409eac57689f1 a oa:Annotation ;\n\toa:hasTarget _:e1bb06299a224802904285b825de3f7b .\n_:e1bb06299a224802904285b825de3f7b oa:hasSource <../in/unstructured-document-pdf.xml> ;\n\toa:hasSelector _:f33319219babb53bfb8c6ec930deef24 .\n_:f20bb325bcb4fdecd02409eac57689f1 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_:e455d569cea349450c412bdb260d6b76 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:bc40ac36349e1b3d926606c11d5c3c78 oa:hasSource <../in/unstructured-document-pdf.xml> .\n_:e455d569cea349450c412bdb260d6b76 oa:refinedBy _:b71a0f40c61ee255b74e3e18590ef4a3 .\n_:b71a0f40c61ee255b74e3e18590ef4a3 a oa:XPathSelector ;\n\trdf:value \"*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='nonXMLBody' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:bc40ac36349e1b3d926606c11d5c3c78 oa:hasSelector _:e455d569cea349450c412bdb260d6b76 .\n_:c40495834299250946a3dd5165c3754b oa:hasTarget _:bc40ac36349e1b3d926606c11d5c3c78 ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody ccda:noteDataNotRead ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"application/pdf\" .\n", "empty": false}}