{"name": "unstructured-document-header-not-stated", "comment": "An Unstructured Document whose id, code and effectiveTime state only a nullFlavor: its note takes none of them, so the document's id, type and time are each a finding valued by the flavour, where a stated id, code and time of an unstructured document are findings of none.", "input": {"file": "fixtures/in/unstructured-document-header-not-stated.xml", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/in/unstructured-document-header-not-stated.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 nullFlavor=\"NI\"/>\n  <code nullFlavor=\"UNK\"/>\n  <title>Discharge Summary</title>\n  <effectiveTime nullFlavor=\"UNK\"/>\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=\"text/plain\" representation=\"B64\">RGlzY2hhcmdlIHN1bW1hcnkKQWRtaXR0ZWQgMjAyNi0xMC0yMCB3aXRoIGFuYWVtaWE7IEIxMiBsb3c7IHN0YXJ0ZWQgY3lhbm9jb2JhbGFtaW4u</text>\n    </nonXMLBody>\n  </component>\n</ClinicalDocument>\n"}, "expectedGraph": {"file": "fixtures/expected/unstructured-document-header-not-stated.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/expected/unstructured-document-header-not-stated.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;h0XUH6oVwMJIkFquOKTkzw3uAK3zYYadElVuF8kXWbo> prov:wasGeneratedBy _:c2d219436faeb330de16d1a4155db734 ;\n\tprov:wasAttributedTo <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> .\n_:c2d219436faeb330de16d1a4155db734 prov:qualifiedAssociation _:cf1bf5acc452506b4f62ff2544697b5d .\n_:cf1bf5acc452506b4f62ff2544697b5d 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_:1e7ccca39bf0f3421263bf3daf93b385 bridge:arrivedAs <ni:///sha-256;grKi0ms_W2WGoIJBSajj9WqQqFYdSHTIaehKWGv5yRg> ;\n\toa:hasSelector _:b3a1af114eb5f5d58d530a4c3529082a .\n_:b3a1af114eb5f5d58d530a4c3529082a 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;LLjTWZIfHfsbeY12oO65MLr5lb4cYoV49jjLAbE35FA> cascade:workflowStatus \"current\" ;\n\tcascade:narrativeText \"Discharge summary\\nAdmitted 2026-10-20 with anaemia; B12 low; started cyanocobalamin.\" ;\n\tcascade:attachment <ni:///sha-256;LLjTWZIfHfsbeY12oO65MLr5lb4cYoV49jjLAbE35FA#attachment-1> .\n<ni:///sha-256;LLjTWZIfHfsbeY12oO65MLr5lb4cYoV49jjLAbE35FA#attachment-1> cascade:attachmentContentType \"text/plain\" .\n<ni:///sha-256;8OhFhApPXbNaEpnniPsDDmUOh7GZ3tQ3brvo1CVgP0c> foaf:givenName \"Robin\" ;\n\tfoaf:familyName \"Ahmadi\" ;\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_:c8e6c5bcc73eb4fd198b21acb586f33f 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_:34cde5dab7eecea99f38eff166f3bf0 bridge:arrivedAs <ni:///sha-256;8OhFhApPXbNaEpnniPsDDmUOh7GZ3tQ3brvo1CVgP0c> ;\n\toa:hasSelector _:c8e6c5bcc73eb4fd198b21acb586f33f .\n<urn:uuid:28511049-cc3b-8db1-9e3c-8676a6b10a4b> a cascade:ClinicalNoteOrDocument .\n<ni:///sha-256;LLjTWZIfHfsbeY12oO65MLr5lb4cYoV49jjLAbE35FA> prov:specializationOf <urn:uuid:28511049-cc3b-8db1-9e3c-8676a6b10a4b> ;\n\tcascade:patient <urn:uuid:ed62f5a3-7994-8c3c-9b4a-9f1f41a1aba4> .\n_:da6784493ee242671b873b069e2ee799 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_:4db29704c50a1a29d3cdf3a3103797df bridge:arrivedAs <ni:///sha-256;LLjTWZIfHfsbeY12oO65MLr5lb4cYoV49jjLAbE35FA> ;\n\toa:hasSelector _:da6784493ee242671b873b069e2ee799 ;\n\toa:hasSource <ni:///sha-256;h0XUH6oVwMJIkFquOKTkzw3uAK3zYYadElVuF8kXWbo> ;\n\tprov:wasDerivedFrom <ni:///sha-256;h0XUH6oVwMJIkFquOKTkzw3uAK3zYYadElVuF8kXWbo> ;\n\tprov:wasGeneratedBy _:7e8dcde256092d32b9b1e5aa87ebfd63 .\n_:1e7ccca39bf0f3421263bf3daf93b385 oa:hasSource <ni:///sha-256;h0XUH6oVwMJIkFquOKTkzw3uAK3zYYadElVuF8kXWbo> ;\n\tprov:wasDerivedFrom <ni:///sha-256;h0XUH6oVwMJIkFquOKTkzw3uAK3zYYadElVuF8kXWbo> ;\n\tprov:wasGeneratedBy _:7e8dcde256092d32b9b1e5aa87ebfd63 .\n_:34cde5dab7eecea99f38eff166f3bf0 oa:hasSource <ni:///sha-256;h0XUH6oVwMJIkFquOKTkzw3uAK3zYYadElVuF8kXWbo> ;\n\tprov:wasDerivedFrom <ni:///sha-256;h0XUH6oVwMJIkFquOKTkzw3uAK3zYYadElVuF8kXWbo> ;\n\tprov:wasGeneratedBy _:7e8dcde256092d32b9b1e5aa87ebfd63 .\n<ni:///sha-256;h0XUH6oVwMJIkFquOKTkzw3uAK3zYYadElVuF8kXWbo> <http://purl.org/pav/retrievedOn> \"2025-07-02T09:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:ce57edd8d733600c32890f22fb154a49 .\n_:73c94e204cc65623fe05e59759a30343 prov:agent _:8c44df849afac31be382005b5dc26046 ;\n\tprov:hadRole cascade:TransmitterRole .\n_:ce57edd8d733600c32890f22fb154a49 prov:qualifiedAssociation _:73c94e204cc65623fe05e59759a30343 .\n_:8c44df849afac31be382005b5dc26046 <http://www.w3.org/2000/01/rdf-schema#label> \"Riverside patient portal\" .\n_:7e8dcde256092d32b9b1e5aa87ebfd63 <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;h0XUH6oVwMJIkFquOKTkzw3uAK3zYYadElVuF8kXWbo> a prov:Entity .\n_:7e8dcde256092d32b9b1e5aa87ebfd63 a prov:Activity ;\n\tprov:used <ni:///sha-256;h0XUH6oVwMJIkFquOKTkzw3uAK3zYYadElVuF8kXWbo> ;\n\tprov:qualifiedAssociation _:8030954cabecac32484b9fb16e6cc63d .\n_:8030954cabecac32484b9fb16e6cc63d prov:hadPlan _:2ae2534bac49d7b39ee99a0cf676b3cc .\n_:2ae2534bac49d7b39ee99a0cf676b3cc 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_:8030954cabecac32484b9fb16e6cc63d prov:agent _:7041ffa3adcb3e8272c9503e35c09435 .\n_:7041ffa3adcb3e8272c9503e35c09435 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-header-not-stated.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/findings/unstructured-document-header-not-stated.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_:b9b734216c62cc761c68ce3beb3b8a28 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:f9782a004de2d704f8fda9a94f800072 a oa:XPathSelector ;\n\trdf:value \"*[local-name()='author' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:b9b734216c62cc761c68ce3beb3b8a28 oa:refinedBy _:f9782a004de2d704f8fda9a94f800072 .\n_:de81fd174e29381e497a76233a7964fb a oa:Annotation ;\n\toa:hasTarget _:d3da5bbff7038bb7d5d0d5ee78c64f97 .\n_:d3da5bbff7038bb7d5d0d5ee78c64f97 oa:hasSource <../in/unstructured-document-header-not-stated.xml> ;\n\toa:hasSelector _:b9b734216c62cc761c68ce3beb3b8a28 .\n_:de81fd174e29381e497a76233a7964fb 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_:ca82b539f10ab95bff6beadf94ed239c a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:e972a9ae228a56b35dfdadd04bf5795c oa:hasSource <../in/unstructured-document-header-not-stated.xml> .\n_:ca82b539f10ab95bff6beadf94ed239c oa:refinedBy _:d580ec62cbf2fc5fda083bb0ac23a725 .\n_:d580ec62cbf2fc5fda083bb0ac23a725 a oa:XPathSelector ;\n\trdf:value \"*[local-name()='id' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:e972a9ae228a56b35dfdadd04bf5795c oa:hasSelector _:ca82b539f10ab95bff6beadf94ed239c .\n_:a343fbcff9fd13ceaa1aa0014acee6fc oa:hasTarget _:e972a9ae228a56b35dfdadd04bf5795c .\n_:ebab53fde265db432698370b09f8cdca a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:d3f43a8191dfef30d5188d11b206bd46 oa:hasSource <../in/unstructured-document-header-not-stated.xml> .\n_:ebab53fde265db432698370b09f8cdca oa:refinedBy _:e9920f87bd78ac13a2bfdc8dc9492c59 .\n_:e9920f87bd78ac13a2bfdc8dc9492c59 a oa:XPathSelector ;\n\trdf:value \"*[local-name()='code' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:d3f43a8191dfef30d5188d11b206bd46 oa:hasSelector _:ebab53fde265db432698370b09f8cdca .\n_:eb8febffc963d37f9c3c0ed439dcf399 oa:hasTarget _:d3f43a8191dfef30d5188d11b206bd46 .\n_:ab373098acfc4e7da880751b7483aa1 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:f97dfd4e392da1ff9b945917f9c50b15 oa:hasSource <../in/unstructured-document-header-not-stated.xml> .\n_:ab373098acfc4e7da880751b7483aa1 oa:refinedBy _:aa785b6c3d7770b6db6aed5d409721ec .\n_:aa785b6c3d7770b6db6aed5d409721ec a oa:XPathSelector ;\n\trdf:value \"*[local-name()='effectiveTime' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:f97dfd4e392da1ff9b945917f9c50b15 oa:hasSelector _:ab373098acfc4e7da880751b7483aa1 .\n_:e70cb4f4d5055c33feb6ede513ca968b oa:hasTarget _:f97dfd4e392da1ff9b945917f9c50b15 .\n_:a343fbcff9fd13ceaa1aa0014acee6fc sh:resultSeverity sh:Info .\n_:eb8febffc963d37f9c3c0ed439dcf399 sh:resultSeverity sh:Info .\n_:e70cb4f4d5055c33feb6ede513ca968b sh:resultSeverity sh:Info .\n_:a343fbcff9fd13ceaa1aa0014acee6fc a oa:Annotation ;\n\toa:hasBody ccda:documentId ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"NI\" .\n_:eb8febffc963d37f9c3c0ed439dcf399 a oa:Annotation ;\n\toa:hasBody ccda:documentType ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"UNK\" .\n_:e70cb4f4d5055c33feb6ede513ca968b a oa:Annotation ;\n\toa:hasBody ccda:documentTime ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"UNK\" .\n", "empty": false}}